ONE - On-device Neural Engine
Loading...
Searching...
No Matches
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 29 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 32 of file ParallelExecutor.cc.

34 : _fn{fn}, _setup{setup}, _teardown{teardown}
35 {
36 }

Member Function Documentation

◆ run()

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

Implements onert::exec::IFunction.

Definition at line 39 of file ParallelExecutor.cc.

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

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

Referenced by package.infer.session::inference().


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