pub struct DeviceScorer { /* private fields */ }Implementations§
Source§impl DeviceScorer
impl DeviceScorer
pub fn new(backend: Arc<DeviceBackend>) -> Self
pub fn backend_name(&self) -> &'static str
Trait Implementations§
Source§impl Scorer for DeviceScorer
impl Scorer for DeviceScorer
Source§fn score(&self, vector: &ComparisonVector, params: &ModelParams) -> ScoredPair
fn score(&self, vector: &ComparisonVector, params: &ModelParams) -> ScoredPair
Score a single pair, always CPU, cheap dot product.
Source§fn score_batch(
&self,
batch: &ComparisonBatch,
params: &ModelParams,
) -> Vec<ScoredPair>
fn score_batch( &self, batch: &ComparisonBatch, params: &ModelParams, ) -> Vec<ScoredPair>
Score a batch using the field-major
ComparisonBatch.fn estimate_params( &self, batch: &ComparisonBatch, init: Option<ModelParams>, max_iter: usize, ) -> Result<ModelParams>
Auto Trait Implementations§
impl Freeze for DeviceScorer
impl RefUnwindSafe for DeviceScorer
impl Send for DeviceScorer
impl Sync for DeviceScorer
impl Unpin for DeviceScorer
impl UnsafeUnpin for DeviceScorer
impl UnwindSafe for DeviceScorer
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> 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