Go to the source code of this file.
|
| cuda |
| All definitions and functionality wrapping the CUDA Runtime API.
|
|
| cuda::device |
| Definitions and functionality related to CUDA devices (not including the device wrapper type device_t itself)
|
|
|
bool | cuda::device::primary_context::is_active (const device_t &device) |
|
void | cuda::device::primary_context::destroy (const device_t &device) |
| Destroy and clean up all resources associated with the specified device's primary context. More...
|
|
primary_context_t | cuda::device::primary_context::get (const device_t &device) |
| Obtain a handle to the primary context of a given device - creating it ("activating" it) if it doesn't exist. More...
|
|
bool | cuda::device::primary_context::is_current () |
|
◆ destroy()
void cuda::device::primary_context::destroy |
( |
const device_t & |
device | ) |
|
|
inline |
Destroy and clean up all resources associated with the specified device's primary context.
- Parameters
-
device | The device whose primary context is to be destroyed |
◆ get()
primary_context_t cuda::device::primary_context::get |
( |
const device_t & |
device | ) |
|
|
inline |
Obtain a handle to the primary context of a given device - creating it ("activating" it) if it doesn't exist.
- Note
- This method and its returned object will "perform their own" reference accounting vis-a-vis the driver, i.e. the caller does not need to worry about increasing or decreasing the CUDA driver reference count for the primary context. Naturally, though, the caller must not interfere with this reference accounting by decreasing the reference count arbitrarily by more than it has increased it, by destroying the primary context etc.
- Parameters
-
device | The device whose primary context is to be proxied |
- Returns
- A proxy object for the specified device