C helper function has incomplete list of error numbers
simonmcs opened this issue · 0 comments
simonmcs commented
The C helper function we provide, int err_code (cl_int err_in) in err_code.c, has an incomplete list of error codes it will recognise. In particular, it doesn't know about CL_DEVICE_NOT_FOUND, which is quite an important one.
This has already bitten me when one solution code expected a GPU, but my MBA doesn't expose one.
It would be worth updating the list in err_code() against the latest OpenCL v1.1 header file and making it a complete set.
In fact, a simple script that would take the appropriate chunk from cl.h and turn it into err_code() would be useful as we migrate this to support v1.2 and 2.0 etc.