From b167115b5bf32194633610304d47512e3e39f19a Mon Sep 17 00:00:00 2001 From: Baiyun-u-smartAI <45277409+Baiyun-u-smartAI@users.noreply.github.com> Date: Mon, 6 Dec 2021 14:09:50 +0800 Subject: [PATCH] fixed an error ------Context::p is protected whinin this context --- modules/core/src/ocl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index b902a571b0..d54fc555f4 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -2352,7 +2352,7 @@ class OpenCLSVMBufferPoolImpl; struct Context::Impl { - static Context::Impl* get(Context& context) { return context.p; } + static Context::Impl* get(Context& context) { return context.getImpl(); } typedef std::deque container_t; static container_t& getGlobalContainer() @@ -3084,7 +3084,7 @@ namespace svm { const SVMCapabilities getSVMCapabilitites(const ocl::Context& context) { - Context::Impl* i = context.p; + Context::Impl* i = context.getImpl(); CV_Assert(i); if (!i->svmInitialized) i->svmInit(); @@ -3093,7 +3093,7 @@ const SVMCapabilities getSVMCapabilitites(const ocl::Context& context) CV_EXPORTS const SVMFunctions* getSVMFunctions(const ocl::Context& context) { - Context::Impl* i = context.p; + Context::Impl* i = context.getImpl(); CV_Assert(i); CV_Assert(i->svmInitialized); // getSVMCapabilitites() must be called first CV_Assert(i->svmFunctions.fn_clSVMAlloc != NULL);