Skip to main content

SimdMutPtr

Trait SimdMutPtr 

Source
pub trait SimdMutPtr: Copy {
    type Usize;
    type Isize;
    type CastPtr<T>;
    type ConstPtr;
    type Mask;

    // Required methods
    fn is_null(self) -> Self::Mask;
    fn cast<T>(self) -> Self::CastPtr<T>;
    fn cast_const(self) -> Self::ConstPtr;
    fn addr(self) -> Self::Usize;
    fn with_addr(self, addr: Self::Usize) -> Self;
    fn expose_provenance(self) -> Self::Usize;
    fn wrapping_offset(self, offset: Self::Isize) -> Self;
    fn wrapping_add(self, count: Self::Usize) -> Self;
    fn wrapping_sub(self, count: Self::Usize) -> Self;
}
This trait cannot be implemented outside core.
🔬This is a nightly-only experimental API. (portable_simd #86656)
Expand description

Operations on SIMD vectors of mutable pointers.

Required Associated Types§

Source

type Usize

🔬This is a nightly-only experimental API. (portable_simd #86656)

Vector of usize with the same number of elements.

Source

type Isize

🔬This is a nightly-only experimental API. (portable_simd #86656)

Vector of isize with the same number of elements.

Source

type CastPtr<T>

🔬This is a nightly-only experimental API. (portable_simd #86656)

Vector of const pointers with the same number of elements.

Source

type ConstPtr

🔬This is a nightly-only experimental API. (portable_simd #86656)

Vector of constant pointers to the same type.

Source

type Mask

🔬This is a nightly-only experimental API. (portable_simd #86656)

Mask type used for manipulating this SIMD vector type.

Required Methods§

Source

fn is_null(self) -> Self::Mask

🔬This is a nightly-only experimental API. (portable_simd #86656)

Returns true for each element that is null.

Source

fn cast<T>(self) -> Self::CastPtr<T>

🔬This is a nightly-only experimental API. (portable_simd #86656)

Casts to a pointer of another type.

Equivalent to calling pointer::cast on each element.

Source

fn cast_const(self) -> Self::ConstPtr

🔬This is a nightly-only experimental API. (portable_simd #86656)

Changes constness without changing the type.

Equivalent to calling pointer::cast_const on each element.

Source

fn addr(self) -> Self::Usize

🔬This is a nightly-only experimental API. (portable_simd #86656)

Gets the “address” portion of the pointer.

Equivalent to calling pointer::addr on each element.

Source

fn with_addr(self, addr: Self::Usize) -> Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

Creates a new pointer with the given address.

Equivalent to calling pointer::with_addr on each element.

Source

fn expose_provenance(self) -> Self::Usize

🔬This is a nightly-only experimental API. (portable_simd #86656)

Exposes the “provenance” part of the pointer for future use in super::with_exposed_provenance_mut and returns the “address” portion.

Equivalent to calling pointer::expose_provenance on each element.

See super::with_exposed_provenance_mut for the matching constructor.

Source

fn wrapping_offset(self, offset: Self::Isize) -> Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

Calculates the offset from a pointer using wrapping arithmetic.

Equivalent to calling pointer::wrapping_offset on each element.

Source

fn wrapping_add(self, count: Self::Usize) -> Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

Calculates the offset from a pointer using wrapping arithmetic.

Equivalent to calling pointer::wrapping_add on each element.

Source

fn wrapping_sub(self, count: Self::Usize) -> Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

Calculates the offset from a pointer using wrapping arithmetic.

Equivalent to calling pointer::wrapping_sub on each element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§