21.11
|
The SubgraphView class represents a subgraph of a Graph. More...
#include <SubgraphView.hpp>
Public Types | |
using | SubgraphViewPtr = std::unique_ptr< SubgraphView > |
using | InputSlots = std::vector< InputSlot * > |
using | OutputSlots = std::vector< OutputSlot * > |
using | Layers = std::list< Layer * > |
using | Iterator = Layers::iterator |
using | ConstIterator = Layers::const_iterator |
Public Member Functions | |
template<typename Func > | |
void | ForEachLayer (Func func) const |
SubgraphView (Graph &graph) | |
Constructs a sub-graph from the entire given graph. More... | |
SubgraphView (InputSlots &&inputs, OutputSlots &&outputs, Layers &&layers) | |
Constructs a sub-graph with the given arguments. More... | |
SubgraphView (const SubgraphView &subgraph) | |
Copy-constructor. More... | |
SubgraphView (SubgraphView &&subgraph) | |
Move-constructor. More... | |
SubgraphView (IConnectableLayer *layer) | |
Constructs a sub-graph with only the given layer. More... | |
SubgraphView & | operator= (SubgraphView &&other) |
Move-assignment operator. More... | |
const InputSlots & | GetInputSlots () const |
const OutputSlots & | GetOutputSlots () const |
const Layers & | GetLayers () const |
const InputSlot * | GetInputSlot (unsigned int index) const |
InputSlot * | GetInputSlot (unsigned int index) |
const OutputSlot * | GetOutputSlot (unsigned int index) const |
OutputSlot * | GetOutputSlot (unsigned int index) |
unsigned int | GetNumInputSlots () const |
unsigned int | GetNumOutputSlots () const |
Iterator | begin () |
Iterator | end () |
ConstIterator | begin () const |
ConstIterator | end () const |
ConstIterator | cbegin () const |
ConstIterator | cend () const |
void | Clear () |
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 become invalid when the Layers are destroyed or changed.
Definition at line 23 of file SubgraphView.hpp.
using ConstIterator = Layers::const_iterator |
Definition at line 42 of file SubgraphView.hpp.
using InputSlots = std::vector<InputSlot*> |
Definition at line 38 of file SubgraphView.hpp.
using Iterator = Layers::iterator |
Definition at line 41 of file SubgraphView.hpp.
Definition at line 40 of file SubgraphView.hpp.
using OutputSlots = std::vector<OutputSlot*> |
Definition at line 39 of file SubgraphView.hpp.
using SubgraphViewPtr = std::unique_ptr<SubgraphView> |
Definition at line 37 of file SubgraphView.hpp.
|
explicit |
Constructs a sub-graph from the entire given graph.
Definition at line 43 of file SubgraphView.cpp.
SubgraphView | ( | InputSlots && | inputs, |
OutputSlots && | outputs, | ||
Layers && | layers | ||
) |
Constructs a sub-graph with the given arguments.
Definition at line 52 of file SubgraphView.cpp.
SubgraphView | ( | const SubgraphView & | subgraph | ) |
Copy-constructor.
Definition at line 61 of file SubgraphView.cpp.
SubgraphView | ( | SubgraphView && | subgraph | ) |
Move-constructor.
Definition at line 70 of file SubgraphView.cpp.
SubgraphView | ( | IConnectableLayer * | layer | ) |
SubgraphView::Iterator begin | ( | ) |
Definition at line 169 of file SubgraphView.cpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AssignBackends(), SubgraphView::cbegin(), NeonBackend::OptimizeSubgraphView(), and ClBackend::OptimizeSubgraphView().
SubgraphView::ConstIterator begin | ( | ) | const |
Definition at line 179 of file SubgraphView.cpp.
SubgraphView::ConstIterator cbegin | ( | ) | const |
SubgraphView::ConstIterator cend | ( | ) | const |
Definition at line 194 of file SubgraphView.cpp.
References SubgraphView::end().
void Clear | ( | ) |
Definition at line 199 of file SubgraphView.cpp.
Referenced by Graph::SubstituteSubgraph().
SubgraphView::Iterator end | ( | ) |
Definition at line 174 of file SubgraphView.cpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AssignBackends(), SubgraphView::cend(), NeonBackend::OptimizeSubgraphView(), and ClBackend::OptimizeSubgraphView().
SubgraphView::ConstIterator end | ( | ) | const |
Definition at line 184 of file SubgraphView.cpp.
|
inline |
Definition at line 27 of file SubgraphView.hpp.
Referenced by Graph::SubstituteSubgraph().
const InputSlot * GetInputSlot | ( | unsigned int | index | ) | const |
Definition at line 134 of file SubgraphView.cpp.
InputSlot * GetInputSlot | ( | unsigned int | index | ) |
Definition at line 139 of file SubgraphView.cpp.
const SubgraphView::InputSlots & GetInputSlots | ( | ) | const |
Definition at line 124 of file SubgraphView.cpp.
Referenced by Graph::SubstituteSubgraph(), TEST_SUITE(), and OptimizationViews::Validate().
const SubgraphView::Layers & GetLayers | ( | ) | const |
Definition at line 164 of file SubgraphView.cpp.
Referenced by MockBackend::OptimizeSubgraphView(), Graph::SubstituteSubgraph(), TEST_SUITE(), and OptimizationViews::Validate().
unsigned int GetNumInputSlots | ( | ) | const |
Definition at line 154 of file SubgraphView.cpp.
References armnn::numeric_cast().
unsigned int GetNumOutputSlots | ( | ) | const |
Definition at line 159 of file SubgraphView.cpp.
References armnn::numeric_cast().
const OutputSlot * GetOutputSlot | ( | unsigned int | index | ) | const |
Definition at line 144 of file SubgraphView.cpp.
OutputSlot * GetOutputSlot | ( | unsigned int | index | ) |
Definition at line 149 of file SubgraphView.cpp.
const SubgraphView::OutputSlots & GetOutputSlots | ( | ) | const |
Definition at line 129 of file SubgraphView.cpp.
Referenced by Graph::SubstituteSubgraph(), TEST_SUITE(), and OptimizationViews::Validate().
SubgraphView & operator= | ( | SubgraphView && | other | ) |
Move-assignment operator.
Definition at line 101 of file SubgraphView.cpp.