[opencv] 203/251: ocl: fix program cache key
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit 16fb74425ec855fdac315eab7e1559e70c51fc4f
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Mon Jul 31 17:24:08 2017 +0300
ocl: fix program cache key
---
modules/core/src/ocl.cpp | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp
index 196cefc..f25b9c0 100644
--- a/modules/core/src/ocl.cpp
+++ b/modules/core/src/ocl.cpp
@@ -174,24 +174,6 @@ static uint64 crc64( const uchar* data, size_t size, uint64 crc0=0 )
return ~crc;
}
-struct HashKey
-{
- typedef uint64 part;
- HashKey(part _a, part _b) : a(_a), b(_b) {}
- part a, b;
-};
-
-inline bool operator == (const HashKey& h1, const HashKey& h2)
-{
- return h1.a == h2.a && h1.b == h2.b;
-}
-
-inline bool operator < (const HashKey& h1, const HashKey& h2)
-{
- return h1.a < h2.a || (h1.a == h2.a && h1.b < h2.b);
-}
-
-
bool haveOpenCL()
{
#ifdef HAVE_OPENCL
@@ -1351,7 +1333,7 @@ struct Context::Impl
const String& buildflags, String& errmsg)
{
size_t limit = getProgramCountLimit();
- String key = Program::getPrefix(buildflags);
+ String key = cv::format("codehash=%08llx ", src.hash()) + Program::getPrefix(buildflags);
{
cv::AutoLock lock(program_cache_mutex);
phash_t::iterator it = phash.find(key);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list