Trait MaskNarrow

pub trait MaskNarrow<S: Simd>: SimdMask<S> + Seal

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.

Associated Types

type Narrowed: MaskWiden<S, Widened = Self>;

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

Required Methods

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

Narrow each boolean lane and concatenate self followed by high.

Implementors