[−][src]Function safe_arch::average_u16_m128i
#[must_use]pub fn average_u16_m128i(a: m128i, b: m128i) -> m128i
This is supported with target feature
sse2
only.Lanewise average of the u16
values.
let a = m128i::from([u16::MAX, 0, 3, 4, 1, 2, 3, 4]); let b = m128i::from([u16::MAX, 0, 7, 8, 15, 26, 37, 48]); let c: [u16; 8] = average_u16_m128i(a, b).into(); assert_eq!(c, [u16::MAX, 0, 5, 6, 8, 14, 20, 26]);