removed double support (gpu: minMax, minMaxLoc, countNonZero) for CC which doesn't have native double support
This commit is contained in:
parent
72f020a8f3
commit
1066bd2fa2
@ -526,10 +526,8 @@ void cv::gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, GpuMat&
|
|||||||
get_buf_size_required(src.elemSize(), bufSize.width, bufSize.height);
|
get_buf_size_required(src.elemSize(), bufSize.width, bufSize.height);
|
||||||
buf.create(bufSize, CV_8U);
|
buf.create(bufSize, CV_8U);
|
||||||
|
|
||||||
int major, minor;
|
int device = getDevice();
|
||||||
getComputeCapability(getDevice(), major, minor);
|
if (hasAtomicsSupport(device))
|
||||||
|
|
||||||
if (major > 1 || (major == 1 && minor >= 1))
|
|
||||||
{
|
{
|
||||||
switch (src_.type())
|
switch (src_.type())
|
||||||
{
|
{
|
||||||
@ -539,7 +537,12 @@ void cv::gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, GpuMat&
|
|||||||
case CV_16S: min_max_caller<signed short>(src_, minVal, maxVal, buf); break;
|
case CV_16S: min_max_caller<signed short>(src_, minVal, maxVal, buf); break;
|
||||||
case CV_32S: min_max_caller<int>(src_, minVal, maxVal, buf); break;
|
case CV_32S: min_max_caller<int>(src_, minVal, maxVal, buf); break;
|
||||||
case CV_32F: min_max_caller<float>(src_, minVal, maxVal, buf); break;
|
case CV_32F: min_max_caller<float>(src_, minVal, maxVal, buf); break;
|
||||||
case CV_64F: min_max_caller<double>(src_, minVal, maxVal, buf); break;
|
case CV_64F:
|
||||||
|
if (hasNativeDoubleSupport(device))
|
||||||
|
{
|
||||||
|
min_max_caller<double>(src_, minVal, maxVal, buf);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: CV_Error(CV_StsBadArg, "minMax: unsupported type");
|
default: CV_Error(CV_StsBadArg, "minMax: unsupported type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -600,10 +603,8 @@ void cv::gpu::minMaxLoc(const GpuMat& src, double* minVal, double* maxVal, Point
|
|||||||
valbuf.create(valbuf_size, CV_8U);
|
valbuf.create(valbuf_size, CV_8U);
|
||||||
locbuf.create(locbuf_size, CV_8U);
|
locbuf.create(locbuf_size, CV_8U);
|
||||||
|
|
||||||
int major, minor;
|
int device = getDevice();
|
||||||
getComputeCapability(getDevice(), major, minor);
|
if (hasAtomicsSupport(device))
|
||||||
|
|
||||||
if (major > 1 || (major == 1 && minor >= 1))
|
|
||||||
{
|
{
|
||||||
switch (src.type())
|
switch (src.type())
|
||||||
{
|
{
|
||||||
@ -613,7 +614,12 @@ void cv::gpu::minMaxLoc(const GpuMat& src, double* minVal, double* maxVal, Point
|
|||||||
case CV_16S: min_max_loc_caller<signed short>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
case CV_16S: min_max_loc_caller<signed short>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
||||||
case CV_32S: min_max_loc_caller<int>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
case CV_32S: min_max_loc_caller<int>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
||||||
case CV_32F: min_max_loc_caller<float>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
case CV_32F: min_max_loc_caller<float>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
||||||
case CV_64F: min_max_loc_caller<double>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf); break;
|
case CV_64F:
|
||||||
|
if (hasNativeDoubleSupport(device))
|
||||||
|
{
|
||||||
|
min_max_loc_caller<double>(src, minVal, maxVal, minLoc_, maxLoc_, valbuf, locbuf);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: CV_Error(CV_StsBadArg, "minMaxLoc: unsupported type");
|
default: CV_Error(CV_StsBadArg, "minMaxLoc: unsupported type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user