mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #13851 from TolyaTalamanov:at/new-kernel-package-design
G-API: Kernel package design (#13851) * Remove cv::unite_policy from API * Add check that all id in kernel package are unique * Refactor checker id procedure * Remove cv::gapi::GLookupOrder from API * Implement cv::gapi::use_only * Fix samples * Fix docs * Fix comments to review * Remove unite_policy * Fix GKernelPackage::backends() * Fix comments to review * Fix all_unique * Fix comments to review * Fix comments to review * Remove out of date tests
This commit is contained in:
committed by
Alexander Alekhin
parent
de977cc9c8
commit
935c02c0a3
@@ -235,7 +235,7 @@ TEST(GCompoundKernel, ReplaceDefaultKernel)
|
||||
cv::GMat in1, in2;
|
||||
auto out = cv::gapi::add(in1, in2);
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundAddImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(cv::gapi::core::cpu::kernels(), custom_pkg, cv::unite_policy::REPLACE);
|
||||
const auto full_pkg = cv::gapi::combine(cv::gapi::core::cpu::kernels(), custom_pkg);
|
||||
cv::GComputation comp(cv::GIn(in1, in2), cv::GOut(out));
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
in_mat2 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -257,7 +257,7 @@ TEST(GCompoundKernel, DoubleAddC)
|
||||
auto out = cv::gapi::addC(super, s);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundDoubleAddCImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2, s), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -282,7 +282,7 @@ TEST(GCompoundKernel, AddC)
|
||||
auto out = cv::gapi::addC(super, s);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundAddCImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2, s), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -308,7 +308,7 @@ TEST(GCompoundKernel, MergeWithSplit)
|
||||
auto out = cv::gapi::merge3(a2, b2, c2);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundMergeWithSplitImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat = cv::Mat::eye(3, 3, CV_8UC3), out_mat, ref_mat;
|
||||
@@ -325,7 +325,7 @@ TEST(GCompoundKernel, AddWithAddC)
|
||||
auto out = GCompoundAddWithAddC::on(in1, in2, s);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundAddWithAddCImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2, s), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -347,7 +347,7 @@ TEST(GCompoundKernel, SplitWithAdd)
|
||||
std::tie(out1, out2) = GCompoundSplitWithAdd::on(in);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundSplitWithAddImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in), cv::GOut(out1, out2));
|
||||
|
||||
cv::Mat in_mat = cv::Mat::eye(3, 3, CV_8UC3),
|
||||
@@ -375,7 +375,7 @@ TEST(GCompoundKernel, ParallelAddC)
|
||||
std::tie(out1, out2) = GCompoundParallelAddC::on(in1, in2);
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundParallelAddCImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2), cv::GOut(out1, out2));
|
||||
|
||||
cv::Mat in_mat = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -402,7 +402,7 @@ TEST(GCompoundKernel, GCompundKernelAndDefaultUseOneData)
|
||||
auto out = cv::gapi::add(GCompoundAddWithAddC::on(in1, in2, s), cv::gapi::addC(in2, s));
|
||||
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundAddWithAddCImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2, s), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -428,7 +428,7 @@ TEST(GCompoundKernel, CompoundExpandedToCompound)
|
||||
GCompoundAddWithAddCImpl,
|
||||
GCompoundDoubleAddCImpl>();
|
||||
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in1, in2, s), cv::GOut(out));
|
||||
|
||||
cv::Mat in_mat1 = cv::Mat::eye(3, 3, CV_8UC1),
|
||||
@@ -449,7 +449,7 @@ TEST(GCompoundKernel, MaxInArray)
|
||||
GDoubleArray in;
|
||||
auto out = GCompoundMaxInArray::on(in);
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundMaxInArrayImpl, GMaxInArrayImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in), cv::GOut(out));
|
||||
std::vector<double> v = { 1, 5, -2, 3, 10, 2};
|
||||
cv::Scalar out_scl;
|
||||
@@ -465,7 +465,7 @@ TEST(GCompoundKernel, NegateArray)
|
||||
GDoubleArray in;
|
||||
GDoubleArray out = GCompoundNegateArray::on(in);
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundNegateArrayImpl, GNegateArrayImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in), cv::GOut(out));
|
||||
std::vector<double> in_v = {1, 5, -2, -10, 3};
|
||||
std::vector<double> out_v;
|
||||
@@ -483,7 +483,7 @@ TEST(GCompoundKernel, RightGArrayHandle)
|
||||
GDoubleArray a;
|
||||
cv::GMat out = GCompoundGMatGArrayGMat::on(in[0], a, in[1]);
|
||||
const auto custom_pkg = cv::gapi::kernels<GCompoundGMatGArrayGMatImpl, SetDiagKernelImpl>();
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels(), cv::unite_policy::KEEP);
|
||||
const auto full_pkg = cv::gapi::combine(custom_pkg, cv::gapi::core::cpu::kernels());
|
||||
cv::GComputation comp(cv::GIn(in[0], a, in[1]), cv::GOut(out));
|
||||
std::vector<double> in_v(3, 1.0);
|
||||
cv::Mat in_mat1 = cv::Mat::eye(cv::Size(3, 3), CV_8UC1),
|
||||
|
||||
Reference in New Issue
Block a user