|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GAPI_API_GBACKEND_PRIV_HPP
|
|
|
#define GAPI_API_GBACKEND_PRIV_HPP
|
|
|
|
|
|
#include <memory>
|
|
|
#include <unordered_set>
|
|
|
|
|
|
#include <ade/graph.hpp>
|
|
|
#include <ade/passes/pass_base.hpp>
|
|
|
#include <ade/execution_engine/execution_engine.hpp>
|
|
|
|
|
|
#include "opencv2/gapi/gcommon.hpp"
|
|
|
#include "opencv2/gapi/gkernel.hpp"
|
|
|
|
|
|
#include "compiler/gmodel.hpp"
|
|
|
#include "compiler/gislandmodel.hpp"
|
|
|
|
|
|
namespace cv
|
|
|
{
|
|
|
namespace gimpl
|
|
|
{
|
|
|
class GBackend;
|
|
|
class GIslandExecutable;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
class GAPI_EXPORTS cv::gapi::GBackend::Priv
|
|
|
{
|
|
|
public:
|
|
|
using EPtr = std::unique_ptr<cv::gimpl::GIslandExecutable>;
|
|
|
|
|
|
virtual void unpackKernel(ade::Graph &graph,
|
|
|
const ade::NodeHandle &op_node,
|
|
|
const GKernelImpl &impl);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual EPtr compile(const ade::Graph &graph,
|
|
|
const GCompileArgs &args,
|
|
|
const std::vector<ade::NodeHandle> &nodes) const;
|
|
|
|
|
|
|
|
|
virtual EPtr compile(const ade::Graph &graph,
|
|
|
const GCompileArgs &args,
|
|
|
const std::vector<ade::NodeHandle> &nodes,
|
|
|
const std::vector<cv::gimpl::Data>& ins_data,
|
|
|
const std::vector<cv::gimpl::Data>& outs_data) const;
|
|
|
|
|
|
|
|
|
virtual void addBackendPasses(ade::ExecutionEngineSetupContext &);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void addMetaSensitiveBackendPasses(ade::ExecutionEngineSetupContext &);
|
|
|
|
|
|
virtual cv::GKernelPackage auxiliaryKernels() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool controlsMerge() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool allowsMerge(const cv::gimpl::GIslandModel::Graph &g,
|
|
|
const ade::NodeHandle &a_nh,
|
|
|
const ade::NodeHandle &slot_nh,
|
|
|
const ade::NodeHandle &b_nh) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool supportsConst(cv::GShape shape) const;
|
|
|
|
|
|
virtual ~Priv() = default;
|
|
|
};
|
|
|
|
|
|
#endif
|
|
|
|