Closed Noerr closed 4 years ago
The cl2.hpp
header in this repository is a local clone of the official Khronos OpenCL C++ header. We periodically copy it from upstream into this repository as it does not always ship with OpenCL platforms.
I'd recommend you open an Issue against the header source so that we can pick it up from there.
The proposed change is now merged into the upstream master. https://github.com/KhronosGroup/OpenCL-CLHPP/pull/85 @tomdeakin I recommend updating the cl2.hpp copy in this project.
@Noerr Done! Thanks for the contribution, and I'm really pleased it went into the official header quickly.
Need to more carefully handle the case of a platform detected with zero devices. In the first call to clGetDeviceIDs, this will return code CL_DEVICE_NOT_FOUND and set n=0 if no devices are reported by the platform. ( https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clGetDeviceIDs.html ) The second call to clGetDeviceIDs cannot be allowed occur if n=0, otherwise CL_INVALID_VALUE is reported. A platform with zero devices is not an error condition. Device enumeration should simply move on.