rename expose_addr to expose_provenance
This commit is contained in:
parent
6da23374ef
commit
b8a18fa965
3 changed files with 13 additions and 13 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue