Skip to main content

enumerate_circuits

Function enumerate_circuits 

Source
pub fn enumerate_circuits() -> &'static [CircuitAdapter]
Expand description

Enumerate every adapter once (cached), deduped to one entry per physical circuit (vendor, device) keeping the preferred backend, and sorted discrete → integrated → other → cpu for a deterministic, index-stable list. Returns an empty slice on a headless / GPU-less box.

The returned indices are the stable handles used by try_device_for_adapter, primary_circuit_index, and auxiliary_circuit_index.