Trait std::simd::ToBitMask

source ·
pub trait ToBitMask: Sealed {
    type BitMask;

    // Required methods
    fn to_bitmask(self) -> Self::BitMask;
    fn from_bitmask(bitmask: Self::BitMask) -> Self;
}
🔬This is a nightly-only experimental API. (portable_simd #86656)
Expand description

将掩码转换为整数位掩码和从整数位掩码转换。

位掩码的每一位对应一个掩码 lane,从 LSB 开始。

Required Associated Types§

source

type BitMask

🔬This is a nightly-only experimental API. (portable_simd #86656)

整数位掩码类型。

Required Methods§

source

fn to_bitmask(self) -> Self::BitMask

🔬This is a nightly-only experimental API. (portable_simd #86656)

将掩码转换为位掩码。

source

fn from_bitmask(bitmask: Self::BitMask) -> Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

将位掩码转换为掩码。

Implementors§

source§

impl<T> ToBitMask for Mask<T, 1>where T: MaskElement,

§

type BitMask = u8

source§

impl<T> ToBitMask for Mask<T, 2>where T: MaskElement,

§

type BitMask = u8

source§

impl<T> ToBitMask for Mask<T, 4>where T: MaskElement,

§

type BitMask = u8

source§

impl<T> ToBitMask for Mask<T, 8>where T: MaskElement,

§

type BitMask = u8

source§

impl<T> ToBitMask for Mask<T, 16>where T: MaskElement,

§

type BitMask = u16

source§

impl<T> ToBitMask for Mask<T, 32>where T: MaskElement,

§

type BitMask = u32

source§

impl<T> ToBitMask for Mask<T, 64>where T: MaskElement,

§

type BitMask = u64