Trait slipstream::vector::Masked

source ·
pub trait Masked {
    type Mask;
}
Expand description

Trait to look up a mask corresponding to a type.

The Vector implements this and allows for finding out what the corresponding mask type for it is. This is not an inherent associated type because these don’t yet exist in Rust.

Required Associated Types§

source

type Mask

The mask type for this vector.

Masks are vector types of boolean-like base types. They are used as results of lane-wise comparisons like eq and for enabling subsets of lanes for certain operations, like blend and gather_load_masked.

This associated type describes the native mask for the given vector. For example for u32x4 it would be m32x4. This is the type that the comparisons produce. While the selection methods accept any mask type of the right number of lanes, using this type on their input is expected to yield the best performance.

Implementors§

source§

impl<A: Align, B: Repr, const S: usize> Masked for Vector<A, B, S>

§

type Mask = Vector<A, <B as Repr>::Mask, S>