Function cuDevResourceGenerateDesc

Source
pub unsafe extern "C" fn cuDevResourceGenerateDesc(
    phDesc: *mut CUdevResourceDesc,
    resources: *mut CUdevResource,
    nbResources: c_uint,
) -> CUresult
Expand description

\brief Generate a resource descriptor

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

A successful API call must have:

  • A valid output pointer for the \p phDesc descriptor as well as a valid array of \p resources pointers, with the array size passed in \p nbResources. If multiple resources are provided in \p resources, the device they came from must be the same, otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. If multiple resources are provided in \p resources and they are of type ::CU_DEV_RESOURCE_TYPE_SM, they must be outputs (whether \p result or \p remaining) from the same split API instance, otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.

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

\param phDesc - Output descriptor \param resources - Array of resources to be included in the descriptor \param nbResources - Number of resources passed in \p resources

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_RESOURCE_TYPE, ::CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION

\sa ::cuDevSmResourceSplitByCount