OpenCL Actors

Joseph Noir edited this page May 4, 2015 · 3 revisions

This module eases the usage of OpenCL with actors. An OpenCL-enabled actor requires an OpenCL kernel as its behavior and interprets received messages as arguments for the kernel call. After processing it returns the results as a message.

Get the Sources

It is easiest to check out all submodules at once.

git clone --recursive

Alternatively, you can get CAF and the OpenCL submodule only.

git clone
cd actor-framework
git submodule init libcaf_opencl
git submodule update libcaf_opencl

First Steps

libcaf_opencl will be build with CAF per default if the submodule is loaded. If you wann build CAF without OpenCL with the loaded submodule, use the option --no-opencl of the configure script.

make install [as root, optional]

Our tests include a

make test


In addition to the requirements of CAF you need the OpenCL framework. It comes preinstalled on (most) OS X machines. On Linux, libopencl can be acquired through the installation of the vendor drivers and the headers are often found in the repositories. We have experience using the Nivida drivers, which can be downloaded from their homepage and installed manually. The OpenCL module is not tested on Windows.

If you run into problems or have experience with GPUs of different vendors, feel free to share your experiences.


There are two examples included in the module. Both perform simple matrix multiplication.