- Timestamp:
- Jan 7, 2019, 10:55:27 PM (6 years ago)
- Branches:
- feature/cnn_org, feature/crepe_org
- Children:
- 147afba
- Parents:
- 855947d
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio_priv.h
r855947d r096a174 132 132 #define aubio_cblas_swap cblas_sswap 133 133 #define aubio_cblas_dot cblas_sdot 134 #define aubio_cblas__gemv cblas_sgemv 134 135 #else /* HAVE_AUBIO_DOUBLE */ 135 136 #ifdef HAVE_ATLAS … … 139 140 #define aubio_cblas_swap cblas_dswap 140 141 #define aubio_cblas_dot cblas_ddot 142 #define aubio_cblas__gemv cblas_dgemv 141 143 #endif /* HAVE_AUBIO_DOUBLE */ 142 144 #endif /* HAVE_BLAS */ -
src/fmat.c
r855947d r096a174 154 154 155 155 void fmat_vecmul(const fmat_t *s, const fvec_t *scale, fvec_t *output) { 156 uint_t k;157 #if 0158 assert(s->height == output->length);159 assert(s->length == scale->length);160 #endif161 156 #if !defined(HAVE_ACCELERATE) && !defined(HAVE_BLAS) 162 uint_t j; 157 uint_t j, k; 158 AUBIO_ASSERT(s->height == output->length); 159 AUBIO_ASSERT(s->length == scale->length); 163 160 fvec_zeros(output); 164 161 for (j = 0; j < s->length; j++) { 165 162 for (k = 0; k < s->height; k++) { 166 output->data[k] += scale->data[j] 167 * s->data[k][j]; 163 output->data[k] += scale->data[j] * s->data[k][j]; 168 164 } 169 165 } 170 166 #elif defined(HAVE_BLAS) 167 #if 0 171 168 for (k = 0; k < s->height; k++) { 172 169 output->data[k] = aubio_cblas_dot( s->length, scale->data, 1, s->data[k], 1); 173 170 } 171 #else 172 aubio_cblas__gemv(CblasColMajor, CblasTrans, 173 s->length, s->height, 1., 174 s->data[0], s->length, 175 scale->data, 1, 0., 176 output->data, 1); 177 #endif 174 178 #elif defined(HAVE_ACCELERATE) 175 179 #if 0 … … 177 181 vDSP_mmul (s->data[0], 1, scale->data, 1, output->data, 1, s->height, 1, s->length); 178 182 #else 183 uint_t k; 179 184 for (k = 0; k < s->height; k++) { 180 185 aubio_vDSP_dotpr( scale->data, 1, s->data[k], 1, &(output->data[k]), s->length); … … 182 187 #endif 183 188 #endif 189 } 190 #endif 191 #endif 184 192 }
Note: See TracChangeset
for help on using the changeset viewer.