157 SUBROUTINE sgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
166 INTEGER incx,incy,lda,m,n
170 REAL a(lda,*),x(*),y(*)
177 parameter(one=1.0e+0,zero=0.0e+0)
181 INTEGER i,info,ix,iy,j,jx,jy,kx,ky,lenx,leny
197 IF (.NOT.
lsame(trans,
'N') .AND. .NOT.
lsame(trans,
'T') .AND.
198 + .NOT.
lsame(trans,
'C'))
THEN
200 ELSE IF (m.LT.0)
THEN
202 ELSE IF (n.LT.0)
THEN
204 ELSE IF (lda.LT.max(1,m))
THEN
206 ELSE IF (incx.EQ.0)
THEN
208 ELSE IF (incy.EQ.0)
THEN
212 CALL
xerbla(
'SGEMV ',info)
218 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
219 + ((alpha.EQ.zero).AND. (beta.EQ.one))) return
224 IF (
lsame(trans,
'N'))
THEN
234 kx = 1 - (lenx-1)*incx
239 ky = 1 - (leny-1)*incy
247 IF (beta.NE.one)
THEN
249 IF (beta.EQ.zero)
THEN
260 IF (beta.EQ.zero)
THEN
273 IF (alpha.EQ.zero) return
274 IF (
lsame(trans,
'N'))
THEN
281 IF (x(jx).NE.zero)
THEN
284 y(i) = y(i) + temp*a(i,j)
291 IF (x(jx).NE.zero)
THEN
295 y(iy) = y(iy) + temp*a(i,j)
311 temp = temp + a(i,j)*x(i)
313 y(jy) = y(jy) + alpha*temp
321 temp = temp + a(i,j)*x(ix)
324 y(jy) = y(jy) + alpha*temp