From c17a0ee55f9441312e444ded19ad5e8fd01f117a Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 4 Dec 2009 01:46:04 +0100 Subject: [PATCH] src/vecutils.c: switch to mono --- src/vecutils.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/vecutils.c b/src/vecutils.c index 66c97165..b52cee5a 100644 --- a/src/vecutils.c +++ b/src/vecutils.c @@ -8,11 +8,9 @@ #define AUBIO_OP(OPNAME, OP, TYPE, OBJ) \ void TYPE ## _ ## OPNAME (TYPE ## _t *o) \ { \ - uint_t i,j; \ - for (i = 0; i < o->channels; i++) { \ - for (j = 0; j < o->length; j++) { \ - o->OBJ[i][j] = OP (o->OBJ[i][j]); \ - } \ + uint_t j; \ + for (j = 0; j < o->length; j++) { \ + o->OBJ[j] = OP (o->OBJ[j]); \ } \ } @@ -34,21 +32,17 @@ AUBIO_OP_C_AND_F(round, ROUND) //AUBIO_OP_C_AND_F(pow, POW) void fvec_pow (fvec_t *s, smpl_t power) { - uint_t i,j; - for (i = 0; i < s->channels; i++) { - for (j = 0; j < s->length; j++) { - s->data[i][j] = POW(s->data[i][j], power); - } + uint_t j; + for (j = 0; j < s->length; j++) { + s->data[j] = POW(s->data[j], power); } } void cvec_pow (cvec_t *s, smpl_t power) { - uint_t i,j; - for (i = 0; i < s->channels; i++) { - for (j = 0; j < s->length; j++) { - s->norm[i][j] = POW(s->norm[i][j], power); - } + uint_t j; + for (j = 0; j < s->length; j++) { + s->norm[j] = POW(s->norm[j], power); } } -- 2.26.2