ArmNN
 24.02
Graph::LayerInGraph< InputLayer > Class Referencefinal

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

#include <Graph.hpp>

Inheritance diagram for Graph::LayerInGraph< InputLayer >:
[legend]
Collaboration diagram for Graph::LayerInGraph< InputLayer >:
[legend]

Public Member Functions

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

Detailed Description

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

Definition at line 392 of file Graph.hpp.

Constructor & Destructor Documentation

◆ LayerInGraph() [1/2]

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

Definition at line 396 of file Graph.hpp.

397  : LayerInGraphBase<InputLayer>(graph,
398  // Always add to the back of the inputs.
399  std::next(graph.begin(), IteratorDifference(graph.GetNumInputs())),
400  std::forward<Args>(args)...)
401  {
402  const bool isNewId = m_Graph->m_InputIds.emplace(GetBindingId()).second;
403  if (!isNewId)
404  {
405  throw InvalidArgumentException("A layer already exists with the specified id");
406  }
407  }

◆ LayerInGraph() [2/2]

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

Definition at line 409 of file Graph.hpp.

411  : LayerInGraph(graph, std::forward<Args>(args)...)
412  {
413  }

◆ ~LayerInGraph()

~LayerInGraph ( )
inlineoverride

Definition at line 414 of file Graph.hpp.

415  {
416  const size_t numErased = m_Graph->m_InputIds.erase(GetBindingId());
417  IgnoreUnused(numErased);
418  ARMNN_ASSERT(numErased == 1);
419  }

References ARMNN_ASSERT, and armnn::IgnoreUnused().


The documentation for this class was generated from the following file:
ARMNN_ASSERT
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
armnn::Graph::IteratorDifference
Iterator::difference_type IteratorDifference
Definition: Graph.hpp:54
armnn::Graph::LayerInGraph< InputLayer >::LayerInGraph
LayerInGraph(Graph &graph, Args &&... args)
Definition: Graph.hpp:396
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14