@return if error_code is success, then return OK status. Otherwise translates error code into a message.
| 28 | // @return if error_code is success, then return OK status. Otherwise translates |
| 29 | // error code into a message. |
| 30 | inline Status GetOpenCLError(cl_int error_code) { |
| 31 | if (error_code == CL_SUCCESS) { |
| 32 | return OkStatus(); |
| 33 | } |
| 34 | return InternalError("OpenCL error: " + CLErrorCodeToString(error_code)); |
| 35 | } |
| 36 | |
| 37 | } // namespace cl |
| 38 | } // namespace gpu |
no test coverage detected