mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
add multiruns to fix "unreliable results" error
This commit is contained in:
parent
98f6a4a615
commit
c90abb6a03
@ -34,7 +34,8 @@ PERF_TEST_P(Size_MatType_ROp, reduceR,
|
|||||||
declare.in(src, WARMUP_RNG).out(vec);
|
declare.in(src, WARMUP_RNG).out(vec);
|
||||||
declare.time(100);
|
declare.time(100);
|
||||||
|
|
||||||
TEST_CYCLE() reduce(src, vec, 0, reduceOp, ddepth);
|
int runs = 15;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs) reduce(src, vec, 0, reduceOp, ddepth);
|
||||||
|
|
||||||
SANITY_CHECK(vec, 1);
|
SANITY_CHECK(vec, 1);
|
||||||
}
|
}
|
||||||
@ -65,4 +66,3 @@ PERF_TEST_P(Size_MatType_ROp, reduceC,
|
|||||||
|
|
||||||
SANITY_CHECK(vec, 1);
|
SANITY_CHECK(vec, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,8 @@ PERF_TEST_P(Size_CvtMode, cvtColor8u,
|
|||||||
declare.time(100);
|
declare.time(100);
|
||||||
declare.in(src, WARMUP_RNG).out(dst);
|
declare.in(src, WARMUP_RNG).out(dst);
|
||||||
|
|
||||||
TEST_CYCLE() cvtColor(src, dst, mode, ch.dcn);
|
int runs = sz.width <= 320 ? 70 : 1;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn);
|
||||||
|
|
||||||
SANITY_CHECK(dst, 1);
|
SANITY_CHECK(dst, 1);
|
||||||
}
|
}
|
||||||
@ -334,7 +335,8 @@ PERF_TEST_P(Size_CvtMode3, cvtColorRGB2YUV420p,
|
|||||||
declare.time(100);
|
declare.time(100);
|
||||||
declare.in(src, WARMUP_RNG).out(dst);
|
declare.in(src, WARMUP_RNG).out(dst);
|
||||||
|
|
||||||
TEST_CYCLE() cvtColor(src, dst, mode, ch.dcn);
|
int runs = (sz.width <= 640) ? 10 : 1;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs) cvtColor(src, dst, mode, ch.dcn);
|
||||||
|
|
||||||
SANITY_CHECK(dst, 1);
|
SANITY_CHECK(dst, 1);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ PERF_TEST_P(Size_MatType, erode, TYPICAL_MATS_MORPH)
|
|||||||
|
|
||||||
declare.in(src, WARMUP_RNG).out(dst);
|
declare.in(src, WARMUP_RNG).out(dst);
|
||||||
|
|
||||||
TEST_CYCLE() erode(src, dst, noArray());
|
int runs = (sz.width <= 320) ? 15 : 1;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs) erode(src, dst, noArray());
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,8 @@ PERF_TEST_P( TestRemap, Remap,
|
|||||||
|
|
||||||
declare.in(src, WARMUP_RNG).out(dst).time(20);
|
declare.in(src, WARMUP_RNG).out(dst).time(20);
|
||||||
|
|
||||||
TEST_CYCLE() remap(src, dst, map1, map2, inter_type);
|
int runs = (sz.width <= 640) ? 3 : 1;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs) remap(src, dst, map1, map2, inter_type);
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ PERF_TEST_P(Size_MatType_ThreshType, threshold,
|
|||||||
|
|
||||||
declare.in(src, WARMUP_RNG).out(dst);
|
declare.in(src, WARMUP_RNG).out(dst);
|
||||||
|
|
||||||
int runs = (sz.width <= 640) ? 8 : 1;
|
int runs = (sz.width <= 640) ? 40 : 1;
|
||||||
TEST_CYCLE_MULTIRUN(runs) threshold(src, dst, thresh, maxval, threshType);
|
TEST_CYCLE_MULTIRUN(runs) threshold(src, dst, thresh, maxval, threshType);
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst);
|
||||||
|
@ -165,7 +165,8 @@ PERF_TEST_P(Path_Idx_Cn_NPoints_WSize_Deriv, OpticalFlowPyrLK_self, testing::Com
|
|||||||
declare.in(pyramid1, pyramid2, inPoints).out(outPoints);
|
declare.in(pyramid1, pyramid2, inPoints).out(outPoints);
|
||||||
declare.time(400);
|
declare.time(400);
|
||||||
|
|
||||||
TEST_CYCLE()
|
int runs = 3;
|
||||||
|
TEST_CYCLE_MULTIRUN(runs)
|
||||||
{
|
{
|
||||||
calcOpticalFlowPyrLK(pyramid1, pyramid2, inPoints, outPoints, status, err,
|
calcOpticalFlowPyrLK(pyramid1, pyramid2, inPoints, outPoints, status, err,
|
||||||
Size(winSize, winSize), maxLevel, criteria,
|
Size(winSize, winSize), maxLevel, criteria,
|
||||||
|
Loading…
Reference in New Issue
Block a user