pub trait LazySelect<T>: Select<T>where
    T: HasBoolMask<Mask = Self>,{
    // Required method
    fn lazy_select<A, B>(self, a: A, b: B) -> T
       where A: FnOnce() -> T,
             B: FnOnce() -> T;
}
Expand description

Like Select, but can avoid evaluating the input.

Required Methods§

source

fn lazy_select<A, B>(self, a: A, b: B) -> Twhere A: FnOnce() -> T, B: FnOnce() -> T,

Select lanes from the output of a when corresponding lanes in self are true, and select from the output of b when false. May avoid evaluating either option if it’s not selected.

Implementations on Foreign Types§

source§

impl<T> LazySelect<T> for boolwhere T: HasBoolMask<Mask = Self>,

source§

fn lazy_select<A, B>(self, a: A, b: B) -> Twhere A: FnOnce() -> T, B: FnOnce() -> T,

source§

impl LazySelect<f64x4> for f64x4

source§

fn lazy_select<A, B>(self, a: A, b: B) -> Selfwhere A: FnOnce() -> Self, B: FnOnce() -> Self,

source§

impl LazySelect<f32x8> for f32x8

source§

fn lazy_select<A, B>(self, a: A, b: B) -> Selfwhere A: FnOnce() -> Self, B: FnOnce() -> Self,

source§

impl LazySelect<f64x2> for f64x2

source§

fn lazy_select<A, B>(self, a: A, b: B) -> Selfwhere A: FnOnce() -> Self, B: FnOnce() -> Self,

source§

impl LazySelect<f32x4> for f32x4

source§

fn lazy_select<A, B>(self, a: A, b: B) -> Selfwhere A: FnOnce() -> Self, B: FnOnce() -> Self,

Implementors§