1 SUBROUTINE dsyr2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA )
4 INTEGER INCX, INCY, LDA, N
7 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
99 parameter( zero = 0.0d+0 )
101 DOUBLE PRECISION TEMP1, TEMP2
102 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
116 IF ( .NOT.lsame( uplo,
'U' ).AND.
117 $ .NOT.lsame( uplo,
'L' ) )
THEN
119 ELSE IF( n.LT.0 )
THEN
121 ELSE IF( incx.EQ.0 )
THEN
123 ELSE IF( incy.EQ.0 )
THEN
125 ELSE IF( lda.LT.max( 1, n ) )
THEN
129 CALL xerbla(
'DSYR2 ', info )
135 IF( ( n.EQ.0 ).OR.( alpha.EQ.zero ) )
141 IF( ( incx.NE.1 ).OR.( incy.NE.1 ) )
THEN
145 kx = 1 - ( n - 1 )*incx
150 ky = 1 - ( n - 1 )*incy
160 IF( lsame( uplo,
'U' ) )
THEN
164 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
166 IF( ( x( j ).NE.zero ).OR.( y( j ).NE.zero ) )
THEN
170 a( i, j ) = a( i, j ) + x( i )*temp1 + y( i )*temp2
176 IF( ( x( jx ).NE.zero ).OR.( y( jy ).NE.zero ) )
THEN
177 temp1 = alpha*y( jy )
178 temp2 = alpha*x( jx )
182 a( i, j ) = a( i, j ) + x( ix )*temp1
196 IF( ( incx.EQ.1 ).AND.( incy.EQ.1 ) )
THEN
198 IF( ( x( j ).NE.zero ).OR.( y( j ).NE.zero ) )
THEN
202 a( i, j ) = a( i, j ) + x( i )*temp1 + y( i )*temp2
208 IF( ( x( jx ).NE.zero ).OR.( y( jy ).NE.zero ) )
THEN
209 temp1 = alpha*y( jy )
210 temp2 = alpha*x( jx )
214 a( i, j ) = a( i, j ) + x( ix )*temp1
subroutine dsyr2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
subroutine xerbla(SRNAME, INFO)