commit | 1aa1139b58a515877a923cce6b254e09d1b2fb2c | [log] [tgz] |
---|---|---|
author | y-novikov <ynovikov@chromium.org> | Wed Oct 06 17:35:29 2021 -0400 |
committer | GitHub <noreply@github.com> | Wed Oct 06 14:35:29 2021 -0700 |
tree | 9cd2549f67a0dad040cf13e44939edda9375f219 | |
parent | 835558e45c41df1345ee514e94a839c31923c1b2 [diff] |
Fix condition for warning 4201 pop (#179) Matching the condition for push. New clang compiler version complains that the warning can be popped without being pushed first.
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.
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)
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.
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>
README.md This file LICENSE Source license for the OpenCL API headers CL/ Unified OpenCL API headers tree
See LICENSE.
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.