fixed some GPU tests failing when compiled for 1.1(no doubles) and run on 1.3(with doubles)
This commit is contained in:
@@ -222,7 +222,7 @@ CV_EXPORTS bool cv::gpu::isCompatibleWith(int device)
|
||||
if (hasLessOrEqualPtxVersion(major, minor))
|
||||
return true;
|
||||
|
||||
// Check CUBIN compatibilty
|
||||
// Check CUBIN compatibility
|
||||
for (int i = minor; i >= 0; --i)
|
||||
if (hasCubinVersion(major, i))
|
||||
return true;
|
||||
|
@@ -277,7 +277,10 @@ void cv::gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, const Gp
|
||||
|
||||
CV_Assert(src.channels() == 1);
|
||||
CV_Assert(mask.empty() || (mask.type() == CV_8U && src.size() == mask.size()));
|
||||
CV_Assert(src.type() != CV_64F || hasNativeDoubleSupport(getDevice()));
|
||||
|
||||
bool double_ok = hasGreaterOrEqualVersion(1, 3) &&
|
||||
hasNativeDoubleSupport(getDevice());
|
||||
CV_Assert(src.type() != CV_64F || double_ok);
|
||||
|
||||
double minVal_; if (!minVal) minVal = &minVal_;
|
||||
double maxVal_; if (!maxVal) maxVal = &maxVal_;
|
||||
@@ -373,7 +376,10 @@ void cv::gpu::minMaxLoc(const GpuMat& src, double* minVal, double* maxVal, Point
|
||||
|
||||
CV_Assert(src.channels() == 1);
|
||||
CV_Assert(mask.empty() || (mask.type() == CV_8U && src.size() == mask.size()));
|
||||
CV_Assert(src.type() != CV_64F || hasNativeDoubleSupport(getDevice()));
|
||||
|
||||
bool double_ok = hasGreaterOrEqualVersion(1, 3) &&
|
||||
hasNativeDoubleSupport(getDevice());
|
||||
CV_Assert(src.type() != CV_64F || double_ok);
|
||||
|
||||
double minVal_; if (!minVal) minVal = &minVal_;
|
||||
double maxVal_; if (!maxVal) maxVal = &maxVal_;
|
||||
@@ -452,7 +458,10 @@ int cv::gpu::countNonZero(const GpuMat& src, GpuMat& buf)
|
||||
countNonZeroCaller<double> };
|
||||
|
||||
CV_Assert(src.channels() == 1);
|
||||
CV_Assert(src.type() != CV_64F || hasNativeDoubleSupport(getDevice()));
|
||||
|
||||
bool double_ok = hasGreaterOrEqualVersion(1, 3) &&
|
||||
hasNativeDoubleSupport(getDevice());
|
||||
CV_Assert(src.type() != CV_64F || double_ok);
|
||||
|
||||
Size buf_size;
|
||||
getBufSizeRequired(src.cols, src.rows, buf_size.width, buf_size.height);
|
||||
|
@@ -73,6 +73,10 @@ namespace cv { namespace gpu { namespace split_merge
|
||||
CV_Assert(src);
|
||||
CV_Assert(n > 0);
|
||||
|
||||
bool double_ok = hasGreaterOrEqualVersion(1, 3) &&
|
||||
hasNativeDoubleSupport(getDevice());
|
||||
CV_Assert(src[0].depth() != CV_64F || double_ok);
|
||||
|
||||
int depth = src[0].depth();
|
||||
Size size = src[0].size();
|
||||
|
||||
@@ -112,6 +116,10 @@ namespace cv { namespace gpu { namespace split_merge
|
||||
{
|
||||
CV_Assert(dst);
|
||||
|
||||
bool double_ok = hasGreaterOrEqualVersion(1, 3) &&
|
||||
hasNativeDoubleSupport(getDevice());
|
||||
CV_Assert(src.depth() != CV_64F || double_ok);
|
||||
|
||||
int depth = src.depth();
|
||||
int num_channels = src.channels();
|
||||
Size size = src.size();
|
||||
|
Reference in New Issue
Block a user