1 SUBROUTINE cahemv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
11 INTEGER INCX, INCY, LDA, N
16 COMPLEX A( LDA, * ), X( * )
94 parameter( one = 1.0e+0, zero = 0.0e+0 )
97 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
98 REAL TALPHA, TEMP0, TEMP1, TEMP2
109 INTRINSIC abs, aimag, conjg,
max, real
113 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
120 IF ( .NOT.lsame( uplo,
'U' ).AND.
121 $ .NOT.lsame( uplo,
'L' ) )
THEN
123 ELSE IF( n.LT.0 )
THEN
125 ELSE IF( lda.LT.
max( 1, n ) )
THEN
127 ELSE IF( incx.EQ.0 )
THEN
129 ELSE IF( incy.EQ.0 )
THEN
133 CALL xerbla(
'CAHEMV', info )
139 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
147 kx = 1 - ( n - 1 ) * incx
152 ky = 1 - ( n - 1 ) * incy
161 IF( beta.NE.one )
THEN
163 IF( beta.EQ.zero )
THEN
169 y( i ) = abs( beta * y( i ) )
174 IF( beta.EQ.zero )
THEN
181 y( iy ) = abs( beta * y( iy ) )
191 talpha = abs( alpha )
193 IF( lsame( uplo,
'U' ) )
THEN
197 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
199 temp1 = talpha * cabs1( x( j ) )
202 temp0 = cabs1( a( i, j ) )
203 y( i ) = y( i ) + temp1 * temp0
204 temp2 = temp2 + temp0 * cabs1( x( i ) )
206 y( j ) = y( j ) + temp1 * abs( real( a( j, j ) ) ) +
217 temp1 = talpha * cabs1( x( jx ) )
223 temp0 = cabs1( a( i, j ) )
224 y( iy ) = y( iy ) + temp1 * temp0
225 temp2 = temp2 + temp0 * cabs1( x( ix ) )
229 y( jy ) = y( jy ) + temp1 * abs( real( a( j, j ) ) ) +
242 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
246 temp1 = talpha * cabs1( x( j ) )
248 y( j ) = y( j ) + temp1 * abs( real( a( j, j ) ) )
251 temp0 = cabs1( a( i, j ) )
252 y( i ) = y( i ) + temp1 * temp0
253 temp2 = temp2 + temp0 * cabs1( x( i ) )
257 y( j ) = y( j ) + alpha * temp2
267 temp1 = talpha * cabs1( x( jx ) )
269 y( jy ) = y( jy ) + temp1 * abs( real( a( j, j ) ) )
277 temp0 = cabs1( a( i, j ) )
278 y( iy ) = y( iy ) + temp1 * temp0
279 temp2 = temp2 + temp0 * cabs1( x( ix ) )
283 y( jy ) = y( jy ) + alpha * temp2