[−][src]Macro safe_arch::blend_imm_i16_m256i
This is supported with target feature
avx2
only.Blends the i16
lanes according to the immediate value.
- The low 8 lanes and high 8 lanes both use the same immediate.
- Each bit in
0..=7
should be set for$b
and unset for$a
within that half of thei16
values.
let a = m256i::from([5_i16; 16]); let b = m256i::from([10_i16; 16]); // let c: [i16; 16] = blend_imm_i16_m256i!(a, b, 0b11001000).into(); assert_eq!(c, [5_i16, 5, 5, 10, 5, 5, 10, 10, 5, 5, 5, 10, 5, 5, 10, 10]);
- Intrinsic:
_mm256_blend_epi16
- Assembly:
vpblendw ymm, ymm, ymm, imm8