Changeset 44e9eeb5 for src/fvec.c
- Timestamp:
- Sep 5, 2015, 9:14:47 PM (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:
- b8c50c3
- Parents:
- f45dd12
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fvec.c
rf45dd12 r44e9eeb5 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 #else /* HAVE_AUBIO_DOUBLE */31 #define aubio_vDSP_mmov vDSP_mmovD32 #define aubio_vDSP_vmul vDSP_vmulD33 #define aubio_vDSP_vfill vDSP_vfillD34 #endif /* HAVE_AUBIO_DOUBLE */35 #endif36 23 37 24 fvec_t * new_fvec( uint_t length) { … … 74 61 75 62 void fvec_set_all (fvec_t *s, smpl_t val) { 76 #if ndef HAVE_ACCELERATE63 #if !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS) 77 64 uint_t j; 78 65 for (j=0; j< s->length; j++) { 79 66 s->data[j] = val; 80 67 } 81 #else 68 #elif defined(HAVE_ATLAS) 69 aubio_catlas_set(s->length, val, s->data, 1); 70 #elif defined(HAVE_ACCELERATE) 82 71 aubio_vDSP_vfill(&val, s->data, 1, s->length); 83 72 #endif … … 125 114 return; 126 115 } 127 #if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE)116 #if HAVE_NOOPT 128 117 uint_t j; 129 118 for (j=0; j< t->length; j++) { 130 119 t->data[j] = s->data[j]; 131 120 } 132 #else 133 #if defined(HAVE_MEMCPY_HACKS) 121 #elif defined(HAVE_MEMCPY_HACKS) 134 122 memcpy(t->data, s->data, t->length * sizeof(smpl_t)); 135 #else 123 #elif defined(HAVE_ATLAS) 124 aubio_cblas_copy(s->length, s->data, 1, t->data, 1); 125 #elif defined(HAVE_ACCELERATE) 136 126 aubio_vDSP_mmov(s->data, t->data, 1, s->length, 1, 1); 137 127 #endif 138 #endif139 128 }
Note: See TracChangeset
for help on using the changeset viewer.