OpenCL project setup in Eclipse

Hello forum,

I am quite new to GPU-computing using OpenCL, which is why I am looking for tutorials on how to set up a project in Eclipse properly. There are some tutorials out there, but unfortunately most of them are deprecated. They talk about a “template-project” in the SDK’s directory, however I am unable to locate this project in version 3.0. I have already written some small code-examples, but I would like to use Eclipse as IDE for better handling of bigger projects. Or maybe there is a different (better?) IDE that may be used to develop OpenCL-projects?

Regards,
MHR

What host language are you planning using? C/C++, Java? I cannot advise on how to do things in Eclipse. I do use NetBeans - Java - & JavaCL bindings to make OpenCL calls. JavaCL dynamically loads the DLL, so no one’s SDK is required (if OpenCL comes either with the OS or device driver). In Netbeans, you just download the multi-platform library (a .zip file with a .jar extension), then go to the Library Manager dialog box in the IDE, off the Tools menu:

  • create a new library
  • add the JAR file to it

Do this on every development machine you’ve installed Netbeans (Win / OSX / Linux), always using the same name for the library created, and you can copy any Netbeans project directory between them unmodified. The only thing you need to do to the Netbeans project is right-click it & select properties, then add the library as a reference. People also use JavaCL with Eclipse, though I do not know how. Both Netbeans & Eclipse can also be used for C/C++, but I think you might be stuck installing a vendor’s SDK.

I did a small tutorial, explaining how I’ve set up my eclipse. Maybe it will be useful to you:)
Take a look at:

[url=“http://openclexperiments.blogspot.com/”]http://openclexperiments.blogspot.com/[/url]

Its not perfect, but I like the eclipse debugger for host code:) For device code, you are at your own:\

Thank you guys, by means of vandop’s tutorial I finally managed to get this stuff working! :-)

It is pretty easy to get Nvidia OpenCL working on newer versions of Eclipse.
I’ve created a tutorial to explain my steps to get it working:

https://docs.google.com/document/pub?id=1NPo1TK30IOYZxI53t_V3uenSHTMSFYs5cupVDniqVK4

Amdahl Software has just released an Eclipse Editor for OpenCL - it may be of use. It also has host code and test bench generation features