diff options
author | deaglanhalligan <deaglanhalligan@8a072113-8704-0410-8d35-dd094bca7971> | 2009-02-13 23:58:46 +0000 |
---|---|---|
committer | deaglanhalligan <deaglanhalligan@8a072113-8704-0410-8d35-dd094bca7971> | 2009-02-13 23:58:46 +0000 |
commit | 46e09e3c99a1c6aeedcde4281d7625a76f48d315 (patch) | |
tree | 942c090e0a2c3b96035d4a7187459c460cb35a5d /SRC/zla_porcond_x.f | |
parent | 165a76fe3b8aaf2e928c1a2ebdf0d9444d98a22f (diff) | |
download | lapack-46e09e3c99a1c6aeedcde4281d7625a76f48d315.tar.gz lapack-46e09e3c99a1c6aeedcde4281d7625a76f48d315.tar.bz2 lapack-46e09e3c99a1c6aeedcde4281d7625a76f48d315.zip |
Restructured loops in {c,z}la_yyrcond_{x,c} and {s,c,d,z}la_yyamv to do less comparisons.
Diffstat (limited to 'SRC/zla_porcond_x.f')
-rw-r--r-- | SRC/zla_porcond_x.f | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/SRC/zla_porcond_x.f b/SRC/zla_porcond_x.f index 2692dad6..3b93670e 100644 --- a/SRC/zla_porcond_x.f +++ b/SRC/zla_porcond_x.f @@ -33,7 +33,7 @@ * * WORK COMPLEX*16 workspace of size 2*N. * -* RWORK DOUBLE PRECISION workspace of size 3*N. +* RWORK DOUBLE PRECISION workspace of size N. * * ===================================================================== * @@ -83,12 +83,11 @@ IF ( UP ) THEN DO I = 1, N TMP = 0.0D+0 - DO J = 1, N - IF ( I.GT.J ) THEN - TMP = TMP + CABS1( A( J, I ) * X( J ) ) - ELSE - TMP = TMP + CABS1( A( I, J ) * X( J ) ) - END IF + DO J = 1, I + TMP = TMP + CABS1( A( J, I ) * X( J ) ) + END DO + DO J = I+1, N + TMP = TMP + CABS1( A( I, J ) * X( J ) ) END DO RWORK( I ) = TMP ANORM = MAX( ANORM, TMP ) @@ -96,12 +95,11 @@ ELSE DO I = 1, N TMP = 0.0D+0 - DO J = 1, N - IF ( I.LT.J ) THEN - TMP = TMP + CABS1( A( J, I ) * X( J ) ) - ELSE - TMP = TMP + CABS1( A( I, J ) * X( J ) ) - END IF + DO J = 1, I + TMP = TMP + CABS1( A( I, J ) * X( J ) ) + END DO + DO J = I+1, N + TMP = TMP + CABS1( A( J, I ) * X( J ) ) END DO RWORK( I ) = TMP ANORM = MAX( ANORM, TMP ) |