From 1b8c00000c2409e5c4f3eb50361b5be0e6c51a1e Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Mon, 27 Sep 2010 06:57:25 +0000 Subject: [PATCH] added black list for gpu tests --- modules/gpu/src/arithm.cpp | 12 +++++++++--- modules/gpu/src/error.cpp | 2 +- modules/gpu/src/filtering_npp.cpp | 2 +- tests/gpu/src/arithm.cpp | 2 +- tests/gpu/src/gputest_main.cpp | 8 +++++++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/gpu/src/arithm.cpp b/modules/gpu/src/arithm.cpp index 7aa81a9..d0105ef 100644 --- a/modules/gpu/src/arithm.cpp +++ b/modules/gpu/src/arithm.cpp @@ -309,7 +309,7 @@ Scalar cv::gpu::sum(const GpuMat& src) { CV_Assert(src.type() == CV_8UC1 || src.type() == CV_8UC4); - Scalar res; + NppiSize sz; @@ -322,16 +322,22 @@ Scalar cv::gpu::sum(const GpuMat& src) { nppiReductionGetBufferHostSize_8u_C1R(sz, &bufsz); GpuMat buf(1, bufsz, CV_32S); - nppSafeCall( nppiSum_8u_C1R(src.ptr(), src.step, sz, buf.ptr(), res.val) ); + + Scalar res; + nppSafeCall( nppiSum_8u_C1R(src.ptr(), src.step, sz, buf.ptr(), res.val) ); + return res; } else { nppiReductionGetBufferHostSize_8u_C4R(sz, &bufsz); GpuMat buf(1, bufsz, CV_32S); + + Scalar res; nppSafeCall( nppiSum_8u_C4R(src.ptr(), src.step, sz, buf.ptr(), res.val) ); + return res; } - return res; + } //////////////////////////////////////////////////////////////////////// diff --git a/modules/gpu/src/error.cpp b/modules/gpu/src/error.cpp index eeaf86d..04efd0e 100644 --- a/modules/gpu/src/error.cpp +++ b/modules/gpu/src/error.cpp @@ -124,7 +124,7 @@ namespace cv const string& msg = (idx != error_num) ? npp_errors[idx].str : string("Unknown error code"); std::stringstream interpreter; - interpreter << "<" << err << "> " << msg; + interpreter << msg <<" [Code = " << err << "]"; return interpreter.str(); } diff --git a/modules/gpu/src/filtering_npp.cpp b/modules/gpu/src/filtering_npp.cpp index 7a914f8..e8163d4 100644 --- a/modules/gpu/src/filtering_npp.cpp +++ b/modules/gpu/src/filtering_npp.cpp @@ -69,7 +69,7 @@ namespace NppiSize sz; sz.width = src.cols; - sz.height = dst.rows; + sz.height = src.rows; NppiSize mask_sz; mask_sz.width = kernel.cols; diff --git a/tests/gpu/src/arithm.cpp b/tests/gpu/src/arithm.cpp index 366af75..b9033f0 100644 --- a/tests/gpu/src/arithm.cpp +++ b/tests/gpu/src/arithm.cpp @@ -590,6 +590,6 @@ CV_GpuNppImageCompareTest CV_GpuNppImageCompare_test; CV_GpuNppImageMeanStdDevTest CV_GpuNppImageMeanStdDev_test; CV_GpuNppImageNormTest CV_GpuNppImageNorm_test; CV_GpuNppImageFlipTest CV_GpuNppImageFlip_test; -//CV_GpuNppImageSumTest CV_GpuNppImageSum_test; +CV_GpuNppImageSumTest CV_GpuNppImageSum_test; CV_GpuNppImageMinNaxTest CV_GpuNppImageMinNax_test; CV_GpuNppImageLUTTest CV_GpuNppImageLUT_test; \ No newline at end of file diff --git a/tests/gpu/src/gputest_main.cpp b/tests/gpu/src/gputest_main.cpp index 1d15f9b..2a2be4d 100644 --- a/tests/gpu/src/gputest_main.cpp +++ b/tests/gpu/src/gputest_main.cpp @@ -43,9 +43,15 @@ CvTS test_system; +const char* blacklist[] = +{ + "GPU-NppImageSum", + 0 +}; + int main( int argc, char** argv ) { - return test_system.run( argc, argv ); + return test_system.run( argc, argv, blacklist ); } /* End of file. */ -- 2.7.4