Struct async_cuda_core::device::Device
source · 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 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