ONE - On-device Neural Engine
Loading...
Searching...
No Matches
locoex::CircleNode Struct Referenceabstract

#include <CircleNodeDecl.h>

Collaboration diagram for locoex::CircleNode:

Public Member Functions

virtual ~CircleNode ()=default
 
const loco::Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
virtual CircleOpcode opcode (void) const =0
 
template<typename T >
accept (CircleNodeVisitorBase< T > *) const
 
template<typename T >
accept (CircleNodeMutableVisitorBase< T > *)
 
- Public Member Functions inherited from loco::Node
 Node ()=default
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual ~Node ()
 
Graphgraph (void)
 
const Graphgraph (void) const
 
virtual uint32_t opnum (void) const =0
 
virtual uint32_t arity (void) const =0
 Return the number of arguments.
 
virtual Nodearg (uint32_t N) const =0
 Access N-th argument node.
 
virtual void drop (void)=0
 Drop all the reference of arguments.
 
- Public Member Functions inherited from loco::AnnotatedItem< NodeAnnotation >
 AnnotatedItem ()=default
 
virtual ~AnnotatedItem ()=default
 
const T * annot (void) const
 Retrieve a stored annotation of type T.
 
void annot (std::unique_ptr< T > &&p)
 Attach or remove a new annotation of type T.
 

Detailed Description

Definition at line 29 of file CircleNodeDecl.h.

Constructor & Destructor Documentation

◆ ~CircleNode()

virtual locoex::CircleNode::~CircleNode ( )
virtualdefault

Member Function Documentation

◆ accept() [1/2]

template<typename T >
T locoex::CircleNode::accept ( CircleNodeMutableVisitorBase< T > *  v)

Definition at line 48 of file CircleNodeImpl.h.

49{
50 switch (this->opcode())
51 {
52#define CIRCLE_NODE(OPCODE, CLASS) \
53 \
54 case CircleOpcode::OPCODE: \
55 return v->visit(dynamic_cast<CLASS *>(this));
56
57#include "CircleNodes.lst"
58#undef CIRCLE_NODE
59
60 default:
61 break;
62 }
63
64 INTERNAL_EXN("CircleNode::accept(CircleNodeMutableVisitorBase) not handled");
65}
#define INTERNAL_EXN(msg)
@ brief throw internal exception with message
Definition InternalExn.h:25
virtual CircleOpcode opcode(void) const =0

References INTERNAL_EXN, and opcode().

◆ accept() [2/2]

template<typename T >
T locoex::CircleNode::accept ( CircleNodeVisitorBase< T > *  v) const

Definition at line 29 of file CircleNodeImpl.h.

30{
31 switch (this->opcode())
32 {
33#define CIRCLE_NODE(OPCODE, CLASS) \
34 \
35 case CircleOpcode::OPCODE: \
36 return v->visit(dynamic_cast<const CLASS *>(this));
37
38#include "CircleNodes.lst"
39#undef CIRCLE_NODE
40
41 default:
42 break;
43 }
44
45 INTERNAL_EXN("CircleNode::accept(CircleNodeVisitorBase) not handled");
46}

References INTERNAL_EXN, and opcode().

◆ dialect()

const loco::Dialect * locoex::CircleNode::dialect ( void  ) const
finalvirtual

Return "Dialect" identifier that this node belongs to.

dialect() SHOULD return a valid pointer.

Implements loco::Node.

Definition at line 24 of file CircleNode.cpp.

24{ return CircleDialect::get(); }
static loco::Dialect * get(void)

References locoex::CircleDialect::get().

◆ opcode()

virtual CircleOpcode locoex::CircleNode::opcode ( void  ) const
pure virtual

The documentation for this struct was generated from the following files: