193 SUBROUTINE dsyr2k(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
201 DOUBLE PRECISION ALPHA,BETA
202 INTEGER K,LDA,LDB,LDC,N
206 DOUBLE PRECISION A(lda,*),B(ldb,*),C(ldc,*)
222 DOUBLE PRECISION TEMP1,TEMP2
223 INTEGER I,INFO,J,L,NROWA
227 DOUBLE PRECISION ONE,ZERO
228 parameter(one=1.0d+0,zero=0.0d+0)
233 IF (lsame(trans,
'N'))
THEN
238 upper = lsame(uplo,
'U')
241 IF ((.NOT.upper) .AND. (.NOT.lsame(uplo,
'L')))
THEN
243 ELSE IF ((.NOT.lsame(trans,
'N')) .AND.
244 + (.NOT.lsame(trans,
'T')) .AND.
245 + (.NOT.lsame(trans,
'C')))
THEN
247 ELSE IF (n.LT.0)
THEN
249 ELSE IF (k.LT.0)
THEN
251 ELSE IF (lda.LT.max(1,nrowa))
THEN
253 ELSE IF (ldb.LT.max(1,nrowa))
THEN
255 ELSE IF (ldc.LT.max(1,n))
THEN
259 CALL xerbla(
'DSYR2K',info)
265 IF ((n.EQ.0) .OR. (((alpha.EQ.zero).OR.
266 + (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
270 IF (alpha.EQ.zero)
THEN
272 IF (beta.EQ.zero)
THEN
286 IF (beta.EQ.zero)
THEN
305 IF (lsame(trans,
'N'))
THEN
311 IF (beta.EQ.zero)
THEN
315 ELSE IF (beta.NE.one)
THEN
321 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
325 c(i,j) = c(i,j) + a(i,l)*temp1 +
333 IF (beta.EQ.zero)
THEN
337 ELSE IF (beta.NE.one)
THEN
343 IF ((a(j,l).NE.zero) .OR. (b(j,l).NE.zero))
THEN
347 c(i,j) = c(i,j) + a(i,l)*temp1 +
364 temp1 = temp1 + a(l,i)*b(l,j)
365 temp2 = temp2 + b(l,i)*a(l,j)
367 IF (beta.EQ.zero)
THEN
368 c(i,j) = alpha*temp1 + alpha*temp2
370 c(i,j) = beta*c(i,j) + alpha*temp1 +
381 temp1 = temp1 + a(l,i)*b(l,j)
382 temp2 = temp2 + b(l,i)*a(l,j)
384 IF (beta.EQ.zero)
THEN
385 c(i,j) = alpha*temp1 + alpha*temp2
387 c(i,j) = beta*c(i,j) + alpha*temp1 +
subroutine dsyr2k(UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DSYR2K
subroutine xerbla(SRNAME, INFO)
XERBLA