[−][src]Function safe_arch::add_horizontal_saturating_i16_m128i
#[must_use]pub fn add_horizontal_saturating_i16_m128i(a: m128i, b: m128i) -> m128i
This is supported with target feature
ssse3
only.Add horizontal pairs of i16
values, saturating, pack the outputs as a
then b
.
let a = m128i::from([i16::MAX, i16::MAX, 3, 4, -1, -2, -3, -4]); let b = m128i::from([5_i16, 6, 7, 8, -15, -26, -37, 48]); let c: [i16; 8] = add_horizontal_saturating_i16_m128i(a, b).into(); assert_eq!(c, [i16::MAX, 7, -3, -7, 11, 15, -41, 11]);