1 SUBROUTINE dgemv ( TRANS, M, N, ALPHA, A, LDA, X, INCX,
4 DOUBLE PRECISION ALPHA, BETA
5 INTEGER INCX, INCY, LDA, M, N
8 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
103 DOUBLE PRECISION ONE , ZERO
104 parameter( one = 1.0d+0, zero = 0.0d+0 )
106 DOUBLE PRECISION TEMP
107 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY
121 IF ( .NOT.lsame( trans,
'N' ).AND.
122 $ .NOT.lsame( trans,
'T' ).AND.
123 $ .NOT.lsame( trans,
'C' ) )
THEN
125 ELSE IF( m.LT.0 )
THEN
127 ELSE IF( n.LT.0 )
THEN
129 ELSE IF( lda.LT.max( 1, m ) )
THEN
131 ELSE IF( incx.EQ.0 )
THEN
133 ELSE IF( incy.EQ.0 )
THEN
137 CALL xerbla(
'DGEMV ', info )
143 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
144 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
150 IF( lsame( trans,
'N' ) )
THEN
160 kx = 1 - ( lenx - 1 )*incx
165 ky = 1 - ( leny - 1 )*incy
173 IF( beta.NE.one )
THEN
175 IF( beta.EQ.zero )
THEN
186 IF( beta.EQ.zero )
THEN
193 y( iy ) = beta*y( iy )
201 IF( lsame( trans,
'N' ) )
THEN
208 IF( x( jx ).NE.zero )
THEN
211 y( i ) = y( i ) + temp*a( i, j )
218 IF( x( jx ).NE.zero )
THEN
222 y( iy ) = y( iy ) + temp*a( i, j )
238 temp = temp + a( i, j )*x( i )
240 y( jy ) = y( jy ) + alpha*temp
248 temp = temp + a( i, j )*x( ix )
251 y( jy ) = y( jy ) + alpha*temp
subroutine dgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
subroutine xerbla(SRNAME, INFO)