Function safe_arch::pack_i16_to_i8_m128i
source · pub fn pack_i16_to_i8_m128i(a: m128i, b: m128i) -> m128i
Expand description
Saturating convert i16
to i8
, and pack the values.
let a = m128i::from([1_i16, 2, 3, 4, 5, 6, 7, 8]);
let b = m128i::from([9_i16, 10, 11, 12, 13, 14, 15, 16]);
let c: [i8; 16] = pack_i16_to_i8_m128i(a, b).into();
assert_eq!(c, [1_i8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);