Struct rustacuda::context::UnownedContext
source · 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).unwrap();
let unowned = context.get_unowned();
let version = unowned.get_api_version().unwrap();
Trait Implementations§
source§impl Clone for UnownedContext
impl Clone for UnownedContext
source§fn clone(&self) -> UnownedContext
fn clone(&self) -> UnownedContext
Returns a copy 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 more