OpenCL 1.2 C++ bindings with OpenCL 2.0 ? Will it work?

Hi, please help: I have a program that was written for OpenCL 1.2 with C++ bindings, now I’m forced to upgrade to OpenCL 2.0, but I can’t find any cl.hpp shipped with that version…

  1. Do I miss it?
  2. If it is indeed not shipped - will just coping the old 1.2 cl.hpp into the include-dir with the 2.0 version just work (considering required backwards compatibility)?

Thank you very much!

It will work, but that wrapper, obviously, won’t expose any 2.0 improvements. And compiler may show “clCreateQueue is deprecated”. You may finish the wrapper yourself, of course. Personally, I’m not even sure why’d anyone need such a wrapper. It does not abstract away literaly anything and feels like a half-measure to me.

An updated version of the C++ bindings with support for OpenCL 2.0 will be released in the near future.

The OpenCL 2.0 C++ bindings are now available in the khronos registry (cl2.hpp):