Changeset 4aa18e3 for src/fvec.c
- Timestamp:
- Sep 6, 2015, 9:45:22 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 50961b9
- Parents:
- c59e693 (diff), b8c50c3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fvec.c
rc59e693 r4aa18e3 21 21 #include "aubio_priv.h" 22 22 #include "fvec.h" 23 24 #ifdef HAVE_ACCELERATE25 #include <Accelerate/Accelerate.h>26 #if !HAVE_AUBIO_DOUBLE27 #define aubio_vDSP_mmov vDSP_mmov28 #define aubio_vDSP_vmul vDSP_vmul29 #define aubio_vDSP_vfill vDSP_vfill30 #define aubio_catlas_set catlas_sset31 #else /* HAVE_AUBIO_DOUBLE */32 #define aubio_vDSP_mmov vDSP_mmovD33 #define aubio_vDSP_vmul vDSP_vmulD34 #define aubio_vDSP_vfill vDSP_vfillD35 #define aubio_catlas_set catlas_dset36 #endif /* HAVE_AUBIO_DOUBLE */37 #endif38 23 39 24 fvec_t * new_fvec( uint_t length) { … … 76 61 77 62 void fvec_set_all (fvec_t *s, smpl_t val) { 78 #if ndef HAVE_ACCELERATE63 #if !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS) 79 64 uint_t j; 80 65 for (j=0; j< s->length; j++) { 81 66 s->data[j] = val; 82 67 } 83 #else 84 //aubio_catlas_set(s->length, val, s->data, 1); 68 #elif defined(HAVE_ATLAS) 69 aubio_catlas_set(s->length, val, s->data, 1); 70 #elif defined(HAVE_ACCELERATE) 85 71 aubio_vDSP_vfill(&val, s->data, 1, s->length); 86 72 #endif … … 140 126 return; 141 127 } 142 #if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE)128 #if HAVE_NOOPT 143 129 uint_t j; 144 130 for (j=0; j< t->length; j++) { 145 131 t->data[j] = s->data[j]; 146 132 } 147 #else 148 #if defined(HAVE_MEMCPY_HACKS) 133 #elif defined(HAVE_MEMCPY_HACKS) 149 134 memcpy(t->data, s->data, t->length * sizeof(smpl_t)); 150 #else 135 #elif defined(HAVE_ATLAS) 136 aubio_cblas_copy(s->length, s->data, 1, t->data, 1); 137 #elif defined(HAVE_ACCELERATE) 151 138 aubio_vDSP_mmov(s->data, t->data, 1, s->length, 1, 1); 152 139 #endif 153 #endif154 140 }
Note: See TracChangeset
for help on using the changeset viewer.