Khronos OpenCL-CLHPP
C++ CMake Python
Latest commit b9e3d5d Oct 3, 2016 @jrprice jrprice committed on GitHub Merge pull request #22 from petrkalos/hotfix/const_methods
add const qualifier to enqueueMarkerWithWaitList, enqueueBarrierWithW…


Sources for the OpenCL Host API C++ bindings (cl.hpp and cl2.hpp).

Doxgen documentation for the cl2.hpp header is available here:

    Acts as the master source for the 1.x version of the header.
    The reason for doing it this way is to generate an appropriate set of functors with varying argument counts without assuming variadic template support in the header.

    Acts as the master source for the 2.x version of the header.
    Directly copied as cl2.hpp
    A generator script written in python to convert input_cl.hpp into cl.hpp, generating the functor expansions as necessary.
    cl2.hpp does not require this as it uses variadic templates expanded in the compiler.

    Doxygen file used to generate HTML documentation for cl2.hpp.

    A simple example application using the very basic features of the header and generating cl.hpp dynamically through the build system.

    A (very small, incomplete) set of regression tests. Building the tests requires Python, Ruby, Unity and CMock. For the last two I've used Unity 2.1.0 [1] and CMock top-of-tree from Github [2] (the version 2.0.204 on Sourceforge does not work). At the moment there is no way to skip building the tests.

  CMake scripts:
    A build system that both generates the example and drives generation of cl.hpp.

You need to tell cmake where to find external dependencies, using the variables OPENCL_DIST_DIR, UNITY_DIR and CMOCK_DIR. These can be set either as environment variables, or on the cmake command line using the syntax -D<VAR>=<VALUE>. For the lazy, I use the following commands to build and test (you'll need to adapt your paths):

mkdir build
cd build
cmake -DUNITY_DIR=$HOME/src/unity -DCMOCK_DIR=$HOME/src/cmock -DOPENCL_DIST_DIR=/opt/AMD-APP-SDK-v2.7-RC-lnx64/ ..

After building, the headers appear in build/include/CL/. If Doxygen is available, you can generate HTML documentation by typing `make docs`.