129 SUBROUTINE cspr( UPLO, N, ALPHA, X, INCX, AP )
141 COMPLEX AP( * ), X( * )
148 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
151 INTEGER I, INFO, IX, J, JX, K, KK, KX
166 IF( .NOT.lsame( uplo,
'U' ) .AND.
167 $ .NOT.lsame( uplo,
'L' ) )
THEN
169 ELSE IF( n.LT.0 )
THEN
171 ELSE IF( incx.EQ.0 )
THEN
175 CALL xerbla(
'CSPR ', info )
181 IF( ( n.EQ.0 ) .OR. ( alpha.EQ.zero ) )
187 kx = 1 - ( n-1 )*incx
188 ELSE IF( incx.NE.1 )
THEN
196 IF( lsame( uplo,
'U' ) )
THEN
202 IF( x( j ).NE.zero )
THEN
206 ap( k ) = ap( k ) + x( i )*temp
209 ap( kk+j-1 ) = ap( kk+j-1 ) + x( j )*temp
211 ap( kk+j-1 ) = ap( kk+j-1 )
218 IF( x( jx ).NE.zero )
THEN
221 DO 30 k = kk, kk + j - 2
222 ap( k ) = ap( k ) + x( ix )*temp
225 ap( kk+j-1 ) = ap( kk+j-1 ) + x( jx )*temp
227 ap( kk+j-1 ) = ap( kk+j-1 )
239 IF( x( j ).NE.zero )
THEN
241 ap( kk ) = ap( kk ) + temp*x( j )
244 ap( k ) = ap( k ) + x( i )*temp
255 IF( x( jx ).NE.zero )
THEN
257 ap( kk ) = ap( kk ) + temp*x( jx )
259 DO 70 k = kk + 1, kk + n - j
261 ap( k ) = ap( k ) + x( ix )*temp
subroutine cspr(uplo, n, alpha, x, incx, ap)
CSPR performs the symmetrical rank-1 update of a complex symmetric packed matrix.