make the sparse method give correct results on CPU ocl

Add CL_CPU to supportsFeature check
simplify the logic of pyrlk
This commit is contained in:
yao
2013-04-03 13:23:04 +08:00
parent 656594ad4f
commit fd4a6f0af0
5 changed files with 307 additions and 501 deletions

View File

@@ -979,6 +979,12 @@ namespace cv
return impl->double_support == 1;
case CL_UNIFIED_MEM:
return impl->unified_memory == 1;
case CL_CPU:
cl_device_type devicetype;
clGetDeviceInfo(impl->devices[impl->devnum],
CL_DEVICE_TYPE, sizeof(cl_device_type),
&devicetype, NULL);
return devicetype == CVCL_DEVICE_TYPE_CPU;
default:
return false;
}