- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the OpenCL SDK support C++?
If so, what are the limitations? The prorgramming guide isn't quite clear on C++ support (at least, from a quick glance-through)Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At the moment there are no C++ wrappers available in the Altera OpenCL SDK. When vendors add support for C++ it's only for the host side, and as far as I know it's typically just in the form of a wrapper that sits in between your host code and the underlining runtime implemented in C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This.
--- Quote Start --- as far as I know it's typically just in the form of a wrapper that sits in between your host code and the underlining runtime implemented in C. --- Quote End --- Just save cl.hpp (http://www.khronos.org/registry/cl/api/1.2/cl.hpp) in $ALTERAOCLSDKROOT/host/include/CL and voilà. You then include cl.hpp instead and make use of all the C++ goodness. I can't see why Altera doesn't ship this header as part of its SDK. I've been using it since the beginning and I never had any problems.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to use cl.hpp as mentioned above, make sure it's the header supporting the OpenCL spec 1.0 and 1.1: http://www.khronos.org/registry/cl/api/1.1/cl.hpp.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page