pub struct KernelCaps {
pub accelerator: &'static str,
pub min_batch: usize,
pub max_dim: usize,
pub deterministic: bool,
}Expand description
Capability advertisement for a vector kernel. The caller’s dispatch policy compares these against the request to pick the best kernel for a given batch + determinism requirement.
Fields§
§accelerator: &'static strSymbolic accelerator label: “cpu”, “cpu-simd”, “cuda”, “metal”, “rocm”, “wasm-simd”, etc. Surfaced in stats.
min_batch: usizeMinimum batch size at which this kernel is ever chosen. CPU kernels report 1; GPU kernels typically ≥ 64.
max_dim: usizeMaximum dimensionality the kernel supports without falling
back to a slower path. usize::MAX means “no constraint”.
deterministic: boolDoes the kernel produce byte-identical output (scan + rerank) vs the reference CPU kernel? Only deterministic kernels can feed witness-sealed outputs under Fresh/Frozen consistency.
Implementations§
Source§impl KernelCaps
impl KernelCaps
Sourcepub const fn cpu_default() -> Self
pub const fn cpu_default() -> Self
Default CPU caps: available always, deterministic, no dim cap.
Trait Implementations§
Source§impl Clone for KernelCaps
impl Clone for KernelCaps
Source§fn clone(&self) -> KernelCaps
fn clone(&self) -> KernelCaps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KernelCaps
impl RefUnwindSafe for KernelCaps
impl Send for KernelCaps
impl Sync for KernelCaps
impl Unpin for KernelCaps
impl UnsafeUnpin for KernelCaps
impl UnwindSafe for KernelCaps
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
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>
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