Function max_i8_m256i
pub fn max_i8_m256i(a: m256i, b: m256i) -> m256i
Available on crate feature
dep_safe_arch
only.Expand description
Lanewise max(a, b)
with lanes as i8
.
let a = m256i::from([
0_i8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 127, 1, 3, 5, 7, 2, 3, 5, 12, 13, 16, 27,
28, 29, 30, 31, 32,
]);
let b = m256i::from([
0_i8, 11, 2, -13, 4, 15, 6, -17, -8, 19, -20, 21, 22, -23, 24, 127, 0, -1, 3, 4, 5, 1, -2, -4,
-8, 12, 13, 14, 29, 30, -31, -32,
]);
let c: [i8; 32] = max_i8_m256i(a, b).into();
assert_eq!(
c,
[
0, 11, 2, 3, 4, 15, 6, 7, 8, 19, 10, 21, 22, 13, 24, 127, 1, 3, 5, 7, 5, 3, 5, 12, 13, 16,
27, 28, 29, 30, 31, 32
]
);
- Intrinsic:
_mm256_max_epi8
- Assembly:
vpmaxsb ymm, ymm, ymm