1 SUBROUTINE dtrmv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX )
4 CHARACTER*1 DIAG, TRANS, UPLO
6 DOUBLE PRECISION A( LDA, * ), X( * )
101 DOUBLE PRECISION ZERO
102 parameter( zero = 0.0d+0 )
104 DOUBLE PRECISION TEMP
105 INTEGER I, INFO, IX, J, JX, KX
120 IF ( .NOT.lsame( uplo ,
'U' ).AND.
121 $ .NOT.lsame( uplo ,
'L' ) )
THEN
123 ELSE IF( .NOT.lsame( trans,
'N' ).AND.
124 $ .NOT.lsame( trans,
'T' ).AND.
125 $ .NOT.lsame( trans,
'C' ) )
THEN
127 ELSE IF( .NOT.lsame( diag ,
'U' ).AND.
128 $ .NOT.lsame( diag ,
'N' ) )
THEN
130 ELSE IF( n.LT.0 )
THEN
132 ELSE IF( lda.LT.max( 1, n ) )
THEN
134 ELSE IF( incx.EQ.0 )
THEN
138 CALL xerbla(
'DTRMV ', info )
147 nounit = lsame( diag,
'N' )
153 kx = 1 - ( n - 1 )*incx
154 ELSE IF( incx.NE.1 )
THEN
161 IF( lsame( trans,
'N' ) )
THEN
165 IF( lsame( uplo,
'U' ) )
THEN
168 IF( x( j ).NE.zero )
THEN
171 x( i ) = x( i ) + temp*a( i, j )
174 $ x( j ) = x( j )*a( j, j )
180 IF( x( jx ).NE.zero )
THEN
184 x( ix ) = x( ix ) + temp*a( i, j )
188 $ x( jx ) = x( jx )*a( j, j )
196 IF( x( j ).NE.zero )
THEN
198 DO 50, i = n, j + 1, -1
199 x( i ) = x( i ) + temp*a( i, j )
202 $ x( j ) = x( j )*a( j, j )
206 kx = kx + ( n - 1 )*incx
209 IF( x( jx ).NE.zero )
THEN
212 DO 70, i = n, j + 1, -1
213 x( ix ) = x( ix ) + temp*a( i, j )
217 $ x( jx ) = x( jx )*a( j, j )
227 IF( lsame( uplo,
'U' ) )
THEN
232 $ temp = temp*a( j, j )
233 DO 90, i = j - 1, 1, -1
234 temp = temp + a( i, j )*x( i )
239 jx = kx + ( n - 1 )*incx
244 $ temp = temp*a( j, j )
245 DO 110, i = j - 1, 1, -1
247 temp = temp + a( i, j )*x( ix )
258 $ temp = temp*a( j, j )
260 temp = temp + a( i, j )*x( i )
270 $ temp = temp*a( j, j )
273 temp = temp + a( i, j )*x( ix )
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
subroutine xerbla(SRNAME, INFO)