17#ifndef __LOCOEX_VARIADICARITYNODES_OP_H__
18#define __LOCOEX_VARIADICARITYNODES_OP_H__
38 for (uint32_t n = 0; n <
arity; ++n)
40 _args.emplace_back(std::move(std::unique_ptr<loco::Use>{
new loco::Use{
this}}));
47 uint32_t
arity(
void)
const final {
return _args.size(); }
51 assert(n < _args.size());
52 return _args.at(n)->node();
57 for (uint32_t n = 0; n < _args.size(); ++n)
59 _args.at(n)->node(
nullptr);
67 assert(n < _args.size());
68 return _args.at(n).get();
72 std::vector<std::unique_ptr<loco::Use>> _args;
Logical unit of computation.
The edge between a node definition and its user.
Nodes with the variadic inputs.
loco::Node * arg(uint32_t n) const final
virtual ~VariadicArityNode()=default
uint32_t arity(void) const final
VariadicArityNode(uint32_t arity)
loco::Use * at(uint32_t n) const