144 SUBROUTINE chpr2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
156 COMPLEX AP(*),X(*),Y(*)
163 parameter(zero= (0.0e+0,0.0e+0))
167 INTEGER I,INFO,IX,IY,J,JX,JY,K,KK,KX,KY
183 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
185 ELSE IF (n.LT.0)
THEN
187 ELSE IF (incx.EQ.0)
THEN
189 ELSE IF (incy.EQ.0)
THEN
193 CALL xerbla(
'CHPR2 ',info)
199 IF ((n.EQ.0) .OR. (alpha.EQ.zero))
RETURN
204 IF ((incx.NE.1) .OR. (incy.NE.1))
THEN
223 IF (lsame(uplo,
'U'))
THEN
227 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
229 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
230 temp1 = alpha*conjg(y(j))
231 temp2 = conjg(alpha*x(j))
234 ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
237 ap(kk+j-1) = real(ap(kk+j-1)) +
238 + real(x(j)*temp1+y(j)*temp2)
240 ap(kk+j-1) = real(ap(kk+j-1))
246 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
247 temp1 = alpha*conjg(y(jy))
248 temp2 = conjg(alpha*x(jx))
251 DO 30 k = kk,kk + j - 2
252 ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2
256 ap(kk+j-1) = real(ap(kk+j-1)) +
257 + real(x(jx)*temp1+y(jy)*temp2)
259 ap(kk+j-1) = real(ap(kk+j-1))
270 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
272 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
273 temp1 = alpha*conjg(y(j))
274 temp2 = conjg(alpha*x(j))
275 ap(kk) = real(ap(kk)) +
276 + real(x(j)*temp1+y(j)*temp2)
279 ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
283 ap(kk) = real(ap(kk))
289 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
290 temp1 = alpha*conjg(y(jy))
291 temp2 = conjg(alpha*x(jx))
292 ap(kk) = real(ap(kk)) +
293 + real(x(jx)*temp1+y(jy)*temp2)
296 DO 70 k = kk + 1,kk + n - j
299 ap(k) = ap(k) + x(ix)*temp1 + y(iy)*temp2
302 ap(kk) = real(ap(kk))
subroutine xerbla(srname, info)
subroutine chpr2(uplo, n, alpha, x, incx, y, incy, ap)
CHPR2