Download modules/gapi/src/backends/cpu/gcpubackend.hpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 2.39 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/backends/cpu/gcpubackend.hpp
- Command line
-
hf download hf://tgollogly/test/modules/gapi/src/backends/cpu/gcpubackend.hpp
-
curl -L -o gcpubackend.hpp https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/backends/cpu/gcpubackend.hpp
2.39 kB
| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| // | |
| // Copyright (C) 2018-2022 Intel Corporation | |
| namespace cv { namespace gimpl { | |
| struct CPUUnit | |
| { | |
| static const char *name() { return "HostKernel"; } | |
| GCPUKernel k; | |
| }; | |
| class GCPUExecutable final: public GIslandExecutable | |
| { | |
| const ade::Graph &m_g; | |
| GModel::ConstGraph m_gm; | |
| cv::GCompileArgs m_compileArgs; | |
| struct OperationInfo | |
| { | |
| ade::NodeHandle nh; | |
| GMetaArgs expected_out_metas; | |
| }; | |
| // Execution script, currently absolutely naive | |
| std::vector<OperationInfo> m_script; | |
| // TODO: Check that it is thread-safe | |
| // Map of stateful kernel nodes to their kernels' states | |
| std::unordered_map<ade::NodeHandle, GArg, | |
| ade::HandleHasher<ade::Node>> m_nodesToStates; | |
| // List of all resources in graph (both internal and external) | |
| std::vector<ade::NodeHandle> m_dataNodes; | |
| std::vector<ade::NodeHandle> m_opNodes; | |
| // Actual data of all resources in graph (both internal and external) | |
| Mag m_res; | |
| // A flag for call_once() (used for log warnings) | |
| std::once_flag m_warnFlag; | |
| GArg packArg(const GArg &arg); | |
| void setupKernelStates(); | |
| void makeReshape(); | |
| public: | |
| GCPUExecutable(const ade::Graph &graph, | |
| const cv::GCompileArgs &compileArgs, | |
| const std::vector<ade::NodeHandle> &nodes); | |
| virtual inline bool canReshape() const override { return true; } | |
| virtual void reshape(ade::Graph&, const GCompileArgs&) override; | |
| virtual void handleNewStream() override; | |
| virtual void run(std::vector<InObj> &&input_objs, | |
| std::vector<OutObj> &&output_objs) override; | |
| }; | |
| }} | |