pub struct AffineQuery {
pub qrot: Vec<f32>,
pub a: f32,
pub b: f32,
}Expand description
The affine estimate (2g.2): because the quantizer ladder is UNIFORM, level value v(l) = l * step - SPAN (in coordinate units), so dot(x, q) ~ norm * ( step * SUM(l_j * q_j) - SPAN * SUM(q_j) ) / sd The second sum is one constant per query; the first needs no table at all – unpack each nibble to an integer, convert, multiply-add. Every step of that loop is straight-line arithmetic the compiler can vectorize, unlike a table lookup which never vectorizes. Four accumulators break the dependency chain as before.
Fields§
§qrot: Vec<f32>§a: f32step / sqrt(padded), premultiplied.
b: f32-SPAN/sqrt(padded) * SUM(qrot), premultiplied.
Auto Trait Implementations§
impl Freeze for AffineQuery
impl RefUnwindSafe for AffineQuery
impl Send for AffineQuery
impl Sync for AffineQuery
impl Unpin for AffineQuery
impl UnsafeUnpin for AffineQuery
impl UnwindSafe for AffineQuery
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