Function core::intrinsics::simd::simd_select
source · pub unsafe extern "platform-intrinsic" 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
Select 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
.