Changeset b155ed03


Ignore:
Timestamp:
Dec 17, 2013, 4:42:20 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
ad76ce2
Parents:
aa033c2
Message:

src/vecutils.*: remove cvec functions for clarity

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/vecutils.c

    raa033c2 rb155ed03  
    1515}
    1616
    17 #define AUBIO_OP_C_AND_F(OPNAME, OP) \
    18   AUBIO_OP(OPNAME, OP, fvec, data) \
    19   AUBIO_OP(norm ## _ ## OPNAME, OP, cvec, norm) \
    20   AUBIO_OP(phas ## _ ## OPNAME, OP, cvec, phas)
     17#define AUBIO_OP_C(OPNAME, OP) \
     18  AUBIO_OP(OPNAME, OP, fvec, data)
    2119
    22 AUBIO_OP_C_AND_F(exp, EXP)
    23 AUBIO_OP_C_AND_F(cos, COS)
    24 AUBIO_OP_C_AND_F(sin, SIN)
    25 AUBIO_OP_C_AND_F(abs, ABS)
    26 AUBIO_OP_C_AND_F(sqrt, SQRT)
    27 AUBIO_OP_C_AND_F(log10, SAFE_LOG10)
    28 AUBIO_OP_C_AND_F(log, SAFE_LOG)
    29 AUBIO_OP_C_AND_F(floor, FLOOR)
    30 AUBIO_OP_C_AND_F(ceil, CEIL)
    31 AUBIO_OP_C_AND_F(round, ROUND)
     20AUBIO_OP_C(exp, EXP)
     21AUBIO_OP_C(cos, COS)
     22AUBIO_OP_C(sin, SIN)
     23AUBIO_OP_C(abs, ABS)
     24AUBIO_OP_C(sqrt, SQRT)
     25AUBIO_OP_C(log10, SAFE_LOG10)
     26AUBIO_OP_C(log, SAFE_LOG)
     27AUBIO_OP_C(floor, FLOOR)
     28AUBIO_OP_C(ceil, CEIL)
     29AUBIO_OP_C(round, ROUND)
    3230
    33 //AUBIO_OP_C_AND_F(pow, POW)
    3431void fvec_pow (fvec_t *s, smpl_t power)
    3532{
     
    3936  }
    4037}
    41 
    42 void cvec_pow (cvec_t *s, smpl_t power)
    43 {
    44   uint_t j;
    45   for (j = 0; j < s->length; j++) {
    46     s->norm[j] = POW(s->norm[j], power);
    47   }
    48 }
    49 
  • src/vecutils.h

    raa033c2 rb155ed03  
    2121/** \file
    2222
    23   Utility functions for ::fvec_t and ::cvec_t objects
     23  Utility functions for ::fvec_t
    2424
    2525 */
     
    110110void fvec_pow (fvec_t *s, smpl_t pow);
    111111
    112 /** compute \f$e^x\f$ of each vector norm elements
    113 
    114   \param s vector to modify
    115 
    116 */
    117 void cvec_norm_exp (cvec_t *s);
    118 
    119 /** compute \f$cos(x)\f$ of each vector norm elements
    120 
    121   \param s vector to modify
    122 
    123 */
    124 void cvec_norm_cos (cvec_t *s);
    125 
    126 /** compute \f$sin(x)\f$ of each vector norm elements
    127 
    128   \param s vector to modify
    129 
    130 */
    131 void cvec_norm_sin (cvec_t *s);
    132 
    133 /** compute the \f$abs(x)\f$ of each vector norm elements
    134 
    135   \param s vector to modify
    136 
    137 */
    138 void cvec_norm_abs (cvec_t *s);
    139 
    140 /** compute the \f$sqrt(x)\f$ of each vector norm elements
    141 
    142   \param s vector to modify
    143 
    144 */
    145 void cvec_norm_sqrt (cvec_t *s);
    146 
    147 /** compute the \f$log10(x)\f$ of each vector norm elements
    148 
    149   \param s vector to modify
    150 
    151 */
    152 void cvec_norm_log10 (cvec_t *s);
    153 
    154 /** compute the \f$log(x)\f$ of each vector norm elements
    155 
    156   \param s vector to modify
    157 
    158 */
    159 void cvec_norm_log (cvec_t *s);
    160 
    161 /** compute the \f$floor(x)\f$ of each vector norm elements
    162 
    163   \param s vector to modify
    164 
    165 */
    166 void cvec_norm_floor (cvec_t *s);
    167 
    168 /** compute the \f$ceil(x)\f$ of each vector norm elements
    169 
    170   \param s vector to modify
    171 
    172 */
    173 void cvec_norm_ceil (cvec_t *s);
    174 
    175 /** compute the \f$round(x)\f$ of each vector norm elements
    176 
    177   \param s vector to modify
    178 
    179 */
    180 void cvec_norm_round (cvec_t *s);
    181 
    182 /** raise each vector norm elements to the power pow
    183 
    184   \param s vector to modify
    185   \param pow power to raise to
    186 
    187 */
    188 void cvec_norm_pow (cvec_t *s, smpl_t pow);
    189 
    190 /** compute \f$e^x\f$ of each vector phas elements
    191 
    192   \param s vector to modify
    193 
    194 */
    195 void cvec_phas_exp (cvec_t *s);
    196 
    197 /** compute \f$cos(x)\f$ of each vector phas elements
    198 
    199   \param s vector to modify
    200 
    201 */
    202 void cvec_phas_cos (cvec_t *s);
    203 
    204 /** compute \f$sin(x)\f$ of each vector phas elements
    205 
    206   \param s vector to modify
    207 
    208 */
    209 void cvec_phas_sin (cvec_t *s);
    210 
    211 /** compute the \f$abs(x)\f$ of each vector phas elements
    212 
    213   \param s vector to modify
    214 
    215 */
    216 void cvec_phas_abs (cvec_t *s);
    217 
    218 /** compute the \f$sqrt(x)\f$ of each vector phas elements
    219 
    220   \param s vector to modify
    221 
    222 */
    223 void cvec_phas_sqrt (cvec_t *s);
    224 
    225 /** compute the \f$log10(x)\f$ of each vector phas elements
    226 
    227   \param s vector to modify
    228 
    229 */
    230 void cvec_phas_log10 (cvec_t *s);
    231 
    232 /** compute the \f$log(x)\f$ of each vector phas elements
    233 
    234   \param s vector to modify
    235 
    236 */
    237 void cvec_phas_log (cvec_t *s);
    238 
    239 /** compute the \f$floor(x)\f$ of each vector phas elements
    240 
    241   \param s vector to modify
    242 
    243 */
    244 void cvec_phas_floor (cvec_t *s);
    245 
    246 /** compute the \f$ceil(x)\f$ of each vector phas elements
    247 
    248   \param s vector to modify
    249 
    250 */
    251 void cvec_phas_ceil (cvec_t *s);
    252 
    253 /** compute the \f$round(x)\f$ of each vector phas elements
    254 
    255   \param s vector to modify
    256 
    257 */
    258 void cvec_phas_round (cvec_t *s);
    259 
    260 /** raise each vector phas elements to the power pow
    261 
    262   \param s vector to modify
    263   \param pow power to raise to
    264 
    265 */
    266 void cvec_phas_pow (cvec_t *s, smpl_t pow);
    267 
    268112#ifdef __cplusplus
    269113}
Note: See TracChangeset for help on using the changeset viewer.