[][src]Function safe_arch::load_masked_i32_m256i

#[must_use]pub fn load_masked_i32_m256i(a: &m256i, mask: m256i) -> m256i
This is supported with target feature avx2 only.

Loads the reference given and zeroes any i32 lanes not in the mask.

  • A lane is "in" the mask if that lane's mask value is set in the high bit (aka "if the lane's value is negative").
let a = m256i::from([5_i32; 8]);
let b =
  load_masked_i32_m256i(&a, m256i::from([-1_i32, 0, 0, -1, -1, -1, 0, 0]));
assert_eq!(<[i32; 8]>::from(b), [5, 0, 0, 5, 5, 5, 0, 0]);