pub const unsafe fn simd_masked_load<V, U, T, const ALIGN: SimdAlign>(
mask: V,
ptr: U,
val: T,
) -> T🔬This is a nightly-only experimental API. (
core_intrinsics)This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description
Reads a vector of pointers.
T must be a vector.
U must be a pointer to the element type of T
V must be a vector of integers with the same length as T (but any element size).
For each element, if the corresponding value in mask is !0, read the corresponding
pointer offset from ptr.
The first element is loaded from ptr, the second from ptr.wrapping_offset(1) and so on.
Otherwise if the corresponding value in mask is 0, return the corresponding value from
val.
§Safety
ptr must be aligned according to the ALIGN parameter, see SimdAlign for details.
Each pointer offset from ptr whose corresponding value in mask is !0 must be readable as if
by ptr::read.
mask must only contain 0 or !0 values.