ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CircleIf Class Referencefinal

IF in Circle. More...

#include <CircleIf.h>

Collaboration diagram for luci::CircleIf:

Public Member Functions

 CircleIf (uint32_t arity, uint32_t out)
 
uint32_t input_count (void) const
 
uint32_t output_count (void) const
 
Nodecond (void) const
 
void cond (Node *node)
 
Nodeinput (uint32_t index) const
 
void input (uint32_t index, Node *node)
 
int32_t then_branch (void) const
 
void then_branch (int32_t then_branch)
 
int32_t else_branch (void) const
 
void else_branch (int32_t else_branch)
 
loco::Graphthen_graph (void) const
 
void then_graph (loco::Graph *then_graph)
 
loco::Graphelse_graph (void) const
 
void else_graph (loco::Graph *else_graph)
 
- Public Member Functions inherited from luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >
 VariadicArityNode (uint32_t arity)
 
virtual ~VariadicArityNode ()=default
 
uint32_t arity (void) const final
 
loco::Nodearg (uint32_t n) const final
 
void drop (void) final
 
- Public Member Functions inherited from luci::CircleNodeImpl< CircleOpcode::IF >
virtual ~CircleNodeImpl ()=default
 
uint32_t opnum (void) const final
 
CircleOpcode opcode (void) const final
 
- Public Member Functions inherited from luci::CircleNode
virtual ~CircleNode ()=default
 
const loco::Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
template<typename T >
accept (CircleNodeVisitorBase< T > *) const
 
template<typename T >
accept (CircleNodeMutableVisitorBase< T > *)
 
NodeName name (void) const
 
void name (const NodeName &name)
 
CircleQuantParamquantparam (void) const
 
void quantparam (std::unique_ptr< CircleQuantParam > &&quantparam)
 
SparsityParamsparsityparam (void) const
 
void sparsityparam (std::unique_ptr< SparsityParam > &&sparsityparam)
 
ShapeStatus shape_status (void) const
 
void shape_status (ShapeStatus ss)
 
int32_t op_version (void) const
 
void op_version (int32_t op_version)
 
- Public Member Functions inherited from loco::Node
 Node ()=default
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual ~Node ()
 
Graphgraph (void)
 
const Graphgraph (void) const
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >
loco::Useat (uint32_t n) const
 

Detailed Description

IF in Circle.

Definition at line 33 of file CircleIf.h.

Constructor & Destructor Documentation

◆ CircleIf()

luci::CircleIf::CircleIf ( uint32_t  arity,
uint32_t  out 
)
inline

Definition at line 36 of file CircleIf.h.

37 : VariadicArityNode<CircleNodeImpl<CircleOpcode::IF>>(arity + 1), _output_count(out)
38 {
39 assert(arity > 0);
40 assert(out > 0);
41 }
uint32_t arity(void) const final
Return the number of arguments.

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >::arity().

Member Function Documentation

◆ cond() [1/2]

void luci::CircleIf::cond ( Node node)
inline

Definition at line 49 of file CircleIf.h.

49{ at(0)->node(node); }
Node * node(void) const
Definition Use.h:58

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >::at(), and loco::Use::node().

◆ cond() [2/2]

Node * luci::CircleIf::cond ( void  ) const
inline

Definition at line 48 of file CircleIf.h.

48{ return at(0)->node(); }

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >::at(), and loco::Use::node().

◆ else_branch() [1/2]

void luci::CircleIf::else_branch ( int32_t  else_branch)
inline

Definition at line 59 of file CircleIf.h.

59{ _else_branch = else_branch; }
int32_t else_branch(void) const
Definition CircleIf.h:58

References else_branch().

Referenced by else_branch().

◆ else_branch() [2/2]

int32_t luci::CircleIf::else_branch ( void  ) const
inline

Definition at line 58 of file CircleIf.h.

58{ return _else_branch; }

Referenced by luci::BuiltinOptionsExtractor::visit().

◆ else_graph() [1/2]

void luci::CircleIf::else_graph ( loco::Graph else_graph)
inline

Definition at line 66 of file CircleIf.h.

66{ _else_graph = else_graph; }
loco::Graph * else_graph(void) const
Definition CircleIf.h:65

References else_graph().

Referenced by else_graph().

◆ else_graph() [2/2]

loco::Graph * luci::CircleIf::else_graph ( void  ) const
inline

Definition at line 65 of file CircleIf.h.

65{ return _else_graph; }

◆ input() [1/2]

Node * luci::CircleIf::input ( uint32_t  index) const
inline

Definition at line 51 of file CircleIf.h.

51{ return at(index + 1)->node(); }

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >::at(), and loco::Use::node().

◆ input() [2/2]

void luci::CircleIf::input ( uint32_t  index,
Node node 
)
inline

Definition at line 52 of file CircleIf.h.

52{ at(index + 1)->node(node); }

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::IF > >::at(), and loco::Use::node().

◆ input_count()

uint32_t luci::CircleIf::input_count ( void  ) const
inline

◆ output_count()

uint32_t luci::CircleIf::output_count ( void  ) const
inline

Definition at line 45 of file CircleIf.h.

45{ return _output_count; }

Referenced by luci::CloneNodeLet< CN::GHIJ >::visit().

◆ then_branch() [1/2]

void luci::CircleIf::then_branch ( int32_t  then_branch)
inline

Definition at line 56 of file CircleIf.h.

56{ _then_branch = then_branch; }
int32_t then_branch(void) const
Definition CircleIf.h:55

References then_branch().

Referenced by then_branch().

◆ then_branch() [2/2]

int32_t luci::CircleIf::then_branch ( void  ) const
inline

Definition at line 55 of file CircleIf.h.

55{ return _then_branch; }

Referenced by luci::BuiltinOptionsExtractor::visit().

◆ then_graph() [1/2]

void luci::CircleIf::then_graph ( loco::Graph then_graph)
inline

Definition at line 63 of file CircleIf.h.

63{ _then_graph = then_graph; }
loco::Graph * then_graph(void) const
Definition CircleIf.h:62

References then_graph().

Referenced by then_graph().

◆ then_graph() [2/2]

loco::Graph * luci::CircleIf::then_graph ( void  ) const
inline

Definition at line 62 of file CircleIf.h.

62{ return _then_graph; }

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