From 21079dd320c00068208acdfd59177895265a53f2 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Tue, 29 Oct 2019 17:20:09 +0000 Subject: COMPMID-2700: Use NEON wrapper on SoftmaxLayer Change-Id: Id8901e865c9f355dcf7b2a1a539493099591377e Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/2186 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Giorgio Arena Tested-by: Arm Jenkins --- arm_compute/core/NEON/NEMath.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (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 8593059b1a..aa3054306c 100644 --- a/arm_compute/core/NEON/NEMath.h +++ b/arm_compute/core/NEON/NEMath.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef __ARM_COMPUTE_NEMATH_H__ -#define __ARM_COMPUTE_NEMATH_H__ +#ifndef ARM_COMPUTE_NEMATH_H +#define ARM_COMPUTE_NEMATH_H #include @@ -157,6 +157,29 @@ int32x4_t rounding_divide_by_pow2(int32x4_t x, int exponent); */ int32_t rounding_divide_by_pow2(int32_t x, int exponent); +/** Converts from uint8x16 to float32x4x4_t + * + * @param[in] in Vector of uint8 to be converted + * + * @return Converted vector of float + */ +float32x4x4_t convert_uint8x16_to_float32x4x4(const uint8x16_t &in); + +/** Converts from two float32x4x3_t to just one uint8x8x3_t + * + * @param[in] in1 First input vector of float to be converted + * @param[in] in2 Second input vector of float to be converted + * @param[out] out Converted output vector uint8 to store the result + */ +void convert_float32x4x3_to_uint8x8x3(const float32x4x3_t &in1, const float32x4x3_t &in2, uint8x8x3_t &out); + +/** Converts from two float32x4x4_t to just one uint8x16_t + * + * @param[in] in Vector of float to be converted + * @param[out] out Converted vector of uint8 to store the result + */ +void convert_float32x4x4_to_unit8x16(const float32x4x4_t &in, uint8x16_t &out); + /** Calculate sine. * * @param[in] val Input vector value in radians, F32 format. @@ -256,4 +279,4 @@ float16x8_t vsinq_f16(float16x8_t val); #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ } // namespace arm_compute #include "arm_compute/core/NEON/NEMath.inl" -#endif /* __ARM_COMPUTE_NEMATH_H__ */ +#endif /* ARM_COMPUTE_NEMATH_H */ -- cgit v1.2.1