pub struct CpuMemory;
Trait Implementations§
Source§impl<F: 'static + Sync + Send + Debug> ComputeMemory<F> for CpuMemory
impl<F: 'static + Sync + Send + Debug> ComputeMemory<F> for CpuMemory
Source§const ALIGNMENT: usize = 1usize
const ALIGNMENT: usize = 1usize
The required alignment of indices for the split methods. This must be a power of two.
Source§type FSlice<'a> = &'a [F]
type FSlice<'a> = &'a [F]
An opaque handle to an immutable slice of elements stored in a compute memory.
Source§type FSliceMut<'a> = &'a mut [F]
type FSliceMut<'a> = &'a mut [F]
An opaque handle to a mutable slice of elements stored in a compute memory.
Source§fn narrow<'a>(data: &'a &[F]) -> &'a [F]
fn narrow<'a>(data: &'a &[F]) -> &'a [F]
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.
Source§fn as_const<'a>(data: &'a &mut [F]) -> &'a [F]
fn as_const<'a>(data: &'a &mut [F]) -> &'a [F]
Borrows a mutable memory slice as immutable. Read more
Source§fn to_const(data: Self::FSliceMut<'_>) -> Self::FSlice<'_>
fn to_const(data: Self::FSliceMut<'_>) -> Self::FSlice<'_>
Converts a mutable memory slice to an immutable slice.
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 &mut [F],
range: impl RangeBounds<usize>,
) -> &'a mut [F]
fn slice_mut<'a>( data: &'a mut &mut [F], range: impl RangeBounds<usize>, ) -> &'a mut [F]
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
fn to_owned_mut<'a>(data: &'a mut &mut [F]) -> &'a mut [F]
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_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>)
Source§fn slice_chunks<'a>(
data: Self::FSlice<'a>,
chunk_len: usize,
) -> impl Iterator<Item = Self::FSlice<'a>>
fn slice_chunks<'a>( data: Self::FSlice<'a>, chunk_len: usize, ) -> impl Iterator<Item = Self::FSlice<'a>>
Splits 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
Auto Trait Implementations§
impl Freeze for CpuMemory
impl RefUnwindSafe for CpuMemory
impl Send for CpuMemory
impl Sync for CpuMemory
impl Unpin for CpuMemory
impl UnwindSafe for CpuMemory
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