- Timestamp:
- Oct 1, 2017, 3:30:10 PM (7 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
- Children:
- 0ad2e17
- Parents:
- 95f5c83
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio_priv.h
r95f5c83 r4b943729 128 128 #include <ippvm.h> 129 129 #include <ipps.h> 130 #ifndef HAVE_AUBIO_DOUBLE 131 #define aubio_ippsSet ippsSet_32f 132 #define aubio_ippsZero ippsZero_32f 133 #define aubio_ippsCopy ippsCopy_32f 134 #define aubio_ippsMul ippsMul_32f 135 #define aubio_ippsMulC ippsMulC_32f 136 #define aubio_ippsAddC ippsAddC_32f 137 #define aubio_ippsLn ippsLn_32f_A21 138 #define aubio_ippsMean ippsMean_32f 139 #define aubio_ippsSum ippsSum_32f 140 #define aubio_ippsMax ippsMax_32f 141 #define aubio_ippsMin ippsMin_32f 142 #else /* HAVE_AUBIO_DOUBLE */ 143 #define aubio_ippsSet ippsSet_64f 144 #define aubio_ippsZero ippsZero_64f 145 #define aubio_ippsCopy ippsCopy_64f 146 #define aubio_ippsMul ippsMul_64f 147 #define aubio_ippsMulC ippsMulC_64f 148 #define aubio_ippsAddC ippsAddC_64f 149 #define aubio_ippsLn ippsLn_64f_A26 150 #define aubio_ippsMean ippsMean_64f 151 #define aubio_ippsSum ippsSum_64f 152 #define aubio_ippsMax ippsMax_64f 153 #define aubio_ippsMin ippsMin_64f 154 #endif /* HAVE_AUBIO_DOUBLE */ 130 155 #endif 131 156 -
src/cvec.c
r95f5c83 r4b943729 87 87 } 88 88 #if defined(HAVE_INTEL_IPP) 89 #if HAVE_AUBIO_DOUBLE 90 ippsCopy_64f(s->phas, t->phas, (int)s->length); 91 ippsCopy_64f(s->norm, t->norm, (int)s->length); 92 #else 93 ippsCopy_32f(s->phas, t->phas, (int)s->length); 94 ippsCopy_32f(s->norm, t->norm, (int)s->length); 95 #endif 89 aubio_ippsCopy(s->phas, t->phas, (int)s->length); 90 aubio_ippsCopy(s->norm, t->norm, (int)s->length); 96 91 #elif defined(HAVE_MEMCPY_HACKS) 97 92 memcpy(t->norm, s->norm, t->length * sizeof(smpl_t)); … … 108 103 void cvec_norm_set_all(cvec_t *s, smpl_t val) { 109 104 #if defined(HAVE_INTEL_IPP) 110 #if HAVE_AUBIO_DOUBLE 111 ippsSet_64f(val, s->norm, (int)s->length); 112 #else 113 ippsSet_32f(val, s->norm, (int)s->length); 114 #endif 105 aubio_ippsSet(val, s->norm, (int)s->length); 115 106 #else 116 107 uint_t j; … … 123 114 void cvec_norm_zeros(cvec_t *s) { 124 115 #if defined(HAVE_INTEL_IPP) 125 #if HAVE_AUBIO_DOUBLE 126 ippsZero_64f(s->norm, (int)s->length); 127 #else 128 ippsZero_32f(s->norm, (int)s->length); 129 #endif 116 aubio_ippsZero(s->norm, (int)s->length); 130 117 #elif defined(HAVE_MEMCPY_HACKS) 131 118 memset(s->norm, 0, s->length * sizeof(smpl_t)); … … 141 128 void cvec_phas_set_all (cvec_t *s, smpl_t val) { 142 129 #if defined(HAVE_INTEL_IPP) 143 #if HAVE_AUBIO_DOUBLE 144 ippsSet_64f(val, s->phas, (int)s->length); 145 #else 146 ippsSet_32f(val, s->phas, (int)s->length); 147 #endif 130 aubio_ippsSet(val, s->phas, (int)s->length); 148 131 #else 149 132 uint_t j; … … 156 139 void cvec_phas_zeros(cvec_t *s) { 157 140 #if defined(HAVE_INTEL_IPP) 158 #if HAVE_AUBIO_DOUBLE 159 ippsZero_64f(s->phas, (int)s->length); 160 #else 161 ippsZero_32f(s->phas, (int)s->length); 162 #endif 141 aubio_ippsZero(s->phas, (int)s->length); 163 142 #elif defined(HAVE_MEMCPY_HACKS) 164 143 memset(s->phas, 0, s->length * sizeof(smpl_t)); … … 179 158 void cvec_logmag(cvec_t *s, smpl_t lambda) { 180 159 #if defined(HAVE_INTEL_IPP) 181 #if HAVE_AUBIO_DOUBLE 182 ippsMulC_64f(s->norm, lambda, s->norm, (int)s->length); 183 ippsAddC_64f(s->norm, 1.0, s->norm, (int)s->length); 184 ippsLn_64f_A26(s->norm, s->norm, (int)s->length); 185 #else 186 ippsMulC_32f(s->norm, lambda, s->norm, (int)s->length); 187 ippsAddC_32f(s->norm, 1.0, s->norm, (int)s->length); 188 ippsLn_32f_A21(s->norm, s->norm, (int)s->length); 189 #endif 160 aubio_ippsMulC(s->norm, lambda, s->norm, (int)s->length); 161 aubio_ippsAddC(s->norm, 1.0, s->norm, (int)s->length); 162 aubio_ippsLn(s->norm, s->norm, (int)s->length); 190 163 #else 191 164 uint_t j; -
src/fvec.c
r95f5c83 r4b943729 62 62 void fvec_set_all (fvec_t *s, smpl_t val) { 63 63 #if defined(HAVE_INTEL_IPP) 64 #if HAVE_AUBIO_DOUBLE 65 ippsSet_64f(val, s->data, (int)s->length); 66 #else 67 ippsSet_32f(val, s->data, (int)s->length); 68 #endif 64 aubio_ippsSet(val, s->data, (int)s->length); 69 65 #elif defined(HAVE_ATLAS) 70 66 aubio_catlas_set(s->length, val, s->data, 1); … … 82 78 void fvec_zeros(fvec_t *s) { 83 79 #if defined(HAVE_INTEL_IPP) 84 #if HAVE_AUBIO_DOUBLE 85 ippsZero_64f(s->data, (int)s->length); 86 #else 87 ippsZero_32f(s->data, (int)s->length); 88 #endif 80 aubio_ippsZero(s->data, (int)s->length); 89 81 #elif defined(HAVE_ACCELERATE) 90 82 aubio_vDSP_vclr(s->data, 1, s->length); … … 110 102 uint_t length = MIN(s->length, weight->length); 111 103 #if defined(HAVE_INTEL_IPP) 112 #if HAVE_AUBIO_DOUBLE 113 ippsMul_64f(s->data, weight->data, s->data, (int)length); 114 #else 115 ippsMul_32f(s->data, weight->data, s->data, (int)length); 116 #endif 104 aubio_ippsMul(s->data, weight->data, s->data, (int)length); 117 105 #elif defined(HAVE_ACCELERATE) 118 106 aubio_vDSP_vmul( s->data, 1, weight->data, 1, s->data, 1, length ); … … 128 116 uint_t length = MIN(in->length, MIN(out->length, weight->length)); 129 117 #if defined(HAVE_INTEL_IPP) 130 #if HAVE_AUBIO_DOUBLE 131 ippsMul_64f(in->data, weight->data, out->data, (int)length); 132 #else 133 ippsMul_32f(in->data, weight->data, out->data, (int)length); 134 #endif 118 aubio_ippsMul(in->data, weight->data, out->data, (int)length); 135 119 #elif defined(HAVE_ACCELERATE) 136 120 aubio_vDSP_vmul(in->data, 1, weight->data, 1, out->data, 1, length); … … 150 134 } 151 135 #if defined(HAVE_INTEL_IPP) 152 #if HAVE_AUBIO_DOUBLE 153 ippsCopy_64f(s->data, t->data, (int)s->length); 154 #else 155 ippsCopy_32f(s->data, t->data, (int)s->length); 156 #endif 136 aubio_ippsCopy(s->data, t->data, (int)s->length); 157 137 #elif defined(HAVE_ATLAS) 158 138 aubio_cblas_copy(s->length, s->data, 1, t->data, 1); -
src/mathutils.c
r95f5c83 r4b943729 161 161 smpl_t tmp = 0.0; 162 162 #if defined(HAVE_INTEL_IPP) 163 #if HAVE_AUBIO_DOUBLE 164 ippsMean_64f(s->data, (int)s->length, &tmp); 165 #else 166 ippsMean_32f(s->data, (int)s->length, &tmp, ippAlgHintFast); 167 #endif 168 return tmp; 163 aubio_ippsMean(s->data, (int)s->length, &tmp, ippAlgHintFast); 164 return tmp; 169 165 #elif defined(HAVE_ACCELERATE) 170 166 aubio_vDSP_meanv(s->data, 1, &tmp, s->length); … … 184 180 smpl_t tmp = 0.0; 185 181 #if defined(HAVE_INTEL_IPP) 186 #if HAVE_AUBIO_DOUBLE 187 ippsSum_64f(s->data, (int)s->length, &tmp); 188 #else 189 ippsSum_32f(s->data, (int)s->length, &tmp, ippAlgHintFast); 190 #endif 182 aubio_ippsSum(s->data, (int)s->length, &tmp, ippAlgHintFast); 191 183 #elif defined(HAVE_ACCELERATE) 192 184 aubio_vDSP_sve(s->data, 1, &tmp, s->length); … … 205 197 #if defined(HAVE_INTEL_IPP) 206 198 smpl_t tmp = 0.; 207 #if HAVE_AUBIO_DOUBLE 208 ippsMax_64f( s->data, (int)s->length, &tmp); 209 #else 210 ippsMax_32f( s->data, (int)s->length, &tmp); 211 #endif 199 aubio_ippsMax( s->data, (int)s->length, &tmp); 212 200 #elif defined(HAVE_ACCELERATE) 213 201 smpl_t tmp = 0.; … … 228 216 #if defined(HAVE_INTEL_IPP) 229 217 smpl_t tmp = 0.; 230 #if HAVE_AUBIO_DOUBLE 231 ippsMin_64f(s->data, (int)s->length, &tmp); 232 #else 233 ippsMin_32f(s->data, (int)s->length, &tmp); 234 #endif 218 aubio_ippsMin(s->data, (int)s->length, &tmp); 235 219 #elif defined(HAVE_ACCELERATE) 236 220 smpl_t tmp = 0.;
Note: See TracChangeset
for help on using the changeset viewer.