186 SUBROUTINE sgbmv(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
195 INTEGER incx,incy,kl,ku,lda,m,n
199 REAL a(lda,*),x(*),y(*)
206 parameter(one=1.0e+0,zero=0.0e+0)
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(
'SGBMV ',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