compiling and runing OpenCL code

Hello, I’m a beginner to OpenCL. I have installed the “ati-stream-sdk-v2.3-lnx64” from AMD to run the hello world program.
When i execute the command “gcc -o lesson1 -Ipath-OpenCL-include -Lpath-OpenCL-libdir lesson1.cpp -lOpenCL” to run the code (lesson1.cpp), i get the following error.

lesson1.cpp:8: fatal error: CL/cl.hpp: No such file or directory
compilation terminated

I understand that the compiler cannot find cl.hpp, but i’m not sure how to install those files. Does anyone have any idea how to solve this?

Thank you very much.

If you installed the ATI SDK then the headers should already in your system. They may be in /usr/local/include instead of /usr/include or something like that. Do you still have the installer package around? If it’s an RPM or a DEB package you can list the files that they will install and that should show you the path where the headers are.

In the worst case you can search your whole filesystem for cl.hpp.

In the worst worst case, include files are available here : : :slight_smile:

http://www.khronos.org/registry/cl/

I just would like a clarification. I am heading down to Mexico for three weeks and I thought I would work on OpenCL code on my laptop as I expect to have some time on my hands.
I am unsure about not having a proper GPU on my soon to be bought cheap laptop. I have read conflicting reports about whether I can do this or not. Can anybody help before I spring for a cheap Mexico laptop?

Sam, you can use AMD’s SDK to compile and run OpenCL kernels on your CPU (it doesn’t matter whether the CPU is Intel or AMD). Intel also has some beta OpenCL drivers.