Path: blob/master/modules/gapi/src/backends/cpu/gcpubackend.hpp
16344 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_GCPUBACKEND_HPP8#define OPENCV_GAPI_GCPUBACKEND_HPP910#include <map> // map11#include <unordered_map> // unordered_map12#include <tuple> // tuple13#include <ade/util/algorithm.hpp> // type_list_index1415#include "opencv2/gapi/garg.hpp"16#include "opencv2/gapi/gproto.hpp"17#include "opencv2/gapi/cpu/gcpukernel.hpp"181920#include "api/gapi_priv.hpp"21#include "backends/common/gbackend.hpp"22#include "compiler/gislandmodel.hpp"2324namespace cv { namespace gimpl {2526struct Unit27{28static const char *name() { return "HostKernel"; }29GCPUKernel k;30};3132class GCPUExecutable final: public GIslandExecutable33{34const ade::Graph &m_g;35GModel::ConstGraph m_gm;3637struct OperationInfo38{39ade::NodeHandle nh;40GMetaArgs expected_out_metas;41};4243// Execution script, currently absolutely naive44std::vector<OperationInfo> m_script;45// List of all resources in graph (both internal and external)46std::vector<ade::NodeHandle> m_dataNodes;4748// Actual data of all resources in graph (both internal and external)49Mag m_res;50GArg packArg(const GArg &arg);5152public:53GCPUExecutable(const ade::Graph &graph,54const std::vector<ade::NodeHandle> &nodes);5556virtual void run(std::vector<InObj> &&input_objs,57std::vector<OutObj> &&output_objs) override;58};5960}}6162#endif // OPENCV_GAPI_GBACKEND_HPP636465