1 SUBROUTINE csymv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
10 INTEGER INCX, INCY, LDA, N
14 COMPLEX A( LDA, * ), X( * ), Y( * )
86 parameter( one = ( 1.0e+0, 0.0e+0 ),
87 $ zero = ( 0.0e+0, 0.0e+0 ) )
90 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
108 IF ( .NOT.lsame( uplo,
'U' ).AND.
109 $ .NOT.lsame( uplo,
'L' ) )
THEN
111 ELSE IF( n.LT.0 )
THEN
113 ELSE IF( lda.LT.
max( 1, n ) )
THEN
115 ELSE IF( incx.EQ.0 )
THEN
117 ELSE IF( incy.EQ.0 )
THEN
121 CALL xerbla(
'CSYMV ', info )
127 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
135 kx = 1 - ( n - 1 )*incx
140 ky = 1 - ( n - 1 )*incy
149 IF( beta.NE.one )
THEN
151 IF( beta.EQ.zero )
THEN
162 IF( beta.EQ.zero )
THEN
169 y( iy ) = beta*y( iy )
179 IF( lsame( uplo,
'U' ) )
THEN
183 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
188 y( i ) = y( i ) + temp1*a( i, j )
189 temp2 = temp2 + a( i, j )*x( i )
191 y( j ) = y( j ) + temp1*a( j, j ) + alpha*temp2
197 temp1 = alpha*x( jx )
202 y( iy ) = y( iy ) + temp1*a( i, j )
203 temp2 = temp2 + a( i, j )*x( ix )
207 y( jy ) = y( jy ) + temp1*a( j, j ) + alpha*temp2
216 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
220 y( j ) = y( j ) + temp1*a( j, j )
222 y( i ) = y( i ) + temp1*a( i, j )
223 temp2 = temp2 + a( i, j )*x( i )
225 y( j ) = y( j ) + alpha*temp2
231 temp1 = alpha*x( jx )
233 y( jy ) = y( jy ) + temp1*a( j, j )
239 y( iy ) = y( iy ) + temp1*a( i, j )
240 temp2 = temp2 + a( i, j )*x( ix )
242 y( jy ) = y( jy ) + alpha*temp2