143 SUBROUTINE dtpsv(UPLO,TRANS,DIAG,N,AP,X,INCX)
151 CHARACTER DIAG,TRANS,UPLO
154 DOUBLE PRECISION AP(*),X(*)
160 DOUBLE PRECISION ZERO
161 parameter(zero=0.0d+0)
164 DOUBLE PRECISION TEMP
165 INTEGER I,INFO,IX,J,JX,K,KK,KX
179 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
181 ELSE IF (.NOT.lsame(trans,
'N') .AND.
182 + .NOT.lsame(trans,
'T') .AND.
183 + .NOT.lsame(trans,
'C'))
THEN
185 ELSE IF (.NOT.lsame(diag,
'U') .AND.
186 + .NOT.lsame(diag,
'N'))
THEN
188 ELSE IF (n.LT.0)
THEN
190 ELSE IF (incx.EQ.0)
THEN
194 CALL xerbla(
'DTPSV ',info)
202 nounit = lsame(diag,
'N')
209 ELSE IF (incx.NE.1)
THEN
216 IF (lsame(trans,
'N'))
THEN
220 IF (lsame(uplo,
'U'))
THEN
224 IF (x(j).NE.zero)
THEN
225 IF (nounit) x(j) = x(j)/ap(kk)
229 x(i) = x(i) - temp*ap(k)
238 IF (x(jx).NE.zero)
THEN
239 IF (nounit) x(jx) = x(jx)/ap(kk)
242 DO 30 k = kk - 1,kk - j + 1,-1
244 x(ix) = x(ix) - temp*ap(k)
255 IF (x(j).NE.zero)
THEN
256 IF (nounit) x(j) = x(j)/ap(kk)
260 x(i) = x(i) - temp*ap(k)
269 IF (x(jx).NE.zero)
THEN
270 IF (nounit) x(jx) = x(jx)/ap(kk)
273 DO 70 k = kk + 1,kk + n - j
275 x(ix) = x(ix) - temp*ap(k)
287 IF (lsame(uplo,
'U'))
THEN
294 temp = temp - ap(k)*x(i)
297 IF (nounit) temp = temp/ap(kk+j-1)
306 DO 110 k = kk,kk + j - 2
307 temp = temp - ap(k)*x(ix)
310 IF (nounit) temp = temp/ap(kk+j-1)
322 DO 130 i = n,j + 1,-1
323 temp = temp - ap(k)*x(i)
326 IF (nounit) temp = temp/ap(kk-n+j)
336 DO 150 k = kk,kk - (n- (j+1)),-1
337 temp = temp - ap(k)*x(ix)
340 IF (nounit) temp = temp/ap(kk-n+j)
subroutine xerbla(srname, info)
subroutine dtpsv(uplo, trans, diag, n, ap, x, incx)
DTPSV