Skip to content

Commit d96cac1

Browse files
committed
ocl: cache program build failures
To prevent unnecessary compiler invocations
1 parent cca99bf commit d96cac1

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)