ArmNN
 20.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 365 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph()

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

Definition at line 369 of file Graph.hpp.

References Graph::InputLayersAccessor::m_Graph.

370  : LayerInGraphBase<OutputLayer>(graph,
371  // Always add to the back of the outputs.
372  graph.end(),
373  std::forward<Args>(args)...)
374  {
375  const bool isNewId = m_Graph->m_OutputIds.emplace(GetBindingId()).second;
376  if (!isNewId)
377  {
378  throw InvalidArgumentException("A layer already exists with the specified id");
379  }
380  }

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 381 of file Graph.hpp.

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

382  {
383  const size_t numErased = m_Graph->m_OutputIds.erase(GetBindingId());
384  IgnoreUnused(numErased);
385  BOOST_ASSERT(numErased == 1);
386  }
void IgnoreUnused(Ts &&...)

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