Subroutine */
| 6525 | } /* ctrsv_ */ |
| 6526 | |
| 6527 | /* Subroutine */ int daxpy_(integer *n, doublereal *da, doublereal *dx, |
| 6528 | integer *incx, doublereal *dy, integer *incy) |
| 6529 | { |
| 6530 | /* System generated locals */ |
| 6531 | integer i__1; |
| 6532 | |
| 6533 | /* Local variables */ |
| 6534 | static integer i__, m, ix, iy, mp1; |
| 6535 | |
| 6536 | |
| 6537 | /* |
| 6538 | Purpose |
| 6539 | ======= |
| 6540 | |
| 6541 | DAXPY constant times a vector plus a vector. |
| 6542 | uses unrolled loops for increments equal to one. |
| 6543 | |
| 6544 | Further Details |
| 6545 | =============== |
| 6546 | |
| 6547 | jack dongarra, linpack, 3/11/78. |
| 6548 | modified 12/3/93, array(1) declarations changed to array(*) |
| 6549 | |
| 6550 | ===================================================================== |
| 6551 | */ |
| 6552 | |
| 6553 | /* Parameter adjustments */ |
| 6554 | --dy; |
| 6555 | --dx; |
| 6556 | |
| 6557 | /* Function Body */ |
| 6558 | if (*n <= 0) { |
| 6559 | return 0; |
| 6560 | } |
| 6561 | if (*da == 0.) { |
| 6562 | return 0; |
| 6563 | } |
| 6564 | if (*incx == 1 && *incy == 1) { |
| 6565 | goto L20; |
| 6566 | } |
| 6567 | |
| 6568 | /* |
| 6569 | code for unequal increments or equal increments |
| 6570 | not equal to 1 |
| 6571 | */ |
| 6572 | |
| 6573 | ix = 1; |
| 6574 | iy = 1; |
| 6575 | if (*incx < 0) { |
| 6576 | ix = (-(*n) + 1) * *incx + 1; |
| 6577 | } |
| 6578 | if (*incy < 0) { |
| 6579 | iy = (-(*n) + 1) * *incy + 1; |
| 6580 | } |
| 6581 | i__1 = *n; |
| 6582 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 6583 | dy[iy] += *da * dx[ix]; |
| 6584 | ix += *incx; |