Go to file
Ewan Crawford 92c9108be0
Add provisional command-buffer extension (#182)
* Add provisional command-buffer extension

Run `gen_headers.py` from https://github.com/KhronosGroup/OpenCL-Headers/pull/161 on XML file
containing https://github.com/KhronosGroup/OpenCL-Docs/pull/711 new spec extensions.

The only XML changes are for the `cl_khr_command_buffer` extension, which declarations gets
generated at the top of `cl_ext.h` by the script. So I have taken the generated
`cl_khr_command_buffer` code and applied it to the same location in master branch `cl_ext.h`.

* Remove INFO from command-buffer query enums

Updated to reflect
9295865867

* Reflect command-buffer property changes

1. Change type of `cl_command_buffer_properties_khr` to `cl_properties`
2. Add a new `cl_command_buffer_flags_khr` type.
3. Rename `CL_COMMAND_BUFFER_PROPERTIES_KHR` to
`CL_COMMAND_BUFFER_FLAGS_KHR`.
  3a. Change the expected type of this to `cl_command_buffer_flags_khr`.
4. Change type of `cl_ndrange_kernel_command_properties_khr` to
`cl_properties`
2021-11-16 17:29:32 -08:00
.github/workflows disable failing CI configs (#163) 2021-04-16 21:17:45 -07:00
CL Add provisional command-buffer extension (#182) 2021-11-16 17:29:32 -08:00
tests Add testing for cl_d3d10.h, cl_d3d11.h, and cl_dx9_media_sharing.h (#123) 2021-02-16 15:19:03 -05:00
build.py Comprehensive CMake Package Config support (#107) 2020-11-24 19:18:58 +01:00
CMakeLists.txt If change the include path destination when run cmake configure with DCMAKE_INSTALL_INCLUDEDIR, the .cmake generated still point to hardcoded path include. this fix it (#178) 2021-10-18 23:14:52 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-10-10 15:50:24 -04:00
conanfile.py Comprehensive CMake Package Config support (#107) 2020-11-24 19:18:58 +01:00
LICENSE Change license to Apache 2.0 (#76) 2020-03-25 00:52:39 -07:00
README.md Update default OpenCL version in README (#160) 2021-02-20 23:26:35 -05:00

OpenCLTM API Headers

This repository contains C language headers for the OpenCL API.

The authoritative public repository for these headers is located at:

https://github.com/KhronosGroup/OpenCL-Headers

Issues, proposed fixes for issues, and other suggested changes should be created using Github.

CMake Package

While the headers may just be copied as-is, this repository also contains a CMake script with an install rule to allow for packaging the headers.

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/chosen/install/prefix
cmake --build build --target install

To consume the package:

cmake path/to/opencl/app -DOpenCLHeaders_ROOT=/chosen/install/prefix
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0...3.18.4)
project(proj)
add_executable(app main.cpp)
find_package(OpenCLHeaders REQUIRED)
target_link_libraries(app PRIVATE OpenCL::Headers)

Branch Structure

The OpenCL API headers in this repository are Unified headers and are designed to work with all released OpenCL versions. This differs from previous OpenCL API headers, where version-specific API headers either existed in separate branches, or in separate folders in a branch.

Compiling for a Specific OpenCL Version

By default, the OpenCL API headers in this repository are for the latest OpenCL version (currently OpenCL 3.0). To use these API headers to target a different OpenCL version, an application may #define the preprocessor value CL_TARGET_OPENCL_VERSION before including the OpenCL API headers. The CL_TARGET_OPENCL_VERSION is a three digit decimal value representing the OpenCL API version.

For example, to enforce usage of no more than the OpenCL 1.2 APIs, you may include the OpenCL API headers as follows:

#define CL_TARGET_OPENCL_VERSION 120
#include <CL/opencl.h>

Directory Structure

README.md               This file
LICENSE                 Source license for the OpenCL API headers
CL/                     Unified OpenCL API headers tree

License

See LICENSE.


OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.