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 len(&self) -> u32
pub fn buffer_len(&self) -> u32
pub fn __expand_new_lined( scope: &mut Scope, size: ExpandElementTyped<u32>, line_size: 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>, line_size: u32, ) -> <Self as CubeType>::ExpandType
pub fn __expand_new( scope: &mut Scope, size: ExpandElementTyped<u32>, ) -> <Self as CubeType>::ExpandType
pub fn __expand_len( scope: &mut Scope, this: ExpandElementTyped<Self>, ) -> ExpandElementTyped<u32>
pub fn __expand_buffer_len( scope: &mut Scope, this: ExpandElementTyped<Self>, ) -> ExpandElementTyped<u32>
pub fn new_aligned( size: u32, line_size: u32, alignment: u32, ) -> SharedMemory<Line<T>>
Sourcepub unsafe fn free(self)
 
pub unsafe fn free(self)
Frees the shared memory for reuse, if possible on the target runtime.
§Safety
Must be used in uniform control flow Must not have any dangling references to this shared memory
pub fn __expand_new_aligned( scope: &mut Scope, size: u32, line_size: u32, alignment: u32, ) -> <SharedMemory<Line<T>> as CubeType>::ExpandType
pub fn __expand_free( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <() 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
type Idx = u32
fn cube_idx(&self, _i: Self::Idx) -> &Self::Output
fn expand_index( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
fn expand_index_unchecked( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
fn cube_idx_mut(&mut self, _i: Self::Idx) -> &mut Self::Output
fn expand_index_mut( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, 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 line_size(&self) -> u32
fn __expand_line_size(_scope: &mut Scope, this: Self::ExpandType) -> u32
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 len(&self) -> u32
fn __expand_read_unchecked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, index: <u32 as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_len( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <u32 as CubeType>::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_mut(&mut self, start: u32, end: u32) -> Slice<E, ReadWrite> ⓘ
 
fn slice_mut(&mut self, start: u32, end: u32) -> 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 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.
fn __expand_slice_mut( scope: &mut Scope, this: <Self as CubeType>::ExpandType, start: <u32 as CubeType>::ExpandType, end: <u32 as CubeType>::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType ⓘ
fn __expand_to_slice_mut( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType ⓘ
Source§fn slice(&self, start: u32, end: u32) -> Slice<E, ReadOnly> ⓘ
 
fn slice(&self, start: u32, end: u32) -> 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 to_slice(&self) -> Slice<E, ReadOnly> ⓘ
 
fn to_slice(&self) -> Slice<E, ReadOnly> ⓘ
Reinterprete the current type as a read-only slice.
fn __expand_slice( scope: &mut Scope, this: <Self as CubeType>::ExpandType, start: <u32 as CubeType>::ExpandType, end: <u32 as CubeType>::ExpandType, ) -> <Slice<E, ReadOnly> as CubeType>::ExpandType ⓘ
fn __expand_to_slice( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <Slice<E, ReadOnly> as CubeType>::ExpandType ⓘ
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