mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #13879 from chacha21:REDUCE_SUM2
add REDUCE_SUM2 #13879 proposal to add REDUCE_SUM2 to cv::reduce, an operation that sums up the square of elements
This commit is contained in:
@@ -1150,7 +1150,7 @@ OCL_PERF_TEST_P(ReduceMinMaxFixture, Reduce,
|
||||
SANITY_CHECK(dst, eps);
|
||||
}
|
||||
|
||||
CV_ENUM(ReduceAccOp, CV_REDUCE_SUM, CV_REDUCE_AVG)
|
||||
CV_ENUM(ReduceAccOp, REDUCE_SUM, REDUCE_AVG, REDUCE_SUM2)
|
||||
|
||||
typedef tuple<Size, std::pair<MatType, MatType>, int, ReduceAccOp> ReduceAccParams;
|
||||
typedef TestBaseWithParam<ReduceAccParams> ReduceAccFixture;
|
||||
@@ -1168,7 +1168,6 @@ OCL_PERF_TEST_P(ReduceAccFixture, Reduce,
|
||||
dim = get<2>(params), op = get<3>(params);
|
||||
const Size srcSize = get<0>(params),
|
||||
dstSize(dim == 0 ? srcSize.width : 1, dim == 0 ? 1 : srcSize.height);
|
||||
const double eps = CV_MAT_DEPTH(dtype) <= CV_32S ? 1 : 3e-4;
|
||||
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, stype);
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, dtype);
|
||||
@@ -1178,7 +1177,7 @@ OCL_PERF_TEST_P(ReduceAccFixture, Reduce,
|
||||
|
||||
OCL_TEST_CYCLE() cv::reduce(src, dst, dim, op, dtype);
|
||||
|
||||
SANITY_CHECK(dst, eps);
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
} } // namespace opencv_test::ocl
|
||||
|
||||
Reference in New Issue
Block a user