Skip to content

Commit

Permalink
Remove deprecated cl.hpp (#100)
Browse files Browse the repository at this point in the history
* Remove deprecated cl.hpp

And test cl2.hpp on all OpenCL versions except 1.0 and 1.1 (too
many failures to deal with as part of this change).

Contrinutes to #25

Signed-off-by: Kévin Petit <kpet@free.fr>

* Add OpenCL 3.0 to the list of known versions

Retain 2.2 as the default until 3.0 is final.

Signed-off-by: Kévin Petit <kpet@free.fr>

* fix typo

* Bump minimum required CMake version to 3.0
  • Loading branch information
kpet committed Jun 10, 2020
1 parent 5f3cc41 commit 432b551
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 21,384 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -6,7 +6,6 @@ os:

script:
- export TOP=$(pwd)
- ./tests/check-cl-hpp-generation.sh
- git clone https://github.com/KhronosGroup/OpenCL-Headers.git
- cd OpenCL-Headers
- ln -s CL OpenCL # For OSX builds
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
@@ -1,7 +1,10 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.0)
project(CLCPP)
enable_testing()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(BUILD_DOCS "Build Documentation" ON)
option(BUILD_EXAMPLES "Build Examples" ON)
option(BUILD_TESTS "Build Unit Tests" ON)
Expand Down
23 changes: 4 additions & 19 deletions README.md
@@ -1,4 +1,4 @@
# OpenCL<sup>TM</sup> API C++ bindings (cl.hpp and cl2.hpp)
# OpenCL<sup>TM</sup> API C++ bindings

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

Expand All @@ -10,27 +10,11 @@ Components:
The latest, maintained, version of the C++ bindings. It should work with all
versions of OpenCL (including 1.x). This is what most users will want.

* `input_cl.hpp` (DEPRECATED):
Acts as the master source for the 1.x version of the header
(`include/CL/cl.hpp`).
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.
This version of the C++ bindings is deprecated and is no longer maintained;
it is strongly recommended to switch to `cl2.hpp` if possible.

* `gen_cl_hpp.py`:
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.

* `docs`:
Doxygen file used to generate HTML documentation for `cl2.hpp`.

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

* `tests`:
A (very small, incomplete) set of regression tests. Building the tests
Expand All @@ -40,7 +24,8 @@ Components:
(the version 2.0.204 on Sourceforge does not work).

* `CMakeLists.txt`:
A build system that both generates the example and drives generation of `cl.hpp`.
Build system for the examples and tests and logic for the bindings
installation.

To get external dependencies needed for testing, use `--recursive` when cloning
the repository, or run `git submodule update --init`.
Expand Down
13 changes: 2 additions & 11 deletions examples/src/CMakeLists.txt
@@ -1,9 +1,3 @@
set(TRIVIAL_SOURCES
trivial.cpp )

set(TRIVIAL_HEADERS
${CLCPP_SOURCE_DIR}/include/CL/cl.hpp)

set(TRIVIALCL2_SOURCES
trivialCL2.cpp )

Expand Down Expand Up @@ -32,14 +26,11 @@ link_directories( ${OPENCL_LIB_DIR} )
if( MSVC )
set(CMAKE_CXX_FLAGS " -W3 /EHsc" )
elseif( CMAKE_COMPILER_IS_GNUCXX )
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x" )
set(CMAKE_CXX_FLAGS "-Wall" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
set(CMAKE_CXX_FLAGS "-Wall -std=c++11" )
set(CMAKE_CXX_FLAGS "-Wall" )
endif()

add_executable(trivial ${TRIVIAL_SOURCES} ${TRIVIAL_HEADERS})
target_link_libraries( trivial OpenCL )

add_executable(trivialCL2 ${TRIVIALCL2_SOURCES} ${TRIVIALCL2_HEADERS})
target_link_libraries( trivialCL2 OpenCL )

Expand Down
61 changes: 0 additions & 61 deletions examples/src/trivial.cpp

This file was deleted.

126 changes: 0 additions & 126 deletions gen_cl_hpp.py

This file was deleted.

0 comments on commit 432b551

Please sign in to comment.