ONE - On-device Neural Engine
Loading...
Searching...
No Matches
enco::HostBlockCompiler Class Reference

#include <Host.h>

Public Member Functions

 HostBlockCompiler (const enco::MemoryContext &mem)
 
std::unique_ptr< pp::MultiLineTextcompile (const coco::Block *blk) const
 

Detailed Description

Definition at line 31 of file Host.h.

Constructor & Destructor Documentation

◆ HostBlockCompiler()

enco::HostBlockCompiler::HostBlockCompiler ( const enco::MemoryContext mem)
inline

Definition at line 34 of file Host.h.

34 : _mem(mem)
35 {
36 // DO NOTHING
37 }

Member Function Documentation

◆ compile()

std::unique_ptr< pp::MultiLineText > enco::HostBlockCompiler::compile ( const coco::Block blk) const

Definition at line 291 of file Host.cpp.

292{
293 InstrPrinter prn{_mem};
294
295 auto res = std::make_unique<pp::LinearDocument>();
296
297 for (auto ins = blk->instr()->head(); ins; ins = ins->next())
298 {
299 res->append(ins->accept(prn));
300 }
301
302 return res;
303}
InstrList * instr(void)
Definition Block.h:65
Child * head(void) const
Definition DLinkedList.h:48

References coco::DLinkedList< Child, Parent >::Head::head(), and coco::Block::instr().


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