[GPU Computing] Introductory Tutorial to OpenCL Programming

OpenCL tutorial

Here is a tutorial about OpenCL programming. This tutorial, written by Benedict R. Gaster (AMD Architect, OpenCL), aims to make OpenCL easier to understand and implement. All information to compile the code sample for Windows and Linux are provided.

Here is the “Hello world” kernel used in this tutorial:

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
__constant char hw[] = "Hello World\n";
__kernel void hello(__global char * out)
    size_t tid = get_global_id(0);
    out[tid] = hw[tid];

It’s just a string copy…

You can use GPU Caps Viewer to get the OpenCL API support of your system and test some OpenCL demos. By the way, a new version is planned in few days…