diff --git a/README.en.md b/README.en.md index 09a81e3..af8ba6f 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,54 @@ -# opencl-clhpp +# OpenCLTM API C++ bindings -#### Description -OpenCL (Open Computing Language) bind cpp header files +Doxgen documentation for the cl2.hpp header is available here: -#### Software Architecture -Software architecture description + http://khronosgroup.github.io/OpenCL-CLHPP/ -#### Installation +Components: -1. xxxx -2. xxxx -3. xxxx + * `include/CL/cl2.hpp`: + 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. -#### Instructions + * `docs`: + Doxygen file used to generate HTML documentation for `cl2.hpp`. -1. xxxx -2. xxxx -3. xxxx + * `examples`: + A simple example application using the very basic features of the bindings. -#### Contribution + * `tests`: + A (very small, incomplete) set of regression tests. Building the tests + requires Python, Ruby, Unity and CMock. For the last two we use + [Unity 2.1.0](https://github.com/ThrowTheSwitch/Unity/releases/tag/v2.1.0) + and [CMock top-of-tree from Github](https://github.com/ThrowTheSwitch/CMock) + (the version 2.0.204 on Sourceforge does not work). -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request + * `CMakeLists.txt`: + 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`. -#### Gitee Feature +You may need to tell CMake where to find the OpenCL headers and libraries, +using the variables `OPENCL_INCLUDE_DIR` and `OPENCL_LIB_DIR`. -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +These can be set either as environment variables, or on the cmake command line +using the syntax `-D=`. + +The following is an example set of commands to checkout and build the C++ +bindings (adapt paths as required): + +``` + git clone --recursive https://github.com/KhronosGroup/OpenCL-CLHPP + cd OpenCL-CLHPP + mkdir build + cd build + cmake .. -DOPENCL_INCLUDE_DIR=/path/to/OpenCL/headers -DOPENCL_LIB_DIR=/path/to/OpenCL/library + make + make test +``` + +After building, the headers appear in `build/include/CL/`. + +If Doxygen is available, you can generate HTML documentation by typing `make docs`. \ No newline at end of file diff --git a/README.md b/README.md index 1ed514f..9f37002 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,44 @@ -# opencl-clhpp +# OpenCLTM API C++ 绑定 -#### 介绍 -OpenCL (Open Computing Language) bind cpp header files +cl2.hpp 头文件的 Doxgen 文档可以在这里找到: -#### 软件架构 -软件架构说明 + http://khronosgroup.github.io/OpenCL-CLHPP/ +软件架构: -#### 安装教程 + * `include/CL/cl2.hpp`: + 最新的、维护的 C++ 绑定版本。它应该适用于所有版本的 OpenCL(包括 1.x)。这是大多数用户想要的。 -1. xxxx -2. xxxx -3. xxxx + * `docs`: + Doxygen 文件用于为 `cl2.hpp` 生成 HTML 文档。 -#### 使用说明 + * `examples`: + 使用Bind的基本功能的简单示例应用程序。 -1. xxxx -2. xxxx -3. xxxx + * `tests`: + 一组(非常小,不完整的)回归测试。构建测试需要 Python、Ruby、Unity 和 CMock。对于最后两个我们使用 [Unity 2.1.0](https://github.com/ThrowTheSwitch/Unity/releases/tag/v2.1.0) 和 [CMock top-of-tree from Github](https://github .com/ThrowTheSwitch/CMock)(Sourceforge 上的 2.0.204 版本不起作用)。 -#### 参与贡献 + * `CMakeLists.txt`: + 为Bind安装的示例和测试以及逻辑构建系统。 -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +要获取测试所需的外部依赖项,请在克隆存储库时使用 `--recursive`,或运行 `git submodule update --init`。 +您可能需要使用变量 `OPENCL_INCLUDE_DIR` 和 `OPENCL_LIB_DIR` 告诉 CMake 在哪里可以找到 OpenCL 头文件和库。 -#### 特技 +这些可以设置为环境变量,也可以使用语法`-D=`在cmake命令行上设置。 -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +以下是用于检出和构建 C++ 绑定的示例命令集(根据需要调整路径): + +``` + git clone --recursive https://github.com/KhronosGroup/OpenCL-CLHPP + cd OpenCL-CLHPP + mkdir build + cd build + cmake .. -DOPENCL_INCLUDE_DIR=/path/to/OpenCL/headers -DOPENCL_LIB_DIR=/path/to/OpenCL/library + make + make test +``` + +构建后,头文件保存在`build/include/CL/`中。 + +如果 Doxygen 可用,您可以通过键入 `make docs` 来生成 HTML 文档。 diff --git a/opencl-clhpp.spec b/opencl-clhpp.spec index 3fefd0e..103fdce 100644 --- a/opencl-clhpp.spec +++ b/opencl-clhpp.spec @@ -1,7 +1,7 @@ %global date 2021.11.11 Name: opencl-clhpp Version: 2.0.12 -Release: 1 +Release: 2 Summary: OpenCL (Open Computing Language) bind cpp header files. License: Apache-2.0 URL: https://github.com/KhronosGroup/OpenCL-CLHPP @@ -26,5 +26,8 @@ install -p -m 0644 include/CL/* -t %{buildroot}%{_includedir}/CL/ %{_includedir}/CL/cl2.hpp %changelog +* Tue Nov 12 2021 yinchangpan - v2.12.0-2 +- Updata README + * Tue Nov 11 2021 yinchangpan - v2.12.0-1 - Package init