ArmNN
 22.02
Graph::LayerInGraph< OutputLayer > Class Template 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

template<>
class armnn::Graph::LayerInGraph< OutputLayer >

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

Definition at line 388 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph()

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

Definition at line 392 of file Graph.hpp.

References Graph::InputLayersAccessor::m_Graph.

393  : LayerInGraphBase<OutputLayer>(graph,
394  // Always add to the back of the outputs.
395  graph.end(),
396  std::forward<Args>(args)...)
397  {
398  const bool isNewId = m_Graph->m_OutputIds.emplace(GetBindingId()).second;
399  if (!isNewId)
400  {
401  throw InvalidArgumentException("A layer already exists with the specified id");
402  }
403  }

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 404 of file Graph.hpp.

References ARMNN_ASSERT, armnn::IgnoreUnused(), and Graph::InputLayersAccessor::m_Graph.

405  {
406  const size_t numErased = m_Graph->m_OutputIds.erase(GetBindingId());
407  IgnoreUnused(numErased);
408  ARMNN_ASSERT(numErased == 1);
409  }
void IgnoreUnused(Ts &&...)
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14

The documentation for this class was generated from the following file: