185 SUBROUTINE ztbmv(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
193 CHARACTER DIAG,TRANS,UPLO
196 COMPLEX*16 A(LDA,*),X(*)
203 parameter(zero= (0.0d+0,0.0d+0))
207 INTEGER I,INFO,IX,J,JX,KPLUS1,KX,L
208 LOGICAL NOCONJ,NOUNIT
218 INTRINSIC dconjg,max,min
224 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
226 ELSE IF (.NOT.lsame(trans,
'N') .AND.
227 + .NOT.lsame(trans,
'T') .AND.
228 + .NOT.lsame(trans,
'C'))
THEN
230 ELSE IF (.NOT.lsame(diag,
'U') .AND.
231 + .NOT.lsame(diag,
'N'))
THEN
233 ELSE IF (n.LT.0)
THEN
235 ELSE IF (k.LT.0)
THEN
237 ELSE IF (lda.LT. (k+1))
THEN
239 ELSE IF (incx.EQ.0)
THEN
243 CALL xerbla(
'ZTBMV ',info)
251 noconj = lsame(trans,
'T')
252 nounit = lsame(diag,
'N')
259 ELSE IF (incx.NE.1)
THEN
266 IF (lsame(trans,
'N'))
THEN
270 IF (lsame(uplo,
'U'))
THEN
274 IF (x(j).NE.zero)
THEN
277 DO 10 i = max(1,j-k),j - 1
278 x(i) = x(i) + temp*a(l+i,j)
280 IF (nounit) x(j) = x(j)*a(kplus1,j)
286 IF (x(jx).NE.zero)
THEN
290 DO 30 i = max(1,j-k),j - 1
291 x(ix) = x(ix) + temp*a(l+i,j)
294 IF (nounit) x(jx) = x(jx)*a(kplus1,j)
297 IF (j.GT.k) kx = kx + incx
303 IF (x(j).NE.zero)
THEN
306 DO 50 i = min(n,j+k),j + 1,-1
307 x(i) = x(i) + temp*a(l+i,j)
309 IF (nounit) x(j) = x(j)*a(1,j)
316 IF (x(jx).NE.zero)
THEN
320 DO 70 i = min(n,j+k),j + 1,-1
321 x(ix) = x(ix) + temp*a(l+i,j)
324 IF (nounit) x(jx) = x(jx)*a(1,j)
327 IF ((n-j).GE.k) kx = kx - incx
335 IF (lsame(uplo,
'U'))
THEN
342 IF (nounit) temp = temp*a(kplus1,j)
343 DO 90 i = j - 1,max(1,j-k),-1
344 temp = temp + a(l+i,j)*x(i)
347 IF (nounit) temp = temp*dconjg(a(kplus1,j))
348 DO 100 i = j - 1,max(1,j-k),-1
349 temp = temp + dconjg(a(l+i,j))*x(i)
363 IF (nounit) temp = temp*a(kplus1,j)
364 DO 120 i = j - 1,max(1,j-k),-1
365 temp = temp + a(l+i,j)*x(ix)
369 IF (nounit) temp = temp*dconjg(a(kplus1,j))
370 DO 130 i = j - 1,max(1,j-k),-1
371 temp = temp + dconjg(a(l+i,j))*x(ix)
385 IF (nounit) temp = temp*a(1,j)
386 DO 150 i = j + 1,min(n,j+k)
387 temp = temp + a(l+i,j)*x(i)
390 IF (nounit) temp = temp*dconjg(a(1,j))
391 DO 160 i = j + 1,min(n,j+k)
392 temp = temp + dconjg(a(l+i,j))*x(i)
405 IF (nounit) temp = temp*a(1,j)
406 DO 180 i = j + 1,min(n,j+k)
407 temp = temp + a(l+i,j)*x(ix)
411 IF (nounit) temp = temp*dconjg(a(1,j))
412 DO 190 i = j + 1,min(n,j+k)
413 temp = temp + dconjg(a(l+i,j))*x(ix)
subroutine xerbla(srname, info)
subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBMV