Path: blob/master/modules/gapi/src/compiler/gcompiler.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_GCOMPILER_HPP8#define OPENCV_GAPI_GCOMPILER_HPP91011#include "opencv2/gapi/gcommon.hpp"12#include "opencv2/gapi/gkernel.hpp"13#include "opencv2/gapi/gcomputation.hpp"1415#include <ade/execution_engine/execution_engine.hpp>1617namespace cv { namespace gimpl {1819// FIXME: exported for internal tests only!20class GAPI_EXPORTS GCompiler21{22const GComputation& m_c;23const GMetaArgs m_metas;24GCompileArgs m_args;25ade::ExecutionEngine m_e;2627cv::gapi::GKernelPackage m_all_kernels;2829void validateInputMeta();30void validateOutProtoArgs();3132public:33explicit GCompiler(const GComputation &c,34GMetaArgs &&metas,35GCompileArgs &&args);3637// The method which does everything...38GCompiled compile();3940// But is actually composed of this:41using GPtr = std::unique_ptr<ade::Graph>;42GPtr generateGraph(); // Unroll GComputation into a GModel43void runPasses(ade::Graph &g); // Apply all G-API passes on a GModel44void compileIslands(ade::Graph &g); // Instantiate GIslandExecutables in GIslandModel45GCompiled produceCompiled(GPtr &&pg); // Produce GCompiled from processed GModel46};4748}}4950#endif // OPENCV_GAPI_GCOMPILER_HPP515253