32 #ifndef VSMC_OPENCL_CL_ERROR_HPP
33 #define VSMC_OPENCL_CL_ERROR_HPP
38 #define VSMC_DEFINE_OPENCL_CL_ERROR_ERR(STATUS) case STATUS : return #STATUS
60 #if VSMC_OPENCL_VERSION >= 110
63 CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST);
65 #if VSMC_OPENCL_VERSION >= 120
72 #if VSMC_OPENCL_VERSION >= 200
110 #if VSMC_OPENCL_VERSION >= 110
113 #if VSMC_OPENCL_VERSION >= 120
119 #if VSMC_OPENCL_VERSION >= 200
123 default :
return "UNKNOWN";
143 status_(CL_SUCCESS) {}
150 std::runtime_error(
std::string(err.what()) +
":" +
151 internal::
cl_error_str(err.err())), status_(err.err()) {}
154 std::runtime_error(
std::string(msg) +
":" +
158 std::runtime_error(msg +
":" +
161 cl_int
err ()
const {
return status_;}
172 #endif // VSMC_OPENCL_CL_ERROR_HPP
CLError(cl_int status, const char *msg)
#define VSMC_DEFINE_OPENCL_CL_ERROR_ERR(STATUS)
CLError(cl_int status, const std::string &msg)
std::string cl_error_str(cl_int status)
CLError(const ::cl::Error &err)