pub struct Device;
Expand description
CUDA device.
Implementations§
Source§impl Device
impl Device
Sourcepub async fn get() -> Result<DeviceId, Error>
pub async fn get() -> Result<DeviceId, Error>
Returns which device is currently being used by DeviceId
.
Sourcepub async fn synchronize() -> Result<(), Error>
pub async fn synchronize() -> Result<(), Error>
Synchronize the current CUDA device.
§Warning
Note that this operation will block all device operations, even from other processes while running. Use this operation sparingly.
Sourcepub async fn memory_info() -> Result<MemoryInfo, Error>
pub async fn memory_info() -> Result<MemoryInfo, Error>
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin 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