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

Fixed standalone build, added cv::gapi::proto::ptr test

This commit is contained in:
Ruslan Garnov
2020-04-07 00:34:29 +03:00
parent b1f42a6506
commit ce772b346c
7 changed files with 53 additions and 4 deletions
-1
View File
@@ -266,7 +266,6 @@ std::ostream& operator<<(std::ostream& os, const cv::GMetaArg &arg)
}
} // namespace cv
// TODO: This function requires thorough testing
const void* cv::gimpl::proto::ptr(const GRunArgP &arg)
{
switch (arg.index())
+2 -1
View File
@@ -28,7 +28,8 @@ GAPI_EXPORTS const GOrigin& origin_of (const GArg &arg);
bool is_dynamic(const GArg &arg);
GProtoArg rewrap (const GArg &arg);
const void* ptr (const GRunArgP &arg);
// FIXME:: GAPI_EXPORTS because of tests only!!
GAPI_EXPORTS const void* ptr (const GRunArgP &arg);
} // proto
} // gimpl
@@ -344,6 +344,7 @@ void GIslandExecutable::run(GIslandExecutable::IInput &in, GIslandExecutable::IO
// This kludge should go as a result of de-ownification
const cv::GRunArg& in_data_orig = std::get<1>(it);
cv::GRunArg in_data;
#if !defined(GAPI_STANDALONE)
switch (in_data_orig.index())
{
case cv::GRunArg::index_of<cv::Mat>():
@@ -356,6 +357,9 @@ void GIslandExecutable::run(GIslandExecutable::IInput &in, GIslandExecutable::IO
in_data = in_data_orig;
break;
}
#else
in_data = in_data_orig;
#endif // GAPI_STANDALONE
in_objs.emplace_back(std::get<0>(it), std::move(in_data));
}
for (auto &&it: ade::util::indexed(ade::util::toRange(out_desc)))
@@ -420,8 +420,13 @@ class StreamingOutput final: public cv::gimpl::GIslandExecutable::IOutput
// Prepare this object for posting
virtual cv::GRunArgP get(int idx) override
{
#if !defined(GAPI_STANDALONE)
using MatType = cv::Mat;
using SclType = cv::Scalar;
#else
using MatType = cv::gapi::own::Mat;
using SclType = cv::gapi::own::Scalar;
#endif // GAPI_STANDALONE
// Allocate a new posting first, then bind this GRunArgP to this item
auto iter = m_postings[idx].insert(m_postings[idx].end(), Posting{});