Skip to content

Commit bf418ba

Browse files
committed
Merge pull request opencv#9917 from alalek:ocl_cache_program_failures
2 parents be9767e + d96cac1 commit bf418ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/core/src/ocl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ struct Context::Impl
13871387
}
13881388
}
13891389
Program prog(src, buildflags, errmsg);
1390-
if(prog.ptr())
1390+
// Cache result of build failures too (to prevent unnecessary compiler invocations)
13911391
{
13921392
cv::AutoLock lock(program_cache_mutex);
13931393
phash.insert(std::pair<std::string, Program>(key, prog));

0 commit comments

Comments
 (0)