Skip to main content

cudaExecutionCtxGetDevResource

Function cudaExecutionCtxGetDevResource 

Source
pub unsafe extern "C" fn cudaExecutionCtxGetDevResource(
    ctx: cudaExecutionContext_t,
    resource: *mut cudaDevResource,
    type_: cudaDevResourceType,
) -> cudaError_t
Expand description

Get context resources.

Get the type resources available to context represented by ctx.

Note: The API is not supported on 32-bit platforms.

Note that this function may also return error codes from previous, asynchronous launches.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

Note: The context parameter is required and the API ignores the context that is current to the calling thread. This enables explicit context-based programming without relying on thread-local state. If no context is specified, the API will return cudaError_t::CUDA_ERROR_INVALID_VALUE.

§Parameters

  • ctx: Execution context to get resource for (required parameter, see note below).
  • resource: Output pointer to a cudaDevResource structure.
  • type_: Type of resource to retrieve.

§Return value

See also: cudaDeviceGetDevResource, cudaDevSmResourceSplit, cudaDevResourceGenerateDesc, cudaGreenCtxCreate.