131 SUBROUTINE chpr(UPLO,N,ALPHA,X,INCX,AP)
151 parameter(zero= (0.0e+0,0.0e+0))
155 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
185 IF ((n.EQ.0) .OR. (alpha.EQ.
REAL(zero))) return
191 ELSE IF (incx.NE.1)
THEN
199 IF (
lsame(uplo,
'U'))
THEN
205 IF (x(j).NE.zero)
THEN
206 temp = alpha*conjg(x(j))
209 ap(k) = ap(k) + x(i)*temp
212 ap(kk+j-1) =
REAL(AP(KK+J-1)) +
REAL(x(j)*temp)
214 ap(kk+j-1) =
REAL(ap(kk+j-1))
221 IF (x(jx).NE.zero)
THEN
222 temp = alpha*conjg(x(jx))
224 DO 30 k = kk,kk + j - 2
225 ap(k) = ap(k) + x(ix)*temp
228 ap(kk+j-1) =
REAL(AP(KK+J-1)) +
REAL(x(jx)*temp)
230 ap(kk+j-1) =
REAL(ap(kk+j-1))
242 IF (x(j).NE.zero)
THEN
243 temp = alpha*conjg(x(j))
244 ap(kk) =
REAL(AP(KK)) +
REAL(temp*x(j))
247 ap(k) = ap(k) + x(i)*temp
251 ap(kk) =
REAL(ap(kk))
258 IF (x(jx).NE.zero)
THEN
259 temp = alpha*conjg(x(jx))
260 ap(kk) =
REAL(AP(KK)) +
REAL(temp*x(jx))
262 DO 70 k = kk + 1,kk + n - j
264 ap(k) = ap(k) + x(ix)*temp
267 ap(kk) =
REAL(ap(kk))