aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/Types.h1
-rw-r--r--arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h20
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__ */