Khronos OpenCL-CLHPP
Switch branches/tags
Nothing to show
Clone or download
gallickgunner and jrprice Add version check for some calls and other changes
"enqueueXBufferRect()" calls are introduced from OpenCL 1.1. Therefore add a version  
check to ensure it compiles fine for OpenCL 1.0.

be available in all OpenCL versions. Therefore remove these macro definitions from  
"__PARAM_NAME_INFO_1_1"  and add it in  "__PARAM_NAME_INFO_1_0".

This issue is linked to some errors in OpenCL-C headers.  
For further information on this issue, see:
Latest commit bbccc50 Jul 7, 2018


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`.