Function simd_select

unsafe const fn simd_select<M, T>(mask: M, if_true: T, if_false: T) -> T

Selects elements from a mask.

T must be a vector.

M must be an integer vector with the same length as T (but any element size).

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.