1 SUBROUTINE cagemv( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y,
11 INTEGER INCX, INCY, LDA, M, N
16 COMPLEX A( LDA, * ), X( * )
105 parameter( one = 1.0e+0, zero = 0.0e+0 )
108 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY
109 REAL ABSX, TALPHA, TEMP
120 INTRINSIC abs, aimag,
max, real
124 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( 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(
'CAGEMV', 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