pub struct SharedMemory<T: CubeType> { /* private fields */ }
Implementations§
Sourcepub unsafe fn index_unchecked(&self, i: u32) -> &E
pub unsafe fn index_unchecked(&self, i: u32) -> &E
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(&mut self, i: u32, value: E)
pub unsafe fn index_assign_unchecked(&mut self, i: u32, value: E)
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 __expand_index_unchecked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, i: <u32 as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
pub fn __expand_index_assign_unchecked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, i: <u32 as CubeType>::ExpandType, value: <E as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
pub fn new<S: Index>(_size: S) -> Self
pub fn new_lined<S: Index>( _size: S, _vectorization_factor: 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 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
pub fn new_aligned( size: u32, vectorization_factor: u32, alignment: u32, ) -> SharedMemory<Line<T>>
pub fn __expand_new_aligned( scope: &mut Scope, size: u32, vectorization_factor: u32, alignment: u32, ) -> <SharedMemory<Line<T>> as CubeType>::ExpandType
Trait Implementations§
Source§fn clone(&self) -> SharedMemory<T>
fn clone(&self) -> SharedMemory<T>
Returns a duplicate 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 moretype Output = E
fn cube_idx(&self, _i: u32) -> &Self::Output
fn expand_index( scope: &mut Scope, array: Self::ExpandType, index: ExpandElementTyped<u32>, ) -> <Self::Output as CubeType>::ExpandType
fn expand_index_unchecked( scope: &mut Scope, array: Self::ExpandType, index: ExpandElementTyped<u32>, ) -> <Self::Output as CubeType>::ExpandType
fn cube_idx_mut(&mut self, _i: u32) -> &mut Self::Output
fn expand_index_mut( scope: &mut Scope, array: Self::ExpandType, index: ExpandElementTyped<u32>, value: <Self::Output as CubeType>::ExpandType, )
type ExpandType = ExpandElementTyped<SharedMemory<T>>
Source§fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn into_mut(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 read_unchecked(&self, index: u32) -> T
fn __expand_read_unchecked( scope: &mut Scope, this: Self::ExpandType, index: ExpandElementTyped<u32>, ) -> T::ExpandType
fn __expand_write( scope: &mut Scope, this: ExpandElementTyped<SharedMemory<T>>, idx: ExpandElementTyped<u32>, value: ExpandElementTyped<T>, )
fn write(&self, index: u32, value: T)
Source§fn slice<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> Slice<E, ReadOnly> ⓘ
fn slice<Start: Index, End: Index>( &self, start: Start, end: End, ) -> Slice<E, ReadOnly> ⓘ
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::ExpandType,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> SliceExpand<E, ReadOnly>
fn __expand_slice( scope: &mut Scope, expand: Self::ExpandType, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<E, ReadOnly>
Expand function of SliceOperator::slice.
Source§fn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> Slice<E, ReadWrite> ⓘ
fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> Slice<E, ReadWrite> ⓘ
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::ExpandType,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> SliceExpand<E, ReadWrite>
fn __expand_slice_mut( scope: &mut Scope, expand: Self::ExpandType, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<E, ReadWrite>
Expand function of SliceOperator::slice_mut.
Source§fn to_slice(&self) -> Slice<E, ReadOnly> ⓘ
fn to_slice(&self) -> Slice<E, ReadOnly> ⓘ
Reinterprete the current type as a read-only slice.
Source§fn __expand_to_slice(
scope: &mut Scope,
expand: Self::ExpandType,
) -> SliceExpand<E, ReadOnly>
fn __expand_to_slice( scope: &mut Scope, expand: Self::ExpandType, ) -> SliceExpand<E, ReadOnly>
Expand function of SliceOperator::to_slice.
Source§fn to_slice_mut(&mut self) -> Slice<E, ReadWrite> ⓘ
fn to_slice_mut(&mut self) -> Slice<E, ReadWrite> ⓘ
Reinterprete the current type as a read-write slice.
Source§fn __expand_to_slice_mut(
scope: &mut Scope,
expand: Self::ExpandType,
) -> SliceExpand<E, ReadWrite>
fn __expand_to_slice_mut( scope: &mut Scope, expand: Self::ExpandType, ) -> SliceExpand<E, ReadWrite>
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