pub enum ViewArg<'a, C: Coordinates, R: Runtime> {
Array(ArrayArg<'a, R>, VirtualLayoutLaunch<'a, C, Coords1d, R>),
TensorMap(TensorMapArg<'a, R>, VirtualLayoutLaunch<'a, C, 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>)
TensorMap(TensorMapArg<'a, R>, VirtualLayoutLaunch<'a, C, 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<L: Layout<Coordinates = C, SourceCoordinates: IntoDyn> + LaunchArg>( buffer: TensorMapArg<'a, R>, 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§
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