Compute Library
 21.11
ExecutionTask Struct Reference

Execution task. More...

#include <Workload.h>

Collaboration diagram for ExecutionTask:
[legend]

Public Member Functions

 ExecutionTask (std::unique_ptr< arm_compute::IFunction > &&f, INode *n)
 
 ExecutionTask (const ExecutionTask &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ExecutionTaskoperator= (const ExecutionTask &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ExecutionTask (ExecutionTask &&) noexcept=default
 Default Move Constructor. More...
 
ExecutionTaskoperator= (ExecutionTask &&) noexcept=default
 Default move assignment operator. More...
 
 ~ExecutionTask ()=default
 Default destructor. More...
 
void operator() ()
 Function operator. More...
 
void prepare ()
 Prepare execution task. More...
 

Data Fields

std::unique_ptr< arm_compute::IFunctiontask = {}
 Task to execute. More...
 
INodenode = {}
 Node bound to this workload. More...
 

Detailed Description

Execution task.

Contains all the information required to execute a given task

Definition at line 70 of file Workload.h.

Constructor & Destructor Documentation

◆ ExecutionTask() [1/3]

ExecutionTask ( std::unique_ptr< arm_compute::IFunction > &&  f,
INode n 
)
inline

Definition at line 72 of file Workload.h.

73  : task(std::move(f)), node(n)
74  {
75  }
std::unique_ptr< arm_compute::IFunction > task
Task to execute.
Definition: Workload.h:87
INode * node
Node bound to this workload.
Definition: Workload.h:88

◆ ExecutionTask() [2/3]

ExecutionTask ( const ExecutionTask )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ ExecutionTask() [3/3]

ExecutionTask ( ExecutionTask &&  )
defaultnoexcept

Default Move Constructor.

◆ ~ExecutionTask()

~ExecutionTask ( )
default

Default destructor.

Member Function Documentation

◆ operator()()

void operator() ( )

Function operator.

Definition at line 36 of file Workload.cpp.

References TaskExecutor::execute_function, and TaskExecutor::get().

37 {
39 }
static TaskExecutor & get()
Task executor accessor.
Definition: Workload.cpp:75
std::function< decltype(execute_task)> execute_function
Function that is responsible for executing tasks.
Definition: Workload.h:63

◆ operator=() [1/2]

ExecutionTask& operator= ( const ExecutionTask )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

ExecutionTask& operator= ( ExecutionTask &&  )
defaultnoexcept

Default move assignment operator.

◆ prepare()

void prepare ( )

Prepare execution task.

Definition at line 62 of file Workload.cpp.

References arm_compute::graph::execute_task(), and ExecutionTask::task.

63 {
64  if(task)
65  {
66  task->prepare();
67  }
68 }
std::unique_ptr< arm_compute::IFunction > task
Task to execute.
Definition: Workload.h:87

Field Documentation

◆ node

INode* node = {}

Node bound to this workload.

Definition at line 88 of file Workload.h.

Referenced by arm_compute::graph::execute_task().

◆ task

std::unique_ptr<arm_compute::IFunction> task = {}

Task to execute.

Definition at line 87 of file Workload.h.

Referenced by arm_compute::graph::execute_task(), and ExecutionTask::prepare().


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