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

Method available_count

crates/openshell-driver-vm/src/gpu.rs:56–64  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

54 }
55
56 pub fn available_count(&self) -> u32 {
57 u32::try_from(
58 self.slots
59 .iter()
60 .filter(|s| s.assigned_to.is_none())
61 .count(),
62 )
63 .unwrap_or(u32::MAX)
64 }
65
66 /// Assign a GPU to a sandbox. Returns the assignment details including BDF.
67 pub fn assign(&mut self, sandbox_id: &str, gpu_device: &str) -> Result<GpuAssignment, String> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected