Struct PackedMemory

Source
pub struct PackedMemory<P>(/* private fields */);
Expand description

A packed memory implementation that uses slices of packed fields.

Trait Implementations§

Source§

impl<P: PackedField> ComputeMemory<<P as PackedField>::Scalar> for PackedMemory<P>

Source§

const ALIGNMENT: usize = P::WIDTH

The required alignment of indices for the split methods. This must be a power of two.
Source§

type FSlice<'a> = PackedMemorySlice<'a, P>

An opaque handle to an immutable slice of elements stored in a compute memory.
Source§

type FSliceMut<'a> = PackedMemorySliceMut<'a, P>

An opaque handle to a mutable slice of elements stored in a compute memory.
Source§

fn as_const<'a>(data: &'a Self::FSliceMut<'_>) -> Self::FSlice<'a>

Borrows a mutable memory slice as immutable. Read more
Source§

fn slice( data: Self::FSlice<'_>, range: impl RangeBounds<usize>, ) -> Self::FSlice<'_>

Borrows a subslice of an immutable memory slice. Read more
Source§

fn slice_mut<'a>( data: &'a mut Self::FSliceMut<'_>, range: impl RangeBounds<usize>, ) -> Self::FSliceMut<'a>

Borrows a subslice of a mutable memory slice. Read more
Source§

fn split_at_mut( data: Self::FSliceMut<'_>, mid: usize, ) -> (Self::FSliceMut<'_>, Self::FSliceMut<'_>)

Splits a mutable slice into two disjoint subslices. Read more
Source§

fn narrow<'a>(data: &'a Self::FSlice<'_>) -> Self::FSlice<'a>

Borrows an immutable memory slice, narrowing the lifetime.
Source§

fn narrow_mut<'a, 'b: 'a>(data: Self::FSliceMut<'b>) -> Self::FSliceMut<'a>

Borrows a mutable memory slice, narrowing the lifetime.
Source§

fn to_owned_mut<'a>(data: &'a mut Self::FSliceMut<'_>) -> Self::FSliceMut<'a>

Source§

fn slice_chunks_mut<'a>( data: Self::FSliceMut<'a>, chunk_len: usize, ) -> impl Iterator<Item = Self::FSliceMut<'a>>

Splits a mutable slice into equal chunks. Read more
Source§

fn split_half<'a>( data: Self::FSlice<'a>, ) -> (Self::FSlice<'a>, Self::FSlice<'a>)

Splits an immutable slice of power-two length into two equal halves. Read more
Source§

fn split_half_mut<'a>( data: Self::FSliceMut<'a>, ) -> (Self::FSliceMut<'a>, Self::FSliceMut<'a>)

Splits a mutable slice of power-two length into two equal halves. Read more
Source§

fn split_at( data: Self::FSlice<'_>, mid: usize, ) -> (Self::FSlice<'_>, Self::FSlice<'_>)

Splits an immutable slice into two disjoint subslices. Read more
Source§

fn split_at_mut_borrowed<'a>( data: &'a mut Self::FSliceMut<'_>, mid: usize, ) -> (Self::FSliceMut<'a>, Self::FSliceMut<'a>)

Source§

fn slice_chunks<'a>( data: Self::FSlice<'a>, chunk_len: usize, ) -> impl Iterator<Item = Self::FSlice<'a>>

Splits slice into equal chunks. Read more

Auto Trait Implementations§

§

impl<P> Freeze for PackedMemory<P>

§

impl<P> RefUnwindSafe for PackedMemory<P>
where P: RefUnwindSafe,

§

impl<P> Send for PackedMemory<P>
where P: Send,

§

impl<P> Sync for PackedMemory<P>
where P: Sync,

§

impl<P> Unpin for PackedMemory<P>
where P: Unpin,

§

impl<P> UnwindSafe for PackedMemory<P>
where P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more