1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

ocl: remove support_image2d(): we target on OpenCL 1.1 (with image2d support by default)

This commit is contained in:
Alexander Alekhin
2013-10-11 15:33:10 +04:00
parent c0265c60f3
commit 57120c1a60
8 changed files with 43 additions and 897 deletions
+17 -12
View File
@@ -448,26 +448,30 @@ cl_program ProgramCache::getProgram(const Context *ctx, const cv::ocl::ProgramEn
{
stringstream src_sign;
src_sign << source->name;
src_sign << getClContext(ctx);
if (NULL != build_options)
if (source->name)
{
src_sign << "_" << build_options;
}
{
cv::AutoLock lockCache(mutexCache);
cl_program program = ProgramCache::getProgramCache()->progLookup(src_sign.str());
if (!!program)
src_sign << source->name;
src_sign << getClContext(ctx);
if (NULL != build_options)
{
clRetainProgram(program);
return program;
src_sign << "_" << build_options;
}
{
cv::AutoLock lockCache(mutexCache);
cl_program program = ProgramCache::getProgramCache()->progLookup(src_sign.str());
if (!!program)
{
clRetainProgram(program);
return program;
}
}
}
cv::AutoLock lockCache(mutexFiles);
// second check
if (source->name)
{
cv::AutoLock lockCache(mutexCache);
cl_program program = ProgramCache::getProgramCache()->progLookup(src_sign.str());
@@ -493,6 +497,7 @@ cl_program ProgramCache::getProgram(const Context *ctx, const cv::ocl::ProgramEn
cl_program program = programFileCache.getOrBuildProgram(ctx, source, all_build_options);
//Cache the binary for future use if build_options is null
if (source->name)
{
cv::AutoLock lockCache(mutexCache);
this->addProgram(src_sign.str(), program);