[][src]Macro safe_arch::multi_packed_sum_abs_diff_u8_m256i

macro_rules! multi_packed_sum_abs_diff_u8_m256i {
    ($a:expr, $b:expr, low a $la_pick:expr, low b $lb_pick:expr, high a $ha_pick:expr, high b $hb_pick:expr) => { ... };
}
This is supported with target feature avx2 only.

Computes eight u16 "sum of absolute difference" values according to the bytes selected.

  • This essentially works like two multi_packed_sum_abs_diff_u8_m128i uses happening at once, the "low" portion works on the lower 128 bits, and the "high" portion works on the upper 128 bits.
let a =
  m256i::from([5_u8; 32]);
let b =
  m256i::from([7_u8; 32]);
//
let c: [u16; 16] = multi_packed_sum_abs_diff_u8_m256i!(a, b, low a 0, low b 0, high a 1, high b 1).into();
assert_eq!(c, [8_u16; 16]);