Skip to main content

ProbeableBackend

Trait ProbeableBackend 

Source
pub trait ProbeableBackend: Send + Sync {
    // Required methods
    fn id(&self) -> BackendId;
    fn available(&self) -> bool;
    fn probe_class(
        &self,
        class: KernelClass,
        panel: &KernelPanel,
    ) -> Vec<CircuitBench>;
}
Expand description

One acceleration method. Implementors register into a BackendRegistry; the rest of the bridge only ever sees them through this trait, which is why adding a backend never edits select().

Required Methods§

Source

fn id(&self) -> BackendId

Stable identifier ("cpu", "wgpu", "cuda", …).

Source

fn available(&self) -> bool

Is this backend’s runtime/SDK present and usable on THIS machine? A false backend contributes no rows and is never selected.

Source

fn probe_class( &self, class: KernelClass, panel: &KernelPanel, ) -> Vec<CircuitBench>

Measure this backend on one kernel class, returning a row per physical circuit it can drive (e.g. wgpu returns one row per adapter). Empty when the backend cannot run the class or is unavailable — recorded honestly as “no rows,” never a fabricated number.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ProbeableBackend for CpuBackend

Source§

impl ProbeableBackend for WgpuBackend

Available on crate feature gpu-runtime only.