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

Method vcopy

src/ialglib.cpp:376–395  ·  view source on GitHub ↗

This subroutine copies unaligned real vector ********************************************************************/

Source from the content-addressed store, hash-verified

374This subroutine copies unaligned real vector
375********************************************************************/
376void ialglib::vcopy(int n, const double *a, int stridea, double *b, int strideb)
377{
378 int i, n2;
379 if( stridea==1 && strideb==1 )
380 {
381 n2 = n/2;
382 for(i=n2; i!=0; i--, a+=2, b+=2)
383 {
384 b[0] = a[0];
385 b[1] = a[1];
386 }
387 if( n%2!=0 )
388 b[0] = a[0];
389 }
390 else
391 {
392 for(i=0; i<n; i++,a+=stridea,b+=strideb)
393 *b = *a;
394 }
395}
396
397
398/********************************************************************

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected