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::Output

Compute 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::Output

Compute 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::Output

Compute 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::Output

Compute 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) -> Self
fn from_bitmask(simd: S, bits: u64) -> Self
fn to_bitmask(self) -> u64
fn from_vector(vector: Self::Ints) -> Self
fn to_vector(self) -> Self::Ints
fn set(&mut self, index: usize, value: bool)
fn from_slice(simd: S, slice: &[i32]) -> Self
fn store_slice(&self, slice: &mut [i32])
fn rotate_elements_left<const OFFSET: usize>(self) -> Self
fn rotate_elements_right<const OFFSET: usize>(self) -> Self
fn reverse(self) -> Self
fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self
fn simd_ne(self, rhs: impl SimdInto<Self, S>) -> Self
fn any_true(self) -> bool
fn all_true(self) -> bool
fn any_false(self) -> bool
fn all_false(self) -> bool

Auto Trait Implementations

impl<S> Freeze for mask32x16<S> where <S as ArchTypes>::mask32x16: Freeze, S: Freeze,

impl<S> RefUnwindSafe for mask32x16<S> where <S as ArchTypes>::mask32x16: RefUnwindSafe, S: RefUnwindSafe,

impl<S> Send for mask32x16<S> where <S as ArchTypes>::mask32x16: Send,

impl<S> Sync for mask32x16<S> where <S as ArchTypes>::mask32x16: Sync,

impl<S> Unpin for mask32x16<S> where <S as ArchTypes>::mask32x16: Unpin, S: Unpin,

impl<S> UnsafeUnpin for mask32x16<S> where <S as ArchTypes>::mask32x16: UnsafeUnpin, S: UnsafeUnpin,

impl<S> UnwindSafe for mask32x16<S> where <S as ArchTypes>::mask32x16: UnwindSafe, S: UnwindSafe,

Blanket Implementations

impl<F, T, S> SimdInto<T, S> for mask32x16<S> where T: SimdFrom<F, S>, S: Simd,

impl<T> Any for mask32x16<S> where T: 'static + ?Sized,

impl<T> Borrow<T> for mask32x16<S> where T: ?Sized,

impl<T> BorrowMut<T> for mask32x16<S> where T: ?Sized,

impl<T> CloneToUninit for mask32x16<S> where T: Clone,

impl<T> From<T> for mask32x16<S>

impl<T> ToOwned for mask32x16<S> where T: Clone,

impl<T, S> SimdFrom<T, S> for mask32x16<S> where S: Simd,

impl<T, U> Into<U> for mask32x16<S> where U: From<T>,

impl<T, U> TryFrom<U> for mask32x16<S> where U: Into<T>,

impl<T, U> TryInto<U> for mask32x16<S> where U: TryFrom<T>,