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.

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:

Troubleshooting for Common Mistakes / Errors And Tips
Common Mistakes

Other good tutorials:

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