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 +