Function safe_arch::insert_i16_from_i32_m128i
source · pub fn insert_i16_from_i32_m128i<const LANE: i32>(a: m128i, i: i32) -> m128i
Expand description
Inserts the low 16 bits of an i32
value into an m128i
.
The lane to get must be a constant in 0..8
.
let a = m128i::from([0xA_i16, 0xB, 0xC, 0xD, 0, 0, 0, 0]);
//
let b = insert_i16_from_i32_m128i::<0>(a, -1);
assert_eq!(<[i16; 8]>::from(b), [-1, 0xB, 0xC, 0xD, 0, 0, 0, 0]);