ZGEMM(3)
π ZGEMM β the BLAS routine that does complex matrix-matrix math and SERVES π
okay bestie, so this page is from the LAPACK library functions manual (the file lives at /home/abui...SRC/zgemm.f(3) if you're nosy like me π). It's the docs for ZGEMM, and honestly? She's a legend. Let's get into it π
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/zgemm.f
that's the whole vibe check β that's the file. lowercase, .f, Fortran, iconic π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine ZGEMM (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta,
c, ldc)
ZGEMM
likeβ¦ that's her. that's the whole signature. slay β¨
π¦ Function/Subroutine Documentation π¦
subroutine ZGEMM (character transa, character transb, integer m, integer n,
integer k, complex*16 alpha, complex*16, dimension(lda,*) a, integer
lda, complex*16, dimension(ldb,*) b, integer ldb, complex*16 beta,
complex*16, dimension(ldc,*) c, integer ldc)
ZGEMM
π Purpose π
bestie. listen. ZGEMM performs one of the matrix-matrix operations
C := alpha*op( A )*op( B ) + beta*C,
where op( X ) is one of
op( X ) = X or op( X ) = X**T or op( X ) = X**H,
and like β alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. the dimensions line UP, the math lines UP, everything is correct. periodt π₯
π Parameters π
TRANSAβTRANSAisCHARACTER*1. on entry,TRANSAspecifies the form ofop( A )to be used in the matrix multiplication, like this:TRANSA = 'N'or'n',op( A ) = A.TRANSA = 'T'or't',op( A ) = A**T.TRANSA = 'C'or'c',op( A ) = A**H.
TRANSBβTRANSBisCHARACTER*1. on entry,TRANSBspecifies the form ofop( B )to be used in the matrix multiplication, as follows:TRANSB = 'N'or'n',op( B ) = B.TRANSB = 'T'or't',op( B ) = B**T.TRANSB = 'C'or'c',op( B ) = B**H.
MβMisINTEGER. on entry,Mspecifies the number of rows of the matrixop( A )and of the matrixC.Mmust be at least zero. (zero is allowed, she's not gonna judge π«Ά)NβNisINTEGER. on entry,Nspecifies the number of columns of the matrixop( B )and the number of columns of the matrixC.Nmust be at least zero.KβKisINTEGER. on entry,Kspecifies the number of columns of the matrixop( A )and the number of rows of the matrixop( B ).Kmust be at least zero.ALPHAβALPHAisCOMPLEX*16. on entry,ALPHAspecifies the scalaralpha. the main character scalar, honestly β¨AβAisCOMPLEX*16array, dimension( LDA, ka ), wherekaiskwhenTRANSA = 'N'or'n', and ismotherwise. before entry withTRANSA = 'N'or'n', the leading m by k part of the arrayAmust contain the matrixA, otherwise the leading k by m part of the arrayAmust contain the matrixA. iykyk πLDAβLDAisINTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program. whenTRANSA = 'N'or'n'thenLDAmust be at leastmax( 1, m ), otherwiseLDAmust be at leastmax( 1, k ).BβBisCOMPLEX*16array, dimension( LDB, kb ), wherekbisnwhenTRANSB = 'N'or'n', and iskotherwise. before entry withTRANSB = 'N'or'n', the leading k by n part of the arrayBmust contain the matrixB, otherwise the leading n by k part of the arrayBmust contain the matrixB.LDBβLDBisINTEGER. on entry,LDBspecifies the first dimension ofBas declared in the calling (sub) program. whenTRANSB = 'N'or'n'thenLDBmust be at leastmax( 1, k ), otherwiseLDBmust be at leastmax( 1, n ).BETAβBETAisCOMPLEX*16. on entry,BETAspecifies the scalarbeta. whenBETAis supplied as zero thenCneed not be set on input. (yes really, she said you can skip it π)CβCisCOMPLEX*16array, dimension( LDC, N ). before entry, the leading m by n part of the arrayCmust contain the matrixC, except whenbetais zero, in which caseCneed not be set on entry. on exit, the arrayCis overwritten by the m by n matrix( alpha*op( A )*op( B ) + beta*C ). she goes IN and she replaces the whole thing, no cap ππ₯LDCβLDCisINTEGER. on entry,LDCspecifies the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 1, m ).
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad, the founding mothers and fathers of your linear algebra π«Ά
π Further Details: π
- Level 3 Blas routine. (level 3! she's not a vector, she's not a matrix-vector, she's the full matrix-matrix experience π )
-- Written on 8-February-1989.- Jack Dongarra, Argonne National Laboratory.
- Iain Duff, AERE Harwell.
- Jeremy Du Croz, Numerical Algorithms Group Ltd.
- Sven Hammarling, Numerical Algorithms Group Ltd.
likeβ¦ 1989. they were doing this before most of us were born and it still hits. respect the elders π
β Definition β
Definition at line 186 of file zgemm.f.
π Author π
(pulling up in a whole second author section, because sure)
Generated automatically by Doxygen for LAPACK from the source code. the doc generator said "I got this" and honestly it did π
real talk though bestie:LDA,LDBandLDChave minimum requirements βLDAat leastmax( 1, m )ormax( 1, k )depending onTRANSA;LDBat leastmax( 1, k )ormax( 1, n )depending onTRANSB;LDCat leastmax( 1, m ). andM,N,Kmust all be at least zero. don't come for me if you skip those, the routine will not be nice about it π
so yeah, that's ZGEMM. β€οΈ this was LAPACK, Version 3.12.0, and the page itself was /home/abui...SRC/zgemm.f(3) β go forth and multiply your complex matrices, bestie. mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms