pub trait ViewOperations<T: CubePrimitive, C: Coordinates>: Vectorized + CubeType<ExpandType: ViewOperationsExpand<T, C>> {
Show 16 methods
// Provided methods
fn read(&self, pos: C) -> T { ... }
fn read_checked(&self, pos: C) -> T { ... }
fn read_masked(&self, pos: C, value: T) -> T { ... }
fn read_unchecked(&self, pos: C) -> T { ... }
fn as_linear_slice(&self, pos: C, size: C) -> &[T] { ... }
fn tensor_map_load(
&self,
barrier: &Barrier,
shared_memory: &mut [T],
pos: C,
) { ... }
fn shape(&self) -> C { ... }
fn is_in_bounds(&self, pos: C) -> bool { ... }
fn __expand_read(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <T as CubeType>::ExpandType { ... }
fn __expand_read_checked(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <T as CubeType>::ExpandType { ... }
fn __expand_read_masked(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
value: <T as CubeType>::ExpandType,
) -> <T as CubeType>::ExpandType { ... }
fn __expand_read_unchecked(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <T as CubeType>::ExpandType { ... }
fn __expand_as_linear_slice<'infer, 'scope>(
scope: &'scope Scope,
this: &'infer <Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
size: <C as CubeType>::ExpandType,
) -> &'infer <[T] as CubeType>::ExpandType ⓘ { ... }
fn __expand_tensor_map_load(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
barrier: &<Barrier as CubeType>::ExpandType,
shared_memory: &mut <[T] as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) { ... }
fn __expand_shape(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
) -> <C as CubeType>::ExpandType { ... }
fn __expand_is_in_bounds(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <bool as CubeType>::ExpandType { ... }
}Expand description
Type from which we can read values in cube functions.
For a mutable version, see [ListMut].
Provided Methods§
fn read(&self, pos: C) -> T
fn read_checked(&self, pos: C) -> T
fn read_masked(&self, pos: C, value: T) -> T
fn read_unchecked(&self, pos: C) -> T
Sourcefn as_linear_slice(&self, pos: C, size: C) -> &[T]
fn as_linear_slice(&self, pos: C, size: C) -> &[T]
Create a slice starting from pos, with size.
The layout handles translation into concrete indices.
Sourcefn tensor_map_load(&self, barrier: &Barrier, shared_memory: &mut [T], pos: C)
fn tensor_map_load(&self, barrier: &Barrier, shared_memory: &mut [T], pos: C)
Execute a TMA load into shared memory, if the underlying storage supports it. Panics if it’s unsupported.
fn shape(&self) -> C
fn is_in_bounds(&self, pos: C) -> bool
fn __expand_read( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_checked( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_masked( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, value: <T as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_read_unchecked( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <T as CubeType>::ExpandType
fn __expand_as_linear_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> &'infer <[T] as CubeType>::ExpandType ⓘ
fn __expand_tensor_map_load( scope: &Scope, this: &<Self as CubeType>::ExpandType, barrier: &<Barrier as CubeType>::ExpandType, shared_memory: &mut <[T] as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, )
fn __expand_shape( scope: &Scope, this: &<Self as CubeType>::ExpandType, ) -> <C as CubeType>::ExpandType
fn __expand_is_in_bounds( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".