1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

ocl: silence warning in case of async cleanup

- OpenCL kernel cleanup processing is asynchronous and can be called even after forced clFinish()
- buffers are released later in asynchronous mode
- silence these false positive cases for asynchronous cleanup
This commit is contained in:
Alexander Alekhin
2020-08-20 19:05:50 +00:00
parent fc0f9da7a7
commit b3755e617c
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -80,6 +80,7 @@ UMatData::~UMatData()
CV_Assert(mapcount == 0);
data = origdata = 0;
size = 0;
bool isAsyncCleanup = !!(flags & UMatData::ASYNC_CLEANUP);
flags = 0;
handle = 0;
userdata = 0;
@@ -106,7 +107,7 @@ UMatData::~UMatData()
showWarn = true;
if (zero_Ref && zero_URef) // oops, we need to free resources
{
showWarn = true;
showWarn = !isAsyncCleanup;
// simulate UMat::deallocate
u->currAllocator->deallocate(u);
}