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§
Sourcefn select(self, if_true: T, if_false: T) -> T
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".