ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::exec::ExecObservers Class Reference

#include <ExecutionObservers.h>

Public Member Functions

void add (std::unique_ptr< IExecutionObserver > &&observer)
 
IExecutionObserverget (ObserverType type) const
 

Detailed Description

Definition at line 60 of file ExecutionObservers.h.

Member Function Documentation

◆ add()

void onert::exec::ExecObservers::add ( std::unique_ptr< IExecutionObserver > &&  observer)
inline

Definition at line 63 of file ExecutionObservers.h.

64 {
65 _observers.emplace(observer->type(), std::move(observer));
66 }

Referenced by onert::exec::ExecutorBase::addObserver(), and onert::exec::train::TrainableExecutor::addObserver().

◆ get()

IExecutionObserver * onert::exec::ExecObservers::get ( ObserverType  type) const
inline

Definition at line 68 of file ExecutionObservers.h.

69 {
70 if (_observers.find(type) != _observers.end())
71 return _observers.at(type).get();
72
73 return nullptr;
74 }

Referenced by onert::exec::ExecutionObservee::ExecutionObservee().


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