Skip to content

Commit

Permalink
Fix ARMv7 optimizations for DNN code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Nov 27, 2023
1 parent cc11c07 commit db6dad4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dnn/vec_neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db6dad4

Please sign in to comment.