pub enum Concurrency {
Cpu,
Gpu,
GpuPlusCpu,
}Expand description
Backend selection for Rationer similarity work.
Picked at construction; can’t change for a given handle (the resource set is wired up at
build() time). Re-create the handle if you need a different concurrency mode.
Variants§
Cpu
Pure CPU — single-threaded if threads(1), multi-threaded rayon otherwise. Works on
every platform; the only mode available with feature = "gpu" disabled.
Gpu
Allow the Metal GPU where it measured a net win. In practice that is only
cluster_canonicals on a single group above DFGPU_CLUSTER_THRESHOLD (~1.1–1.4× CPU,
peaking on mid-size canonical-Python corpora). ratio_many and cluster_canonicals_multi
stay on CPU under this mode too — the GPU matching_stats offload lost on both at every
size benchmarked (their GPU paths are env-opt-in only). On non-Metal platforms: Cpu.
GpuPlusCpu
Default. Same routing as Gpu (GPU only for big single-group cluster_canonicals,
everything else CPU), plus rayon-parallel CPU for the per-pair longest_in recursion on the
GPU output. Behaves identically to Gpu for the currently GPU-enabled path; kept as a
distinct mode so heterogeneous overlap can be re-enabled per-path via the env thresholds
without an API change.
Trait Implementations§
Source§impl Clone for Concurrency
impl Clone for Concurrency
Source§fn clone(&self) -> Concurrency
fn clone(&self) -> Concurrency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Concurrency
impl Debug for Concurrency
Source§impl Default for Concurrency
impl Default for Concurrency
Source§impl PartialEq for Concurrency
impl PartialEq for Concurrency
Source§fn eq(&self, other: &Concurrency) -> bool
fn eq(&self, other: &Concurrency) -> bool
self and other values to be equal, and is used by ==.impl Copy for Concurrency
impl Eq for Concurrency
impl StructuralPartialEq for Concurrency
Auto Trait Implementations§
impl Freeze for Concurrency
impl RefUnwindSafe for Concurrency
impl Send for Concurrency
impl Sync for Concurrency
impl Unpin for Concurrency
impl UnsafeUnpin for Concurrency
impl UnwindSafe for Concurrency
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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