• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H03-May-2022-2,3631,822

examples/src/H03-May-2022-561434

external/H22-Jun-2021-

include/CL/H03-May-2022-10,3497,047

tests/H03-May-2022-3,0442,401

.gitmodulesH A D22-Jun-2021198 76

.travis.ymlH A D22-Jun-2021604 2825

CODE_OF_CONDUCT.mdH A D22-Jun-2021280 21

README.mdH A D22-Jun-20212 KiB5841

README.md

1# OpenCL<sup>TM</sup> API C++ bindings
2
3Doxgen documentation for the bindings is available here:
4
5  http://khronosgroup.github.io/OpenCL-CLHPP/
6
7Components:
8
9  * `include/CL/opencl.hpp`:
10    The latest, maintained, version of the C++ bindings. It should work with all
11    versions of OpenCL (including 1.x). This is what most users will want.
12
13  * `include/CL/cl2.hpp`:
14    Includes `opencl.hpp` and emits a warning, for backwards compability.
15
16  * `docs`:
17    Doxygen file used to generate HTML documentation for `opencl.hpp`.
18
19  * `examples`:
20    A simple example application using the very basic features of the bindings.
21
22  * `tests`:
23    A (very small, incomplete) set of regression tests. Building the tests
24    requires Python, Ruby, Unity and CMock. For the last two we use
25    [Unity 2.1.0](https://github.com/ThrowTheSwitch/Unity/releases/tag/v2.1.0)
26    and [CMock top-of-tree from Github](https://github.com/ThrowTheSwitch/CMock)
27    (the version 2.0.204 on Sourceforge does not work).
28
29  * `CMakeLists.txt`:
30    Build system for the examples and tests and logic for the bindings
31    installation.
32
33To get external dependencies needed for testing, use `--recursive` when cloning
34the repository, or run `git submodule update --init`.
35
36You may need to tell CMake where to find the OpenCL headers and libraries,
37using the variables `OPENCL_INCLUDE_DIR` and `OPENCL_LIB_DIR`.
38
39These can be set either as environment variables, or on the cmake command line
40using the syntax `-D<VAR>=<VALUE>`.
41
42The following is an example set of commands to checkout and build the C++
43bindings (adapt paths as required):
44
45```
46    git clone --recursive https://github.com/KhronosGroup/OpenCL-CLHPP
47    cd OpenCL-CLHPP
48    mkdir build
49    cd build
50    cmake .. -DOPENCL_INCLUDE_DIR=/path/to/OpenCL/headers -DOPENCL_LIB_DIR=/path/to/OpenCL/library
51    make
52    make test
53```
54
55After building, the headers appear in `build/include/CL/`.
56
57If Doxygen is available, you can generate HTML documentation by typing `make docs`.
58