aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CPP/ICPPKernel.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-05-21 15:02:36 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-06-16 11:42:09 +0000
commitbcd2352d7fd99a2f6aab220fa0c3b3f3119a1a4c (patch)
treea3e1880071bca828b1c58be71805ccce4b205e53 /arm_compute/core/CPP/ICPPKernel.h
parenteae658453199d67a41deccbeb78e55b8eea9e966 (diff)
downloadComputeLibrary-bcd2352d7fd99a2f6aab220fa0c3b3f3119a1a4c.tar.gz
COMPMID-3391: Implement Async interfaces
Change-Id: I8168cea5056ff48a0253ebb8c88ea549a3ea69a2 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3335 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/CPP/ICPPKernel.h')
-rw-r--r--arm_compute/core/CPP/ICPPKernel.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/arm_compute/core/CPP/ICPPKernel.h b/arm_compute/core/CPP/ICPPKernel.h
index ec05af20bd..21f6ab714a 100644
--- a/arm_compute/core/CPP/ICPPKernel.h
+++ b/arm_compute/core/CPP/ICPPKernel.h
@@ -26,10 +26,13 @@
#include "arm_compute/core/CPP/CPPTypes.h"
#include "arm_compute/core/IKernel.h"
+#include "arm_compute/core/Types.h"
+#include "arm_compute/core/experimental/Types.h"
namespace arm_compute
{
class Window;
+class ITensor;
/** Common interface for all kernels implemented in C++ */
class ICPPKernel : public IKernel
@@ -51,8 +54,7 @@ public:
*/
virtual void run(const Window &window, const ThreadInfo &info)
{
- ARM_COMPUTE_UNUSED(window);
- ARM_COMPUTE_UNUSED(info);
+ ARM_COMPUTE_UNUSED(window, info);
ARM_COMPUTE_ERROR("default implementation of legacy run() virtual member function invoked");
}
@@ -69,6 +71,24 @@ public:
run(window, info);
}
+ /** Execute the kernel on the passed window
+ *
+ * @warning If is_parallelisable() returns false then the passed window must be equal to window()
+ *
+ * @note The window has to be a region within the window returned by the window() method
+ *
+ * @note The width of the window has to be a multiple of num_elems_processed_per_iteration().
+ *
+ * @param[in] inputs A vector containing the input tensors.
+ * @param[in] outputs A vector containing the output tensors.
+ * @param[in] window Region on which to execute the kernel. (Must be a region of the window returned by window())
+ * @param[in] info Info about executing thread and CPU.
+ */
+ virtual void run_op(const std::vector<InputOperatorTensors *> &inputs, std::vector<OutputOperatorTensors *> &outputs, const Window &window, const ThreadInfo &info)
+ {
+ ARM_COMPUTE_UNUSED(inputs, outputs, window, info);
+ }
+
/** Name of the kernel
*
* @return Kernel name