#[non_exhaustive]pub enum Device {
Cpu,
Metal {
index: usize,
},
Cuda {
index: usize,
},
}Expand description
Where a tensor’s storage lives and where its work runs.
This is a handle, not a backend: it names a place. The backend registry resolves a handle to an implementation; this crate must never know how.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Cpu
The multi-threaded CPU backend — always available.
Metal
An Apple-Silicon GPU via Metal, by device index.
Fields
Cuda
An NVIDIA GPU, by device index — served by oxmera-cuda once a
driver and device are registered (oxmera_runtime::init).
Implementations§
Trait Implementations§
impl Copy for Device
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin 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