189 SUBROUTINE csyr2k(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
198 INTEGER k,lda,ldb,ldc,n
202 COMPLEX a(lda,*),b(ldb,*),c(ldc,*)
219 INTEGER i,info,j,l,nrowa
224 parameter(one= (1.0e+0,0.0e+0))
226 parameter(zero= (0.0e+0,0.0e+0))
231 IF (
lsame(trans,
'N'))
THEN
236 upper =
lsame(uplo,
'U')
239 IF ((.NOT.upper) .AND. (.NOT.
lsame(uplo,
'L')))
THEN
241 ELSE IF ((.NOT.
lsame(trans,
'N')) .AND.
242 + (.NOT.
lsame(trans,
'T')))
THEN
244 ELSE IF (n.LT.0)
THEN
246 ELSE IF (k.LT.0)
THEN
248 ELSE IF (lda.LT.max(1,nrowa))
THEN
250 ELSE IF (ldb.LT.max(1,nrowa))
THEN
252 ELSE IF (ldc.LT.max(1,n))
THEN
256 CALL
xerbla(
'CSYR2K',info)
262 IF ((n.EQ.0) .OR. (((alpha.EQ.zero).OR.
263 + (k.EQ.0)).AND. (beta.EQ.one))) return
267 IF (alpha.EQ.zero)
THEN
269 IF (beta.EQ.zero)
THEN
283 IF (beta.EQ.zero)
THEN
302 IF (
lsame(trans,
'N'))
THEN
308 IF (beta.EQ.zero)
THEN
312 ELSE IF (beta.NE.one)
THEN
318 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
322 c(i,j) = c(i,j) + a(i,l)*temp1 +
330 IF (beta.EQ.zero)
THEN
334 ELSE IF (beta.NE.one)
THEN
340 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
344 c(i,j) = c(i,j) + a(i,l)*temp1 +
361 temp1 = temp1 + a(l,i)*b(l,j)
362 temp2 = temp2 + b(l,i)*a(l,j)
364 IF (beta.EQ.zero)
THEN
365 c(i,j) = alpha*temp1 + alpha*temp2
367 c(i,j) = beta*c(i,j) + alpha*temp1 +
378 temp1 = temp1 + a(l,i)*b(l,j)
379 temp2 = temp2 + b(l,i)*a(l,j)
381 IF (beta.EQ.zero)
THEN
382 c(i,j) = alpha*temp1 + alpha*temp2
384 c(i,j) = beta*c(i,j) + alpha*temp1 +