pub enum Quant {
None,
Int8,
Bin,
}Expand description
How a vector set stores the direction of its vectors.
Variants§
None
NOQUANT, which stores the direction as it arrived.
Int8
Q8, one signed byte a coordinate against the widest one.
Bin
BIN, one bit a coordinate, which is the sign of it.
Implementations§
Source§impl Quant
impl Quant
Sourcepub fn token(self) -> &'static str
pub fn token(self) -> &'static str
What VINFO calls this, which is the name of the stored form and not the
name of the option that asked for it.
Sourcepub fn code_bytes(self, dim: usize) -> usize
pub fn code_bytes(self, dim: usize) -> usize
How many bytes VEMB RAW writes for a dim wide vector.
The binary form is rounded up to whole eight byte words rather than to whole bytes, because it is a run of 64 bit words on the wire and a set of 65 dimensions writes sixteen bytes and not nine.
Trait Implementations§
impl Copy for Quant
impl Eq for Quant
impl StructuralPartialEq for Quant
Auto Trait Implementations§
impl Freeze for Quant
impl RefUnwindSafe for Quant
impl Send for Quant
impl Sync for Quant
impl Unpin for Quant
impl UnsafeUnpin for Quant
impl UnwindSafe for Quant
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