Go to file
openharmony_ci 983cc82332
Some checks failed
Linux / compatibility (32, 3.0.2, Debug, clang++-13, clang-13, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Debug, clang++-8, clang-8, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Debug, g++-11, gcc-11, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Debug, g++-7, gcc-7, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Release, clang++-13, clang-13, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Release, clang++-8, clang-8, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Release, g++-11, gcc-11, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.0.2, Release, g++-7, gcc-7, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (32, 3.22.1, clang++-13, clang-13, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (32, 3.22.1, clang++-8, clang-8, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (32, 3.22.1, g++-11, gcc-11, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (32, 3.22.1, g++-7, gcc-7, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Debug, clang++-13, clang-13, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Debug, clang++-8, clang-8, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Debug, g++-11, gcc-11, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Debug, g++-7, gcc-7, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Release, clang++-13, clang-13, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Release, clang++-8, clang-8, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Release, g++-11, gcc-11, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.0.2, Release, g++-7, gcc-7, Unix Makefiles) (push) Has been cancelled
Linux / compatibility (64, 3.22.1, clang++-13, clang-13, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (64, 3.22.1, clang++-8, clang-8, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (64, 3.22.1, g++-11, gcc-11, Ninja Multi-Config) (push) Has been cancelled
Linux / compatibility (64, 3.22.1, g++-7, gcc-7, Ninja Multi-Config) (push) Has been cancelled
MacOS / compatibility (Ninja Multi-Config, 11, 11) (push) Has been cancelled
MacOS / compatibility (Ninja Multi-Config, 11, 9) (push) Has been cancelled
MacOS / compatibility (Ninja Multi-Config, 17, 11) (push) Has been cancelled
MacOS / compatibility (Ninja Multi-Config, 17, 9) (push) Has been cancelled
MacOS / compatibility (Xcode, 11, 11) (push) Has been cancelled
MacOS / compatibility (Xcode, 11, 9) (push) Has been cancelled
MacOS / compatibility (Xcode, 17, 11) (push) Has been cancelled
MacOS / compatibility (Xcode, 17, 9) (push) Has been cancelled
Windows / compatibility (x64, OFF, Ninja Multi-Config, 89, v141) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 11, v142) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 11, v143) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 17, v142) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 17, v143) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 99, v142) (push) Has been cancelled
Windows / compatibility (x64, OFF, Visual Studio 17 2022, 99, v143) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 11, v142) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 11, v143) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 17, v142) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 17, v143) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 99, v142) (push) Has been cancelled
Windows / compatibility (x64, ON, Visual Studio 17 2022, 99, v143) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 11, v142) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 11, v143) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 17, v142) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 17, v143) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 99, v142) (push) Has been cancelled
Windows / compatibility (x86, OFF, Visual Studio 17 2022, 99, v143) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 11, v142) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 11, v143) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 17, v142) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 17, v143) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 99, v142) (push) Has been cancelled
Windows / compatibility (x86, ON, Visual Studio 17 2022, 99, v143) (push) Has been cancelled
!32 修改软件名称
Merge pull request !32 from 姚朱鹏/master
2024-11-04 09:16:37 +00:00
.github/workflows Fix warnings on anonymous structs for MSVC (#198) 2022-05-02 16:35:42 -07:00
CL update opencl header version to v2022.05.18 2023-12-19 12:46:19 +08:00
include add CL so load and unload interface 2024-04-08 15:43:13 +08:00
src add CL so load and unload interface 2024-04-08 15:43:13 +08:00
tests fix tests/BUILD.gn format check error 2023-12-19 13:39:01 +08:00
BUILD.gn 修复格式化检查问题 2023-12-21 18:41:25 +08:00
bundle.json 修改BUILD.gn的output_name字段 2023-06-26 10:13:19 +08:00
CMakeLists.txt update opencl header version to v2022.05.18 2023-12-19 12:46:19 +08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-10-10 15:50:24 -04:00
LICENSE Change license to Apache 2.0 (#76) 2020-03-25 00:52:39 -07:00
OAT.xml fix license bug 2022-09-22 15:37:15 +08:00
README_zh.md add wrapper 2022-08-31 17:51:26 +08:00
README.md update opencl header version to v2022.05.18 2023-12-19 12:46:19 +08:00
README.OpenSource change opensource 2024-11-04 15:30:01 +08: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.

Build instructions

While the OpenCL Headers can be built and installed in isolation, it is part of the OpenCL SDK. If looking for streamlined build experience and a complete development package, refer to the SDK build instructions instead of the following guide.

Dependencies

  • The OpenCL Headers CMake package support uses CMake for its build system. If CMake is not provided by your build system or OS package manager, please consult the CMake website.

Example Build

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

Example Use

Example CMake invocation

cmake -D CMAKE_PREFIX_PATH=/chosen/install/prefix /path/to/opencl/app 

and sample CMakeLists.txt

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.