Function safe_arch::shuffle_ai_i32_half_m256i
source ยท pub fn shuffle_ai_i32_half_m256i<const IMM: i32>(a: m256i) -> m256i
Available with target feature
avx2
only.Expand description
Shuffle the i32
lanes in a
using an immediate control value.
Each lane selection value picks only within that 128-bit half of the overall register.
let a = m256i::from([5, 6, 7, 8, 9, 10, 11, 12]);
let b: [i32; 8] = shuffle_ai_i32_half_m256i::<0b00_01_10_11>(a).into();
assert_eq!(b, [8, 7, 6, 5, 12, 11, 10, 9]);
- Intrinsic:
_mm256_shuffle_epi32
- Assembly:
vpshufd ymm, ymm, imm8