Function safe_arch::sub_horizontal_i32_m256i
source ยท pub fn sub_horizontal_i32_m256i(a: m256i, b: m256i) -> m256i
Available with target feature
avx2
only.Expand description
Horizontal a - b
with lanes as i32
.
- The results are interleaved 128-bits at a time: a.low, b.low, a.high, b.high
let a = m256i::from([5, 6, 2, 5, 4, 3, 1, 0]);
let b = m256i::from([-12, 13, 56, 21, 8, 7, 6, 5]);
let c: [i32; 8] = sub_horizontal_i32_m256i(a, b).into();
assert_eq!(c, [-1, -3, -25, 35, 1, 1, 1, 1]);
- Intrinsic:
_mm256_hsub_epi32
- Assembly:
vphsubd ymm, ymm, ymm