188 SUBROUTINE dgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
196 DOUBLE PRECISION ALPHA,BETA
197 INTEGER K,LDA,LDB,LDC,M,N
198 CHARACTER TRANSA,TRANSB
201 DOUBLE PRECISION A(lda,*),B(ldb,*),C(ldc,*)
217 DOUBLE PRECISION TEMP
218 INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
222 DOUBLE PRECISION ONE,ZERO
223 parameter(one=1.0d+0,zero=0.0d+0)
230 nota = lsame(transa,
'N')
231 notb = lsame(transb,
'N')
248 IF ((.NOT.nota) .AND. (.NOT.lsame(transa,
'C')) .AND.
249 + (.NOT.lsame(transa,
'T')))
THEN
251 ELSE IF ((.NOT.notb) .AND. (.NOT.lsame(transb,
'C')) .AND.
252 + (.NOT.lsame(transb,
'T')))
THEN
254 ELSE IF (m.LT.0)
THEN
256 ELSE IF (n.LT.0)
THEN
258 ELSE IF (k.LT.0)
THEN
260 ELSE IF (lda.LT.max(1,nrowa))
THEN
262 ELSE IF (ldb.LT.max(1,nrowb))
THEN
264 ELSE IF (ldc.LT.max(1,m))
THEN
268 CALL xerbla(
'DGEMM ',info)
274 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
275 + (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
279 IF (alpha.EQ.zero)
THEN
280 IF (beta.EQ.zero)
THEN
304 IF (beta.EQ.zero)
THEN
308 ELSE IF (beta.NE.one)
THEN
316 c(i,j) = c(i,j) + temp*a(i,l)
328 temp = temp + a(l,i)*b(l,j)
330 IF (beta.EQ.zero)
THEN
333 c(i,j) = alpha*temp + beta*c(i,j)
344 IF (beta.EQ.zero)
THEN
348 ELSE IF (beta.NE.one)
THEN
356 c(i,j) = c(i,j) + temp*a(i,l)
368 temp = temp + a(l,i)*b(j,l)
370 IF (beta.EQ.zero)
THEN
373 c(i,j) = alpha*temp + beta*c(i,j)
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine xerbla(SRNAME, INFO)
XERBLA