Struct mask16x32
pub struct mask16x32<S: Simd> { /* private fields */ }
A SIMD mask of 32 logical lanes corresponding to 16-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::*, mask16x32};
fn construct_mask<S: Simd>(simd: S) {
// From a single boolean value:
let a = mask16x32::splat(simd, true);
let b = mask16x32::simd_from(simd, true);
// From signed integer mask lanes:
let c = mask16x32::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 = mask16x32::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 = mask16x32::from_bitmask(simd, 0b0001);
// By setting individual lanes:
let mut f = mask16x32::splat(simd, false);
f.set(0, true);
}
Trait Implementations
impl<S: Clone + Simd> Clone for mask16x32<S>
where
S::mask16x32: Clone,
fn clone(&self) -> Self
impl<S: Copy + Simd> Copy for mask16x32<S>
where
S::mask16x32: Copy,
impl<S: Simd + Debug> Debug for mask16x32<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Simd> BitAnd for mask16x32<S>
type Output = mask16x32<S>;fn bitand(self, rhs: Self) -> Self::OutputCompute the logical AND of two masks.
impl<S: Simd> BitAndAssign for mask16x32<S>
fn bitand_assign(&mut self, rhs: Self)Compute the logical AND of two masks.
impl<S: Simd> BitOr for mask16x32<S>
type Output = mask16x32<S>;fn bitor(self, rhs: Self) -> Self::OutputCompute the logical OR of two masks.
impl<S: Simd> BitOrAssign for mask16x32<S>
fn bitor_assign(&mut self, rhs: Self)Compute the logical OR of two masks.
impl<S: Simd> BitXor for mask16x32<S>
type Output = mask16x32<S>;fn bitxor(self, rhs: Self) -> Self::OutputCompute the logical XOR of two masks.
impl<S: Simd> BitXorAssign for mask16x32<S>
fn bitxor_assign(&mut self, rhs: Self)Compute the logical XOR of two masks.
impl<S: Simd> ExtractToken for mask16x32<S>
type S = S;fn token(&self) -> S
impl<S: Simd> MaskNarrow<S> for mask16x32<S>
type Narrowed = mask8x64<S>;fn narrow(self, high: Self) -> Self::Narrowed
impl<S: Simd> MaskWiden<S> for mask16x32<S>
type Widened = mask32x16<S>;fn widen(self) -> (Self::Widened, Self::Widened)
impl<S: Simd> Not for mask16x32<S>
type Output = mask16x32<S>;fn not(self) -> Self::OutputCompute the logical NOT of the mask.
impl<S: Simd> Select<i16x32<S>> for mask16x32<S>
fn select(self, if_true: i16x32<S>, if_false: i16x32<S>) -> i16x32<S>
impl<S: Simd> Select<mask16x32<S>> for mask16x32<S>
fn select(self, if_true: mask16x32<S>, if_false: mask16x32<S>) -> mask16x32<S>
impl<S: Simd> Select<u16x32<S>> for mask16x32<S>
fn select(self, if_true: u16x32<S>, if_false: u16x32<S>) -> u16x32<S>
impl<S: Simd> SimdFrom<[i16; 32], S> for mask16x32<S>
fn simd_from(simd: S, val: [i16; 32]) -> Self
impl<S: Simd> SimdFrom<bool, S> for mask16x32<S>
fn simd_from(simd: S, value: bool) -> Self
impl<S: Simd> SimdFrom<u32, S> for mask16x32<S>
fn simd_from(simd: S, arch: __mmask32) -> Self
impl<S: Simd> SimdMask<S> for mask16x32<S>
type Element = i16;type Ints = i16x32<S>;const LEN: usize = 32;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: &[i16]) -> Selffn store_slice(&self, slice: &mut [i16])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