From a983e4699082a0b1ef685bab7354f2ad9cd37a44 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 20 May 2020 16:12:19 +0100 Subject: Updating Doxygen documentation for 20.05 release. Change-Id: I4d624343ed5fd6ae269c3d53532903084508fd14 Signed-off-by: Colm Donelan --- 20.05/classarmnn_1_1_input_slot.xhtml | 479 ++++++++++++++++++++++++++++++++++ 1 file changed, 479 insertions(+) create mode 100644 20.05/classarmnn_1_1_input_slot.xhtml (limited to '20.05/classarmnn_1_1_input_slot.xhtml') diff --git a/20.05/classarmnn_1_1_input_slot.xhtml b/20.05/classarmnn_1_1_input_slot.xhtml new file mode 100644 index 0000000000..a7d4b89f72 --- /dev/null +++ b/20.05/classarmnn_1_1_input_slot.xhtml @@ -0,0 +1,479 @@ + + + + + + + + + + + + + +ArmNN: InputSlot Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
InputSlot Class Referencefinal
+
+
+ +

#include <Layer.hpp>

+
+Inheritance diagram for InputSlot:
+
+
+ + +IInputSlot + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 InputSlot (Layer &owner, unsigned int slotIndex)
 
 ~InputSlot ()
 
LayerGetOwningLayer () const
 
unsigned int GetSlotIndex () const
 
const OutputSlotGetConnectedOutputSlot () const
 
OutputSlotGetConnectedOutputSlot ()
 
void SetConnection (OutputSlot *source)
 Links the slot to an output slot or breaks an existing link if passing nullptr. More...
 
void Insert (Layer &layer)
 
const IOutputSlotGetConnection () const override
 
IOutputSlotGetConnection () override
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from IInputSlot
 ~IInputSlot ()
 Not user deletable. More...
 
+

Detailed Description

+
+

Definition at line 41 of file Layer.hpp.

+

Constructor & Destructor Documentation

+ +

◆ InputSlot()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
InputSlot (Layerowner,
unsigned int slotIndex 
)
+
+inlineexplicit
+
+ +

Definition at line 44 of file Layer.hpp.

+ +

References InputSlot::~InputSlot().

+
45  : m_OwningLayer(owner)
46  , m_Connection(nullptr)
47  , m_SlotIndex(slotIndex)
48  {}
+
+
+ +

◆ ~InputSlot()

+ +
+
+ + + + + +
+ + + + + + + +
~InputSlot ()
+
+inline
+
+ +

Definition at line 179 of file Layer.hpp.

+ +

Referenced by InputSlot::InputSlot().

+
180 {
181  if (m_Connection != nullptr)
182  {
183  try
184  {
185  // Coverity fix: Disconnect() may throw uncaught exceptions.
186  m_Connection->Disconnect(*this);
187  }
188  catch (const std::exception& e)
189  {
190  // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
191  // exception of type std::length_error.
192  // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
193  std::cerr << "WARNING: An error has occurred when disconnecting an input slot: "
194  << e.what() << std::endl;
195  }
196  }
197 }
void Disconnect(InputSlot &slot)
Definition: Layer.cpp:87
+
+
+
+

Member Function Documentation

+ +

◆ GetConnectedOutputSlot() [1/2]

+ + + +

◆ GetConnectedOutputSlot() [2/2]

+ +
+
+ + + + + +
+ + + + + + + +
OutputSlot* GetConnectedOutputSlot ()
+
+inline
+
+ +

Definition at line 56 of file Layer.hpp.

+
56 { return m_Connection; }
+
+
+ +

◆ GetConnection() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
const IOutputSlot * GetConnection () const
+
+inlineoverridevirtual
+
+ +

Implements IInputSlot.

+ +

Definition at line 199 of file Layer.hpp.

+ +

References InputSlot::GetConnectedOutputSlot().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), OutputSlot::DisconnectAll(), Layer::GetDataType(), OutputSlot::GetNumConnections(), IWorkloadFactory::IsLayerSupported(), OutputSlot::MoveAllConnections(), OutputSlot::operator==(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), InputSlot::SetConnection(), Graph::SubstituteSubgraph(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), OutputLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().

+
199 { return GetConnectedOutputSlot(); }
const OutputSlot * GetConnectedOutputSlot() const
Definition: Layer.hpp:55
+
+
+
+ +

◆ GetConnection() [2/2]

+ +
+
+ + + + + +
+ + + + + + + +
IOutputSlot * GetConnection ()
+
+inlineoverridevirtual
+
+ +

Implements IInputSlot.

+ +

Definition at line 200 of file Layer.hpp.

+ +

References InputSlot::GetConnectedOutputSlot().

+
200 { return GetConnectedOutputSlot(); }
const OutputSlot * GetConnectedOutputSlot() const
Definition: Layer.hpp:55
+
+
+
+ +

◆ GetOwningLayer()

+ + + +

◆ GetSlotIndex()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int GetSlotIndex () const
+
+inline
+
+ +

Definition at line 53 of file Layer.hpp.

+ +

Referenced by Graph::AddCompatibilityLayers().

+
53 { return m_SlotIndex; }
+
+
+ +

◆ Insert()

+ +
+
+ + + + + + + + +
void Insert (Layerlayer)
+
+ +

Definition at line 20 of file Layer.cpp.

+ +

References ARMNN_ASSERT, OutputSlot::Connect(), InputSlot::GetConnectedOutputSlot(), Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetNumOutputSlots(), Layer::GetOutputHandler(), Layer::GetOutputSlot(), OutputSlot::SetEdgeStrategy(), OutputHandler::SetTensorInfo(), and armnn::Undefined.

+ +

Referenced by Graph::InsertNewLayer(), and InputSlot::SetConnection().

+
21 {
22  ARMNN_ASSERT(layer.GetNumOutputSlots() == 1);
23 
24  OutputSlot* const prevSlot = GetConnectedOutputSlot();
25 
26  if (prevSlot != nullptr)
27  {
28  // Disconnects parent from this.
29  prevSlot->Disconnect(*this);
30 
31  // Connects inserted layer to parent.
32  ARMNN_ASSERT(layer.GetNumInputSlots() == 1);
33  int idx = prevSlot->Connect(layer.GetInputSlot(0));
34  prevSlot->SetEdgeStrategy(boost::numeric_cast<unsigned int>(idx), EdgeStrategy::Undefined);
35 
36  // Sets tensor info for inserted layer.
37  const TensorInfo& tensorInfo = prevSlot->GetTensorInfo();
38  layer.GetOutputHandler().SetTensorInfo(tensorInfo);
39  }
40 
41  // Connects inserted layer to this.
42  layer.GetOutputSlot(0).Connect(*this);
43  layer.GetOutputSlot(0).SetEdgeStrategy(0, EdgeStrategy::Undefined);
44 }
+
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
const OutputSlot * GetConnectedOutputSlot() const
Definition: Layer.hpp:55
+
+
+
+ +

◆ SetConnection()

+ +
+
+ + + + + +
+ + + + + + + + +
void SetConnection (OutputSlotsource)
+
+inline
+
+ +

Links the slot to an output slot or breaks an existing link if passing nullptr.

+ +

Definition at line 59 of file Layer.hpp.

+ +

References InputSlot::GetConnection(), and InputSlot::Insert().

+ +

Referenced by OutputSlot::Connect(), and OutputSlot::Disconnect().

+
60  {
61  if (m_Connection != nullptr && source != nullptr)
62  {
63  throw InvalidArgumentException("Tried to connect an output slot to an input slot, "
64  "but the latter already has a connection");
65  }
66  m_Connection = source;
67  }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1