aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-06-18 10:14:57 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-06-19 14:35:22 +0000
commitce0c67559cf03965acc8f212263a9f53205a0a3f (patch)
treec37105c72538108c46e5964cf49d15acd2d85980 /arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h
parent3be0b8c8d4e90bd264e9575dc2b6994ce8e14d50 (diff)
downloadComputeLibrary-ce0c67559cf03965acc8f212263a9f53205a0a3f.tar.gz
COMPMID-3377: Async support to NEElementwiseUnaryLayerKernel kernels/functions
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: I208287b44ece051e95f891d43a691cb0ac6e56c5 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3419 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h')
-rw-r--r--arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h b/arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h
index 61c25e1a2a..b109ddd0f8 100644
--- a/arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h
+++ b/arm_compute/core/NEON/kernels/NEElementwiseOperationKernel.h
@@ -57,18 +57,19 @@ public:
/** Default destructor */
~NEElementwiseOperationKernel() = default;
- // Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
-
/** Common signature for all the specialised arithmetic functions
*
- * @param[in] input1 First tensor input. Data types supported: QASYMM8/S16/F16/S32/F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[in] output Output tensor. Data types supported: Dependent on subclass.
+ * @param[in] input1 First tensor input info. Data types supported: QASYMM8/S16/F16/S32/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1.
+ * @param[in] output Output tensor info. Data types supported: Dependent on subclass.
* @param[in] window Region on which to execute the kernel.
*/
using ElementwiseFunction = void(const ITensor *input1, const ITensor *input2, ITensor *output, const Window &window);
+ // Inherited methods overridden:
+ void run_op(const InputTensorMap &inputs, const OutputTensorMap &outputs,
+ const Window &window, const ThreadInfo &info) override;
+
protected:
/** Validate the argument passed to the kernel
*
@@ -81,7 +82,7 @@ protected:
/** Commmon configure function for element-wise operators with no additional options (e.g. Min, Max, SquaredDiff)
*
*/
- void configure_common(const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure_common(const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output);
/** Function to use for the particular tensor types passed to configure() */
std::function<void(const ITensor *input1, const ITensor *input2, ITensor *output, const Window &window)> _function;
@@ -100,11 +101,11 @@ public:
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
* @param[in] op Arithmetic operation to be executed.
- * @param[in] input1 First tensor input. Data types supported: QASYMM8/S16/F16/S32/F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[in] output Output tensor. Data types supported: Same as @p input1.
+ * @param[in] input1 First tensor input info. Data types supported: QASYMM8/S16/F16/S32/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1.
+ * @param[in] output Output tensor info. Data types supported: Same as @p input1.
*/
- void configure(ArithmeticOperation op, const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure(ArithmeticOperation op, const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
@@ -130,11 +131,11 @@ public:
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
- * @param[in] input1 First tensor input. Data types supported: F16/F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[in] output Output tensor. Data types supported: Same as @p input1.
+ * @param[in] input1 First tensor input info. Data types supported: F16/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1.
+ * @param[in] output Output tensor info. Data types supported: Same as @p input1.
*/
- void configure(const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure(const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
@@ -159,11 +160,11 @@ public:
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
- * @param[in] input1 First tensor input. Data types supported: F16/F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[out] output Output tensor. Data types supported: Same as @p input1.
+ * @param[in] input1 First tensor input info. Data types supported: F16/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1.
+ * @param[out] output Output tensor info. Data types supported: Same as @p input1.
*/
- void configure(const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure(const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticOperationKernel
*
@@ -189,11 +190,11 @@ public:
/** Static function to check if given info will lead to a valid configuration of @ref NEComparisonOperationKernel
*
* @param[in] op Comparison operation to be executed.
- * @param[in] input1 First tensor input. Data types supported: QASYMM8/QASYMM8_SIGNED/S16/F16/S32/F32.
- * @param[in] input2 Second tensor input. Data types supported: Same as @p input1.
- * @param[in] output Output tensor. Data types supported: U16/U32.
+ * @param[in] input1 First tensor input info. Data types supported: QASYMM8/QASYMM8_SIGNED/S16/F16/S32/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: Same as @p input1.
+ * @param[in] output Output tensor info. Data types supported: U16/U32.
*/
- void configure(ComparisonOperation op, const ITensor *input1, const ITensor *input2, ITensor *output);
+ void configure(ComparisonOperation op, const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output);
/** Static function to check if given info will lead to a valid configuration of @ref NEComparisonOperationKernel
*