Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
655 Discussions

OpenCL host code getting compile error: ‘clCreatePipe’ was not declared in this scope

okramer
New Contributor I
1,360 Views

I'm including CL/cl.hpp. However, I see that 'clCreatePipe' is defined in CL/cl.h. In the comments section of cl.hpp, it explicitely says,

* The interface is contained with a single C++ header file \em cl.hpp and all * definitions are contained within the namespace \em cl. There is no additional * requirement to include \em cl.h and to use either the C++ or original C * bindings it is enough to simply include \em cl.hpp.

 

However, cl.hpp does not declare "clCreatePipe". I will need to include cl.h even though the header says I don't. Is it OK then to also include cl.h (before cl.hpp)?

 

In my code, I tried also adding the cl:: namespace (cl::clCreatePipe), but got the same error.

0 Kudos
1 Solution
okramer
New Contributor I
1,077 Views

It looks like I have to do

#define CL_TARGET_OPENCL_VERSION 200

#include <CL/opencl.h>

in my host code, per Appendix 3 in the OpenCL programmers guide. It now compiles.

 

View solution in original post

0 Kudos
2 Replies
okramer
New Contributor I
1,078 Views

It looks like I have to do

#define CL_TARGET_OPENCL_VERSION 200

#include <CL/opencl.h>

in my host code, per Appendix 3 in the OpenCL programmers guide. It now compiles.

 

0 Kudos
MEIYAN_L_Intel
Employee
1,076 Views

Hi,

 

Yes, you have to define CL_TARGET_OPENCL_VERSION 200 in order to used OpenCL 2.0 features.

 

Thanks

0 Kudos
Reply