[][src]Function safe_arch::mul_i16_horizontal_add_m256i

#[must_use]pub fn mul_i16_horizontal_add_m256i(a: m256i, b: m256i) -> m256i
This is supported with target feature avx2 only.

Multiply i16 lanes producing i32 values, horizontal add pairs of i32 values to produce the final output.

let a = m256i::from([
  1_i16, 2, 3, 4, -1, -2, -3, -4, 12, 13, -14, -15, 100, 200, 300, -400,
]);
let b = m256i::from([
  5_i16, 6, 7, 8, -15, -26, -37, 48, 50, 60, 70, -80, 90, 100, 12, -80,
]);
let c: [i32; 8] = mul_i16_horizontal_add_m256i(a, b).into();
assert_eq!(c, [17, 53, 67, -81, 1380, 220, 29000, 35600]);