pub struct VirtualView<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperations<T, S>> { /* private fields */ }Implementations§
Source§impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperations<T, S>> VirtualView<T, C, S, V>
impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperations<T, S>> VirtualView<T, C, S, V>
pub fn new(view: V, layout: VirtualLayout<C, S>) -> Self
pub fn __expand_new( scope: &Scope, view: <V as CubeType>::ExpandType, layout: <VirtualLayout<C, S> as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
Trait Implementations§
Source§impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperations<T, S>> CubeType for VirtualView<T, C, S, V>
impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V: ViewOperations<T, S>> CubeType for VirtualView<T, C, S, V>
type ExpandType = VirtualViewExpand<T, C, S, V>
Source§impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> Vectorized for VirtualView<T, C, S, V>where
V: ViewOperations<T, S>,
impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> Vectorized for VirtualView<T, C, S, V>where
V: ViewOperations<T, S>,
fn vector_size(&self) -> usize
fn __expand_vector_size(scope: &Scope, this: &Self::ExpandType) -> usize
Source§impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> ViewOperations<T, C> for VirtualView<T, C, S, V>where
V: ViewOperations<T, S>,
impl<T: CubePrimitive, C: Coordinates, S: Coordinates, V> ViewOperations<T, C> for VirtualView<T, C, S, V>where
V: ViewOperations<T, S>,
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
Source§fn 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.Source§fn 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
Auto Trait Implementations§
impl<T, C, S, V> Freeze for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: Freeze,
VirtualLayout<C, S>: Freeze,
PhantomData<T>: Freeze,
impl<T, C, S, V> RefUnwindSafe for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: RefUnwindSafe,
VirtualLayout<C, S>: RefUnwindSafe,
PhantomData<T>: RefUnwindSafe,
impl<T, C, S, V> Send for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: Send,
VirtualLayout<C, S>: Send,
PhantomData<T>: Send,
impl<T, C, S, V> Sync for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: Sync,
VirtualLayout<C, S>: Sync,
PhantomData<T>: Sync,
impl<T, C, S, V> Unpin for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: Unpin,
VirtualLayout<C, S>: Unpin,
PhantomData<T>: Unpin,
impl<T, C, S, V> UnsafeUnpin for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: UnsafeUnpin,
VirtualLayout<C, S>: UnsafeUnpin,
PhantomData<T>: UnsafeUnpin,
impl<T, C, S, V> UnwindSafe for VirtualView<T, C, S, V>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
V: UnwindSafe,
VirtualLayout<C, S>: UnwindSafe,
PhantomData<T>: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
Converts
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> ⓘ
Converts
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