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 --- ...imizations_1_1_squash_equal_siblings_impl.xhtml | 243 +++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 20.02/classarmnn_1_1optimizations_1_1_squash_equal_siblings_impl.xhtml (limited to '20.02/classarmnn_1_1optimizations_1_1_squash_equal_siblings_impl.xhtml') diff --git a/20.02/classarmnn_1_1optimizations_1_1_squash_equal_siblings_impl.xhtml b/20.02/classarmnn_1_1optimizations_1_1_squash_equal_siblings_impl.xhtml new file mode 100644 index 0000000000..45be1fc23d --- /dev/null +++ b/20.02/classarmnn_1_1optimizations_1_1_squash_equal_siblings_impl.xhtml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + +ArmNN: SquashEqualSiblingsImpl< Comparable > Class Template Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SquashEqualSiblingsImpl< Comparable > Class Template Reference
+
+
+ +

#include <SquashEqualSiblings.hpp>

+ + + + + +

+Public Member Functions

void Run (Graph &graph, InputSlot &connection) const
 Run for every connection between a base Layer (any) and a child ComparableLayer. More...
 
+ + + + + +

+Protected Member Functions

 SquashEqualSiblingsImpl ()=default
 
 ~SquashEqualSiblingsImpl ()=default
 
+

Detailed Description

+

template<typename Comparable>
+class armnn::optimizations::SquashEqualSiblingsImpl< Comparable >

+ + +

Definition at line 17 of file SquashEqualSiblings.hpp.

+

Constructor & Destructor Documentation

+ +

◆ SquashEqualSiblingsImpl()

+ +
+
+ + + + + +
+ + + + + + + +
SquashEqualSiblingsImpl ()
+
+protecteddefault
+
+
+ +

◆ ~SquashEqualSiblingsImpl()

+ +
+
+ + + + + +
+ + + + + + + +
~SquashEqualSiblingsImpl ()
+
+protecteddefault
+
+
+

Member Function Documentation

+ +

◆ Run()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Run (Graphgraph,
InputSlotconnection 
) const
+
+inline
+
+ +

Run for every connection between a base Layer (any) and a child ComparableLayer.

+

For all siblings of the child layer that compare equal to it, bypasses and removes them. I.e., moves the connections in the outputs of the siblings to the outputs of the child layer, so the siblings are left unconnected (and later removed).

+ +

Definition at line 24 of file SquashEqualSiblings.hpp.

+ +

References Layer::BeginOutputSlots(), InputSlot::GetConnectedOutputSlot(), OutputSlot::GetConnections(), OutputSlot::GetNumConnections(), InputSlot::GetOwningLayer(), Layer::GetPriority(), armnn::IgnoreUnused(), SquashEqualSiblingsImpl< Comparable >::SquashEqualSiblingsImpl(), armnn::swap(), and SquashEqualSiblingsImpl< Comparable >::~SquashEqualSiblingsImpl().

+
25  {
26  IgnoreUnused(graph);
27  auto& child = connection.GetOwningLayer();
28 
29  if (!child.IsOutputUnconnected())
30  {
31  OutputSlot& baseOutput = *connection.GetConnectedOutputSlot();
32 
33  if (baseOutput.GetNumConnections() > 1)
34  {
35  auto& comparableChild = *boost::polymorphic_downcast<Comparable*>(&child);
36 
37  Layer* lowestPriorityChild = &child;
38  for (auto&& it : baseOutput.GetConnections())
39  {
40  Layer* sibling = &it->GetOwningLayer();
41  if ((sibling != lowestPriorityChild) && comparableChild.IsEqual(*sibling))
42  {
43  if (sibling->GetPriority() < lowestPriorityChild->GetPriority())
44  {
45  std::swap(sibling, lowestPriorityChild);
46  }
47  // Bypasses sibling. It will be removed as it's left unconnected.
48  auto siblingOut = sibling->BeginOutputSlots();
49  for (auto lowestPriorityChildOut = lowestPriorityChild->BeginOutputSlots();
50  lowestPriorityChildOut != lowestPriorityChild->EndOutputSlots(); ++lowestPriorityChildOut)
51  {
52  siblingOut->MoveAllConnections(*lowestPriorityChildOut);
53  ++siblingOut;
54  }
55  }
56  }
57  }
58  }
59  }
void swap(OriginsDescriptor &first, OriginsDescriptor &second)
+
void IgnoreUnused(Ts &&...)
+
+
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.1