Struct mask32x16
pub struct mask32x16<S: Simd> { /* private fields */ }
A SIMD mask of 16 logical lanes corresponding to 32-bit vector elements.
The storage representation of this type is intentionally opaque and may vary depending on the SIMD level.
You can construct this mask type using the Self::splat, Self::from_bitmask, Self::from_slice, and Self::simd_from methods.
# use fearless_simd::{prelude::*, mask32x16};
fn construct_mask<S: Simd>(simd: S) {
// From a single boolean value:
let a = mask32x16::splat(simd, true);
let b = mask32x16::simd_from(simd, true);
// From signed integer mask lanes:
let c = mask32x16::from_slice(simd, &[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
let d = mask32x16::simd_from(simd, [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
// From a compact bitmask (same mask as above, least significant bit maps to lane 0):
let e = mask32x16::from_bitmask(simd, 0b0001);
// By setting individual lanes:
let mut f = mask32x16::splat(simd, false);
f.set(0, true);
}
Trait Implementations
impl<S: Clone + Simd> Clone for mask32x16<S>
where
S::mask32x16: Clone,
fn clone(&self) -> Self
impl<S: Copy + Simd> Copy for mask32x16<S>
where
S::mask32x16: Copy,
impl<S: Simd + Debug> Debug for mask32x16<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Simd> BitAnd for mask32x16<S>
type Output = mask32x16<S>;fn bitand(self, rhs: Self) -> Self::OutputCompute the logical AND of two masks.
impl<S: Simd> BitAndAssign for mask32x16<S>
fn bitand_assign(&mut self, rhs: Self)Compute the logical AND of two masks.
impl<S: Simd> BitOr for mask32x16<S>
type Output = mask32x16<S>;fn bitor(self, rhs: Self) -> Self::OutputCompute the logical OR of two masks.
impl<S: Simd> BitOrAssign for mask32x16<S>
fn bitor_assign(&mut self, rhs: Self)Compute the logical OR of two masks.
impl<S: Simd> BitXor for mask32x16<S>
type Output = mask32x16<S>;fn bitxor(self, rhs: Self) -> Self::OutputCompute the logical XOR of two masks.
impl<S: Simd> BitXorAssign for mask32x16<S>
fn bitxor_assign(&mut self, rhs: Self)Compute the logical XOR of two masks.
impl<S: Simd> ExtractToken for mask32x16<S>
type S = S;fn token(&self) -> S
impl<S: Simd> MaskNarrow<S> for mask32x16<S>
type Narrowed = mask16x32<S>;fn narrow(self, high: Self) -> Self::Narrowed
impl<S: Simd> MaskWiden<S> for mask32x16<S>
type Widened = mask64x8<S>;fn widen(self) -> (Self::Widened, Self::Widened)
impl<S: Simd> Not for mask32x16<S>
type Output = mask32x16<S>;fn not(self) -> Self::OutputCompute the logical NOT of the mask.
impl<S: Simd> Select<f32x16<S>> for mask32x16<S>
fn select(self, if_true: f32x16<S>, if_false: f32x16<S>) -> f32x16<S>
impl<S: Simd> Select<i32x16<S>> for mask32x16<S>
fn select(self, if_true: i32x16<S>, if_false: i32x16<S>) -> i32x16<S>
impl<S: Simd> Select<mask32x16<S>> for mask32x16<S>
fn select(self, if_true: mask32x16<S>, if_false: mask32x16<S>) -> mask32x16<S>
impl<S: Simd> Select<u32x16<S>> for mask32x16<S>
fn select(self, if_true: u32x16<S>, if_false: u32x16<S>) -> u32x16<S>
impl<S: Simd> SimdFrom<[i32; 16], S> for mask32x16<S>
fn simd_from(simd: S, val: [i32; 16]) -> Self
impl<S: Simd> SimdFrom<bool, S> for mask32x16<S>
fn simd_from(simd: S, value: bool) -> Self
impl<S: Simd> SimdFrom<u16, S> for mask32x16<S>
fn simd_from(simd: S, arch: __mmask16) -> Self
impl<S: Simd> SimdMask<S> for mask32x16<S>
type Element = i32;type Ints = i32x16<S>;const LEN: usize = 16;fn splat(simd: S, val: bool) -> Selffn from_bitmask(simd: S, bits: u64) -> Selffn to_bitmask(self) -> u64fn from_vector(vector: Self::Ints) -> Selffn to_vector(self) -> Self::Intsfn set(&mut self, index: usize, value: bool)fn from_slice(simd: S, slice: &[i32]) -> Selffn store_slice(&self, slice: &mut [i32])fn rotate_elements_left<const OFFSET: usize>(self) -> Selffn rotate_elements_right<const OFFSET: usize>(self) -> Selffn reverse(self) -> Selffn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Selffn simd_ne(self, rhs: impl SimdInto<Self, S>) -> Selffn any_true(self) -> boolfn all_true(self) -> boolfn any_false(self) -> boolfn all_false(self) -> bool