Skip to main content
Log in

Mojo function

reduce_add_simd

reduce_add_simd[simd_width: Int, step_simd_width: Int, type: DType](mut scalar: SIMD[type, 1], mut vector: SIMD[type, simd_width], val: SIMD[type, step_simd_width])

This functions adds val to either the scalar value or the vector value depending on the step_simd_width. This is useful when the simd_width varies between iterations as in vectorize.

Was this page helpful?