Skip to main content
Log in

Mojo function

dot_i8_to_i32_x86

dot_i8_to_i32_x86[width: Int, a_type: DType, b_type: DType, c_type: DType](src: SIMD[c_type, width], a: SIMD[a_type, width], b: SIMD[b_type, width]) -> SIMD[c_type, width]

The dot product of the four bytes in each int32 element of a and b plus a int32 from src using VNNI or AVX2.

Constraints:

Requires AVX512_VNNI or AVX2. The size of the output vector must be 4, 8 or 16. The a argument has range [0,255]. The b argument has range [-128,127].

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:

  • src (SIMD[c_type, width]): A int32 SIMD vector.
  • a (SIMD[a_type, width]): A uint8 SIMD vector.
  • b (SIMD[b_type, width]): A int8 SIMD vector.

Returns:

A SIMD vector of width elements.

Was this page helpful?