Function safe_arch::max_i16_m128i

source ยท
pub fn max_i16_m128i(a: m128i, b: m128i) -> m128i
Available with target feature sse2 only.
Expand description

Lanewise max(a, b) with lanes as i16.

let a = m128i::from([1_i16, 2, 3, 4, -1, -2, -3, -4]);
let b = m128i::from([5_i16, 6, 7, 8, -15, -26, -37, 48]);
let c: [i16; 8] = max_i16_m128i(a, b).into();
assert_eq!(c, [5_i16, 6, 7, 8, -1, -2, -3, 48]);