ONE - On-device Neural Engine
Loading...
Searching...
No Matches
coco::Step Class Referencefinal

A Step denotes the edge between Op and Instr. More...

#include <Step.h>

Public Member Functions

 Step (Instr *instr)
 
 ~Step ()
 
Opop (void) const
 
void op (Op *o)
 
Instrinstr (void) const
 

Detailed Description

A Step denotes the edge between Op and Instr.

Definition at line 29 of file Step.h.

Constructor & Destructor Documentation

◆ Step()

coco::Step::Step ( Instr instr)
inlineexplicit

Definition at line 32 of file Step.h.

32 : _instr{instr}
33 {
34 // DO NOTHING
35 }
Instr * instr(void) const
Definition Step.h:45

◆ ~Step()

coco::Step::~Step ( )
inline

Definition at line 38 of file Step.h.

38{ op(nullptr); }
Op * op(void) const
Definition Step.h:41

References op().

Member Function Documentation

◆ instr()

Instr * coco::Step::instr ( void  ) const
inline

Definition at line 45 of file Step.h.

45{ return _instr; }

Referenced by coco::Op::parent().

◆ op() [1/2]

void coco::Step::op ( Op o)

Definition at line 25 of file Step.cpp.

26{
27 if (_op != nullptr)
28 {
29 // Unlink step from _op
30 assert(_op->_step == this);
31 _op->_step = nullptr;
32
33 // Reset _op
34 _op = nullptr;
35 }
36
37 assert(_op == nullptr);
38
39 if (o)
40 {
41 // Update _op
42 _op = o;
43
44 // Link step to _op
45 assert(_op->_step == nullptr);
46 _op->_step = this;
47 }
48
49 assert(_op == o);
50}

◆ op() [2/2]

Op * coco::Step::op ( void  ) const
inline

Definition at line 41 of file Step.h.

41{ return _op; }

Referenced by coco::Eval::op(), coco::Eval::op(), and ~Step().


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