1 SUBROUTINE casymv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
11 INTEGER INCX, INCY, LDA, N
16 COMPLEX A( LDA, * ), X( * )
91 parameter( one = 1.0e+0, zero = 0.0e+0 )
94 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
95 REAL TALPHA, TEMP0, TEMP1, TEMP2
106 INTRINSIC abs, aimag,
max, real
110 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
117 IF ( .NOT.lsame( uplo,
'U' ).AND.
118 $ .NOT.lsame( uplo,
'L' ) )
THEN
120 ELSE IF( n.LT.0 )
THEN
122 ELSE IF( lda.LT.
max( 1, n ) )
THEN
124 ELSE IF( incx.EQ.0 )
THEN
126 ELSE IF( incy.EQ.0 )
THEN
130 CALL xerbla(
'CASYMV', info )
136 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
144 kx = 1 - ( n - 1 ) * incx
149 ky = 1 - ( n - 1 ) * incy
158 IF( beta.NE.one )
THEN
160 IF( beta.EQ.zero )
THEN
166 y( i ) = abs( beta * y( i ) )
171 IF( beta.EQ.zero )
THEN
178 y( iy ) = abs( beta * y( iy ) )
188 talpha = abs( alpha )
190 IF( lsame( uplo,
'U' ) )
THEN
194 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
196 temp1 = talpha * cabs1( x( j ) )
199 temp0 = cabs1( a( i, j ) )
200 y( i ) = y( i ) + temp1 * temp0
201 temp2 = temp2 + temp0 * cabs1( x( i ) )
203 y( j ) = y( j ) + temp1 * cabs1( a( j, j ) ) +
214 temp1 = talpha * cabs1( x( jx ) )
220 temp0 = cabs1( a( i, j ) )
221 y( iy ) = y( iy ) + temp1 * temp0
222 temp2 = temp2 + temp0 * cabs1( x( ix ) )
226 y( jy ) = y( jy ) + temp1 * cabs1( a( j, j ) ) +
239 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
243 temp1 = talpha * cabs1( x( j ) )
245 y( j ) = y( j ) + temp1 * cabs1( a( j, j ) )
248 temp0 = cabs1( a( i, j ) )
249 y( i ) = y( i ) + temp1 * temp0
250 temp2 = temp2 + temp0 * cabs1( x( i ) )
254 y( j ) = y( j ) + alpha * temp2
264 temp1 = talpha * cabs1( x( jx ) )
266 y( jy ) = y( jy ) + temp1 * cabs1( a( j, j ) )
274 temp0 = cabs1( a( i, j ) )
275 y( iy ) = y( iy ) + temp1 * temp0
276 temp2 = temp2 + temp0 * cabs1( x( ix ) )
280 y( jy ) = y( jy ) + alpha * temp2