Refactor OpenCL initialization and allow to use ocl module witout explicit setup

This commit is contained in:
Andrey Kamaev
2013-03-18 01:59:24 +04:00
parent dd678121b3
commit 7b8ad4cb04
17 changed files with 416 additions and 381 deletions

View File

@@ -130,7 +130,7 @@ namespace cv
static void merge_vector_run(const oclMat *mat_src, size_t n, oclMat &mat_dst)
{
if(mat_dst.clCxt -> impl -> double_support == 0 && mat_dst.type() == CV_64F)
if(!mat_dst.clCxt->supportsFeature(Context::CL_DOUBLE) && mat_dst.type() == CV_64F)
{
CV_Error(CV_GpuNotSupported, "Selected device don't support double\r\n");
return;
@@ -279,7 +279,7 @@ namespace cv
static void split_vector_run(const oclMat &mat_src, oclMat *mat_dst)
{
if(mat_src.clCxt -> impl -> double_support == 0 && mat_src.type() == CV_64F)
if(!mat_src.clCxt->supportsFeature(Context::CL_DOUBLE) && mat_src.type() == CV_64F)
{
CV_Error(CV_GpuNotSupported, "Selected device don't support double\r\n");
return;