Trait wasmtime_environ::__core::simd::prelude::SimdConstPtr
source · pub trait SimdConstPtr: Copy + Sealed {
type Usize;
type Isize;
type CastPtr<T>;
type MutPtr;
type Mask;
// Required methods
fn is_null(self) -> Self::Mask;
fn cast<T>(self) -> Self::CastPtr<T>;
fn cast_mut(self) -> Self::MutPtr;
fn addr(self) -> Self::Usize;
fn with_addr(self, addr: Self::Usize) -> Self;
fn expose_addr(self) -> Self::Usize;
fn from_exposed_addr(addr: Self::Usize) -> Self;
fn wrapping_offset(self, offset: Self::Isize) -> Self;
fn wrapping_add(self, count: Self::Usize) -> Self;
fn wrapping_sub(self, count: Self::Usize) -> Self;
}
portable_simd
)Expand description
Operations on SIMD vectors of constant pointers.
Required Associated Types§
sourcetype Usize
type Usize
portable_simd
)Vector of usize
with the same number of lanes.
sourcetype Isize
type Isize
portable_simd
)Vector of isize
with the same number of lanes.
sourcetype CastPtr<T>
type CastPtr<T>
portable_simd
)Vector of const pointers with the same number of lanes.
Required Methods§
sourcefn is_null(self) -> Self::Mask
fn is_null(self) -> Self::Mask
portable_simd
)Returns true
for each lane that is null.
sourcefn cast<T>(self) -> Self::CastPtr<T>
fn cast<T>(self) -> Self::CastPtr<T>
portable_simd
)Casts to a pointer of another type.
Equivalent to calling pointer::cast
on each lane.
sourcefn cast_mut(self) -> Self::MutPtr
fn cast_mut(self) -> Self::MutPtr
portable_simd
)Changes constness without changing the type.
Equivalent to calling pointer::cast_mut
on each lane.
sourcefn addr(self) -> Self::Usize
fn addr(self) -> Self::Usize
portable_simd
)Gets the “address” portion of the pointer.
This method discards pointer semantic metadata, so the result cannot be directly cast into a valid pointer.
This method semantically discards provenance and
address-space information. To properly restore that information, use Self::with_addr
.
Equivalent to calling pointer::addr
on each lane.
sourcefn with_addr(self, addr: Self::Usize) -> Self
fn with_addr(self, addr: Self::Usize) -> Self
portable_simd
)Creates a new pointer with the given address.
This performs the same operation as a cast, but copies the address-space and
provenance of self
to the new pointer.
Equivalent to calling pointer::with_addr
on each lane.
sourcefn expose_addr(self) -> Self::Usize
fn expose_addr(self) -> Self::Usize
portable_simd
)Gets the “address” portion of the pointer, and “exposes” the provenance part for future use
in Self::from_exposed_addr
.
sourcefn from_exposed_addr(addr: Self::Usize) -> Self
fn from_exposed_addr(addr: Self::Usize) -> Self
portable_simd
)Convert an address back to a pointer, picking up a previously “exposed” provenance.
Equivalent to calling core::ptr::from_exposed_addr
on each lane.
sourcefn wrapping_offset(self, offset: Self::Isize) -> Self
fn wrapping_offset(self, offset: Self::Isize) -> Self
portable_simd
)Calculates the offset from a pointer using wrapping arithmetic.
Equivalent to calling pointer::wrapping_offset
on each lane.
sourcefn wrapping_add(self, count: Self::Usize) -> Self
fn wrapping_add(self, count: Self::Usize) -> Self
portable_simd
)Calculates the offset from a pointer using wrapping arithmetic.
Equivalent to calling pointer::wrapping_add
on each lane.
sourcefn wrapping_sub(self, count: Self::Usize) -> Self
fn wrapping_sub(self, count: Self::Usize) -> Self
portable_simd
)Calculates the offset from a pointer using wrapping arithmetic.
Equivalent to calling pointer::wrapping_sub
on each lane.