ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci_interpreter::RuntimeModule Class Reference

#include <RuntimeModule.h>

Public Member Functions

 RuntimeModule (EventNotifier *event_notifier)
 
EventNotifiergetEventNotifier () const
 
RuntimeGraphaddGraph (IMemoryManager *memory_manager)
 
const std::vector< Tensor * > & getInputTensors () const
 
const std::vector< Tensor * > & getOutputTensors () const
 
void execute () const
 
 RuntimeModule ()=default
 
void addGraph (MemoryManager *memory_manager)
 
BaseRuntimeGraphgetRuntimeGraphAt (uint32_t pos)
 
void execute ()
 
CircleReadergetCircleReader ()
 
BaseRuntimeGraphgetMainGraph () const
 
void selectSubgraph (uint32_t index)
 

Detailed Description

Definition at line 30 of file RuntimeModule.h.

Constructor & Destructor Documentation

◆ RuntimeModule() [1/2]

luci_interpreter::RuntimeModule::RuntimeModule ( EventNotifier event_notifier)
inlineexplicit

Definition at line 33 of file RuntimeModule.h.

33: _event_notifier(event_notifier) {}

◆ RuntimeModule() [2/2]

luci_interpreter::RuntimeModule::RuntimeModule ( )
default

Member Function Documentation

◆ addGraph() [1/2]

RuntimeGraph * luci_interpreter::RuntimeModule::addGraph ( IMemoryManager memory_manager)
inline

Definition at line 37 of file RuntimeModule.h.

38 {
39 _graphs.push_back(std::make_unique<RuntimeGraph>(this, memory_manager));
40 return _graphs.back().get();
41 }

Referenced by luci_interpreter::ModuleLoader::load(), and luci_interpreter::ModuleLoader::load().

◆ addGraph() [2/2]

void luci_interpreter::RuntimeModule::addGraph ( MemoryManager memory_manager)
inline

Definition at line 61 of file RuntimeModule.h.

62 {
63 _graphs.emplace_back(memory_manager, &_circle_reader, this,
64 _circle_reader.get_current_subgraph_index());
65 }

◆ execute() [1/2]

void luci_interpreter::RuntimeModule::execute ( )
inline

Definition at line 69 of file RuntimeModule.h.

69{ getMainGraph()->execute(); }

References luci_interpreter::RuntimeGraph::execute().

◆ execute() [2/2]

void luci_interpreter::RuntimeModule::execute ( ) const
inline

Definition at line 49 of file RuntimeModule.h.

49{ getMainGraph()->execute(); }

References luci_interpreter::RuntimeGraph::execute().

◆ getCircleReader()

CircleReader & luci_interpreter::RuntimeModule::getCircleReader ( )
inline

Definition at line 71 of file RuntimeModule.h.

71{ return _circle_reader; }

Referenced by luci_interpreter::ModuleLoader::load().

◆ getEventNotifier()

EventNotifier * luci_interpreter::RuntimeModule::getEventNotifier ( ) const
inline

Definition at line 35 of file RuntimeModule.h.

35{ return _event_notifier; }

Referenced by luci_interpreter::RuntimeGraph::execute().

◆ getInputTensors()

const std::vector< Tensor * > & luci_interpreter::RuntimeModule::getInputTensors ( ) const
inline

Definition at line 43 of file RuntimeModule.h.

43{ return getMainGraph()->getInputTensors(); }
const std::vector< Tensor * > & getInputTensors() const

References luci_interpreter::RuntimeGraph::getInputTensors().

◆ getMainGraph()

BaseRuntimeGraph * luci_interpreter::RuntimeModule::getMainGraph ( ) const
inline

Definition at line 73 of file RuntimeModule.h.

73{ return const_cast<BaseRuntimeGraph *>(&_graphs[0]); }
RuntimeGraph BaseRuntimeGraph

◆ getOutputTensors()

const std::vector< Tensor * > & luci_interpreter::RuntimeModule::getOutputTensors ( ) const
inline

Definition at line 44 of file RuntimeModule.h.

45 {
46 return getMainGraph()->getOutputTensors();
47 }
const std::vector< Tensor * > & getOutputTensors() const

References luci_interpreter::RuntimeGraph::getOutputTensors().

◆ getRuntimeGraphAt()

BaseRuntimeGraph * luci_interpreter::RuntimeModule::getRuntimeGraphAt ( uint32_t  pos)
inline

Definition at line 67 of file RuntimeModule.h.

67{ return &_graphs.at(pos); }

Referenced by luci_interpreter::ModuleLoader::load().

◆ selectSubgraph()

void luci_interpreter::RuntimeModule::selectSubgraph ( uint32_t  index)
inline

Definition at line 75 of file RuntimeModule.h.

75{ _circle_reader.select_subgraph(index); }
bool select_subgraph(uint32_t subgraph)

References luci::CircleReader::select_subgraph().


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