1 SUBROUTINE dagemv( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y,
11 INTEGER INCX, INCY, LDA, M, N
12 DOUBLE PRECISION ALPHA, BETA
15 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
98 DOUBLE PRECISION ONE, ZERO
99 parameter( one = 1.0d+0, zero = 0.0d+0 )
102 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY
103 DOUBLE PRECISION ABSX, TALPHA, TEMP
120 IF( .NOT.lsame( trans,
'N' ) .AND.
121 $ .NOT.lsame( trans,
'T' ) .AND.
122 $ .NOT.lsame( trans,
'C' ) )
THEN
124 ELSE IF( m.LT.0 )
THEN
126 ELSE IF( n.LT.0 )
THEN
128 ELSE IF( lda.LT.
max( 1, m ) )
THEN
130 ELSE IF( incx.EQ.0 )
THEN
132 ELSE IF( incy.EQ.0 )
THEN
136 CALL xerbla(
'DAGEMV', info )
142 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
143 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
149 IF( lsame( trans,
'N' ) )
THEN
159 kx = 1 - ( lenx - 1 )*incx
164 ky = 1 - ( leny - 1 )*incy
173 IF( beta.EQ.zero )
THEN
177 ELSE IF( beta.EQ.one )
THEN
179 y( i ) = abs( y( i ) )
183 y( i ) = abs( beta * y( i ) )
188 IF( beta.EQ.zero )
THEN
193 ELSE IF( beta.EQ.one )
THEN
195 y( iy ) = abs( y( iy ) )
200 y( iy ) = abs( beta * y( iy ) )
209 talpha = abs( alpha )
211 IF( lsame( trans,
'N' ) )
THEN
218 absx = abs( x( jx ) )
219 IF( absx.NE.zero )
THEN
222 y( i ) = y( i ) + temp * abs( a( i, j ) )
229 absx = abs( x( jx ) )
230 IF( absx.NE.zero )
THEN
234 y( iy ) = y( iy ) + temp * abs( a( i, j ) )
251 temp = temp + abs( a( i, j ) * x( i ) )
253 y( jy ) = y( jy ) + talpha * temp
261 temp = temp + abs( a( i, j ) * x( ix ) )
264 y( jy ) = y( jy ) + talpha * temp