Utility function to map error codes to a string
Many projects are rolling their own and most of them end up with missing error codes over time. Should we provide an official solution?
An example of the many such discussions I've been pointed to: https://stackoverflow.com/questions/24326432/convenient-way-to-show-opencl-error-codes#comment39780932_24336429
I think it would be a very good idea. Maybe providing a function which could provide both (or either one) of the string representation of the symbol (CL_DEVICE_NOT_FOUND) and a more human readable message (OpenCL device was not found).
cl_int clGetErrorSymbolMessage(cl_int errcode, const char **errcode_symbol_ret, const char **errcode_message_ret);
Each pointer could be NULL to ignore the value. Or the function could be split in two. We would need to add a new error code: CL_UNKNOWN_ERROR_CODE
As for bikeshedding, can we call it cl_strerror in C and cl::strerror in C++?
Actually it doesn't really matter what we call it, but the functionality should be there. Possible locale awareness is a bonus. I can translate to hu_HU. :)