Skip to main content

Select

Trait Select 

Source
pub trait Select<T: Seal>: Seal {
    // Required method
    fn select(self, if_true: T, if_false: T) -> T;
}
Expand description

Element-wise selection between two SIMD vectors using self.

Required Methods§

Source

fn select(self, if_true: T, if_false: T) -> T

For each logical lane of this mask, select the first operand if the lane is true, and select the second operand if the lane is false.

Masks may be converted to and from signed integer lane arrays for compatibility with older APIs. For those conversions, false is encoded as all zeroes (integer value 0) and true is encoded as all ones (integer value -1). If a mask is constructed from any other integer bit pattern, the result of this operation is unspecified.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S: Simd> Select<f32x4<S>> for mask32x4<S>

Source§

impl<S: Simd> Select<f32x8<S>> for mask32x8<S>

Source§

impl<S: Simd> Select<f32x16<S>> for mask32x16<S>

Source§

impl<S: Simd> Select<f64x2<S>> for mask64x2<S>

Source§

impl<S: Simd> Select<f64x4<S>> for mask64x4<S>

Source§

impl<S: Simd> Select<f64x8<S>> for mask64x8<S>

Source§

impl<S: Simd> Select<i8x16<S>> for mask8x16<S>

Source§

impl<S: Simd> Select<i8x32<S>> for mask8x32<S>

Source§

impl<S: Simd> Select<i8x64<S>> for mask8x64<S>

Source§

impl<S: Simd> Select<i16x8<S>> for mask16x8<S>

Source§

impl<S: Simd> Select<i16x16<S>> for mask16x16<S>

Source§

impl<S: Simd> Select<i16x32<S>> for mask16x32<S>

Source§

impl<S: Simd> Select<i32x4<S>> for mask32x4<S>

Source§

impl<S: Simd> Select<i32x8<S>> for mask32x8<S>

Source§

impl<S: Simd> Select<i32x16<S>> for mask32x16<S>

Source§

impl<S: Simd> Select<mask8x16<S>> for mask8x16<S>

Source§

impl<S: Simd> Select<mask8x32<S>> for mask8x32<S>

Source§

impl<S: Simd> Select<mask8x64<S>> for mask8x64<S>

Source§

impl<S: Simd> Select<mask16x8<S>> for mask16x8<S>

Source§

impl<S: Simd> Select<mask16x16<S>> for mask16x16<S>

Source§

impl<S: Simd> Select<mask16x32<S>> for mask16x32<S>

Source§

impl<S: Simd> Select<mask32x4<S>> for mask32x4<S>

Source§

impl<S: Simd> Select<mask32x8<S>> for mask32x8<S>

Source§

impl<S: Simd> Select<mask32x16<S>> for mask32x16<S>

Source§

impl<S: Simd> Select<mask64x2<S>> for mask64x2<S>

Source§

impl<S: Simd> Select<mask64x4<S>> for mask64x4<S>

Source§

impl<S: Simd> Select<mask64x8<S>> for mask64x8<S>

Source§

impl<S: Simd> Select<u8x16<S>> for mask8x16<S>

Source§

impl<S: Simd> Select<u8x32<S>> for mask8x32<S>

Source§

impl<S: Simd> Select<u8x64<S>> for mask8x64<S>

Source§

impl<S: Simd> Select<u16x8<S>> for mask16x8<S>

Source§

impl<S: Simd> Select<u16x16<S>> for mask16x16<S>

Source§

impl<S: Simd> Select<u16x32<S>> for mask16x32<S>

Source§

impl<S: Simd> Select<u32x4<S>> for mask32x4<S>

Source§

impl<S: Simd> Select<u32x8<S>> for mask32x8<S>

Source§

impl<S: Simd> Select<u32x16<S>> for mask32x16<S>