From 11c562c94fa6a0399aff798bfd970ed8c1942730 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 10 Jun 2020 16:34:50 +0100 Subject: COMPMID-3527: QLSTM should allow nullptr for optional projection bias Change-Id: I5568ca1e9383f3960886f211d8320fc4525a8804 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3326 Reviewed-by: James Conroy Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/core/NEON/wrapper/scalar/add.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'arm_compute/core/NEON/wrapper/scalar/add.h') diff --git a/arm_compute/core/NEON/wrapper/scalar/add.h b/arm_compute/core/NEON/wrapper/scalar/add.h index 5a04fe20fa..e0fc9ab103 100644 --- a/arm_compute/core/NEON/wrapper/scalar/add.h +++ b/arm_compute/core/NEON/wrapper/scalar/add.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -44,6 +44,13 @@ inline int16_t add_sat(const int16_t &a, const int16_t &b) return vget_lane_s16(vqadd_s16(va, vb), 0); } +inline int32_t add_sat(const int32_t &a, const int32_t &b) +{ + const int32x2_t va = { a, 0 }; + const int32x2_t vb = { b, 0 }; + return vget_lane_s32(vqadd_s32(va, vb), 0); +} + inline float add_sat(const float &a, const float &b) { // No notion of saturation exists in floating point -- cgit v1.2.1