{\r
CV_Assert(src.type() == CV_8UC1 || src.type() == CV_8UC4);\r
\r
- Scalar res;\r
+ \r
\r
\r
NppiSize sz;\r
{ \r
nppiReductionGetBufferHostSize_8u_C1R(sz, &bufsz);\r
GpuMat buf(1, bufsz, CV_32S);\r
- nppSafeCall( nppiSum_8u_C1R(src.ptr<Npp8u>(), src.step, sz, buf.ptr<Npp32s>(), res.val) );\r
+\r
+ Scalar res;\r
+ nppSafeCall( nppiSum_8u_C1R(src.ptr<Npp8u>(), src.step, sz, buf.ptr<Npp32s>(), res.val) );\r
+ return res;\r
}\r
else\r
{ \r
nppiReductionGetBufferHostSize_8u_C4R(sz, &bufsz);\r
GpuMat buf(1, bufsz, CV_32S);\r
+\r
+ Scalar res;\r
nppSafeCall( nppiSum_8u_C4R(src.ptr<Npp8u>(), src.step, sz, buf.ptr<Npp32s>(), res.val) );\r
+ return res;\r
}\r
\r
- return res;\r
+ \r
}\r
\r
////////////////////////////////////////////////////////////////////////\r
const string& msg = (idx != error_num) ? npp_errors[idx].str : string("Unknown error code");\r
\r
std::stringstream interpreter;\r
- interpreter << "<" << err << "> " << msg;\r
+ interpreter << msg <<" [Code = " << err << "]";\r
\r
return interpreter.str();\r
}\r
\r
NppiSize sz;\r
sz.width = src.cols;\r
- sz.height = dst.rows;\r
+ sz.height = src.rows;\r
\r
NppiSize mask_sz;\r
mask_sz.width = kernel.cols;\r
CV_GpuNppImageMeanStdDevTest CV_GpuNppImageMeanStdDev_test;\r
CV_GpuNppImageNormTest CV_GpuNppImageNorm_test;\r
CV_GpuNppImageFlipTest CV_GpuNppImageFlip_test;\r
-//CV_GpuNppImageSumTest CV_GpuNppImageSum_test;\r
+CV_GpuNppImageSumTest CV_GpuNppImageSum_test;\r
CV_GpuNppImageMinNaxTest CV_GpuNppImageMinNax_test;\r
CV_GpuNppImageLUTTest CV_GpuNppImageLUT_test;
\ No newline at end of file
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. */