pub enum ViewArg<C: Coordinates, R: Runtime> {
Array(ArrayArg<R>, VirtualViewLayoutLaunch<C, Coords1d, ArrayArg<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: Box<ViewArg<C, R>>,
scheme: QuantScheme,
},
}Variants§
Array(ArrayArg<R>, VirtualViewLayoutLaunch<C, Coords1d, ArrayArg<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: ArrayArg<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: Self, scheme: QuantScheme) -> Self
pub fn new_quantized(values: Self, scales: Self, scheme: QuantScheme) -> Self
Create a new view arg that dequantizes on read. The scales layout should take values indices and map them to the corresponding scale.
Auto Trait Implementations§
impl<C, R> Freeze for ViewArg<C, R>
impl<C, R> !RefUnwindSafe for ViewArg<C, R>
impl<C, R> Send for ViewArg<C, R>
impl<C, R> Sync for ViewArg<C, R>
impl<C, R> Unpin for ViewArg<C, R>where
R: Unpin,
impl<C, R> UnsafeUnpin for ViewArg<C, R>
impl<C, R> !UnwindSafe for ViewArg<C, R>
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