[−][src]Macro safe_arch::shuffle_ai_f32_half_m256
This is supported with target feature
avx
only.Shuffle the f32
lanes in $a
using an immediate control value.
Each lane selection value picks only within that 128-bit half of the overall register. The same selection pattern is simply used for both the upper and lower 128 bits.
let a = m256::from_array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]); // let b = shuffle_ai_f32_half_m256!(a, [3, 1, 2, 0]).to_array(); assert_eq!(b, [4.0, 2.0, 3.0, 1.0, 8.0, 6.0, 7.0, 5.0]);
- Intrinsic:
_mm256_permute_ps
- Assembly:
vpermilps ymm, ymm, imm8