pub struct CudaDeviceHandle {
pub caps: CudaDeviceCaps,
pub ctx: Arc<CudaContext>,
}Expand description
Centralized live CUDA device acquisition result.
Fields§
§caps: CudaDeviceCapsProbed capabilities for the acquired device.
ctx: Arc<CudaContext>Bound CUDA context for dispatch.
Implementations§
Source§impl CudaDeviceHandle
impl CudaDeviceHandle
Sourcepub fn acquire_ordinal(ordinal: usize) -> Result<Self, String>
pub fn acquire_ordinal(ordinal: usize) -> Result<Self, String>
Acquire and bind a CUDA context for ordinal, returning the matching
capability snapshot from the same CUDA device handle.
§Errors
Returns an actionable error when the CUDA driver cannot initialize, the ordinal is invalid, context creation fails, context binding fails, or a required device attribute cannot be queried.
Trait Implementations§
Source§impl Clone for CudaDeviceHandle
impl Clone for CudaDeviceHandle
Source§fn clone(&self) -> CudaDeviceHandle
fn clone(&self) -> CudaDeviceHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CudaDeviceHandle
impl RefUnwindSafe for CudaDeviceHandle
impl Send for CudaDeviceHandle
impl Sync for CudaDeviceHandle
impl Unpin for CudaDeviceHandle
impl UnsafeUnpin for CudaDeviceHandle
impl UnwindSafe for CudaDeviceHandle
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