1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #12674 from dmatveev:gapi_upd270918

* Update G-API code base to 27-Sep-18

Changes mostly improve standalone build support

* G-API code base update 28-09-2018

* Windows/Documentation warnings should be fixed
* Fixed stability issues in Fluid backend
* Fixed precompiled headers issues in G-API source files

* G-API code base update 28-09-18 EOD

* Fixed several static analysis issues
* Fixed issues found when G-API is built in a standalone mode
This commit is contained in:
Dmitry Matveev
2018-09-28 18:42:09 +03:00
committed by Alexander Alekhin
parent 66fdddc339
commit 2c6ab65476
64 changed files with 981 additions and 223 deletions
+14 -2
View File
@@ -5,6 +5,7 @@
// Copyright (C) 2018 Intel Corporation
#include "precomp.hpp"
#include <memory> // unique_ptr
#include "opencv2/gapi/gkernel.hpp"
@@ -15,8 +16,6 @@
#include "compiler/gobjref.hpp"
#include "compiler/gislandmodel.hpp"
// GBackend private implementation /////////////////////////////////////////////
void cv::gapi::GBackend::Priv::unpackKernel(ade::Graph & /*graph */ ,
const ade::NodeHandle & /*op_node*/ ,
@@ -94,19 +93,24 @@ void bindInArg(Mag& mag, const RcDesc &rc, const GRunArg &arg)
switch (arg.index())
{
case GRunArg::index_of<cv::gapi::own::Mat>() : mag_mat = util::get<cv::gapi::own::Mat>(arg); break;
#if !defined(GAPI_STANDALONE)
case GRunArg::index_of<cv::Mat>() : mag_mat = to_own(util::get<cv::Mat>(arg)); break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
break;
}
case GShape::GSCALAR:
{
auto& mag_scalar = mag.template slot<cv::gapi::own::Scalar>()[rc.id];
switch (arg.index())
{
case GRunArg::index_of<cv::gapi::own::Scalar>() : mag_scalar = util::get<cv::gapi::own::Scalar>(arg); break;
#if !defined(GAPI_STANDALONE)
case GRunArg::index_of<cv::Scalar>() : mag_scalar = to_own(util::get<cv::Scalar>(arg)); break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
break;
@@ -131,7 +135,9 @@ void bindOutArg(Mag& mag, const RcDesc &rc, const GRunArgP &arg)
switch (arg.index())
{
case GRunArgP::index_of<cv::gapi::own::Mat*>() : mag_mat = * util::get<cv::gapi::own::Mat*>(arg); break;
#if !defined(GAPI_STANDALONE)
case GRunArgP::index_of<cv::Mat*>() : mag_mat = to_own(* util::get<cv::Mat*>(arg)); break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
break;
@@ -143,7 +149,9 @@ void bindOutArg(Mag& mag, const RcDesc &rc, const GRunArgP &arg)
switch (arg.index())
{
case GRunArgP::index_of<cv::gapi::own::Scalar*>() : mag_scalar = *util::get<cv::gapi::own::Scalar*>(arg); break;
#if !defined(GAPI_STANDALONE)
case GRunArgP::index_of<cv::Scalar*>() : mag_scalar = to_own(*util::get<cv::Scalar*>(arg)); break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
break;
@@ -238,7 +246,9 @@ void writeBack(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg)
switch (g_arg.index())
{
case GRunArgP::index_of<cv::gapi::own::Mat*>() : out_arg_data = util::get<cv::gapi::own::Mat*>(g_arg)->data; break;
#if !defined(GAPI_STANDALONE)
case GRunArgP::index_of<cv::Mat*>() : out_arg_data = util::get<cv::Mat*>(g_arg)->data; break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
@@ -252,7 +262,9 @@ void writeBack(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg)
switch (g_arg.index())
{
case GRunArgP::index_of<cv::gapi::own::Scalar*>() : *util::get<cv::gapi::own::Scalar*>(g_arg) = mag.template slot<cv::gapi::own::Scalar>().at(rc.id); break;
#if !defined(GAPI_STANDALONE)
case GRunArgP::index_of<cv::Scalar*>() : *util::get<cv::Scalar*>(g_arg) = cv::gapi::own::to_ocv(mag.template slot<cv::gapi::own::Scalar>().at(rc.id)); break;
#endif // !defined(GAPI_STANDALONE)
default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
}
break;