Skip to content

Commit

Permalink
Unrolled build for rust-lang#119203
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rust-timer authored Feb 21, 2024
2 parents bb59453 + 14a4551 commit 042e906
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions library/core/src/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,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`.
///
Expand All @@ -279,12 +280,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
Expand Down

0 comments on commit 042e906

Please sign in to comment.