#[repr(C)]pub struct DLDevice {
pub device_type: DLDeviceType,
pub device_id: i32,
}Expand description
\brief A Device for Tensor and operator.
Fields§
§device_type: DLDeviceType\brief The device type used in the device.
device_id: i32\brief The device index. For vanilla CPU memory, pinned memory, or managed memory, this is set to 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DLDevice
impl RefUnwindSafe for DLDevice
impl Send for DLDevice
impl Sync for DLDevice
impl Unpin for DLDevice
impl UnsafeUnpin for DLDevice
impl UnwindSafe for DLDevice
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