Commit 69cd9cc1 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #10582 from mshabunin:fix-ocl-concurrent-cache-name

parents c6d9ce8f 594a9331
......@@ -2070,6 +2070,9 @@ struct Context::Impl
std::string& getPrefixString()
{
if (prefix.empty())
{
cv::AutoLock lock(program_cache_mutex);
if (prefix.empty())
{
CV_Assert(!devices.empty());
......@@ -2088,11 +2091,15 @@ struct Context::Impl
}
}
}
}
return prefix;
}
std::string& getPrefixBase()
{
if (prefix_base.empty())
{
cv::AutoLock lock(program_cache_mutex);
if (prefix_base.empty())
{
const Device& d = devices[0];
......@@ -2110,6 +2117,7 @@ struct Context::Impl
}
}
}
}
return prefix_base;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment