@@ -239,6 +239,45 @@ extern "platform-intrinsic" {
239239 /// `mask` must only contain `0` or `!0` values.
240240 pub fn simd_scatter < T , U , V > ( val : T , ptr : U , mask : V ) ;
241241
242+ /// Read a vector of pointers.
243+ ///
244+ /// `T` must be a vector.
245+ ///
246+ /// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
247+ ///
248+ /// `V` must be a vector of integers with the same length as `T` (but any element size).
249+ ///
250+ /// For each element, if the corresponding value in `mask` is `!0`, read the corresponding
251+ /// pointer from `ptr`.
252+ /// Otherwise if the corresponding value in `mask` is `0`, return the corresponding value from
253+ /// `val`.
254+ ///
255+ /// # Safety
256+ /// Unmasked values in `T` must be readable as if by `<ptr>::read` (e.g. aligned to the element
257+ /// type).
258+ ///
259+ /// `mask` must only contain `0` or `!0` values.
260+ pub fn simd_masked_load < V , U , T > ( mask : V , ptr : U , val : T ) -> T ;
261+
262+ /// Write to a vector of pointers.
263+ ///
264+ /// `T` must be a vector.
265+ ///
266+ /// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
267+ ///
268+ /// `V` must be a vector of integers with the same length as `T` (but any element size).
269+ ///
270+ /// For each element, if the corresponding value in `mask` is `!0`, write the corresponding
271+ /// value in `val` to the pointer.
272+ /// Otherwise if the corresponding value in `mask` is `0`, do nothing.
273+ ///
274+ /// # Safety
275+ /// Unmasked values in `T` must be writeable as if by `<ptr>::write` (e.g. aligned to the element
276+ /// type).
277+ ///
278+ /// `mask` must only contain `0` or `!0` values.
279+ pub fn simd_masked_store < V , U , T > ( mask : V , ptr : U , val : T ) ;
280+
242281 /// Add two simd vectors elementwise, with saturation.
243282 ///
244283 /// `T` must be a vector of integer primitive types.
0 commit comments