188 SUBROUTINE ctbsv(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
196 CHARACTER DIAG,TRANS,UPLO
199 COMPLEX A(LDA,*),X(*)
206 parameter(zero= (0.0e+0,0.0e+0))
210 INTEGER I,INFO,IX,J,JX,KPLUS1,KX,L
211 LOGICAL NOCONJ,NOUNIT
221 INTRINSIC conjg,max,min
227 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
229 ELSE IF (.NOT.lsame(trans,
'N') .AND.
230 + .NOT.lsame(trans,
'T') .AND.
231 + .NOT.lsame(trans,
'C'))
THEN
233 ELSE IF (.NOT.lsame(diag,
'U') .AND.
234 + .NOT.lsame(diag,
'N'))
THEN
236 ELSE IF (n.LT.0)
THEN
238 ELSE IF (k.LT.0)
THEN
240 ELSE IF (lda.LT. (k+1))
THEN
242 ELSE IF (incx.EQ.0)
THEN
246 CALL xerbla(
'CTBSV ',info)
254 noconj = lsame(trans,
'T')
255 nounit = lsame(diag,
'N')
262 ELSE IF (incx.NE.1)
THEN
269 IF (lsame(trans,
'N'))
THEN
273 IF (lsame(uplo,
'U'))
THEN
277 IF (x(j).NE.zero)
THEN
279 IF (nounit) x(j) = x(j)/a(kplus1,j)
281 DO 10 i = j - 1,max(1,j-k),-1
282 x(i) = x(i) - temp*a(l+i,j)
291 IF (x(jx).NE.zero)
THEN
294 IF (nounit) x(jx) = x(jx)/a(kplus1,j)
296 DO 30 i = j - 1,max(1,j-k),-1
297 x(ix) = x(ix) - temp*a(l+i,j)
307 IF (x(j).NE.zero)
THEN
309 IF (nounit) x(j) = x(j)/a(1,j)
311 DO 50 i = j + 1,min(n,j+k)
312 x(i) = x(i) - temp*a(l+i,j)
320 IF (x(jx).NE.zero)
THEN
323 IF (nounit) x(jx) = x(jx)/a(1,j)
325 DO 70 i = j + 1,min(n,j+k)
326 x(ix) = x(ix) - temp*a(l+i,j)
338 IF (lsame(uplo,
'U'))
THEN
345 DO 90 i = max(1,j-k),j - 1
346 temp = temp - a(l+i,j)*x(i)
348 IF (nounit) temp = temp/a(kplus1,j)
350 DO 100 i = max(1,j-k),j - 1
351 temp = temp - conjg(a(l+i,j))*x(i)
353 IF (nounit) temp = temp/conjg(a(kplus1,j))
364 DO 120 i = max(1,j-k),j - 1
365 temp = temp - a(l+i,j)*x(ix)
368 IF (nounit) temp = temp/a(kplus1,j)
370 DO 130 i = max(1,j-k),j - 1
371 temp = temp - conjg(a(l+i,j))*x(ix)
374 IF (nounit) temp = temp/conjg(a(kplus1,j))
378 IF (j.GT.k) kx = kx + incx
387 DO 150 i = min(n,j+k),j + 1,-1
388 temp = temp - a(l+i,j)*x(i)
390 IF (nounit) temp = temp/a(1,j)
392 DO 160 i = min(n,j+k),j + 1,-1
393 temp = temp - conjg(a(l+i,j))*x(i)
395 IF (nounit) temp = temp/conjg(a(1,j))
407 DO 180 i = min(n,j+k),j + 1,-1
408 temp = temp - a(l+i,j)*x(ix)
411 IF (nounit) temp = temp/a(1,j)
413 DO 190 i = min(n,j+k),j + 1,-1
414 temp = temp - conjg(a(l+i,j))*x(ix)
417 IF (nounit) temp = temp/conjg(a(1,j))
421 IF ((n-j).GE.k) kx = kx - incx
subroutine xerbla(srname, info)
subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx)
CTBSV