cuda::experimental::stf::cuda_safe_call
#
-
template<typename T>
void cuda::experimental::stf::cuda_safe_call( - const T status,
- const ::cuda::std::source_location loc = ::cuda::std::source_location::current(),
Enforces successful call of CUDA API functions.
If
status
is0
, the function has no effect. Otherwise, the function prints pertinent error information tostderr
and aborts the program.- Template Parameters:
T – status type, can be
cudaError_t
,cublasStatus_t
, orcusolverStatus_t
- Parameters:
status – status value, usually the result of a CUDA API call
loc – location of the call, defaulted