1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

fixed some GPU tests failing when compiled for 1.1(no doubles) and run on 1.3(with doubles)

This commit is contained in:
Alexey Spizhevoy
2011-01-20 15:08:48 +00:00
parent 9e48f64149
commit 0da71a01ff
7 changed files with 90 additions and 30 deletions
+8 -10
View File
@@ -659,11 +659,10 @@ struct CV_GpuMinMaxTest: public CvTest
{
try
{
int depth_end;
if (cv::gpu::hasNativeDoubleSupport(cv::gpu::getDevice()))
depth_end = CV_64F;
else
depth_end = CV_32F;
bool double_ok = gpu::hasGreaterOrEqualVersion(1, 3) &&
gpu::hasNativeDoubleSupport(gpu::getDevice());
int depth_end = double_ok ? CV_64F : CV_32F;
for (int depth = CV_8U; depth <= depth_end; ++depth)
{
for (int i = 0; i < 3; ++i)
@@ -794,11 +793,10 @@ struct CV_GpuMinMaxLocTest: public CvTest
{
try
{
int depth_end;
if (cv::gpu::hasNativeDoubleSupport(cv::gpu::getDevice()))
depth_end = CV_64F;
else
depth_end = CV_32F;
bool double_ok = gpu::hasGreaterOrEqualVersion(1, 3) &&
gpu::hasNativeDoubleSupport(gpu::getDevice());
int depth_end = double_ok ? CV_64F : CV_32F;
for (int depth = CV_8U; depth <= depth_end; ++depth)
{
int rows = 1, cols = 3;