#[repr(C)]pub struct BlockQ4_1 { /* private fields */ }
Trait Implementations§
Source§impl GgmlType for BlockQ4_1
impl GgmlType for BlockQ4_1
const DTYPE: GgmlDType = GgmlDType::Q4_1
const BLCK_SIZE: usize = 32usize
type VecDotType = BlockQ8_1
Source§fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> Result<f32>
fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> Result<f32>
Dot product used as a building block for quantized mat-mul.
n is the number of elements to be considered.
Source§fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> Result<f32>
fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> Result<f32>
Generic implementation of the dot product without simd optimizations.
fn from_float(xs: &[f32], ys: &mut [Self]) -> Result<()>
fn to_float(xs: &[Self], ys: &mut [f32]) -> Result<()>
fn zeros() -> Self
impl StructuralPartialEq for BlockQ4_1
Auto Trait Implementations§
impl Freeze for BlockQ4_1
impl RefUnwindSafe for BlockQ4_1
impl Send for BlockQ4_1
impl Sync for BlockQ4_1
impl Unpin for BlockQ4_1
impl UnwindSafe for BlockQ4_1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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