Function safe_arch::shl_all_u16_m256i
source ยท pub fn shl_all_u16_m256i(a: m256i, count: m128i) -> m256i
Available with target feature
avx2
only.Expand description
Lanewise u16
shift left by the lower u64
lane of count
.
let a = m256i::from([5_u16, 6, 2, 5, 4, 3, 1, 0, 12, 13, 56, 21, 8, 7, 6, 5]);
let count = m128i::from(1_u128);
let b: [u16; 16] = shl_all_u16_m256i(a, count).into();
assert_eq!(b, [10, 12, 4, 10, 8, 6, 2, 0, 24, 26, 112, 42, 16, 14, 12, 10]);
- Intrinsic:
_mm256_sll_epi16
- Assembly:
vpsllw ymm, ymm, xmm