pub struct NdArrayQTensor {
pub qtensor: NdArrayTensor,
pub scheme: QuantScheme,
pub qparams: Vec<QParams<f32>>,
}Expand description
A quantized tensor for the ndarray backend.
Fields§
§qtensor: NdArrayTensorThe quantized tensor.
scheme: QuantSchemeThe quantization scheme.
qparams: Vec<QParams<f32>>The quantization parameters.
Implementations§
Trait Implementations§
Source§impl Clone for NdArrayQTensor
impl Clone for NdArrayQTensor
Source§fn clone(&self) -> NdArrayQTensor
fn clone(&self) -> NdArrayQTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NdArrayQTensor
impl Debug for NdArrayQTensor
Source§impl TensorMetadata for NdArrayQTensor
impl TensorMetadata for NdArrayQTensor
Source§type Device = NdArrayDevice
type Device = NdArrayDevice
The device type associated with the tensor.
Source§fn can_mut(&self) -> bool
fn can_mut(&self) -> bool
Whether the tensor’s buffer can be mutated in place — i.e. this handle
uniquely owns it, so an in-place op (
slice_assign, an inplace kernel)
writes the existing allocation instead of copying it first. Read moreSource§fn scheme(&self) -> QuantScheme
fn scheme(&self) -> QuantScheme
Get the quantization scheme for a quantized float tensor. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for NdArrayQTensor
impl !UnwindSafe for NdArrayQTensor
impl Freeze for NdArrayQTensor
impl Send for NdArrayQTensor
impl Sync for NdArrayQTensor
impl Unpin for NdArrayQTensor
impl UnsafeUnpin for NdArrayQTensor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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