1 SUBROUTINE dgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
3 DOUBLE PRECISION alpha,beta
4 INTEGER k,lda,ldb,ldc,m,n
5 CHARACTER transa,transb
8 DOUBLE PRECISION a(lda,*),b(ldb,*),c(ldc,*)
145 DOUBLE PRECISION temp
146 INTEGER i,info,j,l,ncola,nrowa,nrowb
150 DOUBLE PRECISION one,zero
151 parameter(one=1.0d+0,zero=0.0d+0)
158 nota = lsame(transa,
'N')
159 notb = lsame(transb,
'N')
176 IF ((.NOT.nota) .AND. (.NOT.lsame(transa,
'C')) .AND.
177 + (.NOT.lsame(transa,
'T')))
THEN 179 ELSE IF ((.NOT.notb) .AND. (.NOT.lsame(transb,
'C')) .AND.
180 + (.NOT.lsame(transb,
'T')))
THEN 182 ELSE IF (m.LT.0)
THEN 184 ELSE IF (n.LT.0)
THEN 186 ELSE IF (k.LT.0)
THEN 188 ELSE IF (lda.LT.max(1,nrowa))
THEN 190 ELSE IF (ldb.LT.max(1,nrowb))
THEN 192 ELSE IF (ldc.LT.max(1,m))
THEN 196 CALL xerbla(
'DGEMM ',info)
202 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
203 + (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one)))
RETURN 207 IF (alpha.EQ.zero)
THEN 208 IF (beta.EQ.zero)
THEN 232 IF (beta.EQ.zero)
THEN 236 ELSE IF (beta.NE.one)
THEN 242 IF (b(l,j).NE.zero)
THEN 245 c(i,j) = c(i,j) + temp*a(i,l)
258 temp = temp + a(l,i)*b(l,j)
260 IF (beta.EQ.zero)
THEN 263 c(i,j) = alpha*temp + beta*c(i,j)
274 IF (beta.EQ.zero)
THEN 278 ELSE IF (beta.NE.one)
THEN 284 IF (b(j,l).NE.zero)
THEN 287 c(i,j) = c(i,j) + temp*a(i,l)
300 temp = temp + a(l,i)*b(j,l)
302 IF (beta.EQ.zero)
THEN 305 c(i,j) = alpha*temp + beta*c(i,j)