diff options
| author | Jakub Okoński <jakub@okonski.org> | 2023-12-22 00:15:44 +0100 |
|---|---|---|
| committer | Jakub Okoński <jakub@okonski.org> | 2024-02-20 17:03:24 +0100 |
| commit | 14a45516951edbbc9dd404529073dc9e9dd40351 (patch) | |
| tree | d590757b8c05d48dee330b6ed76499e50d1e1957 | |
| parent | 3d0e6bed600c0175628e96f1118293cf44fb97bd (diff) | |
| download | rust-14a45516951edbbc9dd404529073dc9e9dd40351.tar.gz rust-14a45516951edbbc9dd404529073dc9e9dd40351.zip | |
Correct the simd_masked_{load,store} intrinsic docs
| -rw-r--r-- | library/core/src/intrinsics/simd.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/library/core/src/intrinsics/simd.rs b/library/core/src/intrinsics/simd.rs index 68c8a335b40..f7818e611f4 100644 --- a/library/core/src/intrinsics/simd.rs +++ b/library/core/src/intrinsics/simd.rs @@ -243,12 +243,13 @@ extern "platform-intrinsic" { /// /// `T` must be a vector. /// - /// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`. + /// `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 from `ptr`. + /// 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`. /// @@ -264,12 +265,13 @@ extern "platform-intrinsic" { /// /// `T` must be a vector. /// - /// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`. + /// `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`, write the corresponding - /// value in `val` to the pointer. + /// value in `val` to the pointer offset from `ptr`. + /// The first element is written to `ptr`, the second to `ptr.wrapping_offset(1)` and so on. /// Otherwise if the corresponding value in `mask` is `0`, do nothing. /// /// # Safety |
