From 903f8cca78502a9e3835e6ec42caa1f816274600 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Thu, 27 Aug 2020 10:17:10 +0100 Subject: COMPMID-3580 Add S32 support to NEArithmeticSubtraction * Fix convert policy validate logics and add missing validate test * Add S32 support to NEArithmeticSubtraction and NEArithmeticSubtractionKernel * Add S32 validation tests Change-Id: I1b6cb15b024613c202fe9f17747a83da43a5ddcf Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3908 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- arm_compute/core/NEON/wrapper/scalar/sub.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arm_compute/core/NEON/wrapper') diff --git a/arm_compute/core/NEON/wrapper/scalar/sub.h b/arm_compute/core/NEON/wrapper/scalar/sub.h index 9abda26224..1fe51d75fc 100644 --- a/arm_compute/core/NEON/wrapper/scalar/sub.h +++ b/arm_compute/core/NEON/wrapper/scalar/sub.h @@ -44,6 +44,13 @@ inline int16_t sub_sat(const int16_t &a, const int16_t &b) return vget_lane_s16(vqsub_s16(va, vb), 0); } +inline int32_t sub_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(vqsub_s32(va, vb), 0); +} + inline float sub_sat(const float &a, const float &b) { // No notion of saturation exists in floating point -- cgit v1.2.1