From 91654c45cf1de5f41127536a0fdd310c17fdfc8e Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 5 Jul 2017 11:32:17 +0100 Subject: COMPMID-421: Added FP16 support in ActivationLayer. Change-Id: I7ba573b19d56e3c87996edb5218a00e5bfca451e Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79755 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- arm_compute/core/NEON/NEMath.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arm_compute/core/NEON/NEMath.h') diff --git a/arm_compute/core/NEON/NEMath.h b/arm_compute/core/NEON/NEMath.h index 8dd9d609e7..b467a600d6 100644 --- a/arm_compute/core/NEON/NEMath.h +++ b/arm_compute/core/NEON/NEMath.h @@ -93,6 +93,24 @@ float32x4_t vtanhq_f32(float32x4_t val); float32x4_t vpowq_f32(float32x4_t val, float32x4_t n); #ifdef ARM_COMPUTE_ENABLE_FP16 +/** Calculate hyperbolic tangent. + * + * tanh(x) = (e^2x - 1)/(e^2x + 1) + * + * @note We clamp x to [-5,5] to avoid overflowing issues. + * + * @param[in] val Input vector value in F32 format. + * + * @return The calculated Hyperbolic Tangent. + */ +float16x8_t vtanhq_f16(float16x8_t val); +/** Calculate inverse square root. + * + * @param[in] x Input value. + * + * @return The calculated inverse square root. + */ +float16x8_t vinvsqrtq_f16(float16x8_t x); /** Calculate exponential * * @param[in] x Input vector value in F16 format. -- cgit v1.2.1