added gpu compare with scalar

This commit is contained in:
Vladislav Vinogradov
2013-02-13 15:53:03 +04:00
parent a828b60765
commit 08914aa708
6 changed files with 431 additions and 0 deletions

View File

@@ -647,6 +647,39 @@ PERF_TEST_P(Sz_Depth_Code, Core_CompareMat, Combine(GPU_TYPICAL_MAT_SIZES, ARITH
}
}
//////////////////////////////////////////////////////////////////////
// CompareScalar
PERF_TEST_P(Sz_Depth_Code, Core_CompareScalar, Combine(GPU_TYPICAL_MAT_SIZES, ARITHM_MAT_DEPTH, ALL_CMP_CODES))
{
const cv::Size size = GET_PARAM(0);
const int depth = GET_PARAM(1);
const int cmp_code = GET_PARAM(2);
cv::Mat src(size, depth);
fillRandom(src);
cv::Scalar s = cv::Scalar::all(100);
if (PERF_RUN_GPU())
{
cv::gpu::GpuMat d_src(src);
cv::gpu::GpuMat d_dst;
TEST_CYCLE() cv::gpu::compare(d_src, s, d_dst, cmp_code);
GPU_SANITY_CHECK(d_dst);
}
else
{
cv::Mat dst;
TEST_CYCLE() cv::compare(src, s, dst, cmp_code);
CPU_SANITY_CHECK(dst);
}
}
//////////////////////////////////////////////////////////////////////
// BitwiseNot