| 518 | } |
| 519 | |
| 520 | void ap::vadd(double *vdst, int stride_dst, const double *vsrc, int stride_src, int n) |
| 521 | { |
| 522 | int i; |
| 523 | if( stride_dst!=1 || stride_src!=1 ) |
| 524 | { |
| 525 | // |
| 526 | // general unoptimized case |
| 527 | // |
| 528 | for(i=0; i<n; i++, vdst+=stride_dst, vsrc+=stride_src) |
| 529 | *vdst += *vsrc; |
| 530 | } |
| 531 | else |
| 532 | { |
| 533 | // |
| 534 | // highly optimized case |
| 535 | // |
| 536 | int n2 = n/2; |
| 537 | for(i=0; i<n2; i++, vdst+=2, vsrc+=2) |
| 538 | { |
| 539 | vdst[0] += vsrc[0]; |
| 540 | vdst[1] += vsrc[1]; |
| 541 | } |
| 542 | if( n%2!=0 ) |
| 543 | vdst[0] += vsrc[0]; |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | void ap::vadd(ap::complex *vdst, int stride_dst, const ap::complex *vsrc, int stride_src, const char *conj_src, int n) |
| 548 | { |
nothing calls this directly
no outgoing calls
no test coverage detected