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

Public Member Functions

 HookFunction (IFunction *fn, const std::function< void()> &setup, const std::function< void()> &teardown)
 
void run () override
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void prepare ()
 

Detailed Description

Definition at line 27 of file ParallelExecutor.cc.

Constructor & Destructor Documentation

◆ HookFunction()

onert::exec::HookFunction::HookFunction ( IFunction fn,
const std::function< void()> &  setup,
const std::function< void()> &  teardown 
)
inline

Definition at line 30 of file ParallelExecutor.cc.

32 : _fn{fn}, _setup{setup}, _teardown{teardown}
33 {
34 }

Member Function Documentation

◆ run()

void onert::exec::HookFunction::run ( )
inlineoverridevirtual

Implements onert::exec::IFunction.

Definition at line 37 of file ParallelExecutor.cc.

38 {
39 _setup();
40 _fn->run();
41 _teardown();
42 }
virtual void run()=0

References onert::exec::IFunction::run().


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