Download modules/gapi/src/compiler/gmodel_priv.hpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.61 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/compiler/gmodel_priv.hpp
- Command line
-
hf download hf://tgollogly/test/modules/gapi/src/compiler/gmodel_priv.hpp
-
curl -L -o gmodel_priv.hpp https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/compiler/gmodel_priv.hpp
1.61 kB
| // 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 | |
| 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})); | |
| } | |
| inline ade::NodeHandle producerOf(const cv::gimpl::GModel::Graph& gm, ade::NodeHandle dh) | |
| { | |
| GAPI_Assert(gm.metadata(dh).get<NodeType>().t == NodeType::DATA); | |
| auto ins = dh->inNodes(); | |
| return ins.empty() ? ade::NodeHandle{ } : *ins.begin(); | |
| } | |
| }}} | |