Skip to content

Commit 042e906

Browse files
authored
Unrolled build for rust-lang#119203
Rollup merge of rust-lang#119203 - farnoy:simd-masked-intrinsic-docfix, r=RalfJung Correct the simd_masked_{load,store} intrinsic docs Explains the uniform pointer being used for these two operations and how elements are offset from it.
2 parents bb59453 + 14a4551 commit 042e906

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: library/core/src/intrinsics/simd.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,13 @@ extern "platform-intrinsic" {
259259
///
260260
/// `T` must be a vector.
261261
///
262-
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
262+
/// `U` must be a pointer to the element type of `T`
263263
///
264264
/// `V` must be a vector of integers with the same length as `T` (but any element size).
265265
///
266266
/// For each element, if the corresponding value in `mask` is `!0`, read the corresponding
267-
/// pointer from `ptr`.
267+
/// pointer offset from `ptr`.
268+
/// The first element is loaded from `ptr`, the second from `ptr.wrapping_offset(1)` and so on.
268269
/// Otherwise if the corresponding value in `mask` is `0`, return the corresponding value from
269270
/// `val`.
270271
///
@@ -279,12 +280,13 @@ extern "platform-intrinsic" {
279280
///
280281
/// `T` must be a vector.
281282
///
282-
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
283+
/// `U` must be a pointer to the element type of `T`
283284
///
284285
/// `V` must be a vector of integers with the same length as `T` (but any element size).
285286
///
286287
/// For each element, if the corresponding value in `mask` is `!0`, write the corresponding
287-
/// value in `val` to the pointer.
288+
/// value in `val` to the pointer offset from `ptr`.
289+
/// The first element is written to `ptr`, the second to `ptr.wrapping_offset(1)` and so on.
288290
/// Otherwise if the corresponding value in `mask` is `0`, do nothing.
289291
///
290292
/// # Safety

0 commit comments

Comments
 (0)