186 SUBROUTINE dgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
194 DOUBLE PRECISION ALPHA,BETA
195 INTEGER K,LDA,LDB,LDC,M,N
196 CHARACTER TRANSA,TRANSB
199 DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
215 DOUBLE PRECISION TEMP
216 INTEGER I,INFO,J,L,NROWA,NROWB
220 DOUBLE PRECISION ONE,ZERO
221 parameter(one=1.0d+0,zero=0.0d+0)
228 nota = lsame(transa,
'N')
229 notb = lsame(transb,
'N')
244 IF ((.NOT.nota) .AND. (.NOT.lsame(transa,
'C')) .AND.
245 + (.NOT.lsame(transa,
'T')))
THEN
247 ELSE IF ((.NOT.notb) .AND. (.NOT.lsame(transb,
'C')) .AND.
248 + (.NOT.lsame(transb,
'T')))
THEN
250 ELSE IF (m.LT.0)
THEN
252 ELSE IF (n.LT.0)
THEN
254 ELSE IF (k.LT.0)
THEN
256 ELSE IF (lda.LT.max(1,nrowa))
THEN
258 ELSE IF (ldb.LT.max(1,nrowb))
THEN
260 ELSE IF (ldc.LT.max(1,m))
THEN
264 CALL xerbla(
'DGEMM ',info)
270 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
271 + (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
275 IF (alpha.EQ.zero)
THEN
276 IF (beta.EQ.zero)
THEN
300 IF (beta.EQ.zero)
THEN
304 ELSE IF (beta.NE.one)
THEN
312 c(i,j) = c(i,j) + temp*a(i,l)
324 temp = temp + a(l,i)*b(l,j)
326 IF (beta.EQ.zero)
THEN
329 c(i,j) = alpha*temp + beta*c(i,j)
340 IF (beta.EQ.zero)
THEN
344 ELSE IF (beta.NE.one)
THEN
352 c(i,j) = c(i,j) + temp*a(i,l)
364 temp = temp + a(l,i)*b(j,l)
366 IF (beta.EQ.zero)
THEN
369 c(i,j) = alpha*temp + beta*c(i,j)
subroutine xerbla(srname, info)
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM