[][src]Function safe_arch::sub_saturating_u8_m128i

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

Lanewise saturating a - b with lanes as u8.

let a =
  m128i::from([10_u8, 255, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 255]);
let b =
  m128i::from([1_u8, 1, 2, 13, 4, 15, 6, 17, 8, 19, 20, 21, 22, 23, 24, 127]);
let c: [u8; 16] = sub_saturating_u8_m128i(a, b).into();
assert_eq!(c, [9_u8, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]);