pub enum DeviceId {
Cpu,
VulkanUuid([u8; 16]),
CudaUuid([u8; 16]),
DxgiLuid {
high: i32,
low: u32,
},
MetalRegistryId(u64),
OpenCl {
platform: String,
device: String,
},
}Expand description
Stable identity of a physical GPU / CPU / accelerator. Used as cache
key in multi-GPU setups and as an equality test for
Error::DeviceMismatch.
Variants§
Cpu
The host CPU pseudo-device — the target of the CPU fallback backend. A single canonical identity (the host has one logical CPU compute target from the library’s perspective), so it carries no payload and all CPU devices compare equal.
VulkanUuid([u8; 16])
CudaUuid([u8; 16])
DxgiLuid
MetalRegistryId(u64)
OpenCl
Trait Implementations§
impl Eq for DeviceId
impl StructuralPartialEq for DeviceId
Auto Trait Implementations§
impl Freeze for DeviceId
impl RefUnwindSafe for DeviceId
impl Send for DeviceId
impl Sync for DeviceId
impl Unpin for DeviceId
impl UnsafeUnpin for DeviceId
impl UnwindSafe for DeviceId
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.