188 SUBROUTINE cgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
197 INTEGER K,LDA,LDB,LDC,M,N
198 CHARACTER TRANSA,TRANSB
201 COMPLEX A(lda,*),B(ldb,*),C(ldc,*)
218 INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
219 LOGICAL CONJA,CONJB,NOTA,NOTB
223 parameter(one= (1.0e+0,0.0e+0))
225 parameter(zero= (0.0e+0,0.0e+0))
234 nota = lsame(transa,
'N')
235 notb = lsame(transb,
'N')
236 conja = lsame(transa,
'C')
237 conjb = lsame(transb,
'C')
254 IF ((.NOT.nota) .AND. (.NOT.conja) .AND.
255 + (.NOT.lsame(transa,
'T')))
THEN
257 ELSE IF ((.NOT.notb) .AND. (.NOT.conjb) .AND.
258 + (.NOT.lsame(transb,
'T')))
THEN
260 ELSE IF (m.LT.0)
THEN
262 ELSE IF (n.LT.0)
THEN
264 ELSE IF (k.LT.0)
THEN
266 ELSE IF (lda.LT.max(1,nrowa))
THEN
268 ELSE IF (ldb.LT.max(1,nrowb))
THEN
270 ELSE IF (ldc.LT.max(1,m))
THEN
274 CALL xerbla(
'CGEMM ',info)
280 IF ((m.EQ.0) .OR. (n.EQ.0) .OR.
281 + (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one)))
RETURN
285 IF (alpha.EQ.zero)
THEN
286 IF (beta.EQ.zero)
THEN
310 IF (beta.EQ.zero)
THEN
314 ELSE IF (beta.NE.one)
THEN
322 c(i,j) = c(i,j) + temp*a(i,l)
334 temp = temp + conjg(a(l,i))*b(l,j)
336 IF (beta.EQ.zero)
THEN
339 c(i,j) = alpha*temp + beta*c(i,j)
351 temp = temp + a(l,i)*b(l,j)
353 IF (beta.EQ.zero)
THEN
356 c(i,j) = alpha*temp + beta*c(i,j)
367 IF (beta.EQ.zero)
THEN
371 ELSE IF (beta.NE.one)
THEN
377 temp = alpha*conjg(b(j,l))
379 c(i,j) = c(i,j) + temp*a(i,l)
388 IF (beta.EQ.zero)
THEN
392 ELSE IF (beta.NE.one)
THEN
400 c(i,j) = c(i,j) + temp*a(i,l)
414 temp = temp + conjg(a(l,i))*conjg(b(j,l))
416 IF (beta.EQ.zero)
THEN
419 c(i,j) = alpha*temp + beta*c(i,j)
431 temp = temp + conjg(a(l,i))*b(j,l)
433 IF (beta.EQ.zero)
THEN
436 c(i,j) = alpha*temp + beta*c(i,j)
450 temp = temp + a(l,i)*conjg(b(j,l))
452 IF (beta.EQ.zero)
THEN
455 c(i,j) = alpha*temp + beta*c(i,j)
467 temp = temp + a(l,i)*b(j,l)
469 IF (beta.EQ.zero)
THEN
472 c(i,j) = alpha*temp + beta*c(i,j)
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM