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

View File

@@ -58,7 +58,12 @@ struct CV_GpuBitwiseTest: public CvTest
void run(int)
{
int rows, cols;
for (int depth = CV_8U; depth <= CV_64F; ++depth)
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 <= CV_32F; ++depth)
for (int cn = 1; cn <= 4; ++cn)
for (int attempt = 0; attempt < 3; ++attempt)
{