diff options
author | SiCong Li <sicong.li@arm.com> | 2020-08-27 10:17:10 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2020-09-07 10:57:52 +0000 |
commit | 903f8cca78502a9e3835e6ec42caa1f816274600 (patch) | |
tree | e8e104990b0b718550797bfe7c7c67c2a722e849 /arm_compute/core/NEON/wrapper | |
parent | 2d2213920ba5ab95052a557dd20594a6ccb7d562 (diff) | |
download | ComputeLibrary-903f8cca78502a9e3835e6ec42caa1f816274600.tar.gz |
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 <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3908
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/wrapper')
-rw-r--r-- | arm_compute/core/NEON/wrapper/scalar/sub.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |