pub struct UnownedContext { /* private fields */ }
Expand description
Non-owning handle to a CUDA context.
Implementations§
Source§impl UnownedContext
impl UnownedContext
Sourcepub fn get_api_version(&self) -> CudaResult<CudaApiVersion>
pub fn get_api_version(&self) -> CudaResult<CudaApiVersion>
Get the API version used to create this context.
This is not necessarily the latest version supported by the driver.
§Example
let context = Context::create_and_push(ContextFlags::MAP_HOST | ContextFlags::SCHED_AUTO, device)?;
let unowned = context.get_unowned();
let version = unowned.get_api_version()?;
Trait Implementations§
Source§impl Clone for UnownedContext
impl Clone for UnownedContext
Source§fn clone(&self) -> UnownedContext
fn clone(&self) -> UnownedContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UnownedContext
impl Debug for UnownedContext
impl ContextHandle for UnownedContext
impl Send for UnownedContext
impl Sync for UnownedContext
Auto Trait Implementations§
impl Freeze for UnownedContext
impl RefUnwindSafe for UnownedContext
impl Unpin for UnownedContext
impl UnwindSafe for UnownedContext
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