Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

C++ support for AOCL

Altera_Forum
Honored Contributor II
1,584 Views

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)
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
466 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
466 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
466 Views

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.

0 Kudos
Reply