133 SUBROUTINE cspr( UPLO, N, ALPHA, X, INCX, AP )
146 COMPLEX ap( * ), x( * )
153 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
156 INTEGER i, info, ix, j, jx, k, kk, kx
171 IF( .NOT.
lsame( uplo,
'U' ) .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
173 ELSE IF( n.LT.0 )
THEN
175 ELSE IF( incx.EQ.0 )
THEN
179 CALL
xerbla(
'CSPR ', info )
185 IF( ( n.EQ.0 ) .OR. ( alpha.EQ.zero ) )
191 kx = 1 - ( n-1 )*incx
192 ELSE IF( incx.NE.1 )
THEN
200 IF(
lsame( uplo,
'U' ) )
THEN
206 IF( x( j ).NE.zero )
THEN
210 ap( k ) = ap( k ) + x( i )*temp
213 ap( kk+j-1 ) = ap( kk+j-1 ) + x( j )*temp
215 ap( kk+j-1 ) = ap( kk+j-1 )
222 IF( x( jx ).NE.zero )
THEN
225 DO 30 k = kk, kk + j - 2
226 ap( k ) = ap( k ) + x( ix )*temp
229 ap( kk+j-1 ) = ap( kk+j-1 ) + x( jx )*temp
231 ap( kk+j-1 ) = ap( kk+j-1 )
243 IF( x( j ).NE.zero )
THEN
245 ap( kk ) = ap( kk ) + temp*x( j )
248 ap( k ) = ap( k ) + x( i )*temp
259 IF( x( jx ).NE.zero )
THEN
261 ap( kk ) = ap( kk ) + temp*x( jx )
263 DO 70 k = kk + 1, kk + n - j
265 ap( k ) = ap( k ) + x( ix )*temp