Skip to main content

cudaDeviceGetDevResource

Function cudaDeviceGetDevResource 

Source
pub unsafe extern "C" fn cudaDeviceGetDevResource(
    device: c_int,
    resource: *mut cudaDevResource,
    type_: cudaDevResourceType,
) -> cudaError_t
Expand description

Get device resources.

Get the type resources available to the device. This may often be the starting point for further partitioning or configuring of resources.

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

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

§Return value

See also: cuDeviceGetDevResource, cudaExecutionCtxGetDevResource, cudaDevSmResourceSplit, cudaDevResourceGenerateDesc.