ArmNN
 23.05
Graph::LayerInGraph< OutputLayer > Class Referencefinal

Outputs add/remove their binding id to m_OutputIds in the graph. More...

#include <Graph.hpp>

Inherits Graph::LayerInGraphBase< LayerT >.

Public Member Functions

template<typename... Args>
 LayerInGraph (Graph &graph, Args &&... args)
 
 ~LayerInGraph () override
 

Detailed Description

Outputs add/remove their binding id to m_OutputIds in the graph.

Definition at line 424 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph()

LayerInGraph ( Graph graph,
Args &&...  args 
)
inline

Definition at line 428 of file Graph.hpp.

429  : LayerInGraphBase<OutputLayer>(graph,
430  // Always add to the back of the outputs.
431  graph.end(),
432  std::forward<Args>(args)...)
433  {
434  const bool isNewId = m_Graph->m_OutputIds.emplace(GetBindingId()).second;
435  if (!isNewId)
436  {
437  throw InvalidArgumentException("A layer already exists with the specified id");
438  }
439  }

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 440 of file Graph.hpp.

441  {
442  const size_t numErased = m_Graph->m_OutputIds.erase(GetBindingId());
443  IgnoreUnused(numErased);
444  ARMNN_ASSERT(numErased == 1);
445  }

References ARMNN_ASSERT, and armnn::IgnoreUnused().


The documentation for this class was generated from the following file:
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14
ARMNN_ASSERT
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14