OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

need help for beginner level.

anuragnandan
Beginner
344 Views
Hi,
I installed the 64 bit openCl SDK 1.5 on my intel i5 processor system and I tried the offline compiler with the sample programs and it was showing errors such as
:6:13: fatal error: 'CL/cl.h' file not found
Please help me with this problem. I tried to refer every possible information but couldn't get much info about the openCL.
0 Kudos
3 Replies
Yuri_K_Intel
Employee
344 Views
Hi,

Intel OpenCL SDK Offline Compiler can be used to compile OpenCL code only, i.e. kernels contained in *.cl files. Please refer to section 5.2 of the Intel OpenCL SDK User's Guide or to article at http://software.intel.com/en-us/articles/inspect-your-code-with-intel-opencl-sdk-offline-compiler/.
To build and run samples refer to section 4.3 of the guide.

Thanks,
Yuri
0 Kudos
Jim_Vaughn
Beginner
344 Views
Hi you are not including the opencl header files. After you install the SDK you need to set your include directories for your compiler to the directory for the header files. This is the same as using any library or source code from any other project.

As mentioned by Yuri the ".cl" files can be compiled by the offline compiler but but you still have to write c/c++ code to call load the compiled kernels.

If you are still a little lost here is a link which show you how to set up a couple of the different opencl vendors libraries for visual studio. Which it doesn't cover specifically Intel's version the process is the same just linking to the libraries for them. Also if you are looking for a more "one click" solution the source code for the Great book OpenCL Programming guide is avalible online for free. I believe it autoconfigures a visual studio project for you when you run a script in their source code. The source is avalible here:

http://code.google.com/p/opencl-book-samples/wiki/Installation
0 Kudos
Jim_Vaughn
Beginner
344 Views
Also the book OpenCL in Action is very good and easy to use with very simple examples if you are looking for a book. I can highly recommend this book for a beginner to OpenCL. I wish I have it three years ago.
0 Kudos
Reply