Changeset 4b943729 for src/cvec.c


Ignore:
Timestamp:
Oct 1, 2017, 3:30:10 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
Children:
0ad2e17
Parents:
95f5c83
Message:

src/aubio_priv.h: define ipp aliases for single/double precision, use them in cvec and fvec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/cvec.c

    r95f5c83 r4b943729  
    8787  }
    8888#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);
    9691#elif defined(HAVE_MEMCPY_HACKS)
    9792  memcpy(t->norm, s->norm, t->length * sizeof(smpl_t));
     
    108103void cvec_norm_set_all(cvec_t *s, smpl_t val) {
    109104#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);
    115106#else
    116107  uint_t j;
     
    123114void cvec_norm_zeros(cvec_t *s) {
    124115#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);
    130117#elif defined(HAVE_MEMCPY_HACKS)
    131118  memset(s->norm, 0, s->length * sizeof(smpl_t));
     
    141128void cvec_phas_set_all (cvec_t *s, smpl_t val) {
    142129#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);
    148131#else
    149132  uint_t j;
     
    156139void cvec_phas_zeros(cvec_t *s) {
    157140#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);
    163142#elif defined(HAVE_MEMCPY_HACKS)
    164143  memset(s->phas, 0, s->length * sizeof(smpl_t));
     
    179158void cvec_logmag(cvec_t *s, smpl_t lambda) {
    180159  #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);
    190163  #else
    191164    uint_t j;
Note: See TracChangeset for help on using the changeset viewer.