Skip to main content

MaskNarrow

Trait MaskNarrow 

Source
pub trait MaskNarrow<S: Simd>: SimdMask<S> + Seal {
    type Narrowed: MaskWiden<S, Widened = Self>;

    // Required method
    fn narrow(self, high: Self) -> Self::Narrowed;
}
Expand description

Narrowing conversion of two SIMD masks, preserving each lane’s boolean value.

Both inputs have the same logical bit width as the result. The result has lanes half as wide and twice as many lanes: self supplies the lower lanes and high supplies the upper lanes. This is supported for 16-, 32-, and 64-bit lanes at logical widths of 128, 256, and 512 bits, independently of the backend’s physical mask representation.

This is the inverse of MaskWiden::widen. Masks constructed from integer lanes other than 0 or -1 have unspecified behavior.

Required Associated Types§

Source

type Narrowed: MaskWiden<S, Widened = Self>

The same logical-width mask type with lanes half as wide.

Required Methods§

Source

fn narrow(self, high: Self) -> Self::Narrowed

Narrow each boolean lane and concatenate self followed by high.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§