mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Merge pull request #15695 from aDanPin:dp/incorrect_use_of_muve_fix
Fix incorrect use of std::move() in g-api perf tests * First version * Fix perfomace tests Replace c.apply(...); with cc = c.compile(...); cc(...); * Remove output meta arguments from .compile() * Style fix * Remove useless commented string * Stick to common pattern : i.e. use gin() and gout() explicitly. * Use cc(gin(...), gout(...)) in all cases.
This commit is contained in:
parent
a7acb8805f
commit
53b6fb465c
@ -35,12 +35,17 @@ PERF_TEST_P_(AddPerfTest, TestPerformance)
|
||||
out = cv::gapi::add(in1, in2, dtype);
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// There is no need to qualify gin, gout, descr_of with namespace (cv::)
|
||||
// as they are in the same namespace as their actual argument (i.e. cv::Mat)
|
||||
// and thus are found via ADL, as in the examples below.
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -71,11 +76,13 @@ PERF_TEST_P_(AddCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -105,11 +112,13 @@ PERF_TEST_P_(SubPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -140,11 +149,13 @@ PERF_TEST_P_(SubCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -175,11 +186,13 @@ PERF_TEST_P_(SubRCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -209,11 +222,13 @@ PERF_TEST_P_(MulPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -245,11 +260,13 @@ PERF_TEST_P_(MulDoublePerfTest, TestPerformance)
|
||||
cv::GComputation c(in1, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -280,11 +297,13 @@ PERF_TEST_P_(MulCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -316,11 +335,13 @@ PERF_TEST_P_(DivPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -352,11 +373,13 @@ PERF_TEST_P_(DivCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -393,11 +416,13 @@ PERF_TEST_P_(DivRCPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, sc1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -430,11 +455,13 @@ PERF_TEST_P_(MaskPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in, m), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1, in_mat2), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1, in_mat2), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -464,11 +491,13 @@ PERF_TEST_P_(MeanPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_norm), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_norm));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_norm), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_norm));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -498,11 +527,13 @@ PERF_TEST_P_(Polar2CartPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out1, out2));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2));
|
||||
}
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
EXPECT_TRUE(cmpF(out_mat_gapi, out_mat_ocv));
|
||||
@ -533,11 +564,13 @@ PERF_TEST_P_(Cart2PolarPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out1, out2));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi, out_mat2));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -577,11 +610,13 @@ PERF_TEST_P_(CmpPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -621,11 +656,13 @@ PERF_TEST_P_(CmpWithScalarPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -676,11 +713,13 @@ PERF_TEST_P_(BitwisePerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -709,11 +748,13 @@ PERF_TEST_P_(BitwiseNotPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -745,11 +786,13 @@ PERF_TEST_P_(SelectPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2, in3), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2, in_mask), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2, in_mask)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mask), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2, in_mask), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mask), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -779,11 +822,13 @@ PERF_TEST_P_(MinPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -813,11 +858,13 @@ PERF_TEST_P_(MaxPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -847,11 +894,13 @@ PERF_TEST_P_(AbsDiffPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -882,11 +931,13 @@ PERF_TEST_P_(AbsDiffCPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1, sc1), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, sc)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, sc), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, sc), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -919,11 +970,13 @@ PERF_TEST_P_(SumPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_sum), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_sum));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_sum), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_sum));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -959,11 +1012,13 @@ PERF_TEST_P_(AddWeightedPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1005,11 +1060,13 @@ PERF_TEST_P_(NormPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1), gout(out_norm), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_norm));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1), gout(out_norm), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_norm));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1051,11 +1108,13 @@ PERF_TEST_P_(IntegralPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1), cv::GOut(out1, out2));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat1, out_mat2), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat1, out_mat2));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat1, out_mat2), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat1, out_mat2));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1089,11 +1148,13 @@ PERF_TEST_P_(ThresholdPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, th1, mv1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, thr, maxval), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, thr, maxval)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, thr, maxval), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, thr, maxval), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, thr, maxval), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1127,11 +1188,13 @@ PERF_TEST_P_(ThresholdOTPerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1, mv1), cv::GOut(out, scout));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, maxval), gout(out_mat_gapi, out_gapi_scalar), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, maxval)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, maxval), gout(out_mat_gapi, out_gapi_scalar));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, maxval), gout(out_mat_gapi, out_gapi_scalar), std::move(compile_args));
|
||||
cc(gin(in_mat1, maxval), gout(out_mat_gapi, out_gapi_scalar));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1164,11 +1227,13 @@ PERF_TEST_P_(InRangePerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, th1, mv1), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, thrLow, thrUp), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, thrLow, thrUp)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, thrLow, thrUp), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, thrLow, thrUp), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, thrLow, thrUp), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1202,11 +1267,13 @@ PERF_TEST_P_(Split3PerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1), cv::GOut(out1, out2, out3));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat_gapi, out_mat2, out_mat3), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi, out_mat2, out_mat3));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat_gapi, out_mat2, out_mat3), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi, out_mat2, out_mat3));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1242,11 +1309,13 @@ PERF_TEST_P_(Split4PerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1), cv::GOut(out1, out2, out3, out4));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat_gapi, out_mat2, out_mat3, out_mat4), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi, out_mat2, out_mat3, out_mat4));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1), cv::gout(out_mat_gapi, out_mat2, out_mat3, out_mat4), std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi, out_mat2, out_mat3, out_mat4));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1281,11 +1350,13 @@ PERF_TEST_P_(Merge3PerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1, in2, in3), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1, in_mat2, in_mat3), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2, in_mat3)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1, in_mat2, in_mat3), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1319,11 +1390,13 @@ PERF_TEST_P_(Merge4PerfTest, TestPerformance)
|
||||
cv::GComputation c(cv::GIn(in1, in2, in3, in4), cv::GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(cv::gin(in_mat1, in_mat2, in_mat3, in_mat4), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2, in_mat3, in_mat4)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3, in_mat4), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(cv::gin(in_mat1, in_mat2, in_mat3, in_mat4), cv::gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3, in_mat4), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1355,11 +1428,13 @@ PERF_TEST_P_(RemapPerfTest, TestPerformance)
|
||||
cv::GComputation c(in1, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1389,11 +1464,13 @@ PERF_TEST_P_(FlipPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1424,11 +1501,13 @@ PERF_TEST_P_(CropPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1458,11 +1537,13 @@ PERF_TEST_P_(CopyPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1506,11 +1587,13 @@ PERF_TEST_P_(ConcatHorPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1559,11 +1642,13 @@ PERF_TEST_P_(ConcatHorVecPerfTest, TestPerformance)
|
||||
cv::GComputation c({ mats[0], mats[1], mats[2] }, { out });
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2, in_mat3)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1606,11 +1691,13 @@ PERF_TEST_P_(ConcatVertPerfTest, TestPerformance)
|
||||
cv::GComputation c(GIn(in1, in2), GOut(out));
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1659,11 +1746,13 @@ PERF_TEST_P_(ConcatVertVecPerfTest, TestPerformance)
|
||||
cv::GComputation c({ mats[0], mats[1], mats[2] }, { out });
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi), std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1, in_mat2, in_mat3)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi), std::move(compile_args));
|
||||
cc(gin(in_mat1, in_mat2, in_mat3), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1696,11 +1785,13 @@ PERF_TEST_P_(LUTPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1731,11 +1822,13 @@ PERF_TEST_P_(ConvertToPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1772,11 +1865,13 @@ PERF_TEST_P_(ResizePerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
@ -1816,11 +1911,13 @@ PERF_TEST_P_(ResizeFxFyPerfTest, TestPerformance)
|
||||
cv::GComputation c(in, out);
|
||||
|
||||
// Warm-up graph engine:
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
auto cc = c.compile(descr_of(gin(in_mat1)),
|
||||
std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
|
||||
TEST_CYCLE()
|
||||
{
|
||||
c.apply(in_mat1, out_mat_gapi, std::move(compile_args));
|
||||
cc(gin(in_mat1), gout(out_mat_gapi));
|
||||
}
|
||||
|
||||
// Comparison ////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user