pub struct BitMask<const N: usize, A: Sealed = Current>(pub <Const<N> as SupportedLaneCount>::BitMaskType, _)
where
Const<N>: SupportedLaneCount;Expand description
A lane-wise mask represented as a bit-mask.
The representation for this type is the smallest unsigned integer capable of holding
N bits.
Tuple Fields§
§0: <Const<N> as SupportedLaneCount>::BitMaskTypeImplementations§
Trait Implementations§
Source§impl<const N: usize, A: Clone + Sealed> Clone for BitMask<N, A>where
Const<N>: SupportedLaneCount,
impl<const N: usize, A: Clone + Sealed> Clone for BitMask<N, A>where
Const<N>: SupportedLaneCount,
Source§impl<const N: usize, A: Debug + Sealed> Debug for BitMask<N, A>where
Const<N>: SupportedLaneCount,
impl<const N: usize, A: Debug + Sealed> Debug for BitMask<N, A>where
Const<N>: SupportedLaneCount,
Source§impl<const N: usize, A: PartialEq + Sealed> PartialEq for BitMask<N, A>where
Const<N>: SupportedLaneCount,
impl<const N: usize, A: PartialEq + Sealed> PartialEq for BitMask<N, A>where
Const<N>: SupportedLaneCount,
Source§impl<A: Sealed> SIMDMask for BitMask<1, A>
impl<A: Sealed> SIMDMask for BitMask<1, A>
Source§type Underlying = u8
type Underlying = u8
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<16, A>
impl<A: Sealed> SIMDMask for BitMask<16, A>
Source§type Underlying = u16
type Underlying = u16
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<2, A>
impl<A: Sealed> SIMDMask for BitMask<2, A>
Source§type Underlying = u8
type Underlying = u8
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<32, A>
impl<A: Sealed> SIMDMask for BitMask<32, A>
Source§type Underlying = u32
type Underlying = u32
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<4, A>
impl<A: Sealed> SIMDMask for BitMask<4, A>
Source§type Underlying = u8
type Underlying = u8
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<64, A>
impl<A: Sealed> SIMDMask for BitMask<64, A>
Source§type Underlying = u64
type Underlying = u64
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<A: Sealed> SIMDMask for BitMask<8, A>
impl<A: Sealed> SIMDMask for BitMask<8, A>
Source§type Underlying = u8
type Underlying = u8
The type of the underlying intrinsic.
Source§fn to_underlying(self) -> Self::Underlying
fn to_underlying(self) -> Self::Underlying
Retrieve the underlying type.
This will always be an unsigned integer of the minimum width required to contain
LANES bits.Source§fn from_underlying(arch: A, value: Self::Underlying) -> Self
fn from_underlying(arch: A, value: Self::Underlying) -> Self
Construct the mask from the underlying type.
Source§fn keep_first(arch: A, i: usize) -> Self
fn keep_first(arch: A, i: usize) -> Self
Efficiently construct a new mask with the first
i bits set and the remainder
set to zero. Read moreSource§fn get_unchecked(&self, i: usize) -> bool
fn get_unchecked(&self, i: usize) -> bool
Source§fn first(&self) -> Option<usize>
fn first(&self) -> Option<usize>
Return the first set index in the mask or
None if no entries are set.Source§fn from_fn<F>(arch: A, f: F) -> Self
fn from_fn<F>(arch: A, f: F) -> Self
Construct a mask based on the result of invoking
f once for each element in the range
0..Self::LANES in order. Read moreSource§impl<T, const N: usize, A> SIMDSelect<Emulated<T, N, A>> for BitMask<N, A>where
T: Copy,
A: Sealed,
Const<N>: SupportedLaneCount,
BitMask<N, A>: SIMDMask<Arch = A>,
Emulated<T, N, A>: SIMDVector<Mask = BitMask<N, A>>,
impl<T, const N: usize, A> SIMDSelect<Emulated<T, N, A>> for BitMask<N, A>where
T: Copy,
A: Sealed,
Const<N>: SupportedLaneCount,
BitMask<N, A>: SIMDMask<Arch = A>,
Emulated<T, N, A>: SIMDVector<Mask = BitMask<N, A>>,
impl<const N: usize, A: Copy + Sealed> Copy for BitMask<N, A>where
Const<N>: SupportedLaneCount,
impl<const N: usize, A: Eq + Sealed> Eq for BitMask<N, A>where
Const<N>: SupportedLaneCount,
impl<const N: usize, A: Sealed> StructuralPartialEq for BitMask<N, A>where
Const<N>: SupportedLaneCount,
Auto Trait Implementations§
impl<const N: usize, A = Scalar> !Freeze for BitMask<N, A>
impl<const N: usize, A = Scalar> !RefUnwindSafe for BitMask<N, A>
impl<const N: usize, A = Scalar> !Send for BitMask<N, A>
impl<const N: usize, A = Scalar> !Sync for BitMask<N, A>
impl<const N: usize, A = Scalar> !Unpin for BitMask<N, A>
impl<const N: usize, A = Scalar> !UnsafeUnpin for BitMask<N, A>
impl<const N: usize, A = Scalar> !UnwindSafe for BitMask<N, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more