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

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