Skip to main content

MaskWiden

Trait MaskWiden 

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

    // Required method
    fn widen(self) -> (Self::Widened, Self::Widened);
}
Expand description

Widening conversion of a SIMD mask, preserving each lane’s boolean value.

The results have the same logical bit width as the input, with lanes twice as wide and half as many lanes. The first result contains the lower lanes and the second contains the upper lanes. This is supported for 8-, 16-, and 32-bit lanes at logical widths of 128, 256, and 512 bits, independently of the backend’s physical mask representation.

Masks constructed from integer lanes other than 0 or -1 have unspecified behavior.

Required Associated Types§

Source

type Widened: MaskNarrow<S, Narrowed = Self>

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

Required Methods§

Source

fn widen(self) -> (Self::Widened, Self::Widened)

Widen each boolean lane, returning the lower and upper halves in that order.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§