mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 14:06:35 +08:00
Merge pull request #10582 from mshabunin:fix-ocl-concurrent-cache-name
This commit is contained in:
commit
69cd9cc1a6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user