| 99 | } |
| 100 | |
| 101 | void fvec_weight(fvec_t *s, const fvec_t *weight) { |
| 102 | uint_t length = MIN(s->length, weight->length); |
| 103 | #if defined(HAVE_INTEL_IPP) |
| 104 | aubio_ippsMul(s->data, weight->data, s->data, (int)length); |
| 105 | #elif defined(HAVE_ACCELERATE) |
| 106 | aubio_vDSP_vmul( s->data, 1, weight->data, 1, s->data, 1, length ); |
| 107 | #else |
| 108 | uint_t j; |
| 109 | for (j = 0; j < length; j++) { |
| 110 | s->data[j] *= weight->data[j]; |
| 111 | } |
| 112 | #endif /* HAVE_ACCELERATE */ |
| 113 | } |
| 114 | |
| 115 | void fvec_weighted_copy(const fvec_t *in, const fvec_t *weight, fvec_t *out) { |
| 116 | uint_t length = MIN(in->length, MIN(out->length, weight->length)); |
no outgoing calls
no test coverage detected