MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / vmoveneg

Method vmoveneg

src/ap.cpp:312–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void ap::vmoveneg(double *vdst, int stride_dst, const double* vsrc, int stride_src, int n)
313{
314 int i;
315 if( stride_dst!=1 || stride_src!=1 )
316 {
317 //
318 // general unoptimized case
319 //
320 for(i=0; i<n; i++, vdst+=stride_dst, vsrc+=stride_src)
321 *vdst = -*vsrc;
322 }
323 else
324 {
325 //
326 // highly optimized case
327 //
328 int n2 = n/2;
329 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
330 {
331 vdst[0] = -vsrc[0];
332 vdst[1] = -vsrc[1];
333 }
334 if( n%2!=0 )
335 vdst[0] = -vsrc[0];
336 }
337}
338
339void ap::vmoveneg(ap::complex *vdst, int stride_dst, const ap::complex* vsrc, int stride_src, const char *conj_src, int n)
340{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected