pub unsafe trait ToBitMask: Sealed {
type BitMask;
fn to_bitmask(self) -> Self::BitMask;
fn from_bitmask(bitmask: Self::BitMask) -> Self;
}
🔬 This is a nightly-only experimental API. (
portable_simd
)Expand description
Converts masks to and from integer bitmasks.
Each bit of the bitmask corresponds to a mask lane, starting with the LSB.
Safety
This trait is unsafe
and sealed, since the BitMask
type must match the number of lanes in
the mask.
Associated Types
Required methods
fn to_bitmask(self) -> Self::BitMask
fn to_bitmask(self) -> Self::BitMask
🔬 This is a nightly-only experimental API. (
portable_simd
)Converts a mask to a bitmask.
fn from_bitmask(bitmask: Self::BitMask) -> Self
fn from_bitmask(bitmask: Self::BitMask) -> Self
🔬 This is a nightly-only experimental API. (
portable_simd
)Converts a bitmask to a mask.