COMPMID-3388: Async support to CLReshapeLayerKernel kernels/functions

Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Change-Id: I141a943dfd691069317860e852ecdd0ba7391604
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3501
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/runtime/CL/CLScheduler.cpp b/src/runtime/CL/CLScheduler.cpp
index e78eaa4..2c1024f 100644
--- a/src/runtime/CL/CLScheduler.cpp
+++ b/src/runtime/CL/CLScheduler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 ARM Limited.
+ * Copyright (c) 2016-2020 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -151,7 +151,7 @@
     _cl_tuner       = cl_tuner;
 }
 
-void CLScheduler::enqueue(ICLKernel &kernel, bool flush)
+void CLScheduler::enqueue_common(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush)
 {
     ARM_COMPUTE_ERROR_ON_MSG(!_is_initialised,
                              "The CLScheduler is not initialised yet! Please call the CLScheduler::get().default_init(), \
@@ -165,11 +165,28 @@
     }
 
     // Run kernel
-    kernel.run(kernel.window(), _queue);
+    if(inputs.empty())
+    {
+        kernel.run(kernel.window(), _queue);
+    }
+    else
+    {
+        kernel.run_op(inputs, outputs, kernel.window(), _queue);
+    }
 
     if(flush)
     {
         _queue.flush();
     }
 }
+
+void CLScheduler::enqueue(ICLKernel &kernel, bool flush)
+{
+    enqueue_common(kernel, {}, {}, flush);
+}
+
+void CLScheduler::enqueue_op(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush)
+{
+    enqueue_common(kernel, inputs, outputs, flush);
+}
 } // namespace arm_compute