Function simd_select

Source
pub unsafe fn simd_select<M, T>(_mask: M, _if_true: T, _if_false: T) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Selects elements from a mask.

M must be an integer vector.

T must be a vector with the same number of elements as M.

For each element, if the corresponding value in mask is !0, select the element from if_true. If the corresponding value in mask is 0, select the element from if_false.

§Safety

mask must only contain 0 and !0.