Changeset 50961b9 for src


Ignore:
Timestamp:
Sep 6, 2015, 10:20:19 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
b046c8c
Parents:
4aa18e3 (diff), ee6ca74 (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.
Message:

Merge branch 'develop' into accelerate

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    r4aa18e3 r50961b9  
    8181#define aubio_vDSP_vmul       vDSP_vmul
    8282#define aubio_vDSP_vfill      vDSP_vfill
     83#define aubio_vDSP_meanv      vDSP_meanv
     84#define aubio_vDSP_sve        vDSP_sve
     85#define aubio_vDSP_maxv       vDSP_maxv
     86#define aubio_vDSP_maxvi      vDSP_maxvi
     87#define aubio_vDSP_minv       vDSP_minv
     88#define aubio_vDSP_minvi      vDSP_minvi
    8389#else /* HAVE_AUBIO_DOUBLE */
    8490#define aubio_vDSP_mmov       vDSP_mmovD
    8591#define aubio_vDSP_vmul       vDSP_vmulD
    8692#define aubio_vDSP_vfill      vDSP_vfillD
     93#define aubio_vDSP_meanv      vDSP_meanvD
     94#define aubio_vDSP_sve        vDSP_sveD
     95#define aubio_vDSP_maxv       vDSP_maxvD
     96#define aubio_vDSP_maxvi      vDSP_maxviD
     97#define aubio_vDSP_minv       vDSP_minvD
     98#define aubio_vDSP_minvi      vDSP_minviD
    8799#endif /* HAVE_AUBIO_DOUBLE */
    88100#endif /* HAVE_ACCELERATE */
  • src/mathutils.c

    r4aa18e3 r50961b9  
    2626#include "musicutils.h"
    2727#include "config.h"
    28 
    29 #ifdef HAVE_ACCELERATE
    30 #include <Accelerate/Accelerate.h>
    31 #endif
    32 
    33 #if !HAVE_AUBIO_DOUBLE
    34 #define aubio_cblas_xswap cblas_sswap
    35 #define aubio_cblas_dot   cblas_sdot
    36 #else
    37 #define aubio_cblas_xswap cblas_dswap
    38 #define aubio_cblas_dot   cblas_ddot
    39 #endif
    4028
    4129/** Window types */
     
    175163  return tmp / (smpl_t) (s->length);
    176164#else
    177 #if !HAVE_AUBIO_DOUBLE
    178   vDSP_meanv(s->data, 1, &tmp, s->length);
    179 #else /* HAVE_AUBIO_DOUBLE */
    180   vDSP_meanvD(s->data, 1, &tmp, s->length);
    181 #endif /* HAVE_AUBIO_DOUBLE */
     165  aubio_vDSP_meanv(s->data, 1, &tmp, s->length);
    182166  return tmp;
    183167#endif /* HAVE_ACCELERATE */
     
    194178  }
    195179#else
    196 #if !HAVE_AUBIO_DOUBLE
    197   vDSP_sve(s->data, 1, &tmp, s->length);
    198 #else /* HAVE_AUBIO_DOUBLE */
    199   vDSP_sveD(s->data, 1, &tmp, s->length);
    200 #endif /* HAVE_AUBIO_DOUBLE */
     180  aubio_vDSP_sve(s->data, 1, &tmp, s->length);
    201181#endif /* HAVE_ACCELERATE */
    202182  return tmp;
     
    214194#else
    215195  smpl_t tmp = 0.;
    216 #if !HAVE_AUBIO_DOUBLE
    217   vDSP_maxv(s->data, 1, &tmp, s->length);
    218 #else
    219   vDSP_maxvD(s->data, 1, &tmp, s->length);
    220 #endif
     196  aubio_vDSP_maxv(s->data, 1, &tmp, s->length);
    221197#endif
    222198  return tmp;
     
    234210#else
    235211  smpl_t tmp = 0.;
    236 #if !HAVE_AUBIO_DOUBLE
    237   vDSP_minv(s->data, 1, &tmp, s->length);
    238 #else
    239   vDSP_minvD(s->data, 1, &tmp, s->length);
    240 #endif
     212  aubio_vDSP_minv(s->data, 1, &tmp, s->length);
    241213#endif
    242214  return tmp;
     
    256228  smpl_t tmp = 0.;
    257229  uint_t pos = 0.;
    258 #if !HAVE_AUBIO_DOUBLE
    259   vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    260 #else
    261   vDSP_minviD(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    262 #endif
     230  aubio_vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    263231#endif
    264232  return pos;
     
    278246  smpl_t tmp = 0.;
    279247  uint_t pos = 0.;
    280 #if !HAVE_AUBIO_DOUBLE
    281   vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    282 #else
    283   vDSP_maxviD(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    284 #endif
     248  aubio_vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    285249#endif
    286250  return pos;
Note: See TracChangeset for help on using the changeset viewer.