diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-05-01 10:31:27 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-05-03 14:35:34 +0000 |
commit | 602af090a6b7285dc1041e3d8424836e5fa12cef (patch) | |
tree | 8ffccd841a911164a022e98e57630ba348ceb796 /src/armnn/SubgraphView.hpp | |
parent | 59e15b00ea51fee4baeea750dc11ab1952dfab1d (diff) | |
download | armnn-602af090a6b7285dc1041e3d8424836e5fa12cef.tar.gz |
IVGCVSW-3029 Remove any AddLayer capabilities from SubgraphView
* Removed the reference to the parent graph in SubgraphView
* Removed the AddLayer method in SubgraphView
* Updated the code where necessary to adapt to the new changes in
SubgraphView
* Fixed a check in the CreatePreCompiledWorkloadTest test function
Change-Id: I4d3af87f11ec3cd8f18a21b250a2d295da56e1a0
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/armnn/SubgraphView.hpp')
-rw-r--r-- | src/armnn/SubgraphView.hpp | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/src/armnn/SubgraphView.hpp b/src/armnn/SubgraphView.hpp index b211ad4046..d4d92bbf6c 100644 --- a/src/armnn/SubgraphView.hpp +++ b/src/armnn/SubgraphView.hpp @@ -17,7 +17,7 @@ namespace armnn /// /// The SubgraphView class represents a subgraph of a Graph. /// The data it holds, points to data held by layers of the Graph, so the -/// the contents of the SubgraphView becomes invalid when the Layers are destroyed +/// the contents of the SubgraphView become invalid when the Layers are destroyed /// or changed. /// class SubgraphView final @@ -30,18 +30,11 @@ public: using Iterator = Layers::iterator; using ConstIterator = Layers::const_iterator; - /// Empty subgraphs are not allowed, they must at least have a parent graph. - SubgraphView() = delete; - /// Constructs a sub-graph from the entire given graph. SubgraphView(Graph& graph); - /// Constructs a sub-graph with the given arguments and binds it to the specified parent graph. - SubgraphView(Graph* parentGraph, InputSlots&& inputs, OutputSlots&& outputs, Layers&& layers); - - /// Constructs a sub-graph with the given arguments and uses the specified sub-graph to get a reference - /// to the parent graph. - SubgraphView(const SubgraphView& referenceSubgraph, InputSlots&& inputs, OutputSlots&& outputs, Layers&& layers); + /// Constructs a sub-graph with the given arguments. + SubgraphView(InputSlots&& inputs, OutputSlots&& outputs, Layers&& layers); /// Copy-constructor. SubgraphView(const SubgraphView& subgraph); @@ -49,16 +42,8 @@ public: /// Move-constructor. SubgraphView(SubgraphView&& subgraph); - /// Constructs a sub-graph with only the given layer and uses the specified sub-graph to get a reference - /// to the parent graph. - SubgraphView(const SubgraphView& referenceSubgraph, IConnectableLayer* layer); - - /// Updates this sub-graph with the contents of the whole given graph. - void Update(Graph& graph); - - /// Adds a new layer, of type LayerType, to the parent graph of this sub-graph. - template <typename LayerT, typename... Args> - LayerT* AddLayer(Args&&... args) const; + /// Constructs a sub-graph with only the given layer. + SubgraphView(IConnectableLayer* layer); const InputSlots& GetInputSlots() const; const OutputSlots& GetOutputSlots() const; @@ -93,17 +78,6 @@ private: /// The list of pointers to the layers of the parent graph. Layers m_Layers; - - /// Pointer to the graph this sub-graph is a view of. - Graph* m_ParentGraph; }; -template <typename LayerT, typename... Args> -LayerT* SubgraphView::AddLayer(Args&&... args) const -{ - BOOST_ASSERT(m_ParentGraph); - - return m_ParentGraph->AddLayer<LayerT>(args...); -} - } // namespace armnn |