ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
coco::Part Class Referencefinal

A Part represents the edge between a child Op and its parent Op. More...

#include <Part.h>

Public Member Functions

 Part (Op *parent)
 
 ~Part ()
 
Opchild (void) const
 
void child (Op *c)
 
Opparent (void) const
 

Detailed Description

A Part represents the edge between a child Op and its parent Op.

Definition at line 28 of file Part.h.

Constructor & Destructor Documentation

◆ Part()

coco::Part::Part ( Op parent)
inline

Definition at line 31 of file Part.h.

31 : _parent{parent}
32 {
33 // DO NOTHING
34 }
Op * parent(void) const
Definition Part.h:44

◆ ~Part()

coco::Part::~Part ( )
inline

Definition at line 37 of file Part.h.

37{ child(nullptr); }
Op * child(void) const
Definition Part.h:40

References child().

Member Function Documentation

◆ child() [1/2]

void coco::Part::child ( Op c)

Definition at line 25 of file Part.cpp.

26{
27 if (_child != nullptr)
28 {
29 assert(_child->_part == this);
30 _child->_part = nullptr;
31 _child = nullptr;
32 }
33
34 assert(_child == nullptr);
35
36 if (c != nullptr)
37 {
38 assert(c->_part == nullptr);
39 assert(c->_step == nullptr);
40 _child = c;
41 _child->_part = this;
42 }
43}

◆ child() [2/2]

Op * coco::Part::child ( void  ) const
inline

◆ parent()

Op * coco::Part::parent ( void  ) const
inline

Definition at line 44 of file Part.h.

44{ return _parent; }

Referenced by coco::Op::parent(), and coco::Op::up().


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