ONE - On-device Neural Engine
Loading...
Searching...
No Matches
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 62 of file ExecutionObservers.h.

Member Function Documentation

◆ add()

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

Definition at line 65 of file ExecutionObservers.h.

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

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 70 of file ExecutionObservers.h.

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

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


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