pub struct BpsScanner<'a> { /* private fields */ }Expand description
BPS scanner for streaming candidate generation
Implementations§
Source§impl<'a> BpsScanner<'a>
impl<'a> BpsScanner<'a>
Sourcepub fn new(
bps_data: &'a [u8],
n_vec: usize,
num_blocks: usize,
num_proj: usize,
) -> Self
pub fn new( bps_data: &'a [u8], n_vec: usize, num_blocks: usize, num_proj: usize, ) -> Self
Create a new BPS scanner
Sourcepub fn scan(&self, query_sketch: &[u8]) -> Vec<u16>
pub fn scan(&self, query_sketch: &[u8]) -> Vec<u16>
Scan and compute L1 distances to query sketch Returns distances for all vectors (lower = more similar)
Uses SIMD-accelerated C++ kernels via FFI when available:
- AVX2: 32 vectors per cycle (~32x speedup)
- AVX512: 64 vectors per cycle (~64x speedup)
- NEON: 16 vectors per cycle (~16x speedup)
Auto Trait Implementations§
impl<'a> Freeze for BpsScanner<'a>
impl<'a> RefUnwindSafe for BpsScanner<'a>
impl<'a> Send for BpsScanner<'a>
impl<'a> Sync for BpsScanner<'a>
impl<'a> Unpin for BpsScanner<'a>
impl<'a> UnsafeUnpin for BpsScanner<'a>
impl<'a> UnwindSafe for BpsScanner<'a>
Blanket Implementations§
impl<T> Allocation for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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