ArmNN
 20.02
Graph::LayerInGraph< InputLayer > Class Template Referencefinal

Inputs add/remove their binding id to m_InputIds in the graph. More...

#include <Graph.hpp>

Inherits Graph::LayerInGraphBase< LayerT >.

Public Member Functions

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

Detailed Description

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

Inputs add/remove their binding id to m_InputIds in the graph.

Definition at line 333 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph() [1/2]

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

Definition at line 337 of file Graph.hpp.

References Graph::InputLayersAccessor::m_Graph.

338  : LayerInGraphBase<InputLayer>(graph,
339  // Always add to the back of the inputs.
340  std::next(graph.begin(), IteratorDifference(graph.GetNumInputs())),
341  std::forward<Args>(args)...)
342  {
343  const bool isNewId = m_Graph->m_InputIds.emplace(GetBindingId()).second;
344  if (!isNewId)
345  {
346  throw InvalidArgumentException("A layer already exists with the specified id");
347  }
348  }
Iterator::difference_type IteratorDifference
Definition: Graph.hpp:51

◆ LayerInGraph() [2/2]

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

Definition at line 350 of file Graph.hpp.

352  : LayerInGraph(graph, std::forward<Args>(args)...)
353  {
354  }
LayerInGraph(Graph &graph, Args &&... args)
Definition: Graph.hpp:337

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 355 of file Graph.hpp.

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

356  {
357  const size_t numErased = m_Graph->m_InputIds.erase(GetBindingId());
358  IgnoreUnused(numErased);
359  BOOST_ASSERT(numErased == 1);
360  }
void IgnoreUnused(Ts &&...)

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