149 SUBROUTINE cher2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
157 INTEGER INCX,INCY,LDA,N
161 COMPLEX A(LDA,*),X(*),Y(*)
168 parameter(zero= (0.0e+0,0.0e+0))
172 INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY
182 INTRINSIC conjg,max,real
188 IF (.NOT.lsame(uplo,
'U') .AND. .NOT.lsame(uplo,
'L'))
THEN
190 ELSE IF (n.LT.0)
THEN
192 ELSE IF (incx.EQ.0)
THEN
194 ELSE IF (incy.EQ.0)
THEN
196 ELSE IF (lda.LT.max(1,n))
THEN
200 CALL xerbla(
'CHER2 ',info)
206 IF ((n.EQ.0) .OR. (alpha.EQ.zero))
RETURN
211 IF ((incx.NE.1) .OR. (incy.NE.1))
THEN
230 IF (lsame(uplo,
'U'))
THEN
234 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
236 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
237 temp1 = alpha*conjg(y(j))
238 temp2 = conjg(alpha*x(j))
240 a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
242 a(j,j) = real(a(j,j)) +
243 + real(x(j)*temp1+y(j)*temp2)
245 a(j,j) = real(a(j,j))
250 IF ((x(jx).NE.zero) .OR. (y(jy).NE.zero))
THEN
251 temp1 = alpha*conjg(y(jy))
252 temp2 = conjg(alpha*x(jx))
256 a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
260 a(j,j) = real(a(j,j)) +
261 + real(x(jx)*temp1+y(jy)*temp2)
263 a(j,j) = real(a(j,j))
273 IF ((incx.EQ.1) .AND. (incy.EQ.1))
THEN
275 IF ((x(j).NE.zero) .OR. (y(j).NE.zero))
THEN
276 temp1 = alpha*conjg(y(j))
277 temp2 = conjg(alpha*x(j))
278 a(j,j) = real(a(j,j)) +
279 + real(x(j)*temp1+y(j)*temp2)
281 a(i,j) = a(i,j) + x(i)*temp1 + y(i)*temp2
284 a(j,j) = real(a(j,j))
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 a(j,j) = real(a(j,j)) +
293 + real(x(jx)*temp1+y(jy)*temp2)
299 a(i,j) = a(i,j) + x(ix)*temp1 + y(iy)*temp2
302 a(j,j) = real(a(j,j))
subroutine xerbla(srname, info)
subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda)
CHER2