From 0a5a57a3f794de851408bae1c63b1660b4c5cbe7 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Thu, 23 May 2019 14:20:33 +0100 Subject: COMPMID-2160: Implement Round for NEON Change-Id: Ie80e2ad294eaf95bc823d979842c320e8fb41f67 Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/1215 Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- arm_compute/core/NEON/NEMath.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 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 5c60d73de4..46d97f6a0d 100644 --- a/arm_compute/core/NEON/NEMath.h +++ b/arm_compute/core/NEON/NEMath.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,6 +36,14 @@ namespace arm_compute */ float32x4_t vfloorq_f32(float32x4_t val); +/** Calculate round value of a vector to nearest with ties to even. + * + * @param[in] val Input vector value in F32 format. + * + * @return The calculated round vector. + */ +float32x4_t vroundq_rte_f32(float32x4_t val); + /** Calculate inverse square root. * * @param[in] x Input value. @@ -123,12 +131,20 @@ float32x4_t vpowq_f32(float32x4_t val, float32x4_t n); * * @note We clamp x to [-5,5] to avoid overflowing issues. * - * @param[in] val Input vector value in F32 format. + * @param[in] val Input vector value in F16 format. * * @return The calculated Hyperbolic Tangent. */ float16x8_t vtanhq_f16(float16x8_t val); +/** Calculate round value of a vector to nearest with ties to even. + * + * @param[in] val Input vector value in F16 format. + * + * @return The calculated round vector. + */ +float16x8_t vroundq_rte_f16(float16x8_t val); + /** Calculate reciprocal. * * @param[in] x Input value. -- cgit v1.2.1