Changeset 4aa18e3 for src/fvec.c


Ignore:
Timestamp:
Sep 6, 2015, 9:45:22 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:
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.
Message:

Merge branch 'develop' into accelerate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fvec.c

    rc59e693 r4aa18e3  
    2121#include "aubio_priv.h"
    2222#include "fvec.h"
    23 
    24 #ifdef HAVE_ACCELERATE
    25 #include <Accelerate/Accelerate.h>
    26 #if !HAVE_AUBIO_DOUBLE
    27 #define aubio_vDSP_mmov       vDSP_mmov
    28 #define aubio_vDSP_vmul       vDSP_vmul
    29 #define aubio_vDSP_vfill      vDSP_vfill
    30 #define aubio_catlas_set      catlas_sset
    31 #else /* HAVE_AUBIO_DOUBLE */
    32 #define aubio_vDSP_mmov       vDSP_mmovD
    33 #define aubio_vDSP_vmul       vDSP_vmulD
    34 #define aubio_vDSP_vfill      vDSP_vfillD
    35 #define aubio_catlas_set      catlas_dset
    36 #endif /* HAVE_AUBIO_DOUBLE */
    37 #endif
    3823
    3924fvec_t * new_fvec( uint_t length) {
     
    7661
    7762void fvec_set_all (fvec_t *s, smpl_t val) {
    78 #ifndef HAVE_ACCELERATE
     63#if !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS)
    7964  uint_t j;
    8065  for (j=0; j< s->length; j++) {
    8166    s->data[j] = val;
    8267  }
    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)
    8571  aubio_vDSP_vfill(&val, s->data, 1, s->length);
    8672#endif
     
    140126    return;
    141127  }
    142 #if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE)
     128#if HAVE_NOOPT
    143129  uint_t j;
    144130  for (j=0; j< t->length; j++) {
    145131    t->data[j] = s->data[j];
    146132  }
    147 #else
    148 #if defined(HAVE_MEMCPY_HACKS)
     133#elif defined(HAVE_MEMCPY_HACKS)
    149134  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)
    151138  aubio_vDSP_mmov(s->data, t->data, 1, s->length, 1, 1);
    152139#endif
    153 #endif
    154140}
Note: See TracChangeset for help on using the changeset viewer.