Skip to main content

cudaDevResourceGenerateDesc

Function cudaDevResourceGenerateDesc 

Source
pub unsafe extern "C" fn cudaDevResourceGenerateDesc(
    phDesc: *mut cudaDevResourceDesc_t,
    resources: *mut cudaDevResource,
    nbResources: c_uint,
) -> cudaError_t
Expand description

Generate a resource descriptor.

Generates a single resource descriptor with the set of resources specified in resources. The generated resource descriptor is necessary for the creation of green contexts via the cudaGreenCtxCreate API. Resources of the same type can be passed in, provided they meet the requirements as noted below.

A successful API call must have:

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

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.

§Parameters

  • phDesc: Output descriptor.
  • resources: Array of resources to be included in the descriptor.
  • nbResources: Number of resources passed in resources.

§Return value

See also: cuDevResourceGenerateDesc, cudaDeviceGetDevResource, cudaExecutionCtxGetDevResource, cudaDevSmResourceSplit, cudaGreenCtxCreate.