Changeset 70afae1
- Timestamp:
- Dec 29, 2021, 5:51:47 PM (3 years ago)
- Branches:
- feature/cnn, feature/crepe
- Children:
- 1f13e29
- Parents:
- 3fa8d95
- git-author:
- Paul Brossier <piem@piem.org> (01/07/19 22:55:27)
- git-committer:
- Paul Brossier <piem@piem.org> (12/29/21 17:51:47)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio_priv.h
r3fa8d95 r70afae1 134 134 #define aubio_cblas_swap cblas_sswap 135 135 #define aubio_cblas_dot cblas_sdot 136 #define aubio_cblas__gemv cblas_sgemv 136 137 #else /* HAVE_AUBIO_DOUBLE */ 137 138 #ifdef HAVE_ATLAS … … 141 142 #define aubio_cblas_swap cblas_dswap 142 143 #define aubio_cblas_dot cblas_ddot 144 #define aubio_cblas__gemv cblas_dgemv 143 145 #endif /* HAVE_AUBIO_DOUBLE */ 144 146 #endif /* HAVE_BLAS */ -
src/fmat.c
r3fa8d95 r70afae1 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.