Skip to main content

SliceMutOperator

Trait SliceMutOperator 

Source
pub trait SliceMutOperator<E>: CubeType{
    // Provided methods
    fn slice_mut(&mut self, start: usize, end: usize) -> Slice<E, ReadWrite>  { ... }
    fn to_slice_mut(&mut self) -> Slice<E, ReadWrite>  { ... }
    fn __expand_slice_mut(
        scope: &mut Scope,
        this: Self::ExpandType,
        start: <usize as CubeType>::ExpandType,
        end: <usize as CubeType>::ExpandType,
    ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType  { ... }
    fn __expand_to_slice_mut(
        scope: &mut Scope,
        this: Self::ExpandType,
    ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType  { ... }
}

Provided Methods§

Source

fn slice_mut(&mut self, start: usize, end: usize) -> 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>

Reinterprete the current type as a read-write slice.

Source

fn __expand_slice_mut( scope: &mut Scope, this: Self::ExpandType, start: <usize as CubeType>::ExpandType, end: <usize as CubeType>::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType

Source

fn __expand_to_slice_mut( scope: &mut Scope, this: Self::ExpandType, ) -> <Slice<E, ReadWrite> as CubeType>::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T, L> SliceMutOperator<T> for &'a L
where T: CubePrimitive, L: SliceMutOperator<T>, &'a L: CubeType<ExpandType = <L as CubeType>::ExpandType>,

Source§

impl<'a, T, L> SliceMutOperator<T> for &'a mut L
where T: CubePrimitive, L: SliceMutOperator<T>, &'a mut L: CubeType<ExpandType = <L as CubeType>::ExpandType>,

Source§

impl<E, N> SliceMutOperator<Vector<E, N>> for VirtualTensor<E, N, ReadWrite>
where E: Numeric, N: Size,

Implementors§