Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fvec.c

    r1dd95c7 r7166ef8  
    2828#define aubio_vDSP_vmul       vDSP_vmul
    2929#define aubio_vDSP_vfill      vDSP_vfill
     30#define aubio_catlas_set      catlas_sset
    3031#else /* HAVE_AUBIO_DOUBLE */
    3132#define aubio_vDSP_mmov       vDSP_mmovD
    3233#define aubio_vDSP_vmul       vDSP_vmulD
    3334#define aubio_vDSP_vfill      vDSP_vfillD
     35#define aubio_catlas_set      catlas_dset
    3436#endif /* HAVE_AUBIO_DOUBLE */
    3537#endif
     
    8082  }
    8183#else
     84  //aubio_catlas_set(s->length, val, s->data, 1);
    8285  aubio_vDSP_vfill(&val, s->data, 1, s->length);
    8386#endif
     
    119122}
    120123
     124void fvec_weighted_copy(fvec_t *in, fvec_t *weight, fvec_t *out) {
     125#ifndef HAVE_ACCELERATE
     126  uint_t j;
     127  uint_t length = MIN(s->length, weight->length);
     128  for (j=0; j< length; j++) {
     129    out->data[j] = in->data[j] * weight->data[j];
     130  }
     131#else
     132  aubio_vDSP_vmul(in->data, 1, weight->data, 1, out->data, 1, out->length);
     133#endif /* HAVE_ACCELERATE */
     134}
     135
    121136void fvec_copy(fvec_t *s, fvec_t *t) {
    122137  if (s->length != t->length) {
Note: See TracChangeset for help on using the changeset viewer.