1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #10406 from seiko2plus:coreUnvintrinCopy

This commit is contained in:
Vadim Pisarevsky
2018-02-20 14:50:16 +00:00
2 changed files with 88 additions and 46 deletions
+42 -1
View File
@@ -55,7 +55,7 @@ PERF_TEST_P(Size_MatType, Mat_Clone,
Size size = get<0>(GetParam());
int type = get<1>(GetParam());
Mat source(size.height, size.width, type);
Mat destination(size.height, size.width, type);;
Mat destination(size.height, size.width, type);
declare.in(source, WARMUP_RNG).out(destination);
@@ -95,6 +95,47 @@ PERF_TEST_P(Size_MatType, Mat_Clone_Roi,
SANITY_CHECK(destination, 1);
}
PERF_TEST_P(Size_MatType, Mat_CopyToWithMask,
testing::Combine(testing::Values(TYPICAL_MAT_SIZES),
testing::Values(CV_8UC1, CV_8UC2))
)
{
const Size_MatType_t params = GetParam();
const Size size = get<0>(params);
const int type = get<1>(params);
Mat src(size, type), dst(size, type), mask(size, CV_8UC1);
declare.in(src, mask, WARMUP_RNG).out(dst);
TEST_CYCLE()
{
src.copyTo(dst, mask);
}
SANITY_CHECK(dst);
}
PERF_TEST_P(Size_MatType, Mat_SetToWithMask,
testing::Combine(testing::Values(TYPICAL_MAT_SIZES),
testing::Values(CV_8UC1, CV_8UC2))
)
{
const Size_MatType_t params = GetParam();
const Size size = get<0>(params);
const int type = get<1>(params);
const Scalar sc = Scalar::all(27);
Mat src(size, type), mask(size, CV_8UC1);
declare.in(src, mask, WARMUP_RNG).out(src);
TEST_CYCLE()
{
src.setTo(sc, mask);
}
SANITY_CHECK(src);
}
///////////// Transform ////////////////////////
PERF_TEST_P(Size_MatType, Mat_Transform,