- 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
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio_priv.h
rf45dd12 r44e9eeb5 63 63 #ifdef HAVE_LIMITS_H 64 64 #include <limits.h> // for CHAR_BIT, in C99 standard 65 #endif 66 67 #ifdef HAVE_ACCELERATE 68 #define HAVE_ATLAS 1 69 #include <Accelerate/Accelerate.h> 70 #elif HAVE_ATLAS_CBLAS_H 71 #define HAVE_ATLAS 1 72 #include <atlas/cblas.h> 73 #else 74 #undef HAVE_ATLAS 75 #endif 76 77 #ifdef HAVE_ACCELERATE 78 #include <Accelerate/Accelerate.h> 79 #define aubio_vDSP_mmov vDSP_mmov 80 #define aubio_vDSP_vmul vDSP_vmul 81 #define aubio_vDSP_vfill vDSP_vfill 82 #else /* HAVE_AUBIO_DOUBLE */ 83 #define aubio_vDSP_mmov vDSP_mmovD 84 #define aubio_vDSP_vmul vDSP_vmulD 85 #define aubio_vDSP_vfill vDSP_vfillD 86 #endif /* HAVE_AUBIO_DOUBLE */ 87 #endif 88 89 #ifdef HAVE_ATLAS 90 #if !HAVE_AUBIO_DOUBLE 91 #define aubio_catlas_set catlas_sset 92 #define aubio_cblas_copy cblas_scopy 93 #else /* HAVE_AUBIO_DOUBLE */ 94 #define aubio_catlas_set catlas_dset 95 #define aubio_cblas_copy cblas_dcopy 96 #endif /* HAVE_AUBIO_DOUBLE */ 97 98 #if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS) 99 #define HAVE_NOOPT 1 100 #else 101 #undef HAVE_NOOPT 65 102 #endif 66 103 -
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.