Function safe_arch::shr_imm_i32_m256i
source ยท pub fn shr_imm_i32_m256i<const IMM: i32>(a: m256i) -> m256i
Available with target feature
avx2
only.Expand description
Shifts all i32
lanes left by an immediate.
let a = m256i::from([1_i32, 2, 3, 4, -1, -2, -3, -4]);
let c: [i32; 8] = shr_imm_i32_m256i::<1>(a).into();
assert_eq!(c, [0, 1, 1, 2, -1, -1, -2, -2]);
- Intrinsic:
_mm256_srai_epi32
- Assembly:
vpsrad ymm, ymm, imm8