cuda::experimental::stf::cuda_exception
Defined in include/cuda/experimental/__stf/utility/cuda_safe_call.cuh
-
class cuda_exception : public exception
Exception type across CUDA, CUBLAS, and CUSOLVER.
Public Functions
-
cuda_exception() = delete
-
template<typename T>
inline cuda_exception(const T status, const cuda::std::source_location loc = cuda::std::source_location::current()) Constructs an exception object from a status value.
If
status
is0
, the exception is still created with an empty error message. Otherwise, the constructor initializes the error message (later accessible withwhat()
) appropriately.- 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
-
inline const char *what() const noexcept override
Returns a message describing the error.
- Returns
the error message
-
cuda_exception() = delete