diff options
| author | joboet <jonasboettiger@icloud.com> | 2024-04-03 15:17:00 +0200 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2024-04-10 23:28:49 -0400 |
| commit | b8a18fa96571ce29814d9cf32f3f16eba918a2fa (patch) | |
| tree | aabcdb86dbb3de2486e42007a0e3c3ab3d149ccb | |
| parent | 6da23374ef93acfea6f2c75d2cf73b7231586156 (diff) | |
| download | rust-b8a18fa96571ce29814d9cf32f3f16eba918a2fa.tar.gz rust-b8a18fa96571ce29814d9cf32f3f16eba918a2fa.zip | |
rename `expose_addr` to `expose_provenance`
| -rw-r--r-- | crates/core_simd/src/simd/ptr/const_ptr.rs | 10 | ||||
| -rw-r--r-- | crates/core_simd/src/simd/ptr/mut_ptr.rs | 10 | ||||
| -rw-r--r-- | crates/core_simd/tests/pointers.rs | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/crates/core_simd/src/simd/ptr/const_ptr.rs b/crates/core_simd/src/simd/ptr/const_ptr.rs index fd6e091aed5..809ea7cf43b 100644 --- a/crates/core_simd/src/simd/ptr/const_ptr.rs +++ b/crates/core_simd/src/simd/ptr/const_ptr.rs @@ -63,9 +63,9 @@ pub trait SimdConstPtr: Copy + Sealed { /// Equivalent to calling [`pointer::with_addr`] on each element. fn with_addr(self, addr: Self::Usize) -> Self; - /// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use - /// in [`Self::with_exposed_provenance`]. - fn expose_addr(self) -> Self::Usize; + /// Exposes the "provenance" part of the pointer for future use in + /// [`Self::with_exposed_provenance`] and returns the "address" portion. + fn expose_provenance(self) -> Self::Usize; /// Convert an address back to a pointer, picking up a previously "exposed" provenance. /// @@ -152,9 +152,9 @@ where } #[inline] - fn expose_addr(self) -> Self::Usize { + fn expose_provenance(self) -> Self::Usize { // Safety: `self` is a pointer vector - unsafe { core::intrinsics::simd::simd_expose_addr(self) } + unsafe { core::intrinsics::simd::simd_expose_provenance(self) } } #[inline] diff --git a/crates/core_simd/src/simd/ptr/mut_ptr.rs b/crates/core_simd/src/simd/ptr/mut_ptr.rs index 2f6684b3f57..f418f90154e 100644 --- a/crates/core_simd/src/simd/ptr/mut_ptr.rs +++ b/crates/core_simd/src/simd/ptr/mut_ptr.rs @@ -60,9 +60,9 @@ pub trait SimdMutPtr: Copy + Sealed { /// Equivalent to calling [`pointer::with_addr`] on each element. fn with_addr(self, addr: Self::Usize) -> Self; - /// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use - /// in [`Self::with_exposed_provenance`]. - fn expose_addr(self) -> Self::Usize; + /// Exposes the "provenance" part of the pointer for future use in + /// [`Self::with_exposed_provenance`] and returns the "address" portion. + fn expose_provenance(self) -> Self::Usize; /// Convert an address back to a pointer, picking up a previously "exposed" provenance. /// @@ -149,9 +149,9 @@ where } #[inline] - fn expose_addr(self) -> Self::Usize { + fn expose_provenance(self) -> Self::Usize { // Safety: `self` is a pointer vector - unsafe { core::intrinsics::simd::simd_expose_addr(self) } + unsafe { core::intrinsics::simd::simd_expose_provenance(self) } } #[inline] diff --git a/crates/core_simd/tests/pointers.rs b/crates/core_simd/tests/pointers.rs index 5984fdae2f9..90bfc5d5fd6 100644 --- a/crates/core_simd/tests/pointers.rs +++ b/crates/core_simd/tests/pointers.rs @@ -32,10 +32,10 @@ macro_rules! common_tests { ); } - fn expose_addr<const LANES: usize>() { + fn expose_provenance<const LANES: usize>() { test_helpers::test_unary_elementwise( - &Simd::<*$constness u32, LANES>::expose_addr, - &<*$constness u32>::expose_addr, + &Simd::<*$constness u32, LANES>::expose_provenance, + &<*$constness u32>::expose_provenance, &|_| true, ); } |
