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>
impl<P: PackedField> ComputeMemory<<P as PackedField>::Scalar> for PackedMemory<P>
Source§const ALIGNMENT: usize = P::WIDTH
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>
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>
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>
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<'_>
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>
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<'_>)
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>
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>
fn narrow_mut<'a, 'b: 'a>(data: Self::FSliceMut<'b>) -> Self::FSliceMut<'a>
Borrows a mutable memory slice, narrowing the lifetime.
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>>
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>)
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>)
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<'_>)
fn split_at( data: Self::FSlice<'_>, mid: usize, ) -> (Self::FSlice<'_>, Self::FSlice<'_>)
Splits an immutable slice into two disjoint subslices. Read more
fn split_at_mut_borrowed<'a>( data: &'a mut Self::FSliceMut<'_>, mid: usize, ) -> (Self::FSliceMut<'a>, Self::FSliceMut<'a>)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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