151 SUBROUTINE zher2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
160 INTEGER INCX,INCY,LDA,N
164 COMPLEX*16 A(lda,*),X(*),Y(*)
171 parameter(zero= (0.0d+0,0.0d+0))
174 COMPLEX*16 TEMP1,TEMP2
175 INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY
185 INTRINSIC dble,dconjg,max
191 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
193 ELSE IF (n.LT.0)
THEN
195 ELSE IF (incx.EQ.0)
THEN
197 ELSE IF (incy.EQ.0)
THEN
199 ELSE IF (lda.LT.max(1,n))
THEN
203 CALL xerbla(
'ZHER2 ',info)
209 IF ((n.EQ.0) .OR. (alpha.EQ.zero))
RETURN
214 IF ((incx.NE.1) .OR. (incy.NE.1))
THEN
233 IF (lsame(uplo,
'U'))
THEN
237 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
239 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
240 temp1 = alpha*dconjg(y(j))
241 temp2 = dconjg(alpha*x(j))
243 a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
245 a(j,j) = dble(a(j,j)) +
246 + dble(x(j)*temp1+y(j)*temp2)
248 a(j,j) = dble(a(j,j))
253 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
254 temp1 = alpha*dconjg(y(jy))
255 temp2 = dconjg(alpha*x(jx))
259 a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
263 a(j,j) = dble(a(j,j)) +
264 + dble(x(jx)*temp1+y(jy)*temp2)
266 a(j,j) = dble(a(j,j))
276 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
278 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
279 temp1 = alpha*dconjg(y(j))
280 temp2 = dconjg(alpha*x(j))
281 a(j,j) = dble(a(j,j)) +
282 + dble(x(j)*temp1+y(j)*temp2)
284 a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
287 a(j,j) = dble(a(j,j))
292 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
293 temp1 = alpha*dconjg(y(jy))
294 temp2 = dconjg(alpha*x(jx))
295 a(j,j) = dble(a(j,j)) +
296 + dble(x(jx)*temp1+y(jy)*temp2)
302 a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
305 a(j,j) = dble(a(j,j))
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zher2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
ZHER2