提交 928edf57 编写于 作者: L liuruilong

move opencl to third party

上级 3426ec36
......@@ -15,6 +15,9 @@ file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c src/*.mm)
file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
include_directories(src/)
include_directories(third_party/opecl/OpenCL-Headers)
if(IS_IOS)
set(CMAKE_CXX_FLAGS "-mfpu=neon -marm -fobjc-abi-version=2 -fobjc-arc -std=gnu++11 -stdlib=libc++ -O3 -s -isysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS}")
else()
......
......@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
struct CLKernelDeleter {
template <class T>
......
......@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
#include "framework/cl/cl_tool.h"
#include "framework/cl/cl_engine.h"
......
......@@ -19,7 +19,7 @@ limitations under the License. */
#include "common/enforce.h"
#include "framework/cl/cl_deleter.h"
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -16,7 +16,7 @@ limitations under the License. */
#include "framework/ddim.h"
#include "framework/tensor.h"
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -21,7 +21,7 @@ limitations under the License. */
#include "framework/cl/cl_tool.h"
#include "framework/cl/cl_engine.h"
#include "framework/cl/cl_deleter.h"
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -21,7 +21,7 @@ limitations under the License. */
#include "framework/tensor_base.h"
#include "framework/cl/cl_engine.h"
#include "framework/cl/cl_deleter.h"
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include "framework/cl/CL/cl.h"
#include "CL/cl.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -31,7 +31,7 @@
#ifdef __APPLE__
#include <OpenCL/cl_version.h>
#include <OpenCL/opencl.h>
#include <OpenCL/cl_platform.h>
#else
#include <CL/cl_version.h>
#include <CL/cl_platform.h>
......
......@@ -37,7 +37,7 @@ extern "C" {
#endif
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <OpenCL/cl.h>
#include <AvailabilityMacros.h>
#else
#include <CL/cl.h>
......
......@@ -53,8 +53,8 @@ Notes:
#define __CL_EXT_INTEL_H
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <OpenCL/opencl.h>
#include <OpenCL/cl.h>
#include <OpenCL/cl_platform.h>
#else
#include <CL/cl.h>
#include <CL/cl_platform.h>
......
......@@ -30,7 +30,7 @@
#define __OPENCL_CL_GL_H
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
......
......@@ -39,7 +39,7 @@ extern "C" {
#endif
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <OpenCL/cl_gl.h>
#else
#include <CL/cl_gl.h>
#endif
......
......@@ -37,10 +37,10 @@ extern "C" {
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#include <OpenCL/opencl.h>
#include <OpenCL/opencl.h>
#include <OpenCL/opencl.h>
#include <OpenCL/cl.h>
#include <OpenCL/cl_gl.h>
#include <OpenCL/cl_gl_ext.h>
#include <OpenCL/cl_ext.h>
#else
......
Copyright (c) 2008-2015 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
https://www.khronos.org/registry/
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
# OpenCL<sup>TM</sup> 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.
## 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 2.2). 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](LICENSE).
---
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册