Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / fluid / modules / gapi / src / api / gbackend_priv.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4 //
5 // Copyright (C) 2018-2019 Intel Corporation
6
7
8 #ifndef GAPI_API_GBACKEND_PRIV_HPP
9 #define GAPI_API_GBACKEND_PRIV_HPP
10
11 #include <memory>
12 #include <unordered_set>
13
14 #include <ade/graph.hpp>
15 #include <ade/passes/pass_base.hpp> // passes::PassContext
16 #include <ade/execution_engine/execution_engine.hpp> // ..SetupContext
17
18 #include "opencv2/gapi/gcommon.hpp"
19 #include "opencv2/gapi/gkernel.hpp"
20
21 namespace cv
22 {
23 namespace gimpl
24 {
25     class GBackend;
26     class GIslandExecutable;
27 } // namespace gimpl
28 } // namespace cv
29
30 // GAPI_EXPORTS is here to make tests build on Windows
31 class GAPI_EXPORTS cv::gapi::GBackend::Priv
32 {
33 public:
34     using EPtr = std::unique_ptr<cv::gimpl::GIslandExecutable>;
35
36     virtual void unpackKernel(ade::Graph            &graph,
37                               const ade::NodeHandle &op_node,
38                               const GKernelImpl     &impl);
39
40     // FIXME: since backends are not passed to ADE anymore,
41     // there's no need in having both cv::gimpl::GBackend
42     // and cv::gapi::GBackend - these two things can be unified
43     // NOTE - nodes are guaranteed to be topologically sorted.
44     virtual EPtr compile(const ade::Graph   &graph,
45                          const GCompileArgs &args,
46                          const std::vector<ade::NodeHandle> &nodes) const;
47
48     virtual void addBackendPasses(ade::ExecutionEngineSetupContext &);
49
50     virtual ~Priv() = default;
51 };
52
53 #endif // GAPI_API_GBACKEND_PRIV_HPP