Struct mask8x32

pub struct mask8x32<S: Simd> { /* private fields */ }

A SIMD mask of 32 logical lanes corresponding to 8-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::*, mask8x32};
fn construct_mask<S: Simd>(simd: S) {
    // From a single boolean value:
    let a = mask8x32::splat(simd, true);
    let b = mask8x32::simd_from(simd, true);

    // From signed integer mask lanes:
    let c = mask8x32::from_slice(simd, &[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
    let d = mask8x32::simd_from(simd, [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 = mask8x32::from_bitmask(simd, 0b0001);

    // By setting individual lanes:
    let mut f = mask8x32::splat(simd, false);
    f.set(0, true);
}

Trait Implementations

impl<S: Clone + Simd> Clone for mask8x32<S> where S::mask8x32: Clone,

fn clone(&self) -> Self

impl<S: Copy + Simd> Copy for mask8x32<S> where S::mask8x32: Copy,

impl<S: Simd + Debug> Debug for mask8x32<S>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<S: Simd> BitAnd for mask8x32<S>

type Output = mask8x32<S>;
fn bitand(self, rhs: Self) -> Self::Output

Compute the logical AND of two masks.

impl<S: Simd> BitAndAssign for mask8x32<S>

fn bitand_assign(&mut self, rhs: Self)

Compute the logical AND of two masks.

impl<S: Simd> BitOr for mask8x32<S>

type Output = mask8x32<S>;
fn bitor(self, rhs: Self) -> Self::Output

Compute the logical OR of two masks.

impl<S: Simd> BitOrAssign for mask8x32<S>

fn bitor_assign(&mut self, rhs: Self)

Compute the logical OR of two masks.

impl<S: Simd> BitXor for mask8x32<S>

type Output = mask8x32<S>;
fn bitxor(self, rhs: Self) -> Self::Output

Compute the logical XOR of two masks.

impl<S: Simd> BitXorAssign for mask8x32<S>

fn bitxor_assign(&mut self, rhs: Self)

Compute the logical XOR of two masks.

impl<S: Simd> ExtractToken for mask8x32<S>

type S = S;
fn token(&self) -> S

impl<S: Simd> MaskWiden<S> for mask8x32<S>

type Widened = mask16x16<S>;
fn widen(self) -> (Self::Widened, Self::Widened)

impl<S: Simd> Not for mask8x32<S>

type Output = mask8x32<S>;
fn not(self) -> Self::Output

Compute the logical NOT of the mask.

impl<S: Simd> Select<i8x32<S>> for mask8x32<S>

fn select(self, if_true: i8x32<S>, if_false: i8x32<S>) -> i8x32<S>

impl<S: Simd> Select<mask8x32<S>> for mask8x32<S>

fn select(self, if_true: mask8x32<S>, if_false: mask8x32<S>) -> mask8x32<S>

impl<S: Simd> Select<u8x32<S>> for mask8x32<S>

fn select(self, if_true: u8x32<S>, if_false: u8x32<S>) -> u8x32<S>

impl<S: Simd> SimdFrom<[i8; 32], S> for mask8x32<S>

fn simd_from(simd: S, val: [i8; 32]) -> Self

impl<S: Simd> SimdFrom<__m256i, S> for mask8x32<S>

fn simd_from(simd: S, arch: __m256i) -> Self

impl<S: Simd> SimdFrom<bool, S> for mask8x32<S>

fn simd_from(simd: S, value: bool) -> Self

impl<S: Simd> SimdFrom<u32, S> for mask8x32<S>

fn simd_from(simd: S, arch: __mmask32) -> Self

impl<S: Simd> SimdMask<S> for mask8x32<S>

type Element = i8;
type Ints = i8x32<S>;
const LEN: usize = 32;
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: &[i8]) -> Self
fn store_slice(&self, slice: &mut [i8])
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 mask8x32<S> where <S as ArchTypes>::mask8x32: Freeze, S: Freeze,

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

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

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

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

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

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

Blanket Implementations

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

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

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

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

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

impl<T> From<T> for mask8x32<S>

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

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

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

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

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