pub struct MaxSimQuery<'a> { /* private fields */ }Expand description
A normalized query prepared for repeated MaxSim scoring.
On x86_64 with AVX2 or AVX-512 the query tokens are packed once into a
dimension-major panel, so each document is scored with a register-tiled
kernel that needs no horizontal reductions. Elsewhere it forwards to
maxsim_flat.
score always equals maxsim_flat on the same inputs. When the BF16 kernels are in use
(see [bf16_active]) nothing is packed and every call goes through the same BF16 path, so
the two never disagree about a document’s score.
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MaxSimQuery<'a>
impl<'a> RefUnwindSafe for MaxSimQuery<'a>
impl<'a> Send for MaxSimQuery<'a>
impl<'a> Sync for MaxSimQuery<'a>
impl<'a> Unpin for MaxSimQuery<'a>
impl<'a> UnsafeUnpin for MaxSimQuery<'a>
impl<'a> UnwindSafe for MaxSimQuery<'a>
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