Changeset 7166ef8
- Timestamp:
- Sep 5, 2015, 11:05:43 AM (9 years ago)
- 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:
- 8982328
- Parents:
- 6c8ef58
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fvec.c
r6c8ef58 r7166ef8 122 122 } 123 123 124 void 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 124 136 void fvec_copy(fvec_t *s, fvec_t *t) { 125 137 if (s->length != t->length) { -
src/fvec.h
r6c8ef58 r7166ef8 163 163 void fvec_copy(fvec_t *s, fvec_t *t); 164 164 165 /** make a copy of a vector, applying weights to each element 166 167 \param in input vector 168 \param weight weights vector 169 \param out output vector 170 171 */ 172 void fvec_weighted_copy(fvec_t *in, fvec_t *weight, fvec_t *out); 173 165 174 #ifdef __cplusplus 166 175 }
Note: See TracChangeset
for help on using the changeset viewer.