Forum Discussion
okramer
Occasional Contributor
6 years agoTo summarize the answer: I found that the C++ wrappers (cl::Context, cl:Kernel, etc.) all have the parens operator () to access the underlying C struct (cl_context, cl_kernel, etc.). So it is a trivial matter to mix the C and C++ APIs.
For host-to-dev comms, there are clWritePipeIntelFPGA and clReadPipeIntelFPGA functions on the host side defined in CL/cl_ext_intelfpga.h that must be included in the host code. It seems Intel should have implemented Pipe::write() and Pipe::read() in the wrapper code to call the C Intel functions above.
I also had to declare the following before including any CL headers:
#define CL_HPP_TARGET_OPENCL_VERSION=200
#define CL_TARGET_OPENCL_VERSION=200I have a good compile now, though getting "ERROR: Enqueue Task (-52)" while running emulation.