pub struct CpuDevice { /* private fields */ }Expand description
CPU compute device using sysinfo
Implementations§
Trait Implementations§
Source§impl ComputeDevice for CpuDevice
impl ComputeDevice for CpuDevice
Source§fn device_name(&self) -> &str
fn device_name(&self) -> &str
Get the device name (e.g., “NVIDIA GeForce RTX 4090”)
Source§fn device_type(&self) -> DeviceType
fn device_type(&self) -> DeviceType
Get the device type
Source§fn memory_bandwidth_gbps(&self) -> Result<f64, GpuError>
fn memory_bandwidth_gbps(&self) -> Result<f64, GpuError>
Get memory bandwidth in GB/s (if available)
Source§fn compute_unit_count(&self) -> u32
fn compute_unit_count(&self) -> u32
Get number of compute units (SMs for NVIDIA, CUs for AMD, cores for CPU)
Source§fn pcie_tx_bytes_per_sec(&self) -> Result<u64, GpuError>
fn pcie_tx_bytes_per_sec(&self) -> Result<u64, GpuError>
Get PCIe TX bytes per second (GPU only)
Source§fn pcie_rx_bytes_per_sec(&self) -> Result<u64, GpuError>
fn pcie_rx_bytes_per_sec(&self) -> Result<u64, GpuError>
Get PCIe RX bytes per second (GPU only)
Source§fn pcie_generation(&self) -> u8
fn pcie_generation(&self) -> u8
Get PCIe generation (1, 2, 3, 4, 5)
Source§fn pcie_width(&self) -> u8
fn pcie_width(&self) -> u8
Get PCIe width (x1, x4, x8, x16)
Source§fn memory_usage_percent(&self) -> Result<f64, GpuError>
fn memory_usage_percent(&self) -> Result<f64, GpuError>
Get memory usage percentage (0.0-100.0)
Source§fn power_usage_percent(&self) -> Result<f64, GpuError>
fn power_usage_percent(&self) -> Result<f64, GpuError>
Get power usage percentage (current/limit * 100)
Auto Trait Implementations§
impl Freeze for CpuDevice
impl RefUnwindSafe for CpuDevice
impl Send for CpuDevice
impl Sync for CpuDevice
impl Unpin for CpuDevice
impl UnsafeUnpin for CpuDevice
impl UnwindSafe for CpuDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more