pub struct SharedMemory<T: CubeType> { /* private fields */ }
Implementations§
Sourcepub unsafe fn index_unchecked<I: Index>(&self, _i: I) -> &Ewhere
Self: CubeIndex<I>,
pub unsafe fn index_unchecked<I: Index>(&self, _i: I) -> &Ewhere
Self: CubeIndex<I>,
Perform an unchecked index into the array
§Safety
Out of bounds indexing causes undefined behaviour and may segfault. Ensure index is always in bounds
Sourcepub unsafe fn index_assign_unchecked<I: Index>(&mut self, _i: I, _value: E)where
Self: CubeIndexMut<I>,
pub unsafe fn index_assign_unchecked<I: Index>(&mut self, _i: I, _value: E)where
Self: CubeIndexMut<I>,
Perform an unchecked index assignment into the array
§Safety
Out of bounds indexing causes undefined behaviour and may segfault. Ensure index is always in bounds
pub fn new<S: Index>(_size: S) -> Self
pub fn new_lined<S: Index>( _size: S, _vectorization_factor: u32, ) -> SharedMemory<Line<T>>
pub fn new_aligned<S: Index>( _size: S, _vectorization_factor: u32, _alignment: u32, ) -> SharedMemory<Line<T>>
pub fn __expand_new_lined( scope: &mut Scope, size: ExpandElementTyped<u32>, vectorization_factor: u32, ) -> <SharedMemory<Line<T>> as CubeType>::ExpandType
pub fn __expand_new_aligned( scope: &mut Scope, size: ExpandElementTyped<u32>, vectorization_factor: u32, alignment: u32, ) -> <SharedMemory<Line<T>> as CubeType>::ExpandType
pub fn vectorized<S: Index>(_size: S, _vectorization_factor: u32) -> Self
pub fn __expand_vectorized( scope: &mut Scope, size: ExpandElementTyped<u32>, vectorization_factor: u32, ) -> <Self as CubeType>::ExpandType
pub fn __expand_new( scope: &mut Scope, size: ExpandElementTyped<u32>, ) -> <Self as CubeType>::ExpandType
Trait Implementations§
Source§fn clone(&self) -> SharedMemory<T>
fn clone(&self) -> SharedMemory<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read morefn cube_idx_mut(&mut self, _i: T) -> &mut Self::Output
type ExpandType = ExpandElementTyped<SharedMemory<T>>
Source§fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
fn __expand_read( scope: &mut Scope, this: ExpandElementTyped<SharedMemory<T>>, idx: ExpandElementTyped<u32>, ) -> ExpandElementTyped<T>
fn read(&self, index: u32) -> T
fn __expand_write( scope: &mut Scope, this: ExpandElementTyped<SharedMemory<T>>, idx: ExpandElementTyped<u32>, value: ExpandElementTyped<T>, )
fn write(&self, index: u32, value: T)
type Expand = ExpandElementTyped<SharedMemory<E>>
Source§fn slice<Start: Index, End: Index>(&self, start: Start, end: End) -> Slice<E> ⓘ
fn slice<Start: Index, End: Index>(&self, start: Start, end: End) -> Slice<E> ⓘ
Return a read-only view of all elements comprise between the
start
and end
indices.
In checked
mode, if the end
index is out-of-bound, it is replaced by
the length of self
.Source§fn __expand_slice(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<E>>
fn __expand_slice( scope: &mut Scope, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<Slice<E>>
Expand function of SliceOperator::slice.
Source§fn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> SliceMut<E>
fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> SliceMut<E>
Return a read-write view of all elements comprise between the
start
and end
indices.
In checked
mode, if the end
index is out-of-bound, it is replaced by
the length of self
.Source§fn __expand_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<E>>
fn __expand_slice_mut( scope: &mut Scope, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<E>>
Expand function of SliceOperator::slice_mut.
Source§fn __expand_to_slice(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<E>>
fn __expand_to_slice( scope: &mut Scope, expand: Self::Expand, ) -> ExpandElementTyped<Slice<E>>
Expand function of SliceOperator::to_slice.
Source§fn to_slice_mut(&mut self) -> SliceMut<E>
fn to_slice_mut(&mut self) -> SliceMut<E>
Reinterprete the current type as a read-write slice.
Source§fn __expand_to_slice_mut(
scope: &mut Scope,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<E>>
fn __expand_to_slice_mut( scope: &mut Scope, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<E>>
Expand function of SliceOperator::to_slice_mut.
Auto Trait Implementations§
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