CGEMM(3)
π CGEMM (cgemm.f) β Library Functions Manual π
Okay bestie, so this page lives in the Library Functions Manual, and the file it's documenting is literally right here:
/home/abu...SRC/cgemm.f(3)
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/cgemm.f
That's the whole name section, no cap. It's just the path. The BLAS girlies keep it simple π
πΈ SYNOPSIS πΈ
Functions/Subroutines π¦
subroutine CGEMM (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta,
c, ldc)
CGEMM β that's her, that's the function π
π Function/Subroutine Documentation π
subroutine CGEMM (character transa, character transb, integer m, integer n,
integer k, complex alpha, complex, dimension(lda,*) a, integer lda,
complex, dimension(ldb,*) b, integer ldb, complex beta, complex,
dimension(ldc,*) c, integer ldc)
CGEMM, again, iconic behavior β¨
π Purpose
Look at this, she literally told us herself:
!>
!> CGEMM 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,
!>
!> 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.
!>
So basically: matrix-matrix multiply, complex edition, with a little scalar seasoning (alpha, beta) and a transposition option on each side. Main character energy for real π«Ά
π Parameters
Okay this is the part you actually need, so pay attention bestie π
TRANSAβTRANSA is CHARACTER*1
On entry, TRANSA tells you what form of op( A ) to use in the multiply. Here's the menu:
!> TRANSA = 'N' or 'n', op( A ) = A.
!>
!> TRANSA = 'T' or 't', op( A ) = A**T.
!>
!> TRANSA = 'C' or 'c', op( A ) = A**H.
!>
So 'N'/'n' = no touch, 'T'/'t' = transpose, 'C'/'c' = conjugate transpose. Slay π₯
TRANSBβTRANSB is CHARACTER*1
On entry, TRANSB specifies the form of op( B ) in the multiply:
!> TRANSB = 'N' or 'n', op( B ) = B.
!>
!> TRANSB = 'T' or 't', op( B ) = B**T.
!>
!> TRANSB = 'C' or 'c', op( B ) = B**H.
!>
Same deal, applied to B. Both sides get their own vibe check π
MβM is INTEGER
On entry, M is how many rows op( A ) has, and how many rows C has. M must be at least zero. Not negative, bestie, zero is the floor π
NβN is INTEGER
On entry, N is the number of columns of op( B ) and also the number of columns of C. N must be at least zero.
KβK is INTEGER
On entry, K is the number of columns of op( A ) and the number of rows of op( B ). K must be at least zero.
ALPHAβALPHA is COMPLEX
On entry, ALPHA is the scalar alpha. That's it, that's the whole description. A whole scalar. She's just a girl π
AβA is COMPLEX array, dimension ( LDA, ka ), wherekaiskwhenTRANSA = 'N' or 'n', and ismotherwise.
Before entry with TRANSA = 'N' or 'n', the leading m by k part of the array A must contain the matrix A. Otherwise, the leading k by m part of the array A must contain the matrix A.
LDAβLDA is INTEGER
On entry, LDA is the first dimension of A as declared in the calling (sub) program. When TRANSA = 'N' or 'n' then LDA must be at least max( 1, m ); otherwise LDA must be at least max( 1, k ).
BβB is COMPLEX array, dimension ( LDB, kb ), wherekbisnwhenTRANSB = 'N' or 'n', and iskotherwise.
Before entry with TRANSB = 'N' or 'n', the leading k by n part of the array B must contain the matrix B. Otherwise, the leading n by k part of the array B must contain the matrix B.
LDBβLDB is INTEGER
On entry, LDB is the first dimension of B as declared in the calling (sub) program. When TRANSB = 'N' or 'n' then LDB must be at least max( 1, k ); otherwise LDB must be at least max( 1, n ).
BETAβBETA is COMPLEX
On entry, BETA is the scalar beta. And here's the cute part: when BETA is supplied as zero, then C need not be set on input. Free real estate β¨
CβC is COMPLEX array, dimension ( LDC, N )
Before entry, the leading m by n part of the array C must contain the matrix C β except when beta is zero, in which case C need not be set on entry.
On exit, the array C is overwritten by the m by n matrix
( alpha*op( A )*op( B ) + beta*C ).
She ate and left no crumbs π
LDCβLDC is INTEGER
On entry, LDC is the first dimension of C as declared in the calling (sub) program. LDC must be at least max( 1, m ).
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Four whole institutions, we stan a collaborative queen π
π¦ Further Details:
!>
!> Level 3 Blas routine.
!>
!> -- 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.
!>
Level 3 Blas routine. Written on 8-February-1989 by Jack Dongarra (Argonne National Laboratory), Iain Duff (AERE Harwell), Jeremy Du Croz (Numerical Algorithms Group Ltd.), and Sven Hammarling (Numerical Algorithms Group Ltd.). Vintage icon behavior, honestly πΈ
π Definition at line 186 of file cgemm.f.
That's where she's defined, bestie, line 186, no cap.
β Author
Generated automatically by Doxygen for LAPACK from the source code. The robots did the typing, we just did the reading π§
Heads up: this is all straight from the LAPACK Version 3.12.0 docs, page /home/abui...SRC/cgemm.f(3), so if anything's off it's the auto-generator's fault, not mine π
okay bye, go multiply some complex matrices, ily π«Άπ
π¦ 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