aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
diff options
context:
space:
mode:
authorSheri Zhang <sheri.zhang@arm.com>2021-01-12 18:25:16 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-01-19 13:43:12 +0000
commit6124390be4690ba06c404d56449f7e5d390cef53 (patch)
tree4aa24d2dbd4ffbcf0c9719a9828ff3e893b96afe /arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
parent5bf441260da09d10b72d77014addeb65b9e139f7 (diff)
downloadComputeLibrary-6124390be4690ba06c404d56449f7e5d390cef53.tar.gz
Make Add kernel and operator stateless
- Rename NEArithmeticAdditionKernel to CpuAddKernel Cpu and move files appropriately - Add CpuAdd under src/runtime/cpu/operators Partially resolves: COMPMID-4005 Signed-off-by: Sheri Zhang <sheri.zhang@arm.com> Change-Id: I1d8d406df9773fea198899f50327407d7125c38d Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4867 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NEArithmeticAddition.h')
-rw-r--r--arm_compute/runtime/NEON/functions/NEArithmeticAddition.h64
1 files changed, 5 insertions, 59 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
index 6aaa5ff4f7..6648e46209 100644
--- a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
+++ b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2020 Arm Limited.
+ * Copyright (c) 2016-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,68 +26,14 @@
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/runtime/NEON/INEOperator.h"
+#include <memory>
namespace arm_compute
{
class ITensor;
+class ITensorInfo;
-namespace experimental
-{
-/** Basic function to run @ref NEArithmeticAdditionKernel */
-class NEArithmeticAddition : public INEOperator
-{
-public:
- /** Constructor */
- NEArithmeticAddition() = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- NEArithmeticAddition(const NEArithmeticAddition &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- NEArithmeticAddition &operator=(const NEArithmeticAddition &) = delete;
- /** Prevent instances of this class from being moved (As this class contains non movable objects) */
- NEArithmeticAddition(NEArithmeticAddition &&) = delete;
- /** Prevent instances of this class from being moved (As this class contains non movable objects) */
- NEArithmeticAddition &operator=(NEArithmeticAddition &&) = delete;
- /** Default destructor */
- ~NEArithmeticAddition();
- /** Initialise the kernel's inputs, output and conversion policy.
- *
- * Valid configurations (Input1,Input2) -> Output :
- *
- * - (U8,U8) -> U8
- * - (U8,U8) -> S16
- * - (S16,U8) -> S16
- * - (U8,S16) -> S16
- * - (S16,S16) -> S16
- * - (S32,S32) -> S32
- * - (F16,F16) -> F16
- * - (F32,F32) -> F32
- * - (QASYMM8,QASYMM8) -> QASYMM8
- * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED
- * - (QSYMM16,QSYMM16) -> QSYMM16
- *
- * @param[in] input1 First tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[in] input2 Second tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[out] output Output tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[in] policy Policy to use to handle overflow.
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported.
- */
- void configure(const ITensorInfo *input1, const ITensorInfo *input2, ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo());
- /** Static function to check if given info will lead to a valid configuration of @ref NEArithmeticAddition
- *
- * @param[in] input1 First tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[in] input2 Second tensor input info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[in] output Output tensor info. Data types supported: U8/SQASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/S32/F32
- * @param[in] policy Policy to use to handle overflow
- * @param[in] act_info (Optional) Activation layer information in case of a fused activation. Currently not supported.
- *
- * @return a status
- */
- static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info = ActivationLayerInfo());
-};
-} // namespace experimental
-
-/** Basic function to run @ref NEArithmeticAdditionKernel */
+/** Basic function to run @ref CpuAddKernel */
class NEArithmeticAddition : public IFunction
{
public:
@@ -146,4 +92,4 @@ private:
std::unique_ptr<Impl> _impl;
};
} // namespace arm_compute
-#endif /*ARM_COMPUTE_NEARITHMETICADDITION_H */
+#endif /* ARM_COMPUTE_NEARITHMETICADDITION_H */