Path: blob/master/modules/gapi/src/compiler/gcompiled_priv.hpp
16337 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3//4// Copyright (C) 2018 Intel Corporation567#ifndef OPENCV_GAPI_GCOMPILED_PRIV_HPP8#define OPENCV_GAPI_GCOMPILED_PRIV_HPP910#include <memory> // unique_ptr1112#include "opencv2/gapi/util/optional.hpp"13#include "compiler/gmodel.hpp"14#include "executor/gexecutor.hpp"1516// NB: BTW, GCompiled is the only "public API" class which17// private part (implementaion) is hosted in the "compiler/" module.18//19// This file is here just to keep ADE hidden from the top-level APIs.20//21// As the thing becomes more complex, appropriate API and implementation22// part will be placed to api/ and compiler/ modules respectively.2324namespace cv {2526namespace gimpl27{28struct GRuntimeArgs;29};3031// FIXME: GAPI_EXPORTS is here only due to tests and Windows linker issues32class GAPI_EXPORTS GCompiled::Priv33{34// NB: For now, a GCompiled keeps the original ade::Graph alive.35// If we want to go autonomous, we might to do something with this.36GMetaArgs m_metas; // passed by user37GMetaArgs m_outMetas; // inferred by compiler38std::unique_ptr<cv::gimpl::GExecutor> m_exec;3940void checkArgs(const cv::gimpl::GRuntimeArgs &args) const;4142public:43void setup(const GMetaArgs &metaArgs,44const GMetaArgs &outMetas,45std::unique_ptr<cv::gimpl::GExecutor> &&pE);46bool isEmpty() const;4748void run(cv::gimpl::GRuntimeArgs &&args);49const GMetaArgs& metas() const;50const GMetaArgs& outMetas() const;5152const cv::gimpl::GModel::Graph& model() const;53};5455}5657#endif // OPENCV_GAPI_GCOMPILED_PRIV_HPP585960