diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-05-15 14:06:02 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2019-05-16 15:26:51 +0000 |
commit | 6ac5992dc81534e81482892f8fb8c03790c57192 (patch) | |
tree | 91255fcd0d4d6a37eeb1784ee9bc2303c1ef2f49 /arm_compute | |
parent | 80e55db85bb4842ef287c2732fc98ad869748b0a (diff) | |
download | ComputeLibrary-6ac5992dc81534e81482892f8fb8c03790c57192.tar.gz |
COMPMID-2254
Implement NEAbsLayer
Change-Id: I88571010d727b2ac8d9fd3838a4d170cf66bf0ce
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1150
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/Types.h | 1 | ||||
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index c6c2728407..382b7f4abe 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -581,6 +581,7 @@ enum class ElementWiseUnary EXP, /**< Exponential */ NEG, /**< Negate */ LOG, /**< Natural Logarithm */ + ABS, /**< Absolute value */ }; /** The normalization type used for the normalization layer */ diff --git a/arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h b/arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h index cce2837a8d..bea9145b80 100644 --- a/arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h +++ b/arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h @@ -109,5 +109,25 @@ public: */ static Status validate(const ITensorInfo *input, const ITensorInfo *output); }; + +/** Basic function to compute the absolute value of an input tensor. */ +class NEAbsLayer : public INESimpleFunction +{ +public: + /** Initialize the function + * + * @param[in] input Input tensor. Data types supported: F16/F32/S32. + * @param[out] output Output tensor. Data types supported: same as @p input. + */ + void configure(const ITensor *input, ITensor *output); + /** Static function to check if given info will lead to a valid configuration of @ref NEAbsLayer + * + * @param[in] input First tensor input info. Data types supported: F16/F32/S32. + * @param[in] output Output tensor info. Data types supported: Same as @p input. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output); +}; } // namespace arm_compute #endif /* __ARM_COMPUTE_NEELEMENTWISEUNARYLAYER_H__ */ |