MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / device_ids

Method device_ids

crates/openshell-core/src/gpu.rs:177–184  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

175 /// Return the cached normalized inventory snapshot.
176 #[must_use]
177 pub fn device_ids(&self) -> Vec<String> {
178 self.state
179 .read()
180 .expect("CDI GPU selector state lock poisoned")
181 .inventory
182 .as_slice()
183 .to_vec()
184 }
185
186 /// Return the current default device IDs without advancing the cursor.
187 pub fn peek_device_ids(&self, count: u32) -> Result<Vec<String>, CdiGpuSelectionError> {

Callers 1

fmtMethod · 0.80

Calls 2

as_sliceMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected