pub unsafe extern "C" fn cudaGetDeviceCount(
count: *mut c_int,
) -> cudaError_tExpand description
Returns the number of compute-capable devices.
Returns in *count the number of devices with compute capability greater or equal to 2.0 that are available for execution.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
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
count: Returns the number of devices with compute capability greater or equal to 2.0
§Return value
See also: cudaGetDevice, cudaSetDevice, cudaGetDeviceProperties, cudaChooseDevice, cudaInitDevice, cuDeviceGetCount.