#[repr(C)]pub struct Device {
pub device_type: DeviceType,
pub device_id: usize,
}
Expand description
Fields
device_type: DeviceType
device_id: usize
Implementations
sourceimpl Device
impl Device
pub fn cpu(device_id: usize) -> Self
pub fn cuda(device_id: usize) -> Self
pub fn nvptx(device_id: usize) -> Self
pub fn cuda_host(device_id: usize) -> Self
pub fn cl(device_id: usize) -> Self
pub fn vulkan(device_id: usize) -> Self
pub fn metal(device_id: usize) -> Self
pub fn vpi(device_id: usize) -> Self
pub fn rocm(device_id: usize) -> Self
pub fn rocm_host(device_id: usize) -> Self
pub fn ext_dev(device_id: usize) -> Self
pub fn cuda_managed(device_id: usize) -> Self
pub fn one_api(device_id: usize) -> Self
pub fn web_gpu(device_id: usize) -> Self
pub fn hexagon(device_id: usize) -> Self
Trait Implementations
impl Copy for Device
impl Eq for Device
impl StructuralEq for Device
impl StructuralPartialEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more