From d96cac134109fbf0a06d5cc270c88210fce0aade Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 23 Oct 2017 13:46:56 +0300 Subject: [PATCH] ocl: cache program build failures To prevent unnecessary compiler invocations --- modules/core/src/ocl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 984307e3fc..6da86b700e 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -1387,7 +1387,7 @@ struct Context::Impl } } Program prog(src, buildflags, errmsg); - if(prog.ptr()) + // Cache result of build failures too (to prevent unnecessary compiler invocations) { cv::AutoLock lock(program_cache_mutex); phash.insert(std::pair(key, prog)); -- GitLab