From db6dad446c7d7f97ee3a81e50253fd0459fa99d6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Sun, 26 Nov 2023 22:21:29 -0500 Subject: [PATCH] Fix ARMv7 optimizations for DNN code --- dnn/vec_neon.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dnn/vec_neon.h b/dnn/vec_neon.h index 18e4b3a4..785fc056 100644 --- a/dnn/vec_neon.h +++ b/dnn/vec_neon.h @@ -39,6 +39,14 @@ static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) { return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8); } + +static OPUS_INLINE int16x8_t vpaddq_s16(int16x8_t a, int16x8_t b) { + return vcombine_s16(vpadd_s16(vget_low_s16(a), vget_high_s16(a)), vpadd_s16(vget_low_s16(b), vget_high_s16(b))); +} + +static OPUS_INLINE int16x8_t vmull_high_s8(int8x16_t a, int8x16_t b) { + return vmull_s8(vget_high_s8(a), vget_high_s8(b)); +} #endif #ifndef LPCNET_TEST