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 __expand_new_lined( context: &mut CubeContext, 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( context: &mut CubeContext, size: ExpandElementTyped<u32>, vectorization_factor: u32, ) -> <Self as CubeType>::ExpandType
pub fn __expand_new( context: &mut CubeContext, 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(context: &mut CubeContext, expand: Self::ExpandType) -> Self::ExpandType
fn init(context: &mut CubeContext, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
fn __expand_runtime_method( self, _context: &mut CubeContext, ) -> ExpandElementTyped<Self>
Source§fn runtime(self) -> Self
fn runtime(self) -> Self
Make sure a type is actually expanded into its runtime expand type.
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 index.
Source§fn __expand_slice(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_slice( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<Slice<'static, E>>
Expand function of SliceOperator::slice.
Source§fn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E>
fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> &mut SliceMut<'_, E>
Return a read-write view of all elements comprise between the start and end index.
Source§fn __expand_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::slice_mut.
Source§fn slice_mut_unsafe<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E>
fn slice_mut_unsafe<Start: Index, End: Index>( &self, start: Start, end: End, ) -> &mut SliceMut<'_, E>
Return a read-write view of all elements comprise between the start and end index. Read more
Source§fn __expand_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut_unsafe( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::slice_mut_unsafe.
Source§fn __expand_as_slice(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<Slice<'static, E>>
Expand function of SliceOperator::as_slice.
Source§fn as_slice_mut(&mut self) -> &mut SliceMut<'_, E>
fn as_slice_mut(&mut self) -> &mut SliceMut<'_, E>
Reinterprete the current type as a read-write slice.
Source§fn __expand_as_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::as_slice_mut.
Source§fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
Reinterprete the current type as a read-write slice. Read more
Source§fn __expand_as_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_unsafe( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::as_slice_mut_unsafe.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)