pub struct Quantizer;Implementations§
Source§impl Quantizer
impl Quantizer
pub fn f32_to_f16_bytes(v: &[f32]) -> Vec<u8> ⓘ
pub fn f16_bytes_to_f32(bytes: &[u8]) -> Vec<f32>
Sourcepub fn f32_bytes_to_f32(bytes: &[u8]) -> Vec<f32>
pub fn f32_bytes_to_f32(bytes: &[u8]) -> Vec<f32>
Reinterpret raw little-endian F32 bytes (4 bytes/element) — the identity
decode for VectorPrecision::F32 columns, no quantization involved.
pub fn f32_to_i8(v: &[f32]) -> (Vec<i8>, ScalingParams)
pub fn i8_to_f32(v: &[i8], params: &ScalingParams) -> Vec<f32>
Auto Trait Implementations§
impl Freeze for Quantizer
impl RefUnwindSafe for Quantizer
impl Send for Quantizer
impl Sync for Quantizer
impl Unpin for Quantizer
impl UnsafeUnpin for Quantizer
impl UnwindSafe for Quantizer
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> 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