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.
Trait Implementations§
source§impl PartialEq<Device> for Device
impl PartialEq<Device> for Device
impl Eq for Device
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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