Function average_u16_m256i
pub fn average_u16_m256i(a: m256i, b: m256i) -> m256i
Available on crate feature
dep_safe_arch
only.Expand description
Average u16
lanes.
let a = m256i::from([100_u16; 16]);
let b = m256i::from([120_u16; 16]);
let c: [u16; 16] = average_u16_m256i(a, b).into();
assert_eq!(c, [110_u16; 16]);
- Intrinsic:
_mm256_avg_epu16
- Assembly:
vpavgw ymm, ymm, ymm