OpenCL C++ support
Hi -- I noticed that in the following issue, @kpet mentioned that there's OpenCL C++ support. I'm interested in using this for a "realtime" rendering experiment with OpenVDB since VDB isn't well-supported on GPU anywhere else (it's highly template-oriented) and I'm targeting Vulkan.
https://github.com/google/clspv/issues/371#issuecomment-492812831
Is there any documentation for this or for its status? I'd love to give it a spin!
C++ for OpenCL itself is experimental and work-in-progress. The language documentation for C++ for OpenCL is maintained there: https://github.com/KhronosGroup/OpenCL-Docs/tree/master/cxx4opencl. Feedback on missing features of interest is welcome as issues in https://github.com/KhronosGroup/OpenCL-Docs.
You can pass -cl-std=CLC++ to clspv to compile C++ for OpenCL (you wil also need -inline-entry-points). clspv support for this is even more experimental than OpenCL C support but the basics seem to work and I know a couple of people who have had success playing with this.
Feel free to raise issues as and when you hit them (and don't hesitate to let us know about significant successes as well :)).
If use combination of further flags
-pod-pushconstant -cl-std=CLC++ -inline-entry-points
got:
POD arguments as push constants are not compatible with module scope push constants
Can't say this is critical, but a bit confusing. It works without -pod-pushconstant.
as shown in compiler-explorer, clspv supports CLC++