From 0a61ee08b0b8c0e820ef6966c23b3eea58abbfaa Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Tue, 1 Aug 2023 19:14:29 -0400 Subject: Bring back support for non-multiples of 8 --- dnn/vec.h | 11 +++++++++-- dnn/vec_avx.h | 11 +++++++++-- dnn/vec_neon.h | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/dnn/vec.h b/dnn/vec.h index 30617de8..5b6951bb 100644 --- a/dnn/vec.h +++ b/dnn/vec.h @@ -120,9 +120,16 @@ static inline void sgemv16x1(float *out, const float *weights, int rows, int col static inline void sgemv(float *out, const float *weights, int rows, int cols, int col_stride, const float *x) { - celt_assert((rows&7) == 0); if ((rows&0xf) == 0) sgemv16x1(out, weights, rows, cols, col_stride, x); - else sgemv8x1(out, weights, rows, cols, col_stride, x); + else if ((rows&0x7) == 0) sgemv8x1(out, weights, rows, cols, col_stride, x); + else { + int i, j; + for (i=0;i