187 SUBROUTINE csyr2k(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
195 INTEGER K,LDA,LDB,LDC,N
199 COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
216 INTEGER I,INFO,J,L,NROWA
221 parameter(one= (1.0e+0,0.0e+0))
223 parameter(zero= (0.0e+0,0.0e+0))
228 IF (lsame(trans,
'N'))
THEN
233 upper = lsame(uplo,
'U')
236 IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,
'L')))
THEN
238 ELSE IF ((.NOT.lsame(trans,
'N')) .AND.
239 + (.NOT.lsame(trans,
'T')))
THEN
241 ELSE IF (n.LT.0)
THEN
243 ELSE IF (k.LT.0)
THEN
245 ELSE IF (lda.LT.max(1,nrowa))
THEN
247 ELSE IF (ldb.LT.max(1,nrowa))
THEN
249 ELSE IF (ldc.LT.max(1,n))
THEN
253 CALL xerbla(
'CSYR2K',info)
259 IF ((n.EQ.0) .OR. (((alpha.EQ.zero).OR.
260 + (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
264 IF (alpha.EQ.zero)
THEN
266 IF (beta.EQ.zero)
THEN
280 IF (beta.EQ.zero)
THEN
299 IF (lsame(trans,
'N'))
THEN
305 IF (beta.EQ.zero)
THEN
309 ELSE IF (beta.NE.one)
THEN
315 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
319 c(i,j) = c(i,j) + a(i,l)*temp1 +
327 IF (beta.EQ.zero)
THEN
331 ELSE IF (beta.NE.one)
THEN
337 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
341 c(i,j) = c(i,j) + a(i,l)*temp1 +
358 temp1 = temp1 + a(l,i)*b(l,j)
359 temp2 = temp2 + b(l,i)*a(l,j)
361 IF (beta.EQ.zero)
THEN
362 c(i,j) = alpha*temp1 + alpha*temp2
364 c(i,j) = beta*c(i,j) + alpha*temp1 +
375 temp1 = temp1 + a(l,i)*b(l,j)
376 temp2 = temp2 + b(l,i)*a(l,j)
378 IF (beta.EQ.zero)
THEN
379 c(i,j) = alpha*temp1 + alpha*temp2
381 c(i,j) = beta*c(i,j) + alpha*temp1 +
subroutine xerbla(srname, info)
subroutine csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CSYR2K