From b83b77477c6ff35f7d9f8d790b2b10e2745f9da9 Mon Sep 17 00:00:00 2001 From: xiebaiyuan Date: Fri, 15 Mar 2019 14:59:27 +0800 Subject: [PATCH] add mecro for opencl interface --- src/io/opencl_interface.cpp | 2 ++ src/io/opencl_interface.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/io/opencl_interface.cpp b/src/io/opencl_interface.cpp index 1a4b1f67cb..1df5b48339 100644 --- a/src/io/opencl_interface.cpp +++ b/src/io/opencl_interface.cpp @@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS, 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. */ +#ifdef PADDLE_MOBILE_CL #include "io/opencl_interface.h" #include "framework/cl/cl_engine.h" @@ -31,3 +32,4 @@ bool isInitSuccess() { } } // namespace paddle_mobile +#endif diff --git a/src/io/opencl_interface.h b/src/io/opencl_interface.h index 3812abf00f..d7877e8afd 100644 --- a/src/io/opencl_interface.h +++ b/src/io/opencl_interface.h @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once - +#ifdef PADDLE_MOBILE_CL #include "CL/cl.h" namespace paddle_mobile { @@ -22,4 +22,6 @@ cl_context getContext(); cl_command_queue getClCommandQueue(); bool isInitSuccess(); +#endif + } // namespace paddle_mobile -- GitLab