144 SUBROUTINE zhpr2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
156 COMPLEX*16 AP(*),X(*),Y(*)
163 parameter(zero= (0.0d+0,0.0d+0))
166 COMPLEX*16 TEMP1,TEMP2
167 INTEGER I,INFO,IX,IY,J,JX,JY,K,KK,KX,KY
177 INTRINSIC dble,dconjg
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(
'ZHPR2 ',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*dconjg(y(j))
231 temp2 = dconjg(alpha*x(j))
234 ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
237 ap(kk+j-1) = dble(ap(kk+j-1)) +
238 + dble(x(j)*temp1+y(j)*temp2)
240 ap(kk+j-1) = dble(ap(kk+j-1))
246 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
247 temp1 = alpha*dconjg(y(jy))
248 temp2 = dconjg(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) = dble(ap(kk+j-1)) +
257 + dble(x(jx)*temp1+y(jy)*temp2)
259 ap(kk+j-1) = dble(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*dconjg(y(j))
274 temp2 = dconjg(alpha*x(j))
275 ap(kk) = dble(ap(kk)) +
276 + dble(x(j)*temp1+y(j)*temp2)
279 ap(k) = ap(k) + x(i)*temp1 + y(i)*temp2
283 ap(kk) = dble(ap(kk))
289 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
290 temp1 = alpha*dconjg(y(jy))
291 temp2 = dconjg(alpha*x(jx))
292 ap(kk) = dble(ap(kk)) +
293 + dble(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) = dble(ap(kk))
subroutine xerbla(srname, info)
subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap)
ZHPR2