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.
5 // Copyright (C) 2018-2019 Intel Corporation
8 #ifndef GAPI_API_GBACKEND_PRIV_HPP
9 #define GAPI_API_GBACKEND_PRIV_HPP
12 #include <unordered_set>
14 #include <ade/graph.hpp>
15 #include <ade/passes/pass_base.hpp> // passes::PassContext
16 #include <ade/execution_engine/execution_engine.hpp> // ..SetupContext
18 #include "opencv2/gapi/gcommon.hpp"
19 #include "opencv2/gapi/gkernel.hpp"
26 class GIslandExecutable;
30 // GAPI_EXPORTS is here to make tests build on Windows
31 class GAPI_EXPORTS cv::gapi::GBackend::Priv
34 using EPtr = std::unique_ptr<cv::gimpl::GIslandExecutable>;
36 virtual void unpackKernel(ade::Graph &graph,
37 const ade::NodeHandle &op_node,
38 const GKernelImpl &impl);
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;
48 virtual void addBackendPasses(ade::ExecutionEngineSetupContext &);
50 virtual ~Priv() = default;
53 #endif // GAPI_API_GBACKEND_PRIV_HPP