Struct rust_gpu_tools::opencl::Device
source · pub struct Device { /* private fields */ }
Expand description
OpenCL specific device.
Implementations§
source§impl Device
impl Device
sourcepub fn compute_units(&self) -> u32
pub fn compute_units(&self) -> u32
Returns the number of compute units of the GPU.
sourcepub fn compute_capability(&self) -> Option<(u32, u32)>
pub fn compute_capability(&self) -> Option<(u32, u32)>
Returns the major and minor version of the compute capability (only available on Nvidia GPUs).
sourcepub fn pci_id(&self) -> PciId
pub fn pci_id(&self) -> PciId
Returns the PCI-ID of the GPU, see the PciId
type for more information.
sourcepub fn uuid(&self) -> Option<DeviceUuid>
pub fn uuid(&self) -> Option<DeviceUuid>
Returns the PCI-ID of the GPU if available, see the DeviceUuid
type for more
information.
sourcepub fn cl_device_id(&self) -> cl_device_id
pub fn cl_device_id(&self) -> cl_device_id
Low-level access to the device identifier.
It changes when the device is initialized and should only be used to interact with other libraries that work on the lowest OpenCL level.