12 #ifndef PLSSVM_BACKENDS_OPENCL_DETAIL_ERROR_CODE_HPP_
13 #define PLSSVM_BACKENDS_OPENCL_DETAIL_ERROR_CODE_HPP_
19 #include <string_view>
60 [[nodiscard]] cl_int
value() const noexcept;
65 [[nodiscard]] std::string_view
message() const noexcept;
70 [[nodiscard]] explicit operator
bool() const noexcept;
75 [[nodiscard]] cl_int *operator&() noexcept;
Class wrapping an OpenCL error code.
Definition: error_code.hpp:27
error_code()=default
Construct a new error code indicating success (CL_SUCCESS).
void assign(cl_int error) noexcept
Assign the OpenCL error code to *this.
std::string_view message() const noexcept
Obtains the explanatory string of the error code.
void clear() noexcept
Sets to error code value back to CL_SUCCESS.
error_code & operator=(cl_int error) noexcept
Assign the OpenCL error code to *this.
error_code(cl_int error) noexcept
Construct a new error code wrapping the OpenCL error code.
cl_int err_
The wrapped OpenCL error code.
Definition: error_code.hpp:79
cl_int value() const noexcept
Obtain the value of the error code.
Namespace containing OpenCL backend specific implementation details. Should not directly be used by u...
Definition: command_queue.hpp:22
std::ostream & operator<<(std::ostream &out, error_code ec)
Output the error code encapsulated by ev to the given output-stream out.
bool operator!=(error_code lhs, error_code rhs) noexcept
Compares two error codes for inequality.
bool operator==(error_code lhs, error_code rhs) noexcept
Compares two error codes for equality.