Skip to main content

cudaStreamGetDevResource

Function cudaStreamGetDevResource 

Source
pub unsafe extern "C" fn cudaStreamGetDevResource(
    hStream: cudaStream_t,
    resource: *mut cudaDevResource,
    type_: cudaDevResourceType,
) -> cudaError_t
Expand description

Get stream resources.

Get the type resources available to the hStream and store them in resource.

Note: The API will return cudaError_t::CUDA_ERROR_INVALID_RESOURCE_TYPE is type is cudaDevResourceType::cudaDevResourceTypeWorkqueueConfig or cudaDevResourceType::cudaDevResourceTypeWorkqueue.

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.

§Parameters

  • hStream: Stream to get resource for.
  • resource: Output pointer to a cudaDevResource structure.
  • type_: Type of resource to retrieve.

§Return value

See also: cudaGreenCtxCreate, cudaExecutionCtxStreamCreate, cudaStreamCreate, cudaDevSmResourceSplit, cudaDevResourceGenerateDesc, cuStreamGetDevResource.