Skip to main content

ViewOperationsMut

Trait ViewOperationsMut 

Source
pub trait ViewOperationsMut<T: CubePrimitive, C: Coordinates>: ViewOperations<T, C> + CubeType<ExpandType: ViewOperationsMutExpand<T, C>> {
    // Provided methods
    fn write(&self, pos: C, value: T) { ... }
    fn write_checked(&self, pos: C, value: T) { ... }
    fn as_linear_slice_mut(&self, pos: C, size: C) -> &mut [T] { ... }
    fn tensor_map_store(&self, shared_memory: &[T], pos: C) { ... }
    fn __expand_write(
        scope: &Scope,
        this: &<Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        value: <T as CubeType>::ExpandType,
    ) { ... }
    fn __expand_write_checked(
        scope: &Scope,
        this: &<Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        value: <T as CubeType>::ExpandType,
    ) { ... }
    fn __expand_as_linear_slice_mut<'infer, 'scope>(
        scope: &'scope Scope,
        this: &'infer <Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        size: <C as CubeType>::ExpandType,
    ) -> &'infer mut <[T] as CubeType>::ExpandType  { ... }
    fn __expand_tensor_map_store(
        scope: &Scope,
        this: &<Self as CubeType>::ExpandType,
        shared_memory: &<[T] as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
    ) { ... }
}
Expand description

Type for which we can read and write values in cube functions. For an immutable version, see List.

Provided Methods§

Source

fn write(&self, pos: C, value: T)

Source

fn write_checked(&self, pos: C, value: T)

Source

fn as_linear_slice_mut(&self, pos: C, size: C) -> &mut [T]

Create a mutable slice starting from pos, with size. The layout handles translation into concrete indices.

Source

fn tensor_map_store(&self, shared_memory: &[T], pos: C)

Execute a TMA store into global memory, if the underlying storage supports it. Panics if it’s unsupported.

Source

fn __expand_write( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, )

Source

fn __expand_write_checked( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, )

Source

fn __expand_as_linear_slice_mut<'infer, 'scope>( scope: &'scope Scope, this: &'infer <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> &'infer mut <[T] as CubeType>::ExpandType

Source

fn __expand_tensor_map_store( scope: &Scope, this: &<Self as CubeType>::ExpandType, shared_memory: &<[T] as CubeType>::ExpandType, pos: <C 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<T: CubePrimitive, C: Coordinates, V: ViewOperationsMut<T, C> + ?Sized> ViewOperationsMut<T, C> for &mut V

Source§

impl<T: CubePrimitive, N: CubePrimitive + Coordinates> ViewOperationsMut<T, Sequence<N>> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (i32, i32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (i32, i32, i32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (i32, i32, i32, i32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (i32, i32, i32, i32, i32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (u32, u32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (u32, u32, u32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (u32, u32, u32, u32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, (u32, u32, u32, u32, u32)> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, i32> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, usize> for Box<[T]>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, usize> for TensorMap<T, Tiled>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, usize> for [T]

Implementors§

Source§

impl<'a, T: CubePrimitive, C: Coordinates + 'a> ViewOperationsMut<T, C> for ViewMut<'a, T, C>

Source§

impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> ViewOperationsMut<T, C> for VirtualViewMut<T, C, S, V>
where V: ViewOperationsMut<T, S>,

Source§

impl<T: Numeric, N: Size> ViewOperationsMut<Vector<T, N>, usize> for VirtualTensor<T, N, ReadWrite>