cuda::experimental::stf::status_traits#
-
template<class _Status>
struct status_traits# Customization point that makes
_Statusa status: a value that reports success or failure by itself, so thatpolicy << statushandles it on the code channel.The primary template is undefined, and a raw integer is never a status: a C API’s result is wrapped in a distinct type at the call site. A specialization provides
static _Status success() noexcept, the success value: a status fails when it differs from it (the only work<<does on success), and a handled failure yields it;static std::string name(_Status), a short name for reports (notify,storeinto text);static auto to_exception(_Status, cuda::std::source_location), thestd::exceptionderivative thatunwindthrows,store(std::exception_ptr*)stores, and a policy that only handles exceptions receives;optionally
static bool failed(_Status) noexcept, for a status type with more than one success value; it then replaces the comparison withsuccess().
cuda_safe_call.cuhspecializes it forcudaError_t,CUresult,cudaOccError, and, when their headers are available,cublasStatus_tandcusolverStatus_t.