From 8eb28b63d0ae4f6d5b015b61dea34451f9a78dea Mon Sep 17 00:00:00 2001 From: "cuijiawei14@huawei.com" Date: Tue, 14 Mar 2023 18:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89MUSL=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cuijiawei14@huawei.com --- src/opencl_wrapper.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/opencl_wrapper.cpp b/src/opencl_wrapper.cpp index edbd453..92e4c44 100644 --- a/src/opencl_wrapper.cpp +++ b/src/opencl_wrapper.cpp @@ -52,9 +52,6 @@ bool InitOpenCL() { } bool UnLoadOpenCLLibrary(void *handle) { -#ifdef __MUSL__ - return true; -#else if (handle != nullptr) { if (dlclose(handle) != 0) { return false; @@ -62,7 +59,6 @@ bool UnLoadOpenCLLibrary(void *handle) { return true; } return true; -#endif } bool LoadLibraryFromPath(const std::string &library_path, void **handle_ptr) { @@ -79,7 +75,6 @@ bool LoadLibraryFromPath(const std::string &library_path, void **handle_ptr) { #define LOAD_OPENCL_FUNCTION_PTR(func_name) \ func_name = reinterpret_cast(dlsym(*handle_ptr, #func_name)); \ if (func_name == nullptr) { \ - UnLoadOpenCLLibrary(*handle_ptr); \ return false; \ } @@ -155,9 +150,6 @@ bool LoadOpenCLLibrary(void **handle_ptr) { if (handle_ptr == nullptr) { return false; } - if (*handle_ptr != nullptr) { - return true; - } auto it = std::find_if(g_opencl_library_paths.begin(), g_opencl_library_paths.end(), [&](const std::string &lib_path) { return OHOS::LoadLibraryFromPath(lib_path, handle_ptr); }); -- Gitee