diff --git a/modules/gapi/CMakeLists.txt b/modules/gapi/CMakeLists.txt index 9df2447b29..ae4d20c024 100644 --- a/modules/gapi/CMakeLists.txt +++ b/modules/gapi/CMakeLists.txt @@ -31,7 +31,7 @@ file(GLOB gapi_ext_hdrs set(gapi_srcs # Front-end part - src/api/gapi_priv.cpp + src/api/gorigin.cpp src/api/gmat.cpp src/api/garray.cpp src/api/gscalar.cpp diff --git a/modules/gapi/src/api/garray.cpp b/modules/gapi/src/api/garray.cpp index 0fd19a7e65..793f44a2b4 100644 --- a/modules/gapi/src/api/garray.cpp +++ b/modules/gapi/src/api/garray.cpp @@ -7,7 +7,7 @@ #include "precomp.hpp" #include "opencv2/gapi/garray.hpp" -#include "api/gapi_priv.hpp" // GOrigin +#include "api/gorigin.hpp" // cv::detail::GArrayU public implementation /////////////////////////////////// cv::detail::GArrayU::GArrayU() diff --git a/modules/gapi/src/api/gmat.cpp b/modules/gapi/src/api/gmat.cpp index dc8fc734d8..ac58a9caf1 100644 --- a/modules/gapi/src/api/gmat.cpp +++ b/modules/gapi/src/api/gmat.cpp @@ -10,7 +10,7 @@ #include //gapi::own::Mat #include "opencv2/gapi/gmat.hpp" -#include "api/gapi_priv.hpp" // GOrigin +#include "api/gorigin.hpp" // cv::GMat public implementation ////////////////////////////////////////////// cv::GMat::GMat() diff --git a/modules/gapi/src/api/gapi_priv.cpp b/modules/gapi/src/api/gorigin.cpp similarity index 97% rename from modules/gapi/src/api/gapi_priv.cpp rename to modules/gapi/src/api/gorigin.cpp index 744db16715..312d614709 100644 --- a/modules/gapi/src/api/gapi_priv.cpp +++ b/modules/gapi/src/api/gorigin.cpp @@ -8,7 +8,7 @@ #include "precomp.hpp" #include -#include "api/gapi_priv.hpp" +#include "api/gorigin.hpp" #include "api/gnode_priv.hpp" cv::GOrigin::GOrigin(GShape s, diff --git a/modules/gapi/src/api/gapi_priv.hpp b/modules/gapi/src/api/gorigin.hpp similarity index 70% rename from modules/gapi/src/api/gapi_priv.hpp rename to modules/gapi/src/api/gorigin.hpp index edab0a08b6..ad4ebf534d 100644 --- a/modules/gapi/src/api/gapi_priv.hpp +++ b/modules/gapi/src/api/gorigin.hpp @@ -5,42 +5,22 @@ // Copyright (C) 2018 Intel Corporation -#ifndef OPENCV_GAPI_PRIV_HPP -#define OPENCV_GAPI_PRIV_HPP +#ifndef OPENCV_GAPI_GORIGIN_HPP +#define OPENCV_GAPI_GORIGIN_HPP #include // set #include // map -#include #include "opencv2/gapi/util/variant.hpp" // variant -#include "opencv2/gapi/garray.hpp" // ConstructVec -#include "opencv2/gapi/gscalar.hpp" #include "opencv2/gapi/gcommon.hpp" - #include "opencv2/gapi/opencv_includes.hpp" +#include "compiler/gobjref.hpp" #include "api/gnode.hpp" namespace cv { -namespace gimpl -{ - // Union type for various user-defined type constructors (GArray, etc) - // FIXME: Replace construct-only API with a more generic one - // (probably with bits of introspection) - // Not required for non-user-defined types (GMat, GScalar, etc) - using HostCtor = util::variant - < util::monostate - , detail::ConstructVec - >; - - using ConstVal = util::variant - < util::monostate - , cv::gapi::own::Scalar - >; -} - // TODO namespace gimpl? struct GOrigin @@ -74,4 +54,4 @@ template using GOriginMap = std::map } // namespace cv -#endif // OPENCV_GAPI_PRIV_HPP +#endif // OPENCV_GAPI_GORIGIN_HPP diff --git a/modules/gapi/src/api/gproto.cpp b/modules/gapi/src/api/gproto.cpp index 2482d628b4..70604cbbca 100644 --- a/modules/gapi/src/api/gproto.cpp +++ b/modules/gapi/src/api/gproto.cpp @@ -12,7 +12,7 @@ #include "opencv2/gapi/garg.hpp" #include "opencv2/gapi/gproto.hpp" -#include "api/gapi_priv.hpp" +#include "api/gorigin.hpp" #include "api/gproto_priv.hpp" // FIXME: it should be a visitor! diff --git a/modules/gapi/src/api/gproto_priv.hpp b/modules/gapi/src/api/gproto_priv.hpp index 2684924c75..ca23ad875f 100644 --- a/modules/gapi/src/api/gproto_priv.hpp +++ b/modules/gapi/src/api/gproto_priv.hpp @@ -11,7 +11,7 @@ #include "opencv2/gapi/gproto.hpp" #include "opencv2/gapi/garg.hpp" -#include "api/gapi_priv.hpp" +#include "api/gorigin.hpp" namespace cv { namespace gimpl { diff --git a/modules/gapi/src/api/gscalar.cpp b/modules/gapi/src/api/gscalar.cpp index 30f3dc9447..2e42ae6241 100644 --- a/modules/gapi/src/api/gscalar.cpp +++ b/modules/gapi/src/api/gscalar.cpp @@ -9,7 +9,7 @@ #include "opencv2/gapi/gscalar.hpp" #include "opencv2/gapi/own/convert.hpp" -#include "api/gapi_priv.hpp" // GOrigin +#include "api/gorigin.hpp" // cv::GScalar public implementation /////////////////////////////////////////// cv::GScalar::GScalar() diff --git a/modules/gapi/src/backends/common/gbackend.hpp b/modules/gapi/src/backends/common/gbackend.hpp index 613022cb9c..daa95026f6 100644 --- a/modules/gapi/src/backends/common/gbackend.hpp +++ b/modules/gapi/src/backends/common/gbackend.hpp @@ -53,8 +53,8 @@ using Mag = magazine::Class #include #include // std::fixed, std::setprecision +#include #include #include diff --git a/modules/gapi/src/backends/ocl/goclbackend.hpp b/modules/gapi/src/backends/ocl/goclbackend.hpp index 3548dff75e..b57c66209d 100644 --- a/modules/gapi/src/backends/ocl/goclbackend.hpp +++ b/modules/gapi/src/backends/ocl/goclbackend.hpp @@ -17,8 +17,7 @@ #include "opencv2/gapi/gproto.hpp" #include "opencv2/gapi/ocl/goclkernel.hpp" - -#include "api/gapi_priv.hpp" +#include "api/gorigin.hpp" #include "backends/common/gbackend.hpp" #include "compiler/gislandmodel.hpp" diff --git a/modules/gapi/src/compiler/gcompiler.cpp b/modules/gapi/src/compiler/gcompiler.cpp index a814b915cf..0418b995f4 100644 --- a/modules/gapi/src/compiler/gcompiler.cpp +++ b/modules/gapi/src/compiler/gcompiler.cpp @@ -21,7 +21,7 @@ #include "api/gnode_priv.hpp" // FIXME: why it is here? #include "api/gproto_priv.hpp" // FIXME: why it is here? #include "api/gcall_priv.hpp" // FIXME: why it is here? -#include "api/gapi_priv.hpp" // FIXME: why it is here? + #include "api/gbackend_priv.hpp" // Backend basic API (newInstance, etc) #include "compiler/gmodel.hpp" diff --git a/modules/gapi/src/compiler/gmodel.cpp b/modules/gapi/src/compiler/gmodel.cpp index c804671134..92ffb2d670 100644 --- a/modules/gapi/src/compiler/gmodel.cpp +++ b/modules/gapi/src/compiler/gmodel.cpp @@ -18,6 +18,8 @@ #include "api/gnode_priv.hpp" #include "compiler/gobjref.hpp" #include "compiler/gmodel.hpp" +#include "api/gorigin.hpp" +#include "compiler/gmodel_priv.hpp" namespace cv { namespace gimpl { @@ -34,9 +36,9 @@ ade::NodeHandle GModel::mkOpNode(GModel::Graph &g, const GKernel &k, const std:: ade::NodeHandle GModel::mkDataNode(GModel::Graph &g, const GOrigin& origin) { - ade::NodeHandle op_h = g.createNode(); + ade::NodeHandle data_h = g.createNode(); const auto id = g.metadata().get().GetNewId(origin.shape); - g.metadata(op_h).set(NodeType{NodeType::DATA}); + g.metadata(data_h).set(NodeType{NodeType::DATA}); GMetaArg meta; Data::Storage storage = Data::Storage::INTERNAL; // By default, all objects are marked INTERNAL @@ -46,10 +48,24 @@ ade::NodeHandle GModel::mkDataNode(GModel::Graph &g, const GOrigin& origin) auto value = value_of(origin); meta = descr_of(value); storage = Data::Storage::CONST; - g.metadata(op_h).set(ConstValue{value}); + g.metadata(data_h).set(ConstValue{value}); } - g.metadata(op_h).set(Data{origin.shape, id, meta, origin.ctor, storage}); - return op_h; + g.metadata(data_h).set(Data{origin.shape, id, meta, origin.ctor, storage}); + return data_h; +} + +ade::NodeHandle GModel::mkDataNode(GModel::Graph &g, const GShape shape) +{ + ade::NodeHandle data_h = g.createNode(); + g.metadata(data_h).set(NodeType{NodeType::DATA}); + + const auto id = g.metadata().get().GetNewId(shape); + GMetaArg meta; + HostCtor ctor; + Data::Storage storage = Data::Storage::INTERNAL; // By default, all objects are marked INTERNAL + + g.metadata(data_h).set(Data{shape, id, meta, ctor, storage}); + return data_h; } void GModel::linkIn(Graph &g, ade::NodeHandle opH, ade::NodeHandle objH, std::size_t in_port) @@ -169,7 +185,7 @@ void GModel::log(Graph &g, ade::EdgeHandle eh, std::string &&msg, ade::NodeHandl } } -ade::NodeHandle GModel::detail::dataNodeOf(const ConstGraph &g, const GOrigin &origin) +ade::NodeHandle GModel::detail::dataNodeOf(const ConstLayoutGraph &g, const GOrigin &origin) { // FIXME: Does it still work with graph transformations, e.g. redirectWriter()?? return g.metadata().get().object_nodes.at(origin); diff --git a/modules/gapi/src/compiler/gmodel.hpp b/modules/gapi/src/compiler/gmodel.hpp index a9c3308d12..dfe65a1e83 100644 --- a/modules/gapi/src/compiler/gmodel.hpp +++ b/modules/gapi/src/compiler/gmodel.hpp @@ -24,9 +24,6 @@ #include "opencv2/gapi/garg.hpp" #include "opencv2/gapi/gkernel.hpp" -#include "api/gapi_priv.hpp" // GShape -#include "api/gproto_priv.hpp" // origin_of -#include "backends/common/gbackend.hpp" #include "compiler/gobjref.hpp" #include "compiler/gislandmodel.hpp" @@ -121,16 +118,6 @@ struct Journal std::vector messages; }; -// The mapping between user-side GMat/GScalar/... objects -// and its appropriate nodes. Can be stored in graph optionally -// (NOT used by any compiler or backends, introspection purposes -// only) -struct Layout -{ - static const char *name() { return "Layout"; } - GOriginMap object_nodes; -}; - // Unique data object counter (per-type) class DataObjectCounter { @@ -170,7 +157,6 @@ namespace GModel , Journal , ade::passes::TopologicalSortData , DataObjectCounter - , Layout , IslandModel , ActiveBackends >; @@ -189,59 +175,46 @@ namespace GModel , Journal , ade::passes::TopologicalSortData , DataObjectCounter - , Layout , IslandModel , ActiveBackends >; + // FIXME: + // Export a single class, not a bunch of functions inside a namespace + // User should initialize graph before using it // GAPI_EXPORTS for tests GAPI_EXPORTS void init (Graph& g); - ade::NodeHandle mkOpNode(Graph &g, const GKernel &k, const std::vector& args, const std::string &island); + GAPI_EXPORTS ade::NodeHandle mkOpNode(Graph &g, const GKernel &k, const std::vector& args, const std::string &island); - // FIXME: change it to take GMeta instead of GShape? - ade::NodeHandle mkDataNode(Graph &g, const GOrigin& origin); + GAPI_EXPORTS ade::NodeHandle mkDataNode(Graph &g, const GShape shape); // Adds a string message to a node. Any node can be subject of log, messages then // appear in the dumped .dot file.x - void log(Graph &g, ade::NodeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle()); - void log(Graph &g, ade::EdgeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle()); + GAPI_EXPORTS void log(Graph &g, ade::NodeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle()); + GAPI_EXPORTS void log(Graph &g, ade::EdgeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle()); - void linkIn (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t in_port); - void linkOut (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t out_port); + GAPI_EXPORTS void linkIn (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t in_port); + GAPI_EXPORTS void linkOut (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t out_port); - // FIXME: Align this GModel API properly, it is a mess now - namespace detail - { - // FIXME: GAPI_EXPORTS only because of tests!!! - GAPI_EXPORTS ade::NodeHandle dataNodeOf(const ConstGraph& g, const GOrigin &origin); - } - template inline ade::NodeHandle dataNodeOf(const ConstGraph& g, T &&t) - { - return detail::dataNodeOf(g, cv::gimpl::proto::origin_of(GProtoArg{t})); - } + GAPI_EXPORTS void redirectReaders(Graph &g, ade::NodeHandle from, ade::NodeHandle to); + GAPI_EXPORTS void redirectWriter (Graph &g, ade::NodeHandle from, ade::NodeHandle to); - void linkIn (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t in_port); - void linkOut (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t out_port); - - void redirectReaders(Graph &g, ade::NodeHandle from, ade::NodeHandle to); - void redirectWriter (Graph &g, ade::NodeHandle from, ade::NodeHandle to); - - std::vector orderedInputs (Graph &g, ade::NodeHandle nh); - std::vector orderedOutputs(Graph &g, ade::NodeHandle nh); + GAPI_EXPORTS std::vector orderedInputs (Graph &g, ade::NodeHandle nh); + GAPI_EXPORTS std::vector orderedOutputs(Graph &g, ade::NodeHandle nh); // Returns input meta array for given op node // Array is sparse, as metadata for non-gapi input objects is empty // TODO: // Cover with tests!! - GMetaArgs collectInputMeta(GModel::ConstGraph cg, ade::NodeHandle node); - GMetaArgs collectOutputMeta(GModel::ConstGraph cg, ade::NodeHandle node); + GAPI_EXPORTS GMetaArgs collectInputMeta(GModel::ConstGraph cg, ade::NodeHandle node); + GAPI_EXPORTS GMetaArgs collectOutputMeta(GModel::ConstGraph cg, ade::NodeHandle node); - ade::EdgeHandle getInEdgeByPort(const GModel::ConstGraph& cg, const ade::NodeHandle& nh, std::size_t in_port); + GAPI_EXPORTS ade::EdgeHandle getInEdgeByPort(const GModel::ConstGraph& cg, const ade::NodeHandle& nh, std::size_t in_port); // Returns true if the given backend participates in the execution - bool isActive(const GModel::Graph &cg, const cv::gapi::GBackend &backend); + GAPI_EXPORTS bool isActive(const GModel::Graph &cg, const cv::gapi::GBackend &backend); } // namespace GModel diff --git a/modules/gapi/src/compiler/gmodel_priv.hpp b/modules/gapi/src/compiler/gmodel_priv.hpp new file mode 100644 index 0000000000..3a3b444b8a --- /dev/null +++ b/modules/gapi/src/compiler/gmodel_priv.hpp @@ -0,0 +1,51 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. +// +// Copyright (C) 2019 Intel Corporation + +#ifndef OPENCV_GAPI_GMODEL_PRIV_HPP +#define OPENCV_GAPI_GMODEL_PRIV_HPP + +#include +#include "compiler/gmodel.hpp" +#include "api/gproto_priv.hpp" // origin_of + +namespace cv { namespace gimpl { + +// The mapping between user-side GMat/GScalar/... objects +// and its appropriate nodes. Can be stored in graph optionally +// (NOT used by any compiler or backends, introspection purposes +// only) +struct Layout +{ + static const char *name() { return "Layout"; } + GOriginMap object_nodes; +}; + +namespace GModel { + +using LayoutGraph = ade::TypedGraph + < Layout + >; + +using ConstLayoutGraph = ade::ConstTypedGraph + < Layout + >; + + ade::NodeHandle mkDataNode(Graph &g, const GOrigin& origin); + +namespace detail +{ + // FIXME: GAPI_EXPORTS only because of tests!!! + GAPI_EXPORTS ade::NodeHandle dataNodeOf(const ConstLayoutGraph& g, const GOrigin &origin); +} + +template inline ade::NodeHandle dataNodeOf(const ConstLayoutGraph& g, T &&t) +{ + return detail::dataNodeOf(g, cv::gimpl::proto::origin_of(GProtoArg{t})); +} + +}}} + +#endif // OPENCV_GAPI_GMODEL_PRIV_HPP diff --git a/modules/gapi/src/compiler/gmodelbuilder.cpp b/modules/gapi/src/compiler/gmodelbuilder.cpp index 7eb2ecf2c0..180bbe1ad2 100644 --- a/modules/gapi/src/compiler/gmodelbuilder.cpp +++ b/modules/gapi/src/compiler/gmodelbuilder.cpp @@ -21,12 +21,13 @@ #include // util::indexed -#include "api/gapi_priv.hpp" // GOrigin +#include "api/gorigin.hpp" #include "api/gproto_priv.hpp" // descriptor_of and other GProtoArg-related #include "api/gcall_priv.hpp" #include "api/gnode_priv.hpp" #include "compiler/gmodelbuilder.hpp" +#include "compiler/gmodel_priv.hpp" namespace { @@ -187,7 +188,7 @@ cv::gimpl::Unrolled cv::gimpl::unrollExpr(const GProtoArgs &ins, cv::gimpl::GModelBuilder::GModelBuilder(ade::Graph &g) - : m_g(g) + : m_g(g), m_gm(g) { } @@ -212,7 +213,7 @@ cv::gimpl::GModelBuilder::put(const GProtoArgs &ins, const GProtoArgs &outs) if (proto::is_dynamic(in_arg)) { ade::NodeHandle data_h = put_DataNode(proto::origin_of(in_arg)); - cv::gimpl::GModel::linkIn(m_g, call_h, data_h, in_port); + cv::gimpl::GModel::linkIn(m_gm, call_h, data_h, in_port); } } } @@ -228,7 +229,7 @@ cv::gimpl::GModelBuilder::put(const GProtoArgs &ins, const GProtoArgs &outs) if (prod.shape() == cv::GNode::NodeShape::CALL) { ade::NodeHandle call_h = put_OpNode(prod); - cv::gimpl::GModel::linkOut(m_g, call_h, data_h, origin.port); + cv::gimpl::GModel::linkOut(m_gm, call_h, data_h, origin.port); } } @@ -236,16 +237,17 @@ cv::gimpl::GModelBuilder::put(const GProtoArgs &ins, const GProtoArgs &outs) for (const auto &arg : ins) { ade::NodeHandle nh = put_DataNode(proto::origin_of(arg)); - m_g.metadata(nh).get().storage = Data::Storage::INPUT; + m_gm.metadata(nh).get().storage = Data::Storage::INPUT; } for (const auto &arg : outs) { ade::NodeHandle nh = put_DataNode(proto::origin_of(arg)); - m_g.metadata(nh).get().storage = Data::Storage::OUTPUT; + m_gm.metadata(nh).get().storage = Data::Storage::OUTPUT; } // And, finally, store data object layout in meta - m_g.metadata().set(Layout{m_graph_data}); + GModel::LayoutGraph lg(m_g); + lg.metadata().set(Layout{m_graph_data}); // After graph is generated, specify which data objects are actually // computation entry/exit points. @@ -262,7 +264,7 @@ cv::gimpl::GModelBuilder::put(const GProtoArgs &ins, const GProtoArgs &outs) for (const auto &arg : proto) { ade::NodeHandle nh = put_DataNode(proto::origin_of(arg)); - const auto &desc = m_g.metadata(nh).get(); + const auto &desc = m_gm.metadata(nh).get(); //These extra empty {} are to please GCC (-Wmissing-field-initializers) slots.first.push_back(RcDesc{desc.rc, desc.shape, {}}); slots.second.push_back(nh); @@ -284,7 +286,7 @@ ade::NodeHandle cv::gimpl::GModelBuilder::put_OpNode(const cv::GNode &node) { GAPI_Assert(node.shape() == GNode::NodeShape::CALL); const auto &call_p = node.call().priv(); - auto nh = cv::gimpl::GModel::mkOpNode(m_g, call_p.m_k, call_p.m_args, node_p.m_island); + auto nh = cv::gimpl::GModel::mkOpNode(m_gm, call_p.m_k, call_p.m_args, node_p.m_island); m_graph_ops[&node_p] = nh; return nh; } @@ -297,7 +299,7 @@ ade::NodeHandle cv::gimpl::GModelBuilder::put_DataNode(const GOrigin &origin) const auto it = m_graph_data.find(origin); if (it == m_graph_data.end()) { - auto nh = cv::gimpl::GModel::mkDataNode(m_g, origin); + auto nh = cv::gimpl::GModel::mkDataNode(m_gm, origin); m_graph_data[origin] = nh; return nh; } diff --git a/modules/gapi/src/compiler/gmodelbuilder.hpp b/modules/gapi/src/compiler/gmodelbuilder.hpp index ce12c7e11b..2d06000617 100644 --- a/modules/gapi/src/compiler/gmodelbuilder.hpp +++ b/modules/gapi/src/compiler/gmodelbuilder.hpp @@ -14,7 +14,7 @@ #include "opencv2/gapi/gproto.hpp" #include "opencv2/gapi/gcall.hpp" -#include "api/gapi_priv.hpp" +#include "api/gorigin.hpp" #include "api/gnode.hpp" #include "compiler/gmodel.hpp" @@ -44,7 +44,8 @@ GAPI_EXPORTS Unrolled unrollExpr(const GProtoArgs &ins, const GProtoArgs &outs); // FIXME: GAPI_EXPORTS only because of tests!!! class GAPI_EXPORTS GModelBuilder { - GModel::Graph m_g; + ade::Graph &m_g; + GModel::Graph m_gm; // Mappings of G-API user framework entities to ADE node handles std::unordered_map m_graph_ops; diff --git a/modules/gapi/src/compiler/gobjref.hpp b/modules/gapi/src/compiler/gobjref.hpp index be365c90e4..bcc5047d8e 100644 --- a/modules/gapi/src/compiler/gobjref.hpp +++ b/modules/gapi/src/compiler/gobjref.hpp @@ -5,19 +5,31 @@ // Copyright (C) 2018 Intel Corporation -#ifndef OPENCV_GAPI_GMATREF_HPP -#define OPENCV_GAPI_GMATREF_HPP +#ifndef OPENCV_GAPI_GOBJREF_HPP +#define OPENCV_GAPI_GOBJREF_HPP #include "opencv2/gapi/util/variant.hpp" #include "opencv2/gapi/garg.hpp" -#include "api/gapi_priv.hpp" // GShape, HostCtor - namespace cv { namespace gimpl { + // Union type for various user-defined type constructors (GArray, etc) + // FIXME: Replace construct-only API with a more generic one + // (probably with bits of introspection) + // Not required for non-user-defined types (GMat, GScalar, etc) + using HostCtor = util::variant + < util::monostate + , detail::ConstructVec + >; + + using ConstVal = util::variant + < util::monostate + , cv::gapi::own::Scalar + >; + struct RcDesc { int id; // id is unique but local to shape @@ -47,4 +59,4 @@ namespace detail } // cv -#endif // OPENCV_GAPI_GMATREF_HPP +#endif // OPENCV_GAPI_GOBJREF_HPP diff --git a/modules/gapi/src/compiler/passes/dump_dot.cpp b/modules/gapi/src/compiler/passes/dump_dot.cpp index 8741089ba2..89020d19b5 100644 --- a/modules/gapi/src/compiler/passes/dump_dot.cpp +++ b/modules/gapi/src/compiler/passes/dump_dot.cpp @@ -10,6 +10,7 @@ #include // cout #include // stringstream #include // ofstream +#include #include diff --git a/modules/gapi/src/compiler/passes/kernels.cpp b/modules/gapi/src/compiler/passes/kernels.cpp index 1df311295f..0feb7b1b15 100644 --- a/modules/gapi/src/compiler/passes/kernels.cpp +++ b/modules/gapi/src/compiler/passes/kernels.cpp @@ -20,6 +20,7 @@ #include "backends/common/gbackend.hpp" #include "compiler/gmodelbuilder.hpp" #include "logger.hpp" // GAPI_LOG +#include "api/gproto_priv.hpp" // is_dynamic, rewrap namespace { diff --git a/modules/gapi/test/internal/gapi_int_island_fusion_tests.cpp b/modules/gapi/test/internal/gapi_int_island_fusion_tests.cpp index 33f0eebefe..6cfd5d3bd1 100644 --- a/modules/gapi/test/internal/gapi_int_island_fusion_tests.cpp +++ b/modules/gapi/test/internal/gapi_int_island_fusion_tests.cpp @@ -10,9 +10,9 @@ #include "../gapi_mock_kernels.hpp" -#include "compiler/gmodel.hpp" #include "compiler/gislandmodel.hpp" #include "compiler/gcompiler.hpp" +#include "compiler/gmodel_priv.hpp" namespace opencv_test { @@ -44,10 +44,11 @@ TEST(IslandFusion, TwoOps_OneIsland) // Inspect the graph and verify the islands configuration cv::gimpl::GModel::ConstGraph gm(*graph); + cv::gimpl::GModel::ConstLayoutGraph glm(*graph); - auto in_nh = cv::gimpl::GModel::dataNodeOf(gm, in); - auto tmp_nh = cv::gimpl::GModel::dataNodeOf(gm, tmp0); - auto out_nh = cv::gimpl::GModel::dataNodeOf(gm, out); + auto in_nh = cv::gimpl::GModel::dataNodeOf(glm, in); + auto tmp_nh = cv::gimpl::GModel::dataNodeOf(glm, tmp0); + auto out_nh = cv::gimpl::GModel::dataNodeOf(glm, out); // in/out mats shouldn't be assigned to any Island EXPECT_FALSE(gm.metadata(in_nh ).contains()); diff --git a/modules/gapi/test/internal/gapi_int_island_tests.cpp b/modules/gapi/test/internal/gapi_int_island_tests.cpp index 06a5b8c7dd..7da1670ecc 100644 --- a/modules/gapi/test/internal/gapi_int_island_tests.cpp +++ b/modules/gapi/test/internal/gapi_int_island_tests.cpp @@ -9,6 +9,7 @@ #include "compiler/gmodel.hpp" #include "compiler/gcompiled_priv.hpp" +#include "compiler/gmodel_priv.hpp" namespace opencv_test {