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

Method vsub

src/ap.cpp:726–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726void ap::vsub(double *vdst, int stride_dst, const double *vsrc, int stride_src, int n)
727{
728 int i;
729 if( stride_dst!=1 || stride_src!=1 )
730 {
731 //
732 // general unoptimized case
733 //
734 for(i=0; i<n; i++, vdst+=stride_dst, vsrc+=stride_src)
735 *vdst -= *vsrc;
736 }
737 else
738 {
739 //
740 // highly optimized case
741 //
742 int n2 = n/2;
743 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
744 {
745 vdst[0] -= vsrc[0];
746 vdst[1] -= vsrc[1];
747 }
748 if( n%2!=0 )
749 vdst[0] -= vsrc[0];
750 }
751}
752
753void ap::vsub(ap::complex *vdst, int stride_dst, const ap::complex *vsrc, int stride_src, const char *conj_src, int n)
754{

Callers

nothing calls this directly

Calls 1

vaddFunction · 0.85

Tested by

no test coverage detected