ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
locoex::FixedArityNode< N, Base > Class Template Reference

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

#include <NodeMixins.h>

Collaboration diagram for locoex::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 locoex::FixedArityNode< N, Base >

Nodes with the fixed number of inputs.

TODO Deprecated this class, and use loco::FixedArity instead

Definition at line 30 of file NodeMixins.h.

Constructor & Destructor Documentation

◆ FixedArityNode()

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

Definition at line 33 of file NodeMixins.h.

34 {
35 for (uint32_t n = 0; n < N; ++n)
36 {
37 _args[n] = std::unique_ptr<loco::Use>(new loco::Use{this});
38 }
39 }
The edge between a node definition and its user.
Definition Use.h:37

◆ ~FixedArityNode()

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

Member Function Documentation

◆ arg()

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

Definition at line 46 of file NodeMixins.h.

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

◆ arity()

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

Definition at line 44 of file NodeMixins.h.

44{ return N; }

◆ at()

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

Definition at line 58 of file NodeMixins.h.

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

◆ drop()

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

Definition at line 48 of file NodeMixins.h.

49 {
50 for (uint32_t n = 0; n < N; ++n)
51 {
52 _args.at(n)->node(nullptr);
53 }
54 }

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