144 SUBROUTINE dtrsv(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
153 CHARACTER diag,trans,uplo
156 DOUBLE PRECISION a(lda,*),x(*)
162 DOUBLE PRECISION zero
163 parameter(zero=0.0d+0)
166 DOUBLE PRECISION temp
167 INTEGER i,info,ix,j,jx,kx
184 IF (.NOT.
lsame(uplo,
'U') .AND. .NOT.
lsame(uplo,
'L'))
THEN
186 ELSE IF (.NOT.
lsame(trans,
'N') .AND. .NOT.
lsame(trans,
'T') .AND.
187 + .NOT.
lsame(trans,
'C'))
THEN
189 ELSE IF (.NOT.
lsame(diag,
'U') .AND. .NOT.
lsame(diag,
'N'))
THEN
191 ELSE IF (n.LT.0)
THEN
193 ELSE IF (lda.LT.max(1,n))
THEN
195 ELSE IF (incx.EQ.0)
THEN
199 CALL
xerbla(
'DTRSV ',info)
207 nounit =
lsame(diag,
'N')
214 ELSE IF (incx.NE.1)
THEN
221 IF (
lsame(trans,
'N'))
THEN
225 IF (
lsame(uplo,
'U'))
THEN
228 IF (x(j).NE.zero)
THEN
229 IF (nounit) x(j) = x(j)/a(j,j)
232 x(i) = x(i) - temp*a(i,j)
239 IF (x(jx).NE.zero)
THEN
240 IF (nounit) x(jx) = x(jx)/a(j,j)
245 x(ix) = x(ix) - temp*a(i,j)
254 IF (x(j).NE.zero)
THEN
255 IF (nounit) x(j) = x(j)/a(j,j)
258 x(i) = x(i) - temp*a(i,j)
265 IF (x(jx).NE.zero)
THEN
266 IF (nounit) x(jx) = x(jx)/a(j,j)
271 x(ix) = x(ix) - temp*a(i,j)
282 IF (
lsame(uplo,
'U'))
THEN
287 temp = temp - a(i,j)*x(i)
289 IF (nounit) temp = temp/a(j,j)
298 temp = temp - a(i,j)*x(ix)
301 IF (nounit) temp = temp/a(j,j)
310 DO 130 i = n,j + 1,-1
311 temp = temp - a(i,j)*x(i)
313 IF (nounit) temp = temp/a(j,j)
322 DO 150 i = n,j + 1,-1
323 temp = temp - a(i,j)*x(ix)
326 IF (nounit) temp = temp/a(j,j)