pub enum DeviceBackend {
Cpu,
Cuda,
Metal,
Rocm,
DirectML,
OpenCL,
Vulkan,
WebGpu,
OneApi,
Custom(String),
}Expand description
Backend/provider for a device.
The serialized form is always a lowercase string (e.g. “cuda”).
Unknown strings round-trip via Custom.
Variants§
Trait Implementations§
Source§impl Clone for DeviceBackend
impl Clone for DeviceBackend
Source§fn clone(&self) -> DeviceBackend
fn clone(&self) -> DeviceBackend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceBackend
impl Debug for DeviceBackend
Source§impl<'de> Deserialize<'de> for DeviceBackend
impl<'de> Deserialize<'de> for DeviceBackend
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DeviceBackend
impl Display for DeviceBackend
Source§impl Hash for DeviceBackend
impl Hash for DeviceBackend
Source§impl PartialEq for DeviceBackend
impl PartialEq for DeviceBackend
Source§impl Serialize for DeviceBackend
impl Serialize for DeviceBackend
impl Eq for DeviceBackend
impl StructuralPartialEq for DeviceBackend
Auto Trait Implementations§
impl Freeze for DeviceBackend
impl RefUnwindSafe for DeviceBackend
impl Send for DeviceBackend
impl Sync for DeviceBackend
impl Unpin for DeviceBackend
impl UnsafeUnpin for DeviceBackend
impl UnwindSafe for DeviceBackend
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