From 70cf7fa424250dc0c9457ac196c48b31f05d1972 Mon Sep 17 00:00:00 2001 From: xu Date: Tue, 6 Sep 2022 10:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BC=96=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xu --- src/opencl_wrapper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/opencl_wrapper.cpp b/src/opencl_wrapper.cpp index 36c34f7..756a70b 100644 --- a/src/opencl_wrapper.cpp +++ b/src/opencl_wrapper.cpp @@ -16,8 +16,10 @@ #ifdef USE_OPENCL_WRAPPER #include "opencl_wrapper.h" +#include #include #include +#include #include #include #include @@ -33,13 +35,12 @@ static const std::vector g_opencl_library_paths = { #endif }; - -static std::mutex gInitMutex; +static std::mutex g_initMutex; bool isInit = false; void *handle_{nullptr}; bool InitOpenCL() { - std::lock_guard lock(gInitMutex); + std::lock_guard lock(g_initMutex); if (isInit){ return true; } -- Gitee