shithub: aubio

Download patch

ref: b155ed0312ee4f3e5ef1122ad106d7317af3d5b4
parent: aa033c2cd6114c7b826a86f351ad370b13a19131
author: Paul Brossier <[email protected]>
date: Tue Dec 17 05:42:20 EST 2013

src/vecutils.*: remove cvec functions for clarity

--- a/src/vecutils.c
+++ b/src/vecutils.c
@@ -14,23 +14,20 @@
   } \
 }
 
-#define AUBIO_OP_C_AND_F(OPNAME, OP) \
-  AUBIO_OP(OPNAME, OP, fvec, data) \
-  AUBIO_OP(norm ## _ ## OPNAME, OP, cvec, norm) \
-  AUBIO_OP(phas ## _ ## OPNAME, OP, cvec, phas)
+#define AUBIO_OP_C(OPNAME, OP) \
+  AUBIO_OP(OPNAME, OP, fvec, data)
 
-AUBIO_OP_C_AND_F(exp, EXP)
-AUBIO_OP_C_AND_F(cos, COS)
-AUBIO_OP_C_AND_F(sin, SIN)
-AUBIO_OP_C_AND_F(abs, ABS)
-AUBIO_OP_C_AND_F(sqrt, SQRT)
-AUBIO_OP_C_AND_F(log10, SAFE_LOG10)
-AUBIO_OP_C_AND_F(log, SAFE_LOG)
-AUBIO_OP_C_AND_F(floor, FLOOR)
-AUBIO_OP_C_AND_F(ceil, CEIL)
-AUBIO_OP_C_AND_F(round, ROUND)
+AUBIO_OP_C(exp, EXP)
+AUBIO_OP_C(cos, COS)
+AUBIO_OP_C(sin, SIN)
+AUBIO_OP_C(abs, ABS)
+AUBIO_OP_C(sqrt, SQRT)
+AUBIO_OP_C(log10, SAFE_LOG10)
+AUBIO_OP_C(log, SAFE_LOG)
+AUBIO_OP_C(floor, FLOOR)
+AUBIO_OP_C(ceil, CEIL)
+AUBIO_OP_C(round, ROUND)
 
-//AUBIO_OP_C_AND_F(pow, POW)
 void fvec_pow (fvec_t *s, smpl_t power)
 {
   uint_t j;
@@ -38,12 +35,3 @@
     s->data[j] = POW(s->data[j], power);
   }
 }
-
-void cvec_pow (cvec_t *s, smpl_t power)
-{
-  uint_t j;
-  for (j = 0; j < s->length; j++) {
-    s->norm[j] = POW(s->norm[j], power);
-  }
-}
-
--- a/src/vecutils.h
+++ b/src/vecutils.h
@@ -20,7 +20,7 @@
 
 /** \file
 
-  Utility functions for ::fvec_t and ::cvec_t objects
+  Utility functions for ::fvec_t
 
  */
 
@@ -108,162 +108,6 @@
 
 */
 void fvec_pow (fvec_t *s, smpl_t pow);
-
-/** compute \f$e^x\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_exp (cvec_t *s);
-
-/** compute \f$cos(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_cos (cvec_t *s);
-
-/** compute \f$sin(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_sin (cvec_t *s);
-
-/** compute the \f$abs(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_abs (cvec_t *s);
-
-/** compute the \f$sqrt(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_sqrt (cvec_t *s);
-
-/** compute the \f$log10(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_log10 (cvec_t *s);
-
-/** compute the \f$log(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_log (cvec_t *s);
-
-/** compute the \f$floor(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_floor (cvec_t *s);
-
-/** compute the \f$ceil(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_ceil (cvec_t *s);
-
-/** compute the \f$round(x)\f$ of each vector norm elements
-
-  \param s vector to modify
-
-*/
-void cvec_norm_round (cvec_t *s);
-
-/** raise each vector norm elements to the power pow
-
-  \param s vector to modify
-  \param pow power to raise to
-
-*/
-void cvec_norm_pow (cvec_t *s, smpl_t pow);
-
-/** compute \f$e^x\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_exp (cvec_t *s);
-
-/** compute \f$cos(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_cos (cvec_t *s);
-
-/** compute \f$sin(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_sin (cvec_t *s);
-
-/** compute the \f$abs(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_abs (cvec_t *s);
-
-/** compute the \f$sqrt(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_sqrt (cvec_t *s);
-
-/** compute the \f$log10(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_log10 (cvec_t *s);
-
-/** compute the \f$log(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_log (cvec_t *s);
-
-/** compute the \f$floor(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_floor (cvec_t *s);
-
-/** compute the \f$ceil(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_ceil (cvec_t *s);
-
-/** compute the \f$round(x)\f$ of each vector phas elements
-
-  \param s vector to modify
-
-*/
-void cvec_phas_round (cvec_t *s);
-
-/** raise each vector phas elements to the power pow
-
-  \param s vector to modify
-  \param pow power to raise to
-
-*/
-void cvec_phas_pow (cvec_t *s, smpl_t pow);
 
 #ifdef __cplusplus
 }