pub enum ViewArg<C: Coordinates, R: Runtime> {
Array(BufferArg<R>, VirtualViewLayoutLaunch<C, Coords1d, BufferArg<R>, R>),
Tensor(TensorArg<R>, VirtualViewLayoutLaunch<C, Coords1d, TensorArg<R>, R>),
TensorMapTiled(TensorMapArg<R, Tiled>, VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>),
TensorMapIm2col(TensorMapArg<R, Im2col>, VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>),
Quantized {
values: Box<ViewArg<C, R>>,
scales: ScaleBindings<C, R>,
scheme: QuantScheme,
},
}Variants§
Array(BufferArg<R>, VirtualViewLayoutLaunch<C, Coords1d, BufferArg<R>, R>)
Tensor(TensorArg<R>, VirtualViewLayoutLaunch<C, Coords1d, TensorArg<R>, R>)
TensorMapTiled(TensorMapArg<R, Tiled>, VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>)
TensorMapIm2col(TensorMapArg<R, Im2col>, VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>)
Quantized
Implementations§
Source§impl<C: Coordinates, R: Runtime> ViewArg<C, R>
impl<C: Coordinates, R: Runtime> ViewArg<C, R>
pub fn new_array<L: Layout<Coordinates = C, SourceCoordinates = Coords1d> + ViewLayoutLaunchArg>( buffer: BufferArg<R>, layout: L::RuntimeArg<R>, ) -> Self
pub fn new_tensor<L: Layout<Coordinates = C, SourceCoordinates = Coords1d> + ViewLayoutLaunchArg>( buffer: TensorArg<R>, layout: L::RuntimeArg<R>, ) -> Self
pub fn new_tensor_map_tiled<L: Layout<Coordinates = C, SourceCoordinates: IntoDyn> + ViewLayoutLaunchArg>( buffer: TensorMapArg<R, Tiled>, layout: L::RuntimeArg<R>, ) -> ViewArg<C, R>
pub fn new_tensor_map_im2col<L: Layout<Coordinates = C, SourceCoordinates = (P, O)> + ViewLayoutLaunchArg, P: IntoDyn, O: IntoDyn>( buffer: TensorMapArg<R, Im2col>, layout: L::RuntimeArg<R>, ) -> ViewArg<C, R>
Sourcepub fn new_quantized(
values: Self,
scales: ScaleBindings<C, R>,
scheme: QuantScheme,
) -> Self
pub fn new_quantized( values: Self, scales: ScaleBindings<C, R>, scheme: QuantScheme, ) -> Self
Create a new view arg that dequantizes on read, against one scale binding per scheme level. The inner scales layout should take values indices and map them to the corresponding scale.
Panics when the bindings and the scheme’s levels disagree in count, since a missing
level would be dropped from the reconstruction, and for an global level this reader
cannot serve. See quant::check_scale_bindings.
Auto Trait Implementations§
impl<C, R> !RefUnwindSafe for ViewArg<C, R>
impl<C, R> !UnwindSafe for ViewArg<C, R>
impl<C, R> Freeze for ViewArg<C, R>where
<C as CubeType>::ExpandType: Sized,
BufferArg<R>: Freeze,
VirtualViewLayoutLaunch<C, usize, BufferArg<R>, R>: Freeze,
TensorArg<R>: Freeze,
VirtualViewLayoutLaunch<C, usize, TensorArg<R>, R>: Freeze,
TensorMapArg<R, Tiled>: Freeze,
VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>: Freeze,
TensorMapArg<R, Im2col>: Freeze,
VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>: Freeze,
Box<ViewArg<C, R>>: Freeze,
ScaleBindings<C, R>: Freeze,
impl<C, R> Send for ViewArg<C, R>where
<C as CubeType>::ExpandType: Sized,
BufferArg<R>: Send,
VirtualViewLayoutLaunch<C, usize, BufferArg<R>, R>: Send,
TensorArg<R>: Send,
VirtualViewLayoutLaunch<C, usize, TensorArg<R>, R>: Send,
TensorMapArg<R, Tiled>: Send,
VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>: Send,
TensorMapArg<R, Im2col>: Send,
VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>: Send,
Box<ViewArg<C, R>>: Send,
ScaleBindings<C, R>: Send,
impl<C, R> Sync for ViewArg<C, R>where
<C as CubeType>::ExpandType: Sized,
BufferArg<R>: Sync,
VirtualViewLayoutLaunch<C, usize, BufferArg<R>, R>: Sync,
TensorArg<R>: Sync,
VirtualViewLayoutLaunch<C, usize, TensorArg<R>, R>: Sync,
TensorMapArg<R, Tiled>: Sync,
VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>: Sync,
TensorMapArg<R, Im2col>: Sync,
VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>: Sync,
Box<ViewArg<C, R>>: Sync,
ScaleBindings<C, R>: Sync,
impl<C, R> Unpin for ViewArg<C, R>where
<C as CubeType>::ExpandType: Sized,
BufferArg<R>: Unpin,
VirtualViewLayoutLaunch<C, usize, BufferArg<R>, R>: Unpin,
TensorArg<R>: Unpin,
VirtualViewLayoutLaunch<C, usize, TensorArg<R>, R>: Unpin,
TensorMapArg<R, Tiled>: Unpin,
VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>: Unpin,
TensorMapArg<R, Im2col>: Unpin,
VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>: Unpin,
Box<ViewArg<C, R>>: Unpin,
ScaleBindings<C, R>: Unpin,
impl<C, R> UnsafeUnpin for ViewArg<C, R>where
<C as CubeType>::ExpandType: Sized,
BufferArg<R>: UnsafeUnpin,
VirtualViewLayoutLaunch<C, usize, BufferArg<R>, R>: UnsafeUnpin,
TensorArg<R>: UnsafeUnpin,
VirtualViewLayoutLaunch<C, usize, TensorArg<R>, R>: UnsafeUnpin,
TensorMapArg<R, Tiled>: UnsafeUnpin,
VirtualViewLayoutLaunch<C, Sequence<i32>, TensorMapArg<R, Tiled>, R>: UnsafeUnpin,
TensorMapArg<R, Im2col>: UnsafeUnpin,
VirtualViewLayoutLaunch<C, (Sequence<i32>, Sequence<i32>), TensorMapArg<R, Im2col>, R>: UnsafeUnpin,
Box<ViewArg<C, R>>: UnsafeUnpin,
ScaleBindings<C, R>: UnsafeUnpin,
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