186 SUBROUTINE dgbmv(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
194 DOUBLE PRECISION alpha,beta
195 INTEGER incx,incy,kl,ku,lda,m,n
199 DOUBLE PRECISION a(lda,*),x(*),y(*)
205 DOUBLE PRECISION one,zero
206 parameter(one=1.0d+0,zero=0.0d+0)
209 DOUBLE PRECISION temp
210 INTEGER i,info,ix,iy,j,jx,jy,k,kup1,kx,ky,lenx,leny
226 IF (.NOT.
lsame(trans,
'N') .AND. .NOT.
lsame(trans,
'T') .AND.
227 + .NOT.
lsame(trans,
'C'))
THEN
229 ELSE IF (m.LT.0)
THEN
231 ELSE IF (n.LT.0)
THEN
233 ELSE IF (kl.LT.0)
THEN
235 ELSE IF (ku.LT.0)
THEN
237 ELSE IF (lda.LT. (kl+ku+1))
THEN
239 ELSE IF (incx.EQ.0)
THEN
241 ELSE IF (incy.EQ.0)
THEN
245 CALL
xerbla(
'DGBMV ',info)
251 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
252 + ((alpha.EQ.zero).AND. (beta.EQ.one))) return
257 IF (
lsame(trans,
'N'))
THEN
267 kx = 1 - (lenx-1)*incx
272 ky = 1 - (leny-1)*incy
280 IF (beta.NE.one)
THEN
282 IF (beta.EQ.zero)
THEN
293 IF (beta.EQ.zero)
THEN
306 IF (alpha.EQ.zero) return
308 IF (
lsame(trans,
'N'))
THEN
315 IF (x(jx).NE.zero)
THEN
318 DO 50 i = max(1,j-ku),min(m,j+kl)
319 y(i) = y(i) + temp*a(k+i,j)
326 IF (x(jx).NE.zero)
THEN
330 DO 70 i = max(1,j-ku),min(m,j+kl)
331 y(iy) = y(iy) + temp*a(k+i,j)
336 IF (j.GT.ku) ky = ky + incy
348 DO 90 i = max(1,j-ku),min(m,j+kl)
349 temp = temp + a(k+i,j)*x(i)
351 y(jy) = y(jy) + alpha*temp
359 DO 110 i = max(1,j-ku),min(m,j+kl)
360 temp = temp + a(k+i,j)*x(ix)
363 y(jy) = y(jy) + alpha*temp
365 IF (j.GT.ku) kx = kx + incx