shithub: opus

Download patch

ref: 8c3fe6f31d8c48936f061b5134ecec18d3c9f71e
parent: 40b9fd0a758ef7c43b763cdde21e61061917f1ee
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Dec 30 11:04:26 EST 2020

Cleaning up float version

--- a/dnn/vec.h
+++ b/dnn/vec.h
@@ -339,7 +339,7 @@
 
 #else /*DOT_PROD*/
 
-#define sgemv_accum sgemv_accum8x4
+#define sgemv_accum8x4 sgemv_accum
 
 
 static inline void sparse_sgemv_accum8x4(float *out, const qweight *w, int rows, int ignore, const int *idx, const float *x)
--- a/dnn/vec_avx.h
+++ b/dnn/vec_avx.h
@@ -227,11 +227,7 @@
 #ifdef DOT_PROD
 #define USE_SU_BIAS
 
-#ifdef DOT_PROD
 typedef signed char qweight;
-#else
-typedef float qweight;
-#endif
 
 
 #define MAX_INPUTS (2048)
@@ -378,6 +374,9 @@
 
 
 #else /*DOT_PROD*/
+typedef float qweight;
+#define sgemv_accum8x4 sgemv_accum
+
 static inline void sparse_sgemv_accum8x4(float *out, const qweight *weights, int rows, int ignore, const int *idx, const float *x)
 {
    int i, j;
--