\r
cv::Scalar val(1, 2, 3, 4);\r
\r
- if (runOnGpu)\r
+ if (PERF_RUN_GPU())\r
{\r
cv::gpu::GpuMat d_src(size, type);\r
\r
{\r
d_src.setTo(val);\r
}\r
+\r
+ GPU_SANITY_CHECK(d_src);\r
}\r
else\r
{\r
{\r
src.setTo(val);\r
}\r
+\r
+ CPU_SANITY_CHECK(src);\r
}\r
}\r
\r
\r
cv::Scalar val(1, 2, 3, 4);\r
\r
- if (runOnGpu)\r
+ if (PERF_RUN_GPU())\r
{\r
cv::gpu::GpuMat d_src(src);\r
cv::gpu::GpuMat d_mask(mask);\r
{\r
d_src.setTo(val, d_mask);\r
}\r
+\r
+ GPU_SANITY_CHECK(d_src);\r
}\r
else\r
{\r
{\r
src.setTo(val, mask);\r
}\r
+\r
+ CPU_SANITY_CHECK(src);\r
}\r
}\r
\r
cv::Mat mask(size, CV_8UC1);\r
fillRandom(mask, 0, 2);\r
\r
- if (runOnGpu)\r
+ if (PERF_RUN_GPU())\r
{\r
cv::gpu::GpuMat d_src(src);\r
cv::gpu::GpuMat d_mask(mask);\r
{\r
d_src.copyTo(d_dst, d_mask);\r
}\r
+\r
+ GPU_SANITY_CHECK(d_dst);\r
}\r
else\r
{\r
{\r
src.copyTo(dst, mask);\r
}\r
+\r
+ CPU_SANITY_CHECK(dst);\r
}\r
}\r
\r
cv::Mat src(size, depth1);\r
fillRandom(src);\r
\r
- if (runOnGpu)\r
+ if (PERF_RUN_GPU())\r
{\r
cv::gpu::GpuMat d_src(src);\r
cv::gpu::GpuMat d_dst;\r
{\r
d_src.convertTo(d_dst, depth2, 0.5, 1.0);\r
}\r
+\r
+ GPU_SANITY_CHECK(d_dst);\r
}\r
else\r
{\r
{\r
src.convertTo(dst, depth2, 0.5, 1.0);\r
}\r
+\r
+ CPU_SANITY_CHECK(dst);\r
}\r
}\r
\r