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 to_linear_slice_mut(&self, pos: C, size: C) -> Slice<T, ReadWrite> { ... }
    fn tensor_map_store(&self, shared_memory: &Slice<T>, pos: C) { ... }
    fn __expand_write(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        value: <T as CubeType>::ExpandType,
    ) -> <() as CubeType>::ExpandType { ... }
    fn __expand_write_checked(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        value: <T as CubeType>::ExpandType,
    ) -> <() as CubeType>::ExpandType { ... }
    fn __expand_to_linear_slice_mut(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
        size: <C as CubeType>::ExpandType,
    ) -> <Slice<T, ReadWrite> as CubeType>::ExpandType { ... }
    fn __expand_tensor_map_store(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        shared_memory: <Slice<T> as CubeType>::ExpandType,
        pos: <C as CubeType>::ExpandType,
    ) -> <() 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 to_linear_slice_mut(&self, pos: C, size: C) -> Slice<T, ReadWrite>

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

Source

fn tensor_map_store(&self, shared_memory: &Slice<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: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source

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

Source

fn __expand_to_linear_slice_mut( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <Slice<T, ReadWrite> as CubeType>::ExpandType

Source

fn __expand_tensor_map_store( scope: &mut Scope, this: <Self as CubeType>::ExpandType, shared_memory: <Slice<T> as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T: CubePrimitive, C: Coordinates, L: ViewOperationsMut<T, C>> ViewOperationsMut<T, C> for &'a L
where &'a L: CubeType<ExpandType = L::ExpandType>,

Source§

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

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, pos: C::ExpandType, value: T::ExpandType, )

Source§

impl<'a, T: CubePrimitive, C: Coordinates, L: ViewOperationsMut<T, C>> ViewOperationsMut<T, C> for &'a mut L
where &'a mut L: CubeType<ExpandType = L::ExpandType>,

Source§

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

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, pos: C::ExpandType, value: T::ExpandType, )

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, u32> for Array<T>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, u32> for SharedMemory<T>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, u32> for Slice<T, ReadWrite>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, u32> for Tensor<T>

Source§

impl<T: CubePrimitive> ViewOperationsMut<T, u32> for TensorMap<T>

Source§

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

Implementors§