142 SUBROUTINE dtrsv(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
150 CHARACTER DIAG,TRANS,UPLO
153 DOUBLE PRECISION A(LDA,*),X(*)
159 DOUBLE PRECISION ZERO
160 parameter(zero=0.0d+0)
163 DOUBLE PRECISION TEMP
164 INTEGER I,INFO,IX,J,JX,KX
181 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
183 ELSE IF (.NOT.lsame(trans,
'N') .AND.
184 + .NOT.lsame(trans,
'T') .AND.
185 + .NOT.lsame(trans,
'C'))
THEN
187 ELSE IF (.NOT.lsame(diag,
'U') .AND.
188 + .NOT.lsame(diag,
'N'))
THEN
190 ELSE IF (n.LT.0)
THEN
192 ELSE IF (lda.LT.max(1,n))
THEN
194 ELSE IF (incx.EQ.0)
THEN
198 CALL xerbla(
'DTRSV ',info)
206 nounit = lsame(diag,
'N')
213 ELSE IF (incx.NE.1)
THEN
220 IF (lsame(trans,
'N'))
THEN
224 IF (lsame(uplo,
'U'))
THEN
227 IF (x(j).NE.zero)
THEN
228 IF (nounit) x(j) = x(j)/a(j,j)
231 x(i) = x(i) - temp*a(i,j)
238 IF (x(jx).NE.zero)
THEN
239 IF (nounit) x(jx) = x(jx)/a(j,j)
244 x(ix) = x(ix) - temp*a(i,j)
253 IF (x(j).NE.zero)
THEN
254 IF (nounit) x(j) = x(j)/a(j,j)
257 x(i) = x(i) - temp*a(i,j)
264 IF (x(jx).NE.zero)
THEN
265 IF (nounit) x(jx) = x(jx)/a(j,j)
270 x(ix) = x(ix) - temp*a(i,j)
281 IF (lsame(uplo,
'U'))
THEN
286 temp = temp - a(i,j)*x(i)
288 IF (nounit) temp = temp/a(j,j)
297 temp = temp - a(i,j)*x(ix)
300 IF (nounit) temp = temp/a(j,j)
309 DO 130 i = n,j + 1,-1
310 temp = temp - a(i,j)*x(i)
312 IF (nounit) temp = temp/a(j,j)
321 DO 150 i = n,j + 1,-1
322 temp = temp - a(i,j)*x(ix)
325 IF (nounit) temp = temp/a(j,j)
subroutine xerbla(srname, info)
subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx)
DTRSV