17#ifndef __LOCOEX_COPCALL_H__
18#define __LOCOEX_COPCALL_H__
43 void op(
const std::string &
op) { _op.assign(
op); }
44 const std::string &
op() {
return _op; }
47 const std::string &
name() {
return _name; }
53 void attr(
const std::string &attr_name, std::unique_ptr<COpAttrData> &&attr_data);
56 template <COpAttrType AT>
66 std::map<std::string, std::unique_ptr<COpAttrData>> _attrs;
Logical unit of computation.
Class to calls custom operation.
const std::string & name()
loco::Node * input(uint32_t nth) const
std::vector< std::string > attr_names() const
get all the names of attr
void op(const std::string &op)
void name(const std::string &name)
void input(uint32_t nth, loco::Node *node)
void attr(const std::string &attr_name, std::unique_ptr< COpAttrData > &&attr_data)
Store [attr_name, attr_data].
Nodes with the variadic inputs.
uint32_t arity(void) const final
Return the number of arguments.
loco::Use * at(uint32_t n) const