| 10506 | } /* dtrsm_ */ |
| 10507 | |
| 10508 | doublereal dzasum_(integer *n, doublecomplex *zx, integer *incx) |
| 10509 | { |
| 10510 | /* System generated locals */ |
| 10511 | integer i__1; |
| 10512 | doublereal ret_val; |
| 10513 | |
| 10514 | /* Local variables */ |
| 10515 | static integer i__, ix; |
| 10516 | static doublereal stemp; |
| 10517 | extern doublereal dcabs1_(doublecomplex *); |
| 10518 | |
| 10519 | |
| 10520 | /* |
| 10521 | Purpose |
| 10522 | ======= |
| 10523 | |
| 10524 | DZASUM takes the sum of the absolute values. |
| 10525 | |
| 10526 | Further Details |
| 10527 | =============== |
| 10528 | |
| 10529 | jack dongarra, 3/11/78. |
| 10530 | modified 3/93 to return if incx .le. 0. |
| 10531 | modified 12/3/93, array(1) declarations changed to array(*) |
| 10532 | |
| 10533 | ===================================================================== |
| 10534 | */ |
| 10535 | |
| 10536 | /* Parameter adjustments */ |
| 10537 | --zx; |
| 10538 | |
| 10539 | /* Function Body */ |
| 10540 | ret_val = 0.; |
| 10541 | stemp = 0.; |
| 10542 | if (*n <= 0 || *incx <= 0) { |
| 10543 | return ret_val; |
| 10544 | } |
| 10545 | if (*incx == 1) { |
| 10546 | goto L20; |
| 10547 | } |
| 10548 | |
| 10549 | /* code for increment not equal to 1 */ |
| 10550 | |
| 10551 | ix = 1; |
| 10552 | i__1 = *n; |
| 10553 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 10554 | stemp += dcabs1_(&zx[ix]); |
| 10555 | ix += *incx; |
| 10556 | /* L10: */ |
| 10557 | } |
| 10558 | ret_val = stemp; |
| 10559 | return ret_val; |
| 10560 | |
| 10561 | /* code for increment equal to 1 */ |
| 10562 | |
| 10563 | L20: |
| 10564 | i__1 = *n; |
| 10565 | for (i__ = 1; i__ <= i__1; ++i__) { |