ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::Module Class Referencefinal

Collection of 'loco::Graph's. More...

#include <Module.h>

Public Member Functions

 Module ()=default
 
 Module (const Module &)=delete
 
 Module (Module &&)=delete
 
 ~Module ()=default
 
size_t size (void) const
 
void add (std::unique_ptr< loco::Graph > &&g)
 
loco::Graphgraph (void) const
 provide main graph
 
loco::Graphgraph (size_t idx) const
 provide graph with an index
 
void ext_buffer (bool set)
 
bool ext_buffer (void) const
 
void source_table (const std::map< uint32_t, std::string > &table)
 
const std::map< uint32_t, std::string > & source_table (void) const
 

Detailed Description

Collection of 'loco::Graph's.

Definition at line 32 of file Module.h.

Constructor & Destructor Documentation

◆ Module() [1/3]

luci::Module::Module ( )
default

◆ Module() [2/3]

luci::Module::Module ( const Module )
delete

◆ Module() [3/3]

luci::Module::Module ( Module &&  )
delete

◆ ~Module()

luci::Module::~Module ( )
default

Member Function Documentation

◆ add()

void luci::Module::add ( std::unique_ptr< loco::Graph > &&  g)

Definition at line 24 of file Module.cpp.

25{
26 if (g.get() == nullptr)
27 throw std::invalid_argument("Module: Graph cannot be null");
28
29 _graphs.emplace_back(std::move(g));
30}

◆ ext_buffer() [1/2]

void luci::Module::ext_buffer ( bool  set)
inline

Definition at line 64 of file Module.h.

64{ _ext_buffer = set; }
void set(Dialect d)
Definition Knob.cpp:100

◆ ext_buffer() [2/2]

bool luci::Module::ext_buffer ( void  ) const
inline

Definition at line 65 of file Module.h.

65{ return _ext_buffer; }

◆ graph() [1/2]

loco::Graph * luci::Module::graph ( size_t  idx) const

provide graph with an index

Note
graph(0) is interpreted as a main graph

Definition at line 38 of file Module.cpp.

39{
40 auto &graph = _graphs.at(idx);
41 return graph.get();
42}
loco::Graph * graph(void) const
provide main graph
Definition Module.cpp:32

References graph().

Referenced by TopologicalSortHelper.TopologicalSortHelper::add_edge(), and TopologicalSortHelper.TopologicalSortHelper::sort_util().

◆ graph() [2/2]

◆ size()

size_t luci::Module::size ( void  ) const
inline

Definition at line 44 of file Module.h.

44{ return _graphs.size(); }

Referenced by luci_interpreter::ModuleLoader::load(), luci::ModuleProgressReporter::notify(), and luci::ModuleProgressReporter::notify().

◆ source_table() [1/2]

void luci::Module::source_table ( const std::map< uint32_t, std::string > &  table)
inline

Definition at line 71 of file Module.h.

71{ _source_table = table; }

◆ source_table() [2/2]

const std::map< uint32_t, std::string > & luci::Module::source_table ( void  ) const
inline

Definition at line 73 of file Module.h.

73{ return _source_table; }

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