pub enum ViewArg<'a, C: Coordinates, R: Runtime> {
Array(ArrayArg<'a, R>, VirtualLayoutLaunch<'a, C, Coords1d, R>),
TensorMapTiled(TensorMapArg<'a, R, Tiled>, VirtualLayoutLaunch<'a, C, Sequence<i32>, R>),
TensorMapIm2col(TensorMapArg<'a, R, Im2col>, VirtualLayoutLaunch<'a, C, (Sequence<i32>, Sequence<i32>), R>),
Quantized {
values: Box<ViewArg<'a, C, R>>,
scales: Box<ViewArg<'a, C, R>>,
scheme: QuantScheme,
},
}Variants§
Array(ArrayArg<'a, R>, VirtualLayoutLaunch<'a, C, Coords1d, R>)
TensorMapTiled(TensorMapArg<'a, R, Tiled>, VirtualLayoutLaunch<'a, C, Sequence<i32>, R>)
TensorMapIm2col(TensorMapArg<'a, R, Im2col>, VirtualLayoutLaunch<'a, C, (Sequence<i32>, Sequence<i32>), R>)
Quantized
Implementations§
Source§impl<'a, C: Coordinates, R: Runtime> ViewArg<'a, C, R>
impl<'a, C: Coordinates, R: Runtime> ViewArg<'a, C, R>
pub fn new<L: Layout<Coordinates = C, SourceCoordinates = Coords1d> + LaunchArg>( buffer: ArrayArg<'a, R>, layout: L::RuntimeArg<'a, R>, ) -> Self
pub fn new_tensor_map_tiled<L: Layout<Coordinates = C, SourceCoordinates: IntoDyn> + LaunchArg>( buffer: TensorMapArg<'a, R, Tiled>, layout: L::RuntimeArg<'a, R>, ) -> Self
pub fn new_tensor_map_im2col<L: Layout<Coordinates = C, SourceCoordinates = (P, O)> + LaunchArg, P: IntoDyn, O: IntoDyn>( buffer: TensorMapArg<'a, R, Im2col>, layout: L::RuntimeArg<'a, R>, ) -> Self
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.
Trait Implementations§
Source§impl<'a, C: Coordinates, R: Runtime> ArgSettings<R> for ViewArg<'a, C, R>
impl<'a, C: Coordinates, R: Runtime> ArgSettings<R> for ViewArg<'a, C, R>
Source§fn register(&self, launcher: &mut KernelLauncher<R>)
fn register(&self, launcher: &mut KernelLauncher<R>)
Register the information of an argument to the KernelLauncher.
Auto Trait Implementations§
impl<'a, C, R> Freeze for ViewArg<'a, C, R>
impl<'a, C, R> !RefUnwindSafe for ViewArg<'a, C, R>
impl<'a, C, R> Send for ViewArg<'a, C, R>
impl<'a, C, R> Sync for ViewArg<'a, C, R>
impl<'a, C, R> Unpin for ViewArg<'a, C, R>where
R: Unpin,
impl<'a, C, R> !UnwindSafe for ViewArg<'a, C, R>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more