ONE - On-device Neural Engine
Loading...
Searching...
No Matches
coco::DLinkedList< Child, Parent > Struct Template Reference

#include <DLinkedList.h>

Data Structures

class  Head
 
class  Node
 

Public Member Functions

void joined (Module *, Block *curr_blk)
 
void leaving (Module *, Block *curr_blk)
 
BlockListhead (Module *m)
 
void joined (Block *, Instr *curr_ins)
 
void leaving (Block *, Instr *curr_ins)
 
InstrListhead (Block *b)
 

Static Public Member Functions

static void joined (Parent *, Child *)
 A hook for Child-Join event.
 
static void leaving (Parent *, Child *)
 A hook for Child-Leave event.
 
static Headhead (Parent *)
 

Detailed Description

template<typename Child, typename Parent>
struct coco::DLinkedList< Child, Parent >

Definition at line 27 of file DLinkedList.h.

Member Function Documentation

◆ head() [1/3]

Definition at line 54 of file Instr.cpp.

54{ return b->instr(); }

◆ head() [2/3]

Definition at line 54 of file Block.cpp.

54{ return m->block(); }

References m.

◆ head() [3/3]

template<typename Child , typename Parent >
static Head * coco::DLinkedList< Child, Parent >::head ( Parent *  )
static

◆ joined() [1/3]

void coco::DLinkedList< Instr, Block >::joined ( Block ,
Instr curr_ins 
)

Definition at line 25 of file Instr.cpp.

26{
27 assert(!curr_ins->index().valid());
28 uint32_t value = 0;
29
30 if (auto prev_ins = curr_ins->prev())
31 {
32 value = prev_ins->index().value() + 1;
33 }
34
35 for (auto ins = curr_ins; ins; ins = ins->next())
36 {
37 ins->_index.set(value++);
38 }
39}

References coco::Instr::index(), coco::DLinkedList< Child, Parent >::Node::next(), coco::DLinkedList< Child, Parent >::Node::prev(), and coco::InstrIndex::valid().

◆ joined() [2/3]

void coco::DLinkedList< Block, Module >::joined ( Module ,
Block curr_blk 
)

Definition at line 25 of file Block.cpp.

26{
27 assert(!curr_blk->index().valid());
28 uint32_t value = 0;
29
30 if (auto prev_blk = curr_blk->prev())
31 {
32 value = prev_blk->index().value() + 1;
33 }
34
35 for (auto blk = curr_blk; blk; blk = blk->next())
36 {
37 blk->_index.set(value++);
38 }
39}

References coco::Block::index(), coco::DLinkedList< Child, Parent >::Node::next(), coco::DLinkedList< Child, Parent >::Node::prev(), and coco::BlockIndex::valid().

◆ joined() [3/3]

template<typename Child , typename Parent >
static void coco::DLinkedList< Child, Parent >::joined ( Parent *  ,
Child *   
)
static

A hook for Child-Join event.

Referenced by coco::DLinkedList< Child, Parent >::Head::enlist().

◆ leaving() [1/3]

void coco::DLinkedList< Instr, Block >::leaving ( Block ,
Instr curr_ins 
)

Definition at line 41 of file Instr.cpp.

42{
43 assert(curr_ins->index().valid());
44 uint32_t value = curr_ins->index().value();
45
46 for (auto ins = curr_ins->next(); ins; ins = ins->next())
47 {
48 ins->_index.set(value++);
49 }
50
51 curr_ins->_index.reset();
52}

References coco::Instr::index(), coco::DLinkedList< Child, Parent >::Node::next(), coco::InstrIndex::reset(), coco::InstrIndex::valid(), and coco::InstrIndex::value().

◆ leaving() [2/3]

void coco::DLinkedList< Block, Module >::leaving ( Module ,
Block curr_blk 
)

Definition at line 41 of file Block.cpp.

42{
43 assert(curr_blk->index().valid());
44 uint32_t value = curr_blk->index().value();
45
46 for (auto blk = curr_blk->next(); blk; blk = blk->next())
47 {
48 blk->_index.set(value++);
49 }
50
51 curr_blk->_index.reset();
52}

References coco::Block::index(), coco::DLinkedList< Child, Parent >::Node::next(), coco::BlockIndex::reset(), coco::BlockIndex::valid(), and coco::BlockIndex::value().

◆ leaving() [3/3]

template<typename Child , typename Parent >
static void coco::DLinkedList< Child, Parent >::leaving ( Parent *  ,
Child *   
)
static

A hook for Child-Leave event.

Referenced by coco::DLinkedList< Child, Parent >::Head::delist().


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