Open CL Tutorial / First steps

This is a project / tutorial where the first steps of open cl (from my beginner point of view) are explained

First there is small source code with useful helper / manager functions.
Then there is a small example kernel which just double numbers.

Its tested on Ubuntu 10.4 32 bit.

Install
Download the latest, stable open cl installer / sdk from amd (or your favourite vendor). You dont need to setup envoirement variables, its done automaticly since a few versions of the installer.

Read (and understand the source code):
Source Code Host runs on CPU
Source Code Kernel runs on GPU

You can compile it with:
g++ -I/opt/AMDAPP/include -L/opt/AMDAPP/lib -lOpenCL init.cpp -o ini

And test it with:
./init

Troubleshooting for Common Mistakes / Errors And Tips
Common Mistakes

Other good tutorials:
http://developer.amd.com/SDKS/AMDAPPSDK/documentation/pages/TutorialOpenCL.aspx
http://developer.amd.com/documentation/videos/opencltechnicaloverviewvideoseries/pages/default.aspx
http://www.khronos.org/message_boards/viewtopic.php?f=28&t=2787
http://en.wikipedia.org/wiki/OpenCL#OpenCL_1.1
http://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%201
http://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%202

Last edited May 6, 2012 at 12:56 AM by rohezal, version 16