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

fixed gpu::sum* on CC1.0, updated some tests

This commit is contained in:
Alexey Spizhevoy
2011-02-02 07:23:55 +00:00
parent f7e62d89f8
commit 557dd39f03
6 changed files with 27 additions and 11 deletions
+10
View File
@@ -947,6 +947,16 @@ struct CV_GpuSumTest: CvTest
// sum
//
gen(1 + rand() % 500, 1 + rand() % 500, CV_MAKETYPE(type, 1), src);
a = sum(src);
b = sum(GpuMat(src));
if (abs(a[0] - b[0]) > src.size().area() * max_err)
{
ts->printf(CvTS::CONSOLE, "1 cols: %d, rows: %d, expected: %f, actual: %f\n", src.cols, src.rows, a[0], b[0]);
ts->set_failed_test_info(CvTS::FAIL_INVALID_OUTPUT);
return;
}
gen(1 + rand() % 500, 1 + rand() % 500, CV_MAKETYPE(type, 2), src);
a = sum(src);
b = sum(GpuMat(src));