1 SUBROUTINE csyr2( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA )
10 INTEGER INCX, INCY, LDA, N
14 COMPLEX A( LDA, * ), X( * ), Y( * )
88 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
91 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
109 IF ( .NOT.lsame( uplo,
'U' ).AND.
110 $ .NOT.lsame( uplo,
'L' ) )
THEN
112 ELSE IF( n.LT.0 )
THEN
114 ELSE IF( incx.EQ.0 )
THEN
116 ELSE IF( incy.EQ.0 )
THEN
118 ELSE IF( lda.LT.
max( 1, n ) )
THEN
122 CALL xerbla(
'CSYR2', info )
128 IF( ( n.EQ.0 ).OR.( alpha.EQ.zero ) )
138 IF( ( incx.NE.1 ).OR.( incy.NE.1 ) )
THEN
142 kx = 1 - ( n - 1 )*incx
147 ky = 1 - ( n - 1 )*incy
157 IF( lsame( uplo,
'U' ) )
THEN
161 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
163 IF( ( x( j ).NE.zero ).OR.( y( j ).NE.zero ) )
THEN
167 a( i, j ) = a( i, j ) + x( i )*temp1 + y( i )*temp2
173 IF( ( x( jx ).NE.zero ).OR.( y( jy ).NE.zero ) )
THEN
174 temp1 = alpha*y( jy )
175 temp2 = alpha*x( jx )
179 a( i, j ) = a( i, j ) + x( ix )*temp1
193 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
195 IF( ( x( j ).NE.zero ).OR.( y( j ).NE.zero ) )
THEN
199 a( i, j ) = a( i, j ) + x( i )*temp1 + y( i )*temp2
205 IF( ( x( jx ).NE.zero ).OR.( y( jy ).NE.zero ) )
THEN
206 temp1 = alpha*y( jy )
207 temp2 = alpha*x( jx )
211 a( i, j ) = a( i, j ) + x( ix )*temp1