pub struct mask64x2<S: Simd> { /* private fields */ }Expand description
A SIMD mask of 2 logical lanes corresponding to 64-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.
fn construct_mask<S: Simd>(simd: S) {
// From a single boolean value:
let a = mask64x2::splat(simd, true);
let b = mask64x2::simd_from(simd, true);
// From signed integer mask lanes:
let c = mask64x2::from_slice(simd, &[-1, 0]);
let d = mask64x2::simd_from(simd, [-1, 0]);
// From a compact bitmask (same mask as above, least significant bit maps to lane 0):
let e = mask64x2::from_bitmask(simd, 0b0001);
// By setting individual lanes:
let mut f = mask64x2::splat(simd, false);
f.set(0, true);
}Trait Implementations§
Source§impl<S: Simd> BitAndAssign for mask64x2<S>
impl<S: Simd> BitAndAssign for mask64x2<S>
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Compute the logical AND of two masks.
Source§impl<S: Simd> BitOrAssign for mask64x2<S>
impl<S: Simd> BitOrAssign for mask64x2<S>
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Compute the logical OR of two masks.
Source§impl<S: Simd> BitXorAssign for mask64x2<S>
impl<S: Simd> BitXorAssign for mask64x2<S>
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Compute the logical XOR of two masks.
impl<S: Copy + Simd> Copy for mask64x2<S>where
S::mask64x2: Copy,
Source§impl<S: Simd> SimdMask<S> for mask64x2<S>
impl<S: Simd> SimdMask<S> for mask64x2<S>
Source§type Element = i64
type Element = i64
The signed integer type used when converting this mask to and from lane values. Read more
Source§fn splat(simd: S, val: bool) -> Self
fn splat(simd: S, val: bool) -> Self
Create a SIMD mask with all lanes set to the given boolean value.
Source§fn from_bitmask(simd: S, bits: u64) -> Self
fn from_bitmask(simd: S, bits: u64) -> Self
Create a mask from a compact bitmask. Read more
Source§fn to_bitmask(self) -> u64
fn to_bitmask(self) -> u64
Convert this mask to a compact bitmask. Read more
Source§fn from_slice(simd: S, slice: &[i64]) -> Self
fn from_slice(simd: S, slice: &[i64]) -> Self
Create a SIMD mask from signed integer mask lanes. Read more
Source§fn store_slice(&self, slice: &mut [i64])
fn store_slice(&self, slice: &mut [i64])
Store this SIMD mask as signed integer mask lanes. Read more
Source§fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self
fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self
Compare two vectors element-wise for equality. Read more
Source§fn any_false(self) -> bool
fn any_false(self) -> bool
Returns true if any logical lanes in this mask are false. Read more
Auto Trait Implementations§
impl<S> Freeze for mask64x2<S>
impl<S> RefUnwindSafe for mask64x2<S>where
<S as ArchTypes>::mask64x2: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for mask64x2<S>
impl<S> Sync for mask64x2<S>
impl<S> Unpin for mask64x2<S>
impl<S> UnsafeUnpin for mask64x2<S>where
<S as ArchTypes>::mask64x2: UnsafeUnpin,
S: UnsafeUnpin,
impl<S> UnwindSafe for mask64x2<S>where
<S as ArchTypes>::mask64x2: UnwindSafe,
S: UnwindSafe,
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