MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / fvec_shift

Function fvec_shift

deps/aubio/src/mathutils.c:268–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void
269fvec_shift (fvec_t * s)
270{
271 uint_t half = s->length / 2, start = half, j;
272 // if length is odd, middle element is moved to the end
273 if (2 * half < s->length) start ++;
274#ifndef HAVE_BLAS
275 for (j = 0; j < half; j++) {
276 ELEM_SWAP (s->data[j], s->data[j + start]);
277 }
278#else
279 aubio_cblas_swap(half, s->data, 1, s->data + start, 1);
280#endif
281 if (start != half) {
282 for (j = 0; j < half; j++) {
283 ELEM_SWAP (s->data[j + start - 1], s->data[j + start]);
284 }
285 }
286}
287
288void
289fvec_ishift (fvec_t * s)

Callers 1

aubio_pvoc_doFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected