source: src/vecutils.c @ cc469dd

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change on this file since cc469dd was 33d0242, checked in by Paul Brossier <piem@piem.org>, 8 years ago

src/aubio_priv.h: move include config.h here

  • Property mode set to 100644
File size: 729 bytes
RevLine 
[83963b3]1#include "aubio_priv.h"
[916f8983]2#include "types.h"
3#include "fvec.h"
4#include "cvec.h"
5#include "vecutils.h"
6
7#define AUBIO_OP(OPNAME, OP, TYPE, OBJ) \
8void TYPE ## _ ## OPNAME (TYPE ## _t *o) \
9{ \
[c17a0ee]10  uint_t j; \
11  for (j = 0; j < o->length; j++) { \
12    o->OBJ[j] = OP (o->OBJ[j]); \
[916f8983]13  } \
14}
15
[b155ed03]16#define AUBIO_OP_C(OPNAME, OP) \
17  AUBIO_OP(OPNAME, OP, fvec, data)
[916f8983]18
[b155ed03]19AUBIO_OP_C(exp, EXP)
20AUBIO_OP_C(cos, COS)
21AUBIO_OP_C(sin, SIN)
22AUBIO_OP_C(abs, ABS)
23AUBIO_OP_C(sqrt, SQRT)
24AUBIO_OP_C(log10, SAFE_LOG10)
25AUBIO_OP_C(log, SAFE_LOG)
26AUBIO_OP_C(floor, FLOOR)
27AUBIO_OP_C(ceil, CEIL)
28AUBIO_OP_C(round, ROUND)
[916f8983]29
30void fvec_pow (fvec_t *s, smpl_t power)
31{
[c17a0ee]32  uint_t j;
33  for (j = 0; j < s->length; j++) {
34    s->data[j] = POW(s->data[j], power);
[916f8983]35  }
36}
Note: See TracBrowser for help on using the repository browser.