From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_subgraph_view_8hpp_source.xhtml | 143 +++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 21.02/_subgraph_view_8hpp_source.xhtml (limited to '21.02/_subgraph_view_8hpp_source.xhtml') diff --git a/21.02/_subgraph_view_8hpp_source.xhtml b/21.02/_subgraph_view_8hpp_source.xhtml new file mode 100644 index 0000000000..4f7f9ca128 --- /dev/null +++ b/21.02/_subgraph_view_8hpp_source.xhtml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/SubgraphView.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
SubgraphView.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "Layer.hpp"
9 #include "Graph.hpp"
10 
11 #include <vector>
12 #include <list>
13 
14 namespace armnn
15 {
16 
17 ///
18 /// The SubgraphView class represents a subgraph of a Graph.
19 /// The data it holds, points to data held by layers of the Graph, so the
20 /// the contents of the SubgraphView become invalid when the Layers are destroyed
21 /// or changed.
22 ///
23 class SubgraphView final
24 {
25 public:
26  template <typename Func>
27  void ForEachLayer(Func func) const
28  {
29  for (auto it = m_Layers.begin(); it != m_Layers.end(); )
30  {
31  auto next = std::next(it);
32  func(*it);
33  it = next;
34  }
35  }
36 
37  using SubgraphViewPtr = std::unique_ptr<SubgraphView>;
38  using InputSlots = std::vector<InputSlot*>;
39  using OutputSlots = std::vector<OutputSlot*>;
40  using Layers = std::list<Layer*>;
41  using Iterator = Layers::iterator;
42  using ConstIterator = Layers::const_iterator;
43 
44  /// Constructs a sub-graph from the entire given graph.
45  explicit SubgraphView(Graph& graph);
46 
47  /// Constructs a sub-graph with the given arguments.
48  SubgraphView(InputSlots&& inputs, OutputSlots&& outputs, Layers&& layers);
49 
50  /// Copy-constructor.
51  SubgraphView(const SubgraphView& subgraph);
52 
53  /// Move-constructor.
54  SubgraphView(SubgraphView&& subgraph);
55 
56  /// Constructs a sub-graph with only the given layer.
58 
59  /// Move-assignment operator.
61 
62  const InputSlots& GetInputSlots() const;
63  const OutputSlots& GetOutputSlots() const;
64  const Layers& GetLayers() const;
65 
66  const InputSlot* GetInputSlot(unsigned int index) const;
67  InputSlot* GetInputSlot(unsigned int index);
68 
69  const OutputSlot* GetOutputSlot(unsigned int index) const;
70  OutputSlot* GetOutputSlot(unsigned int index);
71 
72  unsigned int GetNumInputSlots() const;
73  unsigned int GetNumOutputSlots() const;
74 
75  Iterator begin();
76  Iterator end();
77 
78  ConstIterator begin() const;
79  ConstIterator end() const;
80 
81  ConstIterator cbegin() const;
82  ConstIterator cend() const;
83 
84  void Clear();
85 
86 private:
87  void CheckSubgraph();
88 
89  /// Arrange the order of layers topologically so that nodes can be visited in valid order
90  void ArrangeBySortOrder();
91 
92  /// The list of pointers to the input slots of the parent graph.
93  InputSlots m_InputSlots;
94 
95  /// The list of pointers to the output slots of the parent graph.
96  OutputSlots m_OutputSlots;
97 
98  /// The list of pointers to the layers of the parent graph.
99  Layers m_Layers;
100 };
101 
102 ///
103 /// Old SubGraph definition kept for backward compatibility only.
104 ///
105 using SubGraph ARMNN_DEPRECATED_MSG("SubGraph is deprecated, use SubgraphView instead") = SubgraphView;
106 
107 } // namespace armnn
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:62
+
Layers::iterator Iterator
+
SubgraphView & operator=(SubgraphView &&other)
Move-assignment operator.
+
std::vector< OutputSlot * > OutputSlots
+
unsigned int GetNumInputSlots() const
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+
The SubgraphView class represents a subgraph of a Graph.
+
std::unique_ptr< SubgraphView > SubgraphViewPtr
+ +
const OutputSlot * GetOutputSlot(unsigned int index) const
+ + + +
std::vector< InputSlot * > InputSlots
+
SubgraphView(Graph &graph)
Constructs a sub-graph from the entire given graph.
+
const InputSlots & GetInputSlots() const
+
ConstIterator cend() const
+ +
const InputSlot * GetInputSlot(unsigned int index) const
+
const OutputSlots & GetOutputSlots() const
+
const Layers & GetLayers() const
+ +
#define ARMNN_DEPRECATED_MSG(message)
Definition: Deprecated.hpp:43
+
ConstIterator cbegin() const
+
void ForEachLayer(Func func) const
+
std::list< Layer * > Layers
+
Layers::const_iterator ConstIterator
+
unsigned int GetNumOutputSlots() const
+
+
+ + + + -- cgit v1.2.1