pub struct ViewExpand<'a, E: CubePrimitive, C: Coordinates> { /* private fields */ }Expand description
Expand type of View
Implementations§
Source§impl<'a, E: CubePrimitive, C: Coordinates + 'a> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates + 'a> ViewExpand<'a, E, C>
pub fn __expand_view_method<T: Coordinates + 'a>( self, scope: &Scope, layout: VirtualLayoutExpand<T, C>, ) -> ViewExpand<'a, E, T>
Source§impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
Sourcepub fn __expand_shape_method(
&self,
scope: &Scope,
) -> <C as CubeType>::ExpandType
pub fn __expand_shape_method( &self, scope: &Scope, ) -> <C as CubeType>::ExpandType
Calls Layout::shape on the view’s layout
Sourcepub fn __expand_is_in_bounds_method(
&self,
scope: &Scope,
pos: <C as CubeType>::ExpandType,
) -> <bool as CubeType>::ExpandType
pub fn __expand_is_in_bounds_method( &self, scope: &Scope, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
Calls Layout::is_in_bounds on the view’s layout
Sourcepub fn __expand_shape(scope: &Scope, this: &Self) -> <C as CubeType>::ExpandType
pub fn __expand_shape(scope: &Scope, this: &Self) -> <C as CubeType>::ExpandType
Calls Layout::shape on the view’s layout
Sourcepub fn __expand_is_in_bounds(
scope: &Scope,
this: &Self,
pos: <C as CubeType>::ExpandType,
) -> <bool as CubeType>::ExpandType
pub fn __expand_is_in_bounds( scope: &Scope, this: &Self, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
Calls Layout::is_in_bounds on the view’s layout
Source§impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
Sourcepub fn __expand_read_method(
&self,
scope: &Scope,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_method( &self, scope: &Scope, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos. The layout handles translation into a concrete index.
Sourcepub fn __expand_read_unchecked_method(
&self,
scope: &Scope,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_unchecked_method( &self, scope: &Scope, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos. The layout handles translation into a concrete index.
Reading is done unchecked
Sourcepub fn __expand_read_checked_method(
&self,
scope: &Scope,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_checked_method( &self, scope: &Scope, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos if it’s in bounds. The layout handles translation into a concrete index.
Sourcepub fn __expand_read_masked_method(
&self,
scope: &Scope,
pos: <C as CubeType>::ExpandType,
mask_value: <E as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_masked_method( &self, scope: &Scope, pos: <C as CubeType>::ExpandType, mask_value: <E as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos if it’s in bounds, returning mask_value otherwise. The layout handles translation into a concrete index.
Sourcepub fn __expand_as_linear_slice_method<'infer, 'scope>(
&'infer self,
scope: &'scope Scope,
) -> &'a <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_as_linear_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'a <[E] as CubeType>::ExpandType ⓘ
Interpret this view as a linear slice encompassing the entire view.
§Safety
No checking is done on whether the slice is contiguous in memory.
pub fn __expand_vector_size_method(&self, scope: &Scope) -> VectorSize
Sourcepub fn __expand_read(
scope: &Scope,
this: &Self,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read( scope: &Scope, this: &Self, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos. The layout handles translation into a concrete index.
Sourcepub fn __expand_read_unchecked(
scope: &Scope,
this: &Self,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_unchecked( scope: &Scope, this: &Self, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos. The layout handles translation into a concrete index.
Reading is done unchecked
Sourcepub fn __expand_read_checked(
scope: &Scope,
this: &Self,
pos: <C as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_checked( scope: &Scope, this: &Self, pos: <C as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos if it’s in bounds. The layout handles translation into a concrete index.
Sourcepub fn __expand_read_masked(
scope: &Scope,
this: &Self,
pos: <C as CubeType>::ExpandType,
mask_value: <E as CubeType>::ExpandType,
) -> <E as CubeType>::ExpandType
pub fn __expand_read_masked( scope: &Scope, this: &Self, pos: <C as CubeType>::ExpandType, mask_value: <E as CubeType>::ExpandType, ) -> <E as CubeType>::ExpandType
Read a value at pos if it’s in bounds, returning mask_value otherwise. The layout handles translation into a concrete index.
Sourcepub fn __expand_as_linear_slice<'infer, 'scope>(
scope: &'scope Scope,
this: &'infer Self,
) -> &'a <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_as_linear_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'a <[E] as CubeType>::ExpandType ⓘ
Interpret this view as a linear slice encompassing the entire view.
§Safety
No checking is done on whether the slice is contiguous in memory.
pub fn __expand_vector_size(scope: &Scope, this: &Self) -> VectorSize
Source§impl<'a, E: CubePrimitive, C: Coordinates + 'static> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates + 'static> ViewExpand<'a, E, C>
Sourcepub fn __expand_slice_method<'scope>(
self,
scope: &'scope Scope,
pos: <C as CubeType>::ExpandType,
size: <C as CubeType>::ExpandType,
) -> <View<'a, E, C> as CubeType>::ExpandType
pub fn __expand_slice_method<'scope>( self, scope: &'scope Scope, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <View<'a, E, C> as CubeType>::ExpandType
Create a slice starting from pos, with size.
The layout handles translation into concrete indices.
Size will be clamped to the current layout size.
Sourcepub fn __expand_slice_unchecked_method<'scope>(
self,
scope: &'scope Scope,
pos: <C as CubeType>::ExpandType,
size: <C as CubeType>::ExpandType,
) -> <View<'a, E, C> as CubeType>::ExpandType
pub fn __expand_slice_unchecked_method<'scope>( self, scope: &'scope Scope, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <View<'a, E, C> as CubeType>::ExpandType
Create a slice starting from pos, with size.
The layout handles translation into concrete indices.
Size and pos will be clamped to the current layout size.
#Safety
Access is always unchecked
Sourcepub fn __expand_slice<'scope>(
scope: &'scope Scope,
this: Self,
pos: <C as CubeType>::ExpandType,
size: <C as CubeType>::ExpandType,
) -> <View<'a, E, C> as CubeType>::ExpandType
pub fn __expand_slice<'scope>( scope: &'scope Scope, this: Self, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <View<'a, E, C> as CubeType>::ExpandType
Create a slice starting from pos, with size.
The layout handles translation into concrete indices.
Size will be clamped to the current layout size.
Sourcepub fn __expand_slice_unchecked<'scope>(
scope: &'scope Scope,
this: Self,
pos: <C as CubeType>::ExpandType,
size: <C as CubeType>::ExpandType,
) -> <View<'a, E, C> as CubeType>::ExpandType
pub fn __expand_slice_unchecked<'scope>( scope: &'scope Scope, this: Self, pos: <C as CubeType>::ExpandType, size: <C as CubeType>::ExpandType, ) -> <View<'a, E, C> as CubeType>::ExpandType
Create a slice starting from pos, with size.
The layout handles translation into concrete indices.
Size and pos will be clamped to the current layout size.
#Safety
Access is always unchecked
Source§impl<'a, E: CubePrimitive, C: Coordinates + 'a> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates + 'a> ViewExpand<'a, E, C>
Sourcepub fn __expand_tensor_map_load_method(
&self,
scope: &Scope,
barrier: &<Barrier as CubeType>::ExpandType,
shared_memory: &mut <[E] as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
)
pub fn __expand_tensor_map_load_method( &self, scope: &Scope, barrier: &<Barrier as CubeType>::ExpandType, shared_memory: &mut <[E] as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, )
Execute a TMA load into shared memory, if the underlying storage supports it. Panics if it’s unsupported.
Sourcepub fn __expand_tensor_map_load(
scope: &Scope,
this: &Self,
barrier: &<Barrier as CubeType>::ExpandType,
shared_memory: &mut <[E] as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
)
pub fn __expand_tensor_map_load( scope: &Scope, this: &Self, barrier: &<Barrier as CubeType>::ExpandType, shared_memory: &mut <[E] as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, )
Execute a TMA load into shared memory, if the underlying storage supports it. Panics if it’s unsupported.
Source§impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> ViewExpand<'a, E, C>
pub fn new<V: ViewOperationsExpand<E, C> + 'a>(scope: &Scope, view: V) -> Self
Trait Implementations§
Source§impl<'a, E: CubePrimitive, C: Coordinates> AsMutExpand for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> AsMutExpand for ViewExpand<'a, E, C>
fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self
fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T
Source§impl<'a, E: CubePrimitive, C: Coordinates> AsRefExpand for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> AsRefExpand for ViewExpand<'a, E, C>
fn __expand_ref_method(&self, _: &Scope) -> &Self
fn __expand_as_ref_method(&self, scope: &Scope) -> &T
Source§impl<'a, E: Clone + CubePrimitive, C: Clone + Coordinates> Clone for ViewExpand<'a, E, C>
impl<'a, E: Clone + CubePrimitive, C: Clone + Coordinates> Clone for ViewExpand<'a, E, C>
Source§fn clone(&self) -> ViewExpand<'a, E, C>
fn clone(&self) -> ViewExpand<'a, E, C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a, E: Copy + CubePrimitive, C: Copy + Coordinates> Copy for ViewExpand<'a, E, C>
Source§impl<'a, E: CubePrimitive, C: Coordinates> CubeDebug for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> CubeDebug for ViewExpand<'a, E, C>
Source§fn set_debug_name(&self, scope: &Scope, name: &'static str)
fn set_debug_name(&self, scope: &Scope, name: &'static str)
Source§impl<'a, E: CubePrimitive, C: Coordinates> DerefExpand for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> DerefExpand for ViewExpand<'a, E, C>
type Target = ViewExpand<'a, E, C>
fn __expand_deref_method(&self, _: &Scope) -> Self::Target
Source§impl<'a, E: CubePrimitive, C: Coordinates> ExpandTypeClone for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> ExpandTypeClone for ViewExpand<'a, E, C>
Source§fn clone_unchecked(&self) -> Self
fn clone_unchecked(&self) -> Self
Clone semantics and should only be used for the
conceptual expand values, never real data. Using two values in the same branch is undefined
behaviour.Source§impl<'a, E: CubePrimitive, C: Coordinates> IntoExpand for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> IntoExpand for ViewExpand<'a, E, C>
type Expand = ViewExpand<'a, E, C>
fn into_expand(self, _: &Scope) -> Self::Expand
Source§impl<'a, E: CubePrimitive, C: Coordinates> IntoMut for ViewExpand<'a, E, C>
impl<'a, E: CubePrimitive, C: Coordinates> IntoMut for ViewExpand<'a, E, C>
Source§impl<'a, T: CubePrimitive, C: Coordinates + 'a> VectorizedExpand for ViewExpand<'a, T, C>
impl<'a, T: CubePrimitive, C: Coordinates + 'a> VectorizedExpand for ViewExpand<'a, T, C>
fn vector_size(&self) -> VectorSize
fn __expand_vector_size_method(&self, _scope: &Scope) -> usize
Source§impl<'a, T: CubePrimitive, C: Coordinates + 'a> ViewOperationsExpand<T, C> for ViewExpand<'a, T, C>
impl<'a, T: CubePrimitive, C: Coordinates + 'a> ViewOperationsExpand<T, C> for ViewExpand<'a, T, C>
fn __expand_read_method( &self, scope: &Scope, pos: C::ExpandType, ) -> T::ExpandType
fn __expand_read_checked_method( &self, scope: &Scope, pos: C::ExpandType, ) -> T::ExpandType
fn __expand_read_masked_method( &self, scope: &Scope, pos: C::ExpandType, mask_value: T::ExpandType, ) -> T::ExpandType
fn __expand_read_unchecked_method( &self, scope: &Scope, pos: C::ExpandType, ) -> T::ExpandType
fn __expand_as_linear_slice_method( &self, scope: &Scope, pos: C::ExpandType, end: C::ExpandType, ) -> &SliceExpand<T>
fn __expand_shape_method(&self, scope: &Scope) -> C::ExpandType
fn __expand_is_in_bounds_method( &self, scope: &Scope, pos: C::ExpandType, ) -> NativeExpand<bool>
fn __expand_tensor_map_load_method( &self, scope: &Scope, barrier: &NativeExpand<Barrier>, shared_memory: &mut SliceExpand<T>, pos: C::ExpandType, )
Auto Trait Implementations§
impl<'a, E, C> !RefUnwindSafe for ViewExpand<'a, E, C>
impl<'a, E, C> !Send for ViewExpand<'a, E, C>
impl<'a, E, C> !Sync for ViewExpand<'a, E, C>
impl<'a, E, C> !UnwindSafe for ViewExpand<'a, E, C>
impl<'a, E, C> Freeze for ViewExpand<'a, E, C>
impl<'a, E, C> Unpin for ViewExpand<'a, E, C>
impl<'a, E, C> UnsafeUnpin for ViewExpand<'a, E, C>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more