Skip to content

Commit b039861

Browse files
committed
rename expose_addr to expose_provenance
1 parent 93d3300 commit b039861

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

crates/core_simd/src/simd/ptr/const_ptr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ pub trait SimdConstPtr: Copy + Sealed {
5050
/// Equivalent to calling [`pointer::with_addr`] on each element.
5151
fn with_addr(self, addr: Self::Usize) -> Self;
5252

53-
/// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use
54-
/// in [`Self::with_exposed_provenance`].
55-
fn expose_addr(self) -> Self::Usize;
53+
/// Exposes the "provenance" part of the pointer for future use in
54+
/// [`Self::with_exposed_provenance`] and returns the "address" portion.
55+
fn expose_provenance(self) -> Self::Usize;
5656

5757
/// Convert an address back to a pointer, picking up a previously "exposed" provenance.
5858
///
@@ -131,9 +131,9 @@ where
131131
}
132132

133133
#[inline]
134-
fn expose_addr(self) -> Self::Usize {
134+
fn expose_provenance(self) -> Self::Usize {
135135
// Safety: `self` is a pointer vector
136-
unsafe { core::intrinsics::simd::simd_expose_addr(self) }
136+
unsafe { core::intrinsics::simd::simd_expose_provenance(self) }
137137
}
138138

139139
#[inline]

crates/core_simd/src/simd/ptr/mut_ptr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ pub trait SimdMutPtr: Copy + Sealed {
4747
/// Equivalent to calling [`pointer::with_addr`] on each element.
4848
fn with_addr(self, addr: Self::Usize) -> Self;
4949

50-
/// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use
51-
/// in [`Self::with_exposed_provenance`].
52-
fn expose_addr(self) -> Self::Usize;
50+
/// Exposes the "provenance" part of the pointer for future use in
51+
/// [`Self::with_exposed_provenance`] and returns the "address" portion.
52+
fn expose_provenance(self) -> Self::Usize;
5353

5454
/// Convert an address back to a pointer, picking up a previously "exposed" provenance.
5555
///
@@ -128,9 +128,9 @@ where
128128
}
129129

130130
#[inline]
131-
fn expose_addr(self) -> Self::Usize {
131+
fn expose_provenance(self) -> Self::Usize {
132132
// Safety: `self` is a pointer vector
133-
unsafe { core::intrinsics::simd::simd_expose_addr(self) }
133+
unsafe { core::intrinsics::simd::simd_expose_provenance(self) }
134134
}
135135

136136
#[inline]

crates/core_simd/tests/pointers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ macro_rules! common_tests {
3232
);
3333
}
3434

35-
fn expose_addr<const LANES: usize>() {
35+
fn expose_provenance<const LANES: usize>() {
3636
test_helpers::test_unary_elementwise(
37-
&Simd::<*$constness u32, LANES>::expose_addr,
38-
&<*$constness u32>::expose_addr,
37+
&Simd::<*$constness u32, LANES>::expose_provenance,
38+
&<*$constness u32>::expose_provenance,
3939
&|_| true,
4040
);
4141
}

0 commit comments

Comments
 (0)