diff options
Diffstat (limited to 'dnn/vec_avx.h')
-rw-r--r-- | dnn/vec_avx.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dnn/vec_avx.h b/dnn/vec_avx.h index b31caa88..4747bb41 100644 --- a/dnn/vec_avx.h +++ b/dnn/vec_avx.h @@ -725,9 +725,16 @@ static inline void sgemv8x1(float *out, const float *weights, int rows, int cols 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<rows;i++) + { + out[i] = 0; + for (j=0;j<cols;j++) out[i] += weights[j*col_stride + i]*x[j]; + } + } } static inline void sparse_sgemv8x4(float *out, const float *weights, const int *idx, int rows, const float *x) |