[][src]Function safe_arch::pack_i32_to_u16_m128i

#[must_use]pub fn pack_i32_to_u16_m128i(a: m128i, b: m128i) -> m128i
This is supported with target feature sse4.1 only.

Saturating convert i32 to u16, and pack the values.

let a = m128i::from([1, 2, 3, 4]);
let b = m128i::from([9, -10, -11, i32::MAX]);
let c: [u16; 8] = pack_i32_to_u16_m128i(a, b).into();
assert_eq!(c, [1, 2, 3, 4, 9, 0, 0, u16::MAX]);