190 SUBROUTINE ctbsv(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
199 CHARACTER DIAG,TRANS,UPLO
202 COMPLEX A(lda,*),X(*)
209 parameter(zero= (0.0e+0,0.0e+0))
213 INTEGER I,INFO,IX,J,JX,KPLUS1,KX,L
214 LOGICAL NOCONJ,NOUNIT
224 INTRINSIC conjg,max,min
230 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
232 ELSE IF (.NOT.lsame(trans,
'N') .AND. .NOT.lsame(trans,
'T') .AND.
233 + .NOT.lsame(trans,
'C'))
THEN
235 ELSE IF (.NOT.lsame(diag,
'U') .AND. .NOT.lsame(diag,
'N'))
THEN
237 ELSE IF (n.LT.0)
THEN
239 ELSE IF (k.LT.0)
THEN
241 ELSE IF (lda.LT. (k+1))
THEN
243 ELSE IF (incx.EQ.0)
THEN
247 CALL xerbla(
'CTBSV ',info)
255 noconj = lsame(trans,
'T')
256 nounit = lsame(diag,
'N')
263 ELSE IF (incx.NE.1)
THEN
270 IF (lsame(trans,
'N'))
THEN
274 IF (lsame(uplo,
'U'))
THEN
278 IF (x(j).NE.zero)
THEN
280 IF (nounit) x(j) = x(j)/a(kplus1,j)
282 DO 10 i = j - 1,max(1,j-k),-1
283 x(i) = x(i) - temp*a(l+i,j)
292 IF (x(jx).NE.zero)
THEN
295 IF (nounit) x(jx) = x(jx)/a(kplus1,j)
297 DO 30 i = j - 1,max(1,j-k),-1
298 x(ix) = x(ix) - temp*a(l+i,j)
308 IF (x(j).NE.zero)
THEN
310 IF (nounit) x(j) = x(j)/a(1,j)
312 DO 50 i = j + 1,min(n,j+k)
313 x(i) = x(i) - temp*a(l+i,j)
321 IF (x(jx).NE.zero)
THEN
324 IF (nounit) x(jx) = x(jx)/a(1,j)
326 DO 70 i = j + 1,min(n,j+k)
327 x(ix) = x(ix) - temp*a(l+i,j)
339 IF (lsame(uplo,
'U'))
THEN
346 DO 90 i = max(1,j-k),j - 1
347 temp = temp - a(l+i,j)*x(i)
349 IF (nounit) temp = temp/a(kplus1,j)
351 DO 100 i = max(1,j-k),j - 1
352 temp = temp - conjg(a(l+i,j))*x(i)
354 IF (nounit) temp = temp/conjg(a(kplus1,j))
365 DO 120 i = max(1,j-k),j - 1
366 temp = temp - a(l+i,j)*x(ix)
369 IF (nounit) temp = temp/a(kplus1,j)
371 DO 130 i = max(1,j-k),j - 1
372 temp = temp - conjg(a(l+i,j))*x(ix)
375 IF (nounit) temp = temp/conjg(a(kplus1,j))
379 IF (j.GT.k) kx = kx + incx
388 DO 150 i = min(n,j+k),j + 1,-1
389 temp = temp - a(l+i,j)*x(i)
391 IF (nounit) temp = temp/a(1,j)
393 DO 160 i = min(n,j+k),j + 1,-1
394 temp = temp - conjg(a(l+i,j))*x(i)
396 IF (nounit) temp = temp/conjg(a(1,j))
408 DO 180 i = min(n,j+k),j + 1,-1
409 temp = temp - a(l+i,j)*x(ix)
412 IF (nounit) temp = temp/a(1,j)
414 DO 190 i = min(n,j+k),j + 1,-1
415 temp = temp - conjg(a(l+i,j))*x(ix)
418 IF (nounit) temp = temp/conjg(a(1,j))
422 IF ((n-j).GE.k) kx = kx - incx
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctbsv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
CTBSV