1 SUBROUTINE zagemv( 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 Y( * )
16 COMPLEX*16 A( LDA, * ), X( * )
104 DOUBLE PRECISION ONE, ZERO
105 parameter( one = 1.0d+0, zero = 0.0d+0 )
108 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY
109 DOUBLE PRECISION ABSX, TALPHA, TEMP
120 INTRINSIC abs, dble, dimag,
max
123 DOUBLE PRECISION CABS1
124 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
131 IF( .NOT.lsame( trans,
'N' ) .AND.
132 $ .NOT.lsame( trans,
'T' ) .AND.
133 $ .NOT.lsame( trans,
'C' ) )
THEN
135 ELSE IF( m.LT.0 )
THEN
137 ELSE IF( n.LT.0 )
THEN
139 ELSE IF( lda.LT.
max( 1, m ) )
THEN
141 ELSE IF( incx.EQ.0 )
THEN
143 ELSE IF( incy.EQ.0 )
THEN
147 CALL xerbla(
'ZAGEMV', info )
153 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
154 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
160 IF( lsame( trans,
'N' ) )
THEN
170 kx = 1 - ( lenx - 1 )*incx
175 ky = 1 - ( leny - 1 )*incy
184 IF( beta.EQ.zero )
THEN
188 ELSE IF( beta.EQ.one )
THEN
190 y( i ) = abs( y( i ) )
194 y( i ) = abs( beta * y( i ) )
199 IF( beta.EQ.zero )
THEN
204 ELSE IF( beta.EQ.one )
THEN
206 y( iy ) = abs( y( iy ) )
211 y( iy ) = abs( beta * y( iy ) )
220 talpha = abs( alpha )
222 IF( lsame( trans,
'N' ) )
THEN
229 absx = cabs1( x( jx ) )
230 IF( absx.NE.zero )
THEN
233 y( i ) = y( i ) + temp * cabs1( a( i, j ) )
240 absx = cabs1( x( jx ) )
241 IF( absx.NE.zero )
THEN
245 y( iy ) = y( iy ) + temp * cabs1( a( i, j ) )
262 temp = temp + cabs1( a( i, j ) ) * cabs1( x( i ) )
264 y( jy ) = y( jy ) + talpha * temp
272 temp = temp + cabs1( a( i, j ) ) * cabs1( x( ix ) )
275 y( jy ) = y( jy ) + talpha * temp