187 SUBROUTINE ctbmv(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. .NOT.
lsame(trans,
'T') .AND.
230 + .NOT.
lsame(trans,
'C'))
THEN
232 ELSE IF (.NOT.
lsame(diag,
'U') .AND. .NOT.
lsame(diag,
'N'))
THEN
234 ELSE IF (n.LT.0)
THEN
236 ELSE IF (k.LT.0)
THEN
238 ELSE IF (lda.LT. (k+1))
THEN
240 ELSE IF (incx.EQ.0)
THEN
244 CALL
xerbla(
'CTBMV ',info)
252 noconj =
lsame(trans,
'T')
253 nounit =
lsame(diag,
'N')
260 ELSE IF (incx.NE.1)
THEN
267 IF (
lsame(trans,
'N'))
THEN
271 IF (
lsame(uplo,
'U'))
THEN
275 IF (x(j).NE.zero)
THEN
278 DO 10 i = max(1,j-k),j - 1
279 x(i) = x(i) + temp*a(l+i,j)
281 IF (nounit) x(j) = x(j)*a(kplus1,j)
287 IF (x(jx).NE.zero)
THEN
291 DO 30 i = max(1,j-k),j - 1
292 x(ix) = x(ix) + temp*a(l+i,j)
295 IF (nounit) x(jx) = x(jx)*a(kplus1,j)
298 IF (j.GT.k) kx = kx + incx
304 IF (x(j).NE.zero)
THEN
307 DO 50 i = min(n,j+k),j + 1,-1
308 x(i) = x(i) + temp*a(l+i,j)
310 IF (nounit) x(j) = x(j)*a(1,j)
317 IF (x(jx).NE.zero)
THEN
321 DO 70 i = min(n,j+k),j + 1,-1
322 x(ix) = x(ix) + temp*a(l+i,j)
325 IF (nounit) x(jx) = x(jx)*a(1,j)
328 IF ((n-j).GE.k) kx = kx - incx
336 IF (
lsame(uplo,
'U'))
THEN
343 IF (nounit) temp = temp*a(kplus1,j)
344 DO 90 i = j - 1,max(1,j-k),-1
345 temp = temp + a(l+i,j)*x(i)
348 IF (nounit) temp = temp*conjg(a(kplus1,j))
349 DO 100 i = j - 1,max(1,j-k),-1
350 temp = temp + conjg(a(l+i,j))*x(i)
364 IF (nounit) temp = temp*a(kplus1,j)
365 DO 120 i = j - 1,max(1,j-k),-1
366 temp = temp + a(l+i,j)*x(ix)
370 IF (nounit) temp = temp*conjg(a(kplus1,j))
371 DO 130 i = j - 1,max(1,j-k),-1
372 temp = temp + conjg(a(l+i,j))*x(ix)
386 IF (nounit) temp = temp*a(1,j)
387 DO 150 i = j + 1,min(n,j+k)
388 temp = temp + a(l+i,j)*x(i)
391 IF (nounit) temp = temp*conjg(a(1,j))
392 DO 160 i = j + 1,min(n,j+k)
393 temp = temp + conjg(a(l+i,j))*x(i)
406 IF (nounit) temp = temp*a(1,j)
407 DO 180 i = j + 1,min(n,j+k)
408 temp = temp + a(l+i,j)*x(ix)
412 IF (nounit) temp = temp*conjg(a(1,j))
413 DO 190 i = j + 1,min(n,j+k)
414 temp = temp + conjg(a(l+i,j))*x(ix)