[−][src]Macro safe_arch::insert_m128i_to_m256i
This is supported with target feature
avx
only.Inserts an m128i
to an m256i
at the high or low position.
- First arg: the
m256i
register to insert to - Second arg: the
m128i
register to be inserted - Third arg: 0 or 1 to target either the low or high half for insertion.
let a = m256i::from([0_i32; 8]); let b: [i32; 8] = insert_m128i_to_m256i!(a, m128i::from([1, 2, 3, 4]), 1).into(); assert_eq!(b, [0, 0, 0, 0, 1, 2, 3, 4]);
- Intrinsic:
_mm256_inserti128_si256
- Assembly:
vinserti128 ymm, ymm, xmm, imm8