ONE - On-device Neural Engine
Loading...
Searching...
No Matches
moco::FixedArityNode< N, Base > Class Template Reference

Nodes with the fixed number of inputs. More...

#include <TFNodeDecl.h>

Collaboration diagram for moco::FixedArityNode< N, Base >:

Public Member Functions

 FixedArityNode ()
 
virtual ~FixedArityNode ()=default
 
unsigned arity (void) const final
 
loco::Nodearg (uint32_t n) const final
 
void drop (void) final
 

Protected Member Functions

loco::Useat (unsigned n) const
 

Detailed Description

template<unsigned N, typename Base>
class moco::FixedArityNode< N, Base >

Nodes with the fixed number of inputs.

Definition at line 68 of file TFNodeDecl.h.

Constructor & Destructor Documentation

◆ FixedArityNode()

template<unsigned N, typename Base >
moco::FixedArityNode< N, Base >::FixedArityNode ( )
inline

Definition at line 71 of file TFNodeDecl.h.

72 {
73 for (uint32_t n = 0; n < N; ++n)
74 {
75 _args[n] = std::unique_ptr<loco::Use>{new loco::Use{this}};
76 }
77 }
The edge between a node definition and its user.
Definition Use.h:37

◆ ~FixedArityNode()

template<unsigned N, typename Base >
virtual moco::FixedArityNode< N, Base >::~FixedArityNode ( )
virtualdefault

Member Function Documentation

◆ arg()

template<unsigned N, typename Base >
loco::Node * moco::FixedArityNode< N, Base >::arg ( uint32_t  n) const
inlinefinal

Definition at line 84 of file TFNodeDecl.h.

84{ return _args.at(n)->node(); }

◆ arity()

template<unsigned N, typename Base >
unsigned moco::FixedArityNode< N, Base >::arity ( void  ) const
inlinefinal

Definition at line 82 of file TFNodeDecl.h.

82{ return N; }

◆ at()

template<unsigned N, typename Base >
loco::Use * moco::FixedArityNode< N, Base >::at ( unsigned  n) const
inlineprotected

Definition at line 96 of file TFNodeDecl.h.

96{ return _args.at(n).get(); }

◆ drop()

template<unsigned N, typename Base >
void moco::FixedArityNode< N, Base >::drop ( void  )
inlinefinal

Definition at line 86 of file TFNodeDecl.h.

87 {
88 for (uint32_t n = 0; n < N; ++n)
89 {
90 _args.at(n)->node(nullptr);
91 }
92 }

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