rust / latest / std / simd / trait.tobitmask.html

Trait std::simd::ToBitMask

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)

Converts masks to and from integer bitmasks.

Each bit of the bitmask corresponds to a mask lane, starting with the LSB.

Required Associated Types

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

The integer bitmask type.

Required Methods

source
fn to_bitmask(self) -> Self::BitMask
🔬This is a nightly-only experimental API. (portable_simd #86656)

Converts a mask to a bitmask.

source
fn from_bitmask(bitmask: Self::BitMask) -> Self
🔬This is a nightly-only experimental API. (portable_simd #86656)

Converts a bitmask to a mask.

Object Safety

This trait is not object safe.

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

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/simd/trait.ToBitMask.html