143 SUBROUTINE ctpsv(UPLO,TRANS,DIAG,N,AP,X,INCX)
151 CHARACTER DIAG,TRANS,UPLO
161 parameter(zero= (0.0e+0,0.0e+0))
165 INTEGER I,INFO,IX,J,JX,K,KK,KX
166 LOGICAL NOCONJ,NOUNIT
182 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
184 ELSE IF (.NOT.lsame(trans,
'N') .AND.
185 + .NOT.lsame(trans,
'T') .AND.
186 + .NOT.lsame(trans,
'C'))
THEN
188 ELSE IF (.NOT.lsame(diag,
'U') .AND.
189 + .NOT.lsame(diag,
'N'))
THEN
191 ELSE IF (n.LT.0)
THEN
193 ELSE IF (incx.EQ.0)
THEN
197 CALL xerbla(
'CTPSV ',info)
205 noconj = lsame(trans,
'T')
206 nounit = lsame(diag,
'N')
213 ELSE IF (incx.NE.1)
THEN
220 IF (lsame(trans,
'N'))
THEN
224 IF (lsame(uplo,
'U'))
THEN
228 IF (x(j).NE.zero)
THEN
229 IF (nounit) x(j) = x(j)/ap(kk)
233 x(i) = x(i) - temp*ap(k)
242 IF (x(jx).NE.zero)
THEN
243 IF (nounit) x(jx) = x(jx)/ap(kk)
246 DO 30 k = kk - 1,kk - j + 1,-1
248 x(ix) = x(ix) - temp*ap(k)
259 IF (x(j).NE.zero)
THEN
260 IF (nounit) x(j) = x(j)/ap(kk)
264 x(i) = x(i) - temp*ap(k)
273 IF (x(jx).NE.zero)
THEN
274 IF (nounit) x(jx) = x(jx)/ap(kk)
277 DO 70 k = kk + 1,kk + n - j
279 x(ix) = x(ix) - temp*ap(k)
291 IF (lsame(uplo,
'U'))
THEN
299 temp = temp - ap(k)*x(i)
302 IF (nounit) temp = temp/ap(kk+j-1)
305 temp = temp - conjg(ap(k))*x(i)
308 IF (nounit) temp = temp/conjg(ap(kk+j-1))
319 DO 120 k = kk,kk + j - 2
320 temp = temp - ap(k)*x(ix)
323 IF (nounit) temp = temp/ap(kk+j-1)
325 DO 130 k = kk,kk + j - 2
326 temp = temp - conjg(ap(k))*x(ix)
329 IF (nounit) temp = temp/conjg(ap(kk+j-1))
343 DO 150 i = n,j + 1,-1
344 temp = temp - ap(k)*x(i)
347 IF (nounit) temp = temp/ap(kk-n+j)
349 DO 160 i = n,j + 1,-1
350 temp = temp - conjg(ap(k))*x(i)
353 IF (nounit) temp = temp/conjg(ap(kk-n+j))
365 DO 180 k = kk,kk - (n- (j+1)),-1
366 temp = temp - ap(k)*x(ix)
369 IF (nounit) temp = temp/ap(kk-n+j)
371 DO 190 k = kk,kk - (n- (j+1)),-1
372 temp = temp - conjg(ap(k))*x(ix)
375 IF (nounit) temp = temp/conjg(ap(kk-n+j))
subroutine xerbla(srname, info)
subroutine ctpsv(uplo, trans, diag, n, ap, x, incx)
CTPSV