From 16a1bbf1345c39d800ad17f02d4743143d8a9c7f Mon Sep 17 00:00:00 2001 From: cuijiawei2022 Date: Tue, 6 Sep 2022 11:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cuijiawei2022 --- 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..efe626e 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