Struct cubecl_core::frontend::SharedMemory
source · pub struct SharedMemory<T: CubeType> { /* private fields */ }
Implementations§
pub fn new<S: Index>(_size: S) -> Self
pub fn vectorized<S: Index>(_size: S, _vectorization_factor: UInt) -> Self
pub fn __expand_vectorized<S: Index>( context: &mut CubeContext, size: S, vectorization_factor: UInt, ) -> <Self as CubeType>::ExpandType
pub fn __expand_new<S: Index>( context: &mut CubeContext, size: S, ) -> <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 moretype 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.
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<Start: Index, End: Index>(
context: &mut CubeContext,
expand: Self::Expand,
start: Start,
end: End,
) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_slice<Start: Index, End: Index>( context: &mut CubeContext, expand: Self::Expand, start: Start, end: End, ) -> 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<Start: Index, End: Index>(
context: &mut CubeContext,
expand: Self::Expand,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut<Start: Index, End: Index>( context: &mut CubeContext, expand: Self::Expand, start: Start, end: End, ) -> 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<Start: Index, End: Index>(
context: &mut CubeContext,
expand: Self::Expand,
start: Start,
end: End,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut_unsafe<Start: Index, End: Index>( context: &mut CubeContext, expand: Self::Expand, start: Start, end: End, ) -> 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
)