ArmNN
NotReleased
|
#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 41 of file SubgraphView.cpp.
SubgraphView | ( | InputSlots && | inputs, |
OutputSlots && | outputs, | ||
Layers && | layers | ||
) |
Constructs a sub-graph with the given arguments.
Definition at line 49 of file SubgraphView.cpp.
SubgraphView | ( | const SubgraphView & | subgraph | ) |
Copy-constructor.
Definition at line 57 of file SubgraphView.cpp.
SubgraphView | ( | SubgraphView && | subgraph | ) |
Move-constructor.
Definition at line 65 of file SubgraphView.cpp.
SubgraphView | ( | IConnectableLayer * | layer | ) |
SubgraphView::Iterator begin | ( | ) |
Definition at line 163 of file SubgraphView.cpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AssignBackends(), and SubgraphView::cbegin().
SubgraphView::ConstIterator begin | ( | ) | const |
Definition at line 173 of file SubgraphView.cpp.
SubgraphView::ConstIterator cbegin | ( | ) | const |
SubgraphView::ConstIterator cend | ( | ) | const |
Definition at line 188 of file SubgraphView.cpp.
References SubgraphView::end().
void Clear | ( | ) |
Definition at line 193 of file SubgraphView.cpp.
Referenced by Graph::SubstituteSubgraph().
SubgraphView::Iterator end | ( | ) |
Definition at line 168 of file SubgraphView.cpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AssignBackends(), and SubgraphView::cend().
SubgraphView::ConstIterator end | ( | ) | const |
Definition at line 178 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 128 of file SubgraphView.cpp.
InputSlot * GetInputSlot | ( | unsigned int | index | ) |
Definition at line 133 of file SubgraphView.cpp.
const SubgraphView::InputSlots & GetInputSlots | ( | ) | const |
Definition at line 118 of file SubgraphView.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), Graph::SubstituteSubgraph(), and OptimizationViews::Validate().
const SubgraphView::Layers & GetLayers | ( | ) | const |
Definition at line 158 of file SubgraphView.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), MockBackend::OptimizeSubgraphView(), Graph::SubstituteSubgraph(), and OptimizationViews::Validate().
unsigned int GetNumInputSlots | ( | ) | const |
Definition at line 148 of file SubgraphView.cpp.
unsigned int GetNumOutputSlots | ( | ) | const |
Definition at line 153 of file SubgraphView.cpp.
const OutputSlot * GetOutputSlot | ( | unsigned int | index | ) | const |
Definition at line 138 of file SubgraphView.cpp.
OutputSlot * GetOutputSlot | ( | unsigned int | index | ) |
Definition at line 143 of file SubgraphView.cpp.
const SubgraphView::OutputSlots & GetOutputSlots | ( | ) | const |
Definition at line 123 of file SubgraphView.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), Graph::SubstituteSubgraph(), and OptimizationViews::Validate().
SubgraphView & operator= | ( | SubgraphView && | other | ) |
Move-assignment operator.
Definition at line 95 of file SubgraphView.cpp.