ONE - On-device Neural Engine
Loading...
Searching...
No Matches
locoex::VariadicArityNode< Base > Class Template Reference

Nodes with the variadic inputs. More...

#include <VariadicArityNode.h>

Collaboration diagram for locoex::VariadicArityNode< Base >:

Public Member Functions

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

Protected Member Functions

loco::Useat (uint32_t n) const
 

Detailed Description

template<typename Base>
class locoex::VariadicArityNode< Base >

Nodes with the variadic inputs.

Definition at line 33 of file VariadicArityNode.h.

Constructor & Destructor Documentation

◆ VariadicArityNode()

template<typename Base >
locoex::VariadicArityNode< Base >::VariadicArityNode ( uint32_t  arity)
inline

Definition at line 36 of file VariadicArityNode.h.

37 {
38 for (uint32_t n = 0; n < arity; ++n)
39 {
40 _args.emplace_back(std::move(std::unique_ptr<loco::Use>{new loco::Use{this}}));
41 }
42 };
The edge between a node definition and its user.
Definition Use.h:37
uint32_t arity(void) const final

References locoex::VariadicArityNode< Base >::arity().

◆ ~VariadicArityNode()

template<typename Base >
virtual locoex::VariadicArityNode< Base >::~VariadicArityNode ( )
virtualdefault

Member Function Documentation

◆ arg()

template<typename Base >
loco::Node * locoex::VariadicArityNode< Base >::arg ( uint32_t  n) const
inlinefinal

Definition at line 49 of file VariadicArityNode.h.

50 {
51 assert(n < _args.size());
52 return _args.at(n)->node();
53 }

◆ arity()

template<typename Base >
uint32_t locoex::VariadicArityNode< Base >::arity ( void  ) const
inlinefinal

Definition at line 47 of file VariadicArityNode.h.

47{ return _args.size(); }

Referenced by locoex::VariadicArityNode< Base >::VariadicArityNode().

◆ at()

template<typename Base >
loco::Use * locoex::VariadicArityNode< Base >::at ( uint32_t  n) const
inlineprotected

Definition at line 65 of file VariadicArityNode.h.

66 {
67 assert(n < _args.size());
68 return _args.at(n).get();
69 }

◆ drop()

template<typename Base >
void locoex::VariadicArityNode< Base >::drop ( void  )
inlinefinal

Definition at line 55 of file VariadicArityNode.h.

56 {
57 for (uint32_t n = 0; n < _args.size(); ++n)
58 {
59 _args.at(n)->node(nullptr);
60 }
61 }

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