1 SUBROUTINE dtrsv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX )
4 CHARACTER*1 DIAG, TRANS, UPLO
6 DOUBLE PRECISION A( LDA, * ), X( * )
104 DOUBLE PRECISION ZERO
105 parameter( zero = 0.0d+0 )
107 DOUBLE PRECISION TEMP
108 INTEGER I, INFO, IX, J, JX, KX
123 IF ( .NOT.lsame( uplo ,
'U' ).AND.
124 $ .NOT.lsame( uplo ,
'L' ) )
THEN
126 ELSE IF( .NOT.lsame( trans,
'N' ).AND.
127 $ .NOT.lsame( trans,
'T' ).AND.
128 $ .NOT.lsame( trans,
'C' ) )
THEN
130 ELSE IF( .NOT.lsame( diag ,
'U' ).AND.
131 $ .NOT.lsame( diag ,
'N' ) )
THEN
133 ELSE IF( n.LT.0 )
THEN
135 ELSE IF( lda.LT.max( 1, n ) )
THEN
137 ELSE IF( incx.EQ.0 )
THEN
141 CALL xerbla(
'DTRSV ', info )
150 nounit = lsame( diag,
'N' )
156 kx = 1 - ( n - 1 )*incx
157 ELSE IF( incx.NE.1 )
THEN
164 IF( lsame( trans,
'N' ) )
THEN
168 IF( lsame( uplo,
'U' ) )
THEN
171 IF( x( j ).NE.zero )
THEN
173 $ x( j ) = x( j )/a( j, j )
175 DO 10, i = j - 1, 1, -1
176 x( i ) = x( i ) - temp*a( i, j )
181 jx = kx + ( n - 1 )*incx
183 IF( x( jx ).NE.zero )
THEN
185 $ x( jx ) = x( jx )/a( j, j )
188 DO 30, i = j - 1, 1, -1
190 x( ix ) = x( ix ) - temp*a( i, j )
199 IF( x( j ).NE.zero )
THEN
201 $ x( j ) = x( j )/a( j, j )
204 x( i ) = x( i ) - temp*a( i, j )
211 IF( x( jx ).NE.zero )
THEN
213 $ x( jx ) = x( jx )/a( j, j )
218 x( ix ) = x( ix ) - temp*a( i, j )
229 IF( lsame( uplo,
'U' ) )
THEN
234 temp = temp - a( i, j )*x( i )
237 $ temp = temp/a( j, j )
246 temp = temp - a( i, j )*x( ix )
250 $ temp = temp/a( j, j )
259 DO 130, i = n, j + 1, -1
260 temp = temp - a( i, j )*x( i )
263 $ temp = temp/a( j, j )
267 kx = kx + ( n - 1 )*incx
272 DO 150, i = n, j + 1, -1
273 temp = temp - a( i, j )*x( ix )
277 $ temp = temp/a( j, j )
subroutine dtrsv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
subroutine xerbla(SRNAME, INFO)