Function shr_each_i32_m256i
pub fn shr_each_i32_m256i(a: m256i, count: m256i) -> m256i
Available on crate feature
dep_safe_arch
only.Expand description
Lanewise i32
shift right by the matching i32
lane in count
.
let a = m256i::from([0_i32, 1111, -2999, -13888, 5444, 6222, 7333, -11111]);
let count = m256i::from([1_i32, 2, 3, 4, 5, 4, 3, 2]);
let b: [i32; 8] = shr_each_i32_m256i(a, count).into();
assert_eq!(b, [0, 277, -375, -868, 170, 388, 916, -2778]);
- Intrinsic:
_mm256_srav_epi32
- Assembly:
vpsravd ymm, ymm, ymm