Refactor OpenCL initialization and allow to use ocl module witout explicit setup
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user