145 SUBROUTINE ctpsv(UPLO,TRANS,DIAG,N,AP,X,INCX)
154 CHARACTER DIAG,TRANS,UPLO
164 parameter(zero= (0.0e+0,0.0e+0))
168 INTEGER I,INFO,IX,J,JX,K,KK,KX
169 LOGICAL NOCONJ,NOUNIT
185 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
187 ELSE IF (.NOT.lsame(trans,
'N') .AND. .NOT.lsame(trans,
'T') .AND.
188 + .NOT.lsame(trans,
'C'))
THEN
190 ELSE IF (.NOT.lsame(diag,
'U') .AND. .NOT.lsame(diag,
'N'))
THEN
192 ELSE IF (n.LT.0)
THEN
194 ELSE IF (incx.EQ.0)
THEN
198 CALL xerbla(
'CTPSV ',info)
206 noconj = lsame(trans,
'T')
207 nounit = lsame(diag,
'N')
214 ELSE IF (incx.NE.1)
THEN
221 IF (lsame(trans,
'N'))
THEN
225 IF (lsame(uplo,
'U'))
THEN
229 IF (x(j).NE.zero)
THEN
230 IF (nounit) x(j) = x(j)/ap(kk)
234 x(i) = x(i) - temp*ap(k)
243 IF (x(jx).NE.zero)
THEN
244 IF (nounit) x(jx) = x(jx)/ap(kk)
247 DO 30 k = kk - 1,kk - j + 1,-1
249 x(ix) = x(ix) - temp*ap(k)
260 IF (x(j).NE.zero)
THEN
261 IF (nounit) x(j) = x(j)/ap(kk)
265 x(i) = x(i) - temp*ap(k)
274 IF (x(jx).NE.zero)
THEN
275 IF (nounit) x(jx) = x(jx)/ap(kk)
278 DO 70 k = kk + 1,kk + n - j
280 x(ix) = x(ix) - temp*ap(k)
292 IF (lsame(uplo,
'U'))
THEN
300 temp = temp - ap(k)*x(i)
303 IF (nounit) temp = temp/ap(kk+j-1)
306 temp = temp - conjg(ap(k))*x(i)
309 IF (nounit) temp = temp/conjg(ap(kk+j-1))
320 DO 120 k = kk,kk + j - 2
321 temp = temp - ap(k)*x(ix)
324 IF (nounit) temp = temp/ap(kk+j-1)
326 DO 130 k = kk,kk + j - 2
327 temp = temp - conjg(ap(k))*x(ix)
330 IF (nounit) temp = temp/conjg(ap(kk+j-1))
344 DO 150 i = n,j + 1,-1
345 temp = temp - ap(k)*x(i)
348 IF (nounit) temp = temp/ap(kk-n+j)
350 DO 160 i = n,j + 1,-1
351 temp = temp - conjg(ap(k))*x(i)
354 IF (nounit) temp = temp/conjg(ap(kk-n+j))
366 DO 180 k = kk,kk - (n- (j+1)),-1
367 temp = temp - ap(k)*x(ix)
370 IF (nounit) temp = temp/ap(kk-n+j)
372 DO 190 k = kk,kk - (n- (j+1)),-1
373 temp = temp - conjg(ap(k))*x(ix)
376 IF (nounit) temp = temp/conjg(ap(kk-n+j))
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctpsv(UPLO, TRANS, DIAG, N, AP, X, INCX)
CTPSV