Initialize OpenCL context at the end of getDevice call.

Added for better compatibility with the current samples/test cases.
User now will be able to initialize OpenCL context explicitly with
ocl::getDevice api.
This may be obsoleted in future releases.
This commit is contained in:
peng xiao 2013-05-31 16:48:40 +08:00
parent 37091b086c
commit 97b86aa259

View File

@ -333,6 +333,10 @@ namespace cv
oclinfo.push_back(ocltmpinfo);
}
}
if(devcienums > 0)
{
setDevice(oclinfo[0]);
}
return devcienums;
}