Skip to content

Commit c1a1bbf

Browse files
committed
Correct the simd_masked_{load,store} intrinsic docs
1 parent 3d0e6be commit c1a1bbf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

library/core/src/intrinsics/simd.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,13 @@ extern "platform-intrinsic" {
243243
///
244244
/// `T` must be a vector.
245245
///
246-
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
246+
/// `U` must be a pointer to the element type of `T`
247247
///
248248
/// `V` must be a vector of integers with the same length as `T` (but any element size).
249249
///
250250
/// For each element, if the corresponding value in `mask` is `!0`, read the corresponding
251-
/// pointer from `ptr`.
251+
/// pointer offset from `ptr`.
252+
/// The first element is loaded from `ptr`, the second from `ptr.offset(1)` and so on.
252253
/// Otherwise if the corresponding value in `mask` is `0`, return the corresponding value from
253254
/// `val`.
254255
///
@@ -264,12 +265,13 @@ extern "platform-intrinsic" {
264265
///
265266
/// `T` must be a vector.
266267
///
267-
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
268+
/// `U` must be a pointer to the element type of `T`
268269
///
269270
/// `V` must be a vector of integers with the same length as `T` (but any element size).
270271
///
271272
/// For each element, if the corresponding value in `mask` is `!0`, write the corresponding
272-
/// value in `val` to the pointer.
273+
/// value in `val` to the pointer offset from `ptr`.
274+
/// The first element is written to `ptr`, the second to `ptr.offset(1)` and so on.
273275
/// Otherwise if the corresponding value in `mask` is `0`, do nothing.
274276
///
275277
/// # Safety

0 commit comments

Comments
 (0)