pub unsafe extern "C" fn cudaDeviceGetStreamPriorityRange(
leastPriority: *mut c_int,
greatestPriority: *mut c_int,
) -> cudaError_tExpand description
Returns numerical values that correspond to the least and greatest stream priorities.
Returns in *leastPriority and *greatestPriority the numerical values that correspond to the least and greatest stream priorities respectively. Stream priorities follow a convention where lower numbers imply greater priorities. The range of meaningful stream priorities is given by *greatestPriority, *leastPriority. If the user attempts to create a stream with a priority value that is outside the meaningful range as specified by this API, the priority is automatically clamped down or up to either *leastPriority or *greatestPriority respectively. See cudaStreamCreateWithPriority for details on creating a priority stream. A NULL may be passed in for *leastPriority or *greatestPriority if the value is not desired.
This function will return ‘0’ in both *leastPriority and *greatestPriority if the current context’s device does not support stream priorities (see cudaDeviceGetAttribute).
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
leastPriority: Pointer to an int in which the numerical value for least stream priority is returned.greatestPriority: Pointer to an int in which the numerical value for greatest stream priority is returned.
§Return value
See also: cudaStreamCreateWithPriority, cudaStreamGetPriority, cuCtxGetStreamPriorityRange.