mirror of https://github.com/opencv/opencv.git
Merge pull request #13943 from rgarnov:export_headers_for_backend_development
G-API external backend development (#13943) * Moved HostCtor and ConstVal from gapi_priv.hpp to objref.hpp * Added gmodel_priv.hpp, added export of symbols from gmodel.hpp * Added export of binInArg and bindOutArg * Renamed gapi_priv.*pp -> gorigin.*pp * Added a fixme on collecting exports inside one classpull/14361/head
parent
7ad5d21900
commit
1f517b8a02
23 changed files with 147 additions and 109 deletions
@ -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 <ade/graph.hpp> |
||||
#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<ade::NodeHandle> 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<typename T> 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
|
Loading…
Reference in new issue