ArmNN
 20.08
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 339 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph() [1/2]

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

Definition at line 343 of file Graph.hpp.

References Graph::InputLayersAccessor::m_Graph.

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

◆ LayerInGraph() [2/2]

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

Definition at line 356 of file Graph.hpp.

358  : LayerInGraph(graph, std::forward<Args>(args)...)
359  {
360  }
LayerInGraph(Graph &graph, Args &&... args)
Definition: Graph.hpp:343

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 361 of file Graph.hpp.

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

362  {
363  const size_t numErased = m_Graph->m_InputIds.erase(GetBindingId());
364  IgnoreUnused(numErased);
365  ARMNN_ASSERT(numErased == 1);
366  }
void IgnoreUnused(Ts &&...)
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14

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