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

A unit of (grouped) instructions. More...

#include <Block.h>

Collaboration diagram for coco::Block:

Public Member Functions

 Block ()
 
 Block (const Block &)=delete
 
 Block (Block &&)=delete
 
 ~Block ()
 
InstrListinstr (void)
 
const InstrListinstr (void) const
 
const BlockIndexindex (void) const
 
- Public Member Functions inherited from coco::DLinkedList< Child, Parent >::Node
 Node ()
 
virtual ~Node ()
 
Parent * parent (void) const
 
Child * prev (void) const
 
Child * next (void) const
 
void insertBefore (Node *next)
 
void insertAfter (Node *prev)
 
void detach (void)
 
- Public Member Functions inherited from coco::Entity
virtual ~Entity ()=default
 
Modulemodule (void) const
 

Friends

void DLinkedList (Module *, Block *)
 
void DLinkedList (Module *, Block *)
 

Detailed Description

A unit of (grouped) instructions.

Block allows backend to manage a set of instructions as one unit, which is useful for H/W that has a restriction on code size

Definition at line 39 of file Block.h.

Constructor & Destructor Documentation

◆ Block() [1/3]

coco::Block::Block ( )
inline

Definition at line 46 of file Block.h.

46 : _instr{this}
47 {
48 // DO NOTHING
49 }

◆ Block() [2/3]

coco::Block::Block ( const Block )
delete

◆ Block() [3/3]

coco::Block::Block ( Block &&  )
delete

◆ ~Block()

coco::Block::~Block ( )
inline

Definition at line 56 of file Block.h.

57 {
58 if (parent())
59 {
60 detach();
61 }
62 }
Parent * parent(void) const

References coco::DLinkedList< Child, Parent >::Node::detach(), and coco::DLinkedList< Child, Parent >::Node::parent().

Member Function Documentation

◆ index()

const BlockIndex & coco::Block::index ( void  ) const
inline

Definition at line 69 of file Block.h.

69{ return _index; }

Referenced by dump(), coco::DLinkedList< Child, Parent >::joined(), and coco::DLinkedList< Child, Parent >::leaving().

◆ instr() [1/2]

◆ instr() [2/2]

const InstrList * coco::Block::instr ( void  ) const
inline

Definition at line 66 of file Block.h.

66{ return &_instr; }

Friends And Related Symbol Documentation

◆ DLinkedList [1/2]

void DLinkedList ( Module ,
Block  
)
friend

◆ DLinkedList [2/2]

void DLinkedList ( Module ,
Block  
)
friend

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