186 SUBROUTINE zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
194 COMPLEX*16 ALPHA,BETA
195 INTEGER K,LDA,LDB,LDC,M,N
196 CHARACTER TRANSA,TRANSB
199 COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
216 INTEGER I,INFO,J,L,NROWA,NROWB
217 LOGICAL CONJA,CONJB,NOTA,NOTB
221 parameter(one= (1.0d+0,0.0d+0))
223 parameter(zero= (0.0d+0,0.0d+0))
231 nota = lsame(transa,
'N')
232 notb = lsame(transb,
'N')
233 conja = lsame(transa,
'C')
234 conjb = lsame(transb,
'C')
249 IF ((.NOT.nota) .AND. (.NOT.conja) .AND.
250 + (.NOT.lsame(transa,
'T')))
THEN
252 ELSE IF ((.NOT.notb) .AND. (.NOT.conjb) .AND.
253 + (.NOT.lsame(transb,
'T')))
THEN
255 ELSE IF (m.LT.0)
THEN
257 ELSE IF (n.LT.0)
THEN
259 ELSE IF (k.LT.0)
THEN
261 ELSE IF (lda.LT.max(1,nrowa))
THEN
263 ELSE IF (ldb.LT.max(1,nrowb))
THEN
265 ELSE IF (ldc.LT.max(1,m))
THEN
269 CALL xerbla(
'ZGEMM ',info)
275 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
276 + (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
280 IF (alpha.EQ.zero)
THEN
281 IF (beta.EQ.zero)
THEN
305 IF (beta.EQ.zero)
THEN
309 ELSE IF (beta.NE.one)
THEN
317 c(i,j) = c(i,j) + temp*a(i,l)
329 temp = temp + dconjg(a(l,i))*b(l,j)
331 IF (beta.EQ.zero)
THEN
334 c(i,j) = alpha*temp + beta*c(i,j)
346 temp = temp + a(l,i)*b(l,j)
348 IF (beta.EQ.zero)
THEN
351 c(i,j) = alpha*temp + beta*c(i,j)
362 IF (beta.EQ.zero)
THEN
366 ELSE IF (beta.NE.one)
THEN
372 temp = alpha*dconjg(b(j,l))
374 c(i,j) = c(i,j) + temp*a(i,l)
383 IF (beta.EQ.zero)
THEN
387 ELSE IF (beta.NE.one)
THEN
395 c(i,j) = c(i,j) + temp*a(i,l)
409 temp = temp + dconjg(a(l,i))*dconjg(b(j,l))
411 IF (beta.EQ.zero)
THEN
414 c(i,j) = alpha*temp + beta*c(i,j)
426 temp = temp + dconjg(a(l,i))*b(j,l)
428 IF (beta.EQ.zero)
THEN
431 c(i,j) = alpha*temp + beta*c(i,j)
445 temp = temp + a(l,i)*dconjg(b(j,l))
447 IF (beta.EQ.zero)
THEN
450 c(i,j) = alpha*temp + beta*c(i,j)
462 temp = temp + a(l,i)*b(j,l)
464 IF (beta.EQ.zero)
THEN
467 c(i,j) = alpha*temp + beta*c(i,j)
subroutine xerbla(srname, info)
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM