Function safe_arch::shl_each_u32_m256i
source ยท pub fn shl_each_u32_m256i(a: m256i, count: m256i) -> m256i
Available with target feature
avx2
only.Expand description
Lanewise u32
shift left by the matching i32
lane in count
.
let a = m256i::from([0_u32, 1, 2, 13, 5, 6, 7, 1]);
let count = m256i::from([1_u32, 2, 3, 4, 5, 6, 7, 1]);
let b: [u32; 8] = shl_each_u32_m256i(a, count).into();
assert_eq!(b, [0, 4, 16, 208, 160, 384, 896, 2]);
- Intrinsic:
_mm256_sllv_epi32
- Assembly:
vpsllvd ymm, ymm, ymm