Skip to main content

Module gpu

Module gpu 

Source
Expand description

Graphics adapters.

What the OS says about each adapter: its name, vendor, kind, PCI ids, dedicated memory, and driver. No usage or memory in use: those need vendor libraries (NVML, ROCm SMI, DXGI), which sys-lib does not load.

use sys_lib as sys;

for g in sys::gpu::list().unwrap_or_default() {
    println!("{} ({:?}, {:?}) memory {:?}", g.name, g.vendor, g.kind, g.memory);
}

Structs§

Gpu
One graphics adapter.

Enums§

GpuKind
Where a graphics adapter is.
GpuVendor
Who made a graphics adapter.

Functions§

list
Every graphics adapter the OS lists, in its order.