[−][src]Function safe_arch::abs_i8_m128i
#[must_use]pub fn abs_i8_m128i(a: m128i) -> m128i
This is supported with target feature
ssse3
only.Lanewise absolute value with lanes as i8
.
This is a "wrapping" absolute value, so i8::MIN
stays as i8::MIN
.
let a = m128i::from([ 0_i8, -1, 2, -3, 4, -5, 6, -7, -8, 9, -10, 11, -12, 13, -14, -128, ]); let c: [i8; 16] = abs_i8_m128i(a).into(); assert_eq!(c, [0_i8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -128]);