IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

dot_i16_to_i32_AVX2

def dot_i16_to_i32_AVX2[width: Int, a_type: DType, b_type: DType, c_type: DType](src: SIMD[c_type, width], a: SIMD[a_type, (width * 2)], b: SIMD[b_type, (width * 2)]) -> SIMD[c_type, width]

The dot product of the two words in each int32 element of a and b plus a int32 from src.

Constraints:

Requires AVX2. The size of the output vector must be 4, 8 or 16.

Parameters:

  • ​width (Int): Size of the output SIMD vector.
  • ​a_type (DType): The DType for a.
  • ​b_type (DType): The DType for b.
  • ​c_type (DType): The DType for c.

Args:

Returns:

SIMD[c_type, width]: A SIMD vector of width elements.