Merge pull request #3784 from ilya-lavrenov:nvidia_android
This commit is contained in:
@@ -2114,6 +2114,12 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
|
||||
int ddepth = -1, bool absValues = false, InputArray _src2 = noArray(), double * maxVal2 = NULL)
|
||||
{
|
||||
const ocl::Device & dev = ocl::Device::getDefault();
|
||||
|
||||
#ifdef ANDROID
|
||||
if (dev.isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
bool doubleSupport = dev.doubleFPConfig() > 0, haveMask = !_mask.empty(),
|
||||
haveSrc2 = _src2.kind() != _InputArray::NONE;
|
||||
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type),
|
||||
@@ -2885,6 +2891,12 @@ static NormDiffFunc getNormDiffFunc(int normType, int depth)
|
||||
static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double & result )
|
||||
{
|
||||
const ocl::Device & d = ocl::Device::getDefault();
|
||||
|
||||
#ifdef ANDROID
|
||||
if (d.isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||
bool doubleSupport = d.doubleFPConfig() > 0,
|
||||
haveMask = _mask.kind() != _InputArray::NONE;
|
||||
@@ -3250,6 +3262,11 @@ namespace cv {
|
||||
|
||||
static bool ocl_norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask, double & result )
|
||||
{
|
||||
#ifdef ANDROID
|
||||
if (ocl::Device::getDefault().isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
Scalar sc1, sc2;
|
||||
int type = _src1.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||
bool relative = (normType & NORM_RELATIVE) != 0;
|
||||
|
@@ -331,7 +331,11 @@ OCL_TEST_P(Mul, Mat_Scale)
|
||||
OCL_OFF(cv::multiply(src1_roi, src2_roi, dst1_roi, val[0]));
|
||||
OCL_ON(cv::multiply(usrc1_roi, usrc2_roi, udst1_roi, val[0]));
|
||||
|
||||
#ifdef ANDROID
|
||||
Near(udst1_roi.depth() >= CV_32F ? 2e-1 : 1);
|
||||
#else
|
||||
Near(udst1_roi.depth() >= CV_32F ? 1e-3 : 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user