From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- ...assarmnn_1_1_optimize_for_connection_impl.xhtml | 225 +++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 20.02/classarmnn_1_1_optimize_for_connection_impl.xhtml (limited to '20.02/classarmnn_1_1_optimize_for_connection_impl.xhtml') diff --git a/20.02/classarmnn_1_1_optimize_for_connection_impl.xhtml b/20.02/classarmnn_1_1_optimize_for_connection_impl.xhtml new file mode 100644 index 0000000000..9989c91613 --- /dev/null +++ b/20.02/classarmnn_1_1_optimize_for_connection_impl.xhtml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + +ArmNN: OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > Class Template Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > Class Template Reference
+
+
+ +

Wrapper Optimization class that calls Wrapped::Run for every connection BaseType -> ChildType. + More...

+ +

#include <Optimization.hpp>

+
+Inheritance diagram for OptimizeForConnectionImpl< BaseType, ChildType, Wrapped >:
+
+
+ + +OptimizeForTypeImpl< BaseType, OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > > +OptimizeForConnection< BaseType, ChildType, Wrapped > + +
+ + + + +

+Public Member Functions

void Run (Graph &graph, BaseType &base) const
 
+ + + +

+Protected Member Functions

 ~OptimizeForConnectionImpl ()=default
 
+

Detailed Description

+

template<typename BaseType, typename ChildType, typename Wrapped>
+class armnn::OptimizeForConnectionImpl< BaseType, ChildType, Wrapped >

+ +

Wrapper Optimization class that calls Wrapped::Run for every connection BaseType -> ChildType.

+
    +
  • Wrapped class mustn't remove the base layer. The optimizer will remove it if left unconnected after applying each optimization.
  • +
  • Wrapped class mustn't affect existing connections in the same output. It might add new ones.
  • +
  • Children layers are removed if left unconnected after applying the wrapped optimization.
  • +
+ +

Definition at line 77 of file Optimization.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ~OptimizeForConnectionImpl()

+ +
+
+ + + + + +
+ + + + + + + +
~OptimizeForConnectionImpl ()
+
+protecteddefault
+
+ +
+
+

Member Function Documentation

+ +

◆ Run()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Run (Graphgraph,
BaseType & base 
) const
+
+inline
+
+ +

Definition at line 82 of file Optimization.hpp.

+ +

References Graph::EraseLayer(), and Layer::IsOutputUnconnected().

+
83  {
84  for (auto output = base.BeginOutputSlots(); output != base.EndOutputSlots(); ++output)
85  {
86  for (auto&& childInput : output->GetConnections())
87  {
88  if (childInput->GetOwningLayer().GetType() == LayerEnumOf<ChildType>())
89  {
90  Wrapped::Run(graph, *childInput);
91  }
92  }
93 
94  // Removes unconnected children.
95  for (unsigned int i = 0; i < output->GetNumConnections();)
96  {
97  Layer* child = &output->GetConnection(i)->GetOwningLayer();
98 
99  if (child->IsOutputUnconnected())
100  {
101  graph.EraseLayer(child);
102  }
103  else
104  {
105  ++i;
106  }
107  }
108  }
109  }
+
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.1