COMPMID-997: Add support for node's name in GraphAPI.

Change-Id: I0ca02e42807c1ad9afeffb7202a3556feb11442f
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129701
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/src/graph/Workload.cpp b/src/graph/Workload.cpp
index f350bbf..d8046c3 100644
--- a/src/graph/Workload.cpp
+++ b/src/graph/Workload.cpp
@@ -32,9 +32,14 @@
 {
 void ExecutionTask::operator()()
 {
-    if(task)
+    TaskExecutor::get().execute_function(*this);
+}
+
+void execute_task(ExecutionTask &task)
+{
+    if(task.task)
     {
-        task->run();
+        task.task->run();
     }
 }
 
@@ -45,5 +50,16 @@
         task->prepare();
     }
 }
+
+TaskExecutor::TaskExecutor()
+    : execute_function(execute_task)
+{
+}
+
+TaskExecutor &TaskExecutor::get()
+{
+    static TaskExecutor executor;
+    return executor;
+}
 } // namespace graph
 } // namespace arm_compute
\ No newline at end of file