complex_blas_level3(3)
πΈ complex_blas_level3 πΈ
okay bestie, gather round β this is the manual page for complex_blas_level3, which lives in section 3 of the manual. It's the β¨complexβ¨ LEVEL 3 BLAS family, and honestly? It's giving math girlboss energy. Let's get into it π
β¨ NAME β¨
complex_blas_level3 β complex π¦
π SYNOPSIS π
π Functions π
subroutine cgemm (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)β CGEMM πsubroutine chemm (SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)β CHEMM πsubroutine cher2k (UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)β CHER2K πΈsubroutine cherk (UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)β CHERK β¨subroutine csymm (SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)β CSYMM π¦subroutine csyr2k (UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)β CSYR2K πsubroutine csyrk (UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)β CSYRK πsubroutine ctrmm (SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)β CTRMM π₯subroutine ctrsm (SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)β CTRSM π
π Detailed Description π
This is the group of complex LEVEL 3 BLAS routines. That's it, that's the whole vibe check β nine routines, all complex, all level 3. Periodt.
π§ Function Documentation π§
π subroutine cgemm π
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
π Purpose π
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. Literally the whole main character matrix multiply.
πΈ Parameters πΈ
TRANSAβTRANSAisCHARACTER*1. On entry,TRANSAspecifies the form ofop( A )to be used in the matrix multiplication as follows:
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.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. On entry,ALPHAspecifies the scalar alpha.AβAisCOMPLEXarray, 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. (she shape-shifts depending on TRANSA, icon behaviour ngl)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βBisCOMPLEXarray, 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. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenCneed not be set on input. (free pass on the input, we love a shortcut π )CβCisCOMPLEXarray, dimension( LDC, N ). Before entry, the leading m by n part of the arrayCmust contain the matrixC, except when beta is 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 ).
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.
π 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.
1989 and still slaying, no cap.
π subroutine chemm π
subroutine chemm (character SIDE, character UPLO, integer M, integer N,
complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex,
dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*)
C, integer LDC)
CHEMM
π Purpose π
CHEMM performs one of the matrix-matrix operations
C := alpha*A*B + beta*C,
or
C := alpha*B*A + beta*C,
where alpha and beta are scalars, A is an hermitian matrix and B and C are m by n matrices. hermitian queen stays hermitian, we just multiply around her π
πΈ Parameters πΈ
SIDEβSIDEisCHARACTER*1. On entry,SIDEspecifies whether the hermitian matrixAappears on the left or right in the operation as follows:
SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
UPLOβUPLOisCHARACTER*1. On entry,UPLOspecifies whether the upper or lower triangular part of the hermitian matrixAis to be referenced as follows:
UPLO = 'U' or 'u' Only the upper triangular part of the
hermitian matrix is to be referenced.
UPLO = 'L' or 'l' Only the lower triangular part of the
hermitian matrix is to be referenced.
MβMisINTEGER. On entry,Mspecifies the number of rows of the matrixC.Mmust be at least zero.NβNisINTEGER. On entry,Nspecifies the number of columns of the matrixC.Nmust be at least zero.ALPHAβALPHAisCOMPLEX. On entry,ALPHAspecifies the scalar alpha.AβAisCOMPLEXarray, dimension( LDA, ka ), wherekaismwhenSIDE = 'L'or'l'and isnotherwise.
Before entry with SIDE = 'L' or 'l', the m by m part of the array A must contain the hermitian matrix, such that when UPLO = 'U' or 'u', the leading m by m upper triangular part of the array A must contain the upper triangular part of the hermitian matrix and the strictly lower triangular part of A is not referenced, and when UPLO = 'L' or 'l', the leading m by m lower triangular part of the array A must contain the lower triangular part of the hermitian matrix and the strictly upper triangular part of A is not referenced.
Before entry with SIDE = 'R' or 'r', the n by n part of the array A must contain the hermitian matrix, such that when UPLO = 'U' or 'u', the leading n by n upper triangular part of the array A must contain the upper triangular part of the hermitian matrix and the strictly lower triangular part of A is not referenced, and when UPLO = 'L' or 'l', the leading n by n lower triangular part of the array A must contain the lower triangular part of the hermitian matrix and the strictly upper triangular part of A is not referenced.
Note that the imaginary parts of the diagonal elements need not be set, they are assumed to be zero. (she's imaginary-free on the diagonal by default, don't worry about it β¨)
LDAβLDAisINTEGER. On entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program. WhenSIDE = 'L'or'l'thenLDAmust be at leastmax( 1, m ), otherwiseLDAmust be at leastmax( 1, n ).BβBisCOMPLEXarray, dimension( LDB, N ). Before entry, the leading m by n part of the arrayBmust contain the matrixB.LDBβLDBisINTEGER. On entry,LDBspecifies the first dimension ofBas declared in the calling (sub) program.LDBmust be at leastmax( 1, m ).BETAβBETAisCOMPLEX. On entry,BETAspecifies the scalar beta. WhenBETAis supplied as zero thenCneed not be set on input.CβCisCOMPLEXarray, dimension( LDC, N ). Before entry, the leading m by n part of the arrayCmust contain the matrixC, except when beta is zero, in which caseCneed not be set on entry. On exit, the arrayCis overwritten by the m by n updated matrix.LDC
β¦and that's exactly where this part runs out β the rest of LDC and everything after it is waiting for you in the next part, bestie π«Ά
LDCisINTEGERβ bestie, on entry,LDCis the first dimension ofCexactly as you declared it back in the calling (sub) program. And it has to be at leastmax( 1, m ). that's the vibe check, no exceptions. π
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
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.
subroutine cher2k (character UPLO, character TRANS, integer N, integer K, complex ALPHA, complex, dimension(lda,) A, integer LDA, complex, dimension(ldb,) B, integer LDB, real BETA, complex, dimension(ldc,*) C, integer LDC)
CHER2K π the hermitian rank-2k glow-up routine.
Purpose:
okay so CHER2K does one of these two hermitian rank 2k operations, and it's giving main character energy:
C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
or
C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
where alpha and beta are scalars with beta real, C is an n by n hermitian matrix, and A and B are n by k matrices in the first case and k by n matrices in the second case. β¨
Parameters
UPLOβUPLOisCHARACTER*1. On entry,UPLOtells us whether the upper or lower triangular part of the arrayCis getting referenced, like this:UPLO = 'U' or 'u'β Only the upper triangular part ofCis to be referenced.UPLO = 'L' or 'l'β Only the lower triangular part ofCis to be referenced.
TRANSβTRANSisCHARACTER*1. On entry,TRANSsays which operation we're performing, bestie:TRANS = 'N' or 'n'β
C := alpha*A*B**H +
conjg( alpha )*B*A**H +
beta*C.
TRANS = 'C' or 'c'β
C := alpha*A**H*B +
conjg( alpha )*B**H*A +
beta*C.
NβNisINTEGER. On entry,Nis the order of the matrixC. AndNmust be at least zero. zero is the floor, periodt. π«ΆKβKisINTEGER. On entry withTRANS = 'N' or 'n',Kis the number of columns of the matricesAandB. And on entry withTRANS = 'C' or 'c',Kis the number of rows of the matricesAandB.Kmust be at least zero too. πALPHAβALPHAisCOMPLEX. On entry,ALPHAis the scalaralpha.AβAisCOMPLEX array, dimension ( LDA, ka ), wherekaiskwhenTRANS = 'N' or 'n', and isnotherwise. Before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayAmust contain the matrixA; otherwise the leadingkbynpart of the arrayAmust contain the matrixA.LDAβLDAisINTEGER. On entry,LDAis the first dimension ofAas declared in the calling (sub) program. WhenTRANS = 'N' or 'n'thenLDAmust be at leastmax( 1, n ), otherwiseLDAmust be at leastmax( 1, k ). πBβBisCOMPLEX array, dimension ( LDB, kb ), wherekbiskwhenTRANS = 'N' or 'n', and isnotherwise. Before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayBmust contain the matrixB; otherwise the leadingkbynpart of the arrayBmust contain the matrixB.LDBβLDBisINTEGER. On entry,LDBis the first dimension ofBas declared in the calling (sub) program. WhenTRANS = 'N' or 'n'thenLDBmust be at leastmax( 1, n ), otherwiseLDBmust be at leastmax( 1, k ). πΈBETAβBETAisREAL. On entry,BETAis the scalarbeta. (yes bestie, it's real β we said that. π )CβCisCOMPLEX array, dimension ( LDC, N ). Before entry withUPLO = 'U' or 'u', the leadingnbynupper triangular part of the arrayCmust contain the upper triangular part of the hermitian matrix, and the strictly lower triangular part ofCis not referenced. On exit, the upper triangular part of the arrayCis overwritten by the upper triangular part of the updated matrix. Before entry withUPLO = 'L' or 'l', the leadingnbynlower triangular part of the arrayCmust contain the lower triangular part of the hermitian matrix, and the strictly upper triangular part ofCis not referenced. On exit, the lower triangular part of the arrayCis overwritten by the lower triangular part of the updated matrix.
Note that the imaginary parts of the diagonal elements need not be set β they are assumed to be zero, and on exit they are set to zero. π«Ά
LDCβLDCisINTEGER. On entry,LDCis the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 1, n ). and that's on periodt. π
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
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.
-- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
Ed Anderson, Cray Research Inc.
subroutine cherk (character UPLO, character TRANS, integer N, integer K, real ALPHA, complex, dimension(lda,) A, integer LDA, real BETA, complex, dimension(ldc,) C, integer LDC)
CHERK π the hermitian rank-k icon. no B matrix here, we're keeping it simple.
Purpose:
CHERK performs one of these hermitian rank k operations, and it ate:
C := alpha*A*A**H + beta*C,
or
C := alpha*A**H*A + beta*C,
where alpha and beta are real scalars, C is an n by n hermitian matrix, and A is an n by k matrix in the first case and a k by n matrix in the second case. β¨
Parameters
UPLOβUPLOisCHARACTER*1. On entry,UPLOsays whether the upper or lower triangular part of the arrayCis getting referenced, like so:UPLO = 'U' or 'u'β Only the upper triangular part ofCis to be referenced.UPLO = 'L' or 'l'β Only the lower triangular part ofCis to be referenced.
TRANSβTRANSisCHARACTER*1. On entry,TRANSpicks the operation, bestie:TRANS = 'N' or 'n'βC := alpha*A*A**H + beta*C.TRANS = 'C' or 'c'βC := alpha*A**H*A + beta*C.
NβNisINTEGER. On entry,Nis the order of the matrixC.Nmust be at least zero. πKβKisINTEGER. On entry withTRANS = 'N' or 'n',Kis the number of columns of the matrixA. And on entry withTRANS = 'C' or 'c',Kis the number of rows of the matrixA.Kmust be at least zero. πALPHAβALPHAisREAL. On entry,ALPHAis the scalaralpha.AβAisCOMPLEX array, dimension ( LDA, ka ), wherekaiskwhenTRANS = 'N' or 'n', and isnotherwise. Before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayAmust contain the matrixA; otherwise the leadingkbynpart of the arrayAmust contain the matrixA.LDAβLDAisINTEGER. On entry,LDAis the first dimension ofAas declared in the calling (sub) program. WhenTRANS = 'N' or 'n'thenLDAmust be at leastmax( 1, n ), otherwiseLDAmust be at leastmax( 1, k ). πBETAβBETAisREAL. On entry,BETAis the scalarbeta.CβCisCOMPLEX array, dimension ( LDC, N ). Before entry withUPLO = 'U' or 'u', the leadingnbynupper triangular part of the arrayCmust contain the upper triangular part of the hermitian matrix, and the strictly lower triangular part ofCis not referenced. On exit, the upper triangular part of the arrayCis overwritten by the upper triangular part of the updated matrix. Before entry withUPLO = 'L' or 'l', the leadingnbynlower triangular part of the arrayCmust contain the lower triangular part of the hermitian matrix, and the strictly upper triangular part ofCis not referenced. On exit, the lower triangular part of the arrayCis overwritten by the lower triangular part of the updated matrix.
Note that the imaginary parts of the diagonal elements need not be set β they are assumed to be zero, and on exit they are set to zero. π«Ά
LDCβLDCisINTEGER. On entry,LDCis the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 1, n ). π
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
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.
-- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1. Ed Anderson, Cray Research Inc.
π¦ csymm
subroutine csymm (character SIDE, character UPLO, integer M, integer N,
complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex,
dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*)
C, integer LDC)
CSYMM
β¨ Purpose
okay so bestie, CSYMM does one of these two matrix-matrix operations, your pick:
C := alpha*A*B + beta*C,
or
C := alpha*B*A + beta*C,
where alpha and beta are scalars, A is a symmetric matrix, and B and C are m by n matrices. π
πΈ Parameters
SIDEβSIDEisCHARACTER*1. on entry,SIDEsays whether the symmetric matrixAshows up on the left or the right in the operation, like this:SIDE = 'L' or 'l'βC := alpha*A*B + beta*C,SIDE = 'R' or 'r'βC := alpha*B*A + beta*C,
UPLOβUPLOisCHARACTER*1. on entry,UPLOsays whether the upper or lower triangular part of the symmetric matrixAis the part being referenced, like this:UPLO = 'U' or 'u'β only the upper triangular part of the symmetric matrix is to be referenced.UPLO = 'L' or 'l'β only the lower triangular part of the symmetric matrix is to be referenced.
MβMisINTEGER. on entry,Msays how many rows the matrixChas.Mhas to be at least zero. no negative row counts, that's not the vibe πNβNisINTEGER. on entry,Nsays how many columns the matrixChas.Nhas to be at least zero.ALPHAβALPHAisCOMPLEX. on entry,ALPHAis literally just the scalar alpha. iconic, no notes.AβAis aCOMPLEXarray, dimension( LDA, ka ), wherekaismwhenSIDE = 'L' or 'l'and isnotherwise. so here's the tea π:- before entry with
SIDE = 'L' or 'l', thembympart of the arrayAmust contain the symmetric matrix, such that whenUPLO = 'U' or 'u', the leadingmbymupper triangular part of the arrayAmust contain the upper triangular part of the symmetric matrix, and the strictly lower triangular part ofAis not referenced; and whenUPLO = 'L' or 'l', the leadingmbymlower triangular part of the arrayAmust contain the lower triangular part of the symmetric matrix, and the strictly upper triangular part ofAis not referenced. - before entry with
SIDE = 'R' or 'r', thenbynpart of the arrayAmust contain the symmetric matrix, such that whenUPLO = 'U' or 'u', the leadingnbynupper triangular part of the arrayAmust contain the upper triangular part of the symmetric matrix, and the strictly lower triangular part ofAis not referenced; and whenUPLO = 'L' or 'l', the leadingnbynlower triangular part of the arrayAmust contain the lower triangular part of the symmetric matrix, and the strictly upper triangular part ofAis not referenced.
- before entry with
LDAβLDAisINTEGER. on entry,LDAsays the first dimension ofAas declared in the calling (sub) program. whenSIDE = 'L' or 'l'thenLDAmust be at leastmax( 1, m ), otherwiseLDAmust be at leastmax( 1, n ).BβBis aCOMPLEXarray, dimension( LDB, N ). before entry, the leadingmbynpart of the arrayBmust contain the matrixB. π«ΆLDBβLDBisINTEGER. on entry,LDBsays the first dimension ofBas declared in the calling (sub) program.LDBmust be at leastmax( 1, m ).BETAβBETAisCOMPLEX. on entry,BETAis the scalar beta. whenBETAis supplied as zero thenCneed not be set on input β free pass, bestie, take it πCβCis aCOMPLEXarray, dimension( LDC, N ). before entry, the leadingmbynpart of the arrayCmust contain the matrixC, except whenbetais zero, in which caseCneed not be set on entry. on exit, the arrayCis overwritten by thembynupdated matrix. so yeah she does get rewritten, don't be shocked β¨LDCβLDCisINTEGER. on entry,LDCsays 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.
π Further Details:
Level 3 Blas routine. periodt.
-- 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.
π§ csyr2k
subroutine csyr2k (character UPLO, character TRANS, 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)
CSYR2K
β¨ Purpose
bestie, CSYR2K performs one of the symmetric rank 2k operations:
C := alpha*A*B**T + alpha*B*A**T + beta*C,
or
C := alpha*A**T*B + alpha*B**T*A + beta*C,
where alpha and beta are scalars, C is an n by n symmetric matrix, and A and B are n by k matrices in the first case and k by n matrices in the second case. two for the price of one, we love a 2k moment π₯
πΈ Parameters
UPLOβUPLOisCHARACTER*1. on entry,UPLOspecifies whether the upper or lower triangular part of the arrayCis to be referenced, like this:UPLO = 'U' or 'u'β only the upper triangular part ofCis to be referenced.UPLO = 'L' or 'l'β only the lower triangular part ofCis to be referenced.
TRANSβTRANSisCHARACTER*1. on entry,TRANSspecifies the operation to be performed, like this:TRANS = 'N' or 'n'βC := alpha*A*B**T + alpha*B*A**T + beta*C.TRANS = 'T' or 't'βC := alpha*A**T*B + alpha*B**T*A + beta*C.
NβNisINTEGER. on entry,Nspecifies the order of the matrixC.Nmust be at least zero.KβKisINTEGER. on entry withTRANS = 'N' or 'n',Kspecifies the number of columns of the matricesAandB, and on entry withTRANS = 'T' or 't',Kspecifies the number of rows of the matricesAandB.Kmust be at least zero.ALPHAβALPHAisCOMPLEX. on entry,ALPHAspecifies the scalar alpha. slay.AβAis aCOMPLEXarray, dimension( LDA, ka ), wherekaiskwhenTRANS = 'N' or 'n', and isnotherwise. before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayAmust contain the matrixA; otherwise the leadingkbynpart of the arrayAmust contain the matrixA.LDAβLDAisINTEGER. on entry,LDAspecifies the first dimension ofAas declared in the calling (sub) program. whenTRANS = 'N' or 'n'thenLDAmust be at leastmax( 1, n ), otherwiseLDAmust be at leastmax( 1, k ).BβBis aCOMPLEXarray, dimension( LDB, kb ), wherekbiskwhenTRANS = 'N' or 'n', and isnotherwise. before entry withTRANS = 'N' or 'n', the leadingnbykpart of the arrayBmust contain the matrixB; otherwise the leadingkbynpart of the arrayBmust contain the matrixB.LDBβLDBisINTEGER. on entry,LDBspecifies the first dimension ofBas declared in the calling (sub) program. whenTRANS = 'N' or 'n'thenLDBmust be at leastmax( 1, n ), otherwiseLDBmust be at leastmax( 1, k ).BETAβBETAisCOMPLEX. on entry,BETAspecifies the scalar beta.CβCis aCOMPLEXarray, dimension( LDC, N ). this one's got β¨rulesβ¨, so listen up:- before entry with
UPLO = 'U' or 'u', the leadingnbynupper triangular part of the arrayCmust contain the upper triangular part of the symmetric matrix, and the strictly lower triangular part ofCis not referenced. on exit, the upper triangular part of the arrayCis overwritten by the upper triangular part of the updated matrix. - before entry with
UPLO = 'L' or 'l', the leadingnbynlower triangular part of the arrayCmust contain the lower triangular part of the symmetric matrix, and the strictly upper triangular part ofCis not referenced. on exit, the lower triangular part of the arrayCis overwritten by the lower triangular part of the updated matrix.
- before entry with
LDCβLDCisINTEGER. on entry,LDCspecifies the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 1, n ).
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
Level 3 Blas routine. yep, that's the whole note. π
-- 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.
π
subroutine csyrk π
subroutine csyrk (character UPLO, character TRANS, integer N, integer K,
complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex BETA,
complex, dimension(ldc,*) C, integer LDC)
CSYRK β¨
πΈ Purpose πΈ
okay so CSYRK does one of the symmetric rank k operations, bestie:
C := alpha*A*A**T + beta*C,
or
C := alpha*A**T*A + beta*C,
where alpha and beta are scalars, C is an n by n symmetric matrix and A is an n by k matrix in the first case and a k by n matrix in the second case. no cap. π
π Parameters π
UPLOβUPLOisCHARACTER*1. On entry,UPLOtells us whether the upper or lower triangular part of the arrayCis the one getting referenced, like:UPLO = 'U' or 'u'β Only the upper triangular part ofCis to be referenced.UPLO = 'L' or 'l'β Only the lower triangular part ofCis to be referenced.
TRANSβTRANSisCHARACTER*1. On entry,TRANSsays which operation we're doing, and it's giving:TRANS = 'N' or 'n'βC := alpha*A*A**T + beta*C.TRANS = 'T' or 't'βC := alpha*A**T*A + beta*C.
NβNisINTEGER. On entry,Nis the order of the matrixC.Nmust be at least zero. periodt.KβKisINTEGER. On entry withTRANS = 'N' or 'n',Kis the number of columns of the matrixA, and on entry withTRANS = 'T' or 't',Kis the number of rows of the matrixA.Kmust be at least zero.ALPHAβALPHAisCOMPLEX. On entry,ALPHAis the scalaralpha. π«AβAisCOMPLEX array, dimension ( LDA, ka ), wherekaiskwhenTRANS = 'N' or 'n', and isnotherwise. Before entry withTRANS = 'N' or 'n', the leading n by k part of the arrayAmust contain the matrixA; otherwise the leading k by n part of the arrayAmust contain the matrixA.LDAβLDAisINTEGER. On entry,LDAis the first dimension ofAas declared in the calling (sub) program. WhenTRANS = 'N' or 'n'thenLDAmust be at leastmax( 1, n ); otherwiseLDAmust be at leastmax( 1, k ).BETAβBETAisCOMPLEX. On entry,BETAis the scalarbeta. πCβCisCOMPLEX array, dimension ( LDC, N ). Before entry withUPLO = 'U' or 'u', the leading n by n upper triangular part of the arrayCmust contain the upper triangular part of the symmetric matrix, and the strictly lower triangular part ofCis not referenced. On exit, the upper triangular part of the arrayCis overwritten by the upper triangular part of the updated matrix. Before entry withUPLO = 'L' or 'l', the leading n by n lower triangular part of the arrayCmust contain the lower triangular part of the symmetric matrix, and the strictly upper triangular part ofCis not referenced. On exit, the lower triangular part of the arrayCis overwritten by the lower triangular part of the updated matrix.LDCβLDCisINTEGER. On entry,LDCis the first dimension ofCas declared in the calling (sub) program.LDCmust be at leastmax( 1, n ).
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π¦ Further Details π¦
Level 3 Blas routine. iykyk.
-- 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.
β¨ subroutine ctrmm β¨
subroutine ctrmm (character SIDE, character UPLO, character TRANSA,
character DIAG, integer M, integer N, complex ALPHA, complex,
dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer
LDB)
CTRMM π«
πΈ Purpose πΈ
CTRMM performs one of the matrix-matrix operations
B := alpha*op( A )*B, or B := alpha*B*op( A )
where alpha is a scalar, B is an m by n matrix, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of
op( A ) = A or op( A ) = A**T or op( A ) = A**H.
π Parameters π
SIDEβSIDEisCHARACTER*1. On entry,SIDEsays whetherop( A )multipliesBfrom the left or right, like:SIDE = 'L' or 'l'βB := alpha*op( A )*B.SIDE = 'R' or 'r'βB := alpha*B*op( A ).
UPLOβUPLOisCHARACTER*1. On entry,UPLOsays whether the matrixAis upper or lower triangular:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
TRANSAβTRANSAisCHARACTER*1. On entry,TRANSAsays what form ofop( A )is being used in the matrix multiplication:TRANSA = 'N' or 'n'βop( A ) = A.TRANSA = 'T' or 't'βop( A ) = A**T.TRANSA = 'C' or 'c'βop( A ) = A**H.
DIAGβDIAGisCHARACTER*1. On entry,DIAGsays whether or notAis unit triangular:DIAG = 'U' or 'u'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis not assumed to be unit triangular.
MβMisINTEGER. On entry,Mis the number of rows ofB.Mmust be at least zero.NβNisINTEGER. On entry,Nis the number of columns ofB.Nmust be at least zero.ALPHAβALPHAisCOMPLEX. On entry,ALPHAis the scalaralpha. Whenalphais zero thenAis not referenced andBneed not be set before entry. slay, free real estate πAβAisCOMPLEX array, dimension ( LDA, k ), wherekismwhenSIDE = 'L' or 'l'and isnwhenSIDE = 'R' or 'r'. Before entry withUPLO = 'U' or 'u', the leading k by k upper triangular part of the arrayAmust contain the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. Before entry withUPLO = 'L' or 'l', the leading k by k lower triangular part of the arrayAmust contain the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. Note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced either, but are assumed to be unity. π iconic behavior honestlyLDAβLDAisINTEGER. On entry,LDAis the first dimension ofAas declared in the calling (sub) program. WhenSIDE = 'L' or 'l'thenLDAmust be at leastmax( 1, m ); whenSIDE = 'R' or 'r'thenLDAmust be at leastmax( 1, n ).BβBisCOMPLEX array, dimension ( LDB, N ). Before entry, the leading m by n part of the arrayBmust contain the matrixB, and on exit is overwritten by the transformed matrix. π¦LDBβLDBisINTEGER. On entry,LDBis the first dimension ofBas declared in the calling (sub) program.LDBmust be at leastmax( 1, m ).
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π¦ 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.
π subroutine ctrsm π
subroutine ctrsm (character SIDE, character UPLO, character TRANSA,
character DIAG, integer M, integer N, complex ALPHA, complex,
dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer
LDB)
CTRSM π
πΈ Purpose πΈ
CTRSM solves one of the matrix equations
op( A )*X = alpha*B, or X*op( A ) = alpha*B,
where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of
op( A ) = A or op( A ) = A**T or op( A ) = A**H.
The matrix X is overwritten on B. so heads up bestie, B is not surviving this π
π Parameters π
SIDEβSIDEisCHARACTER*1. On entry,SIDEsays whetherop( A )appears on the left or right ofX, like:SIDE = 'L' or 'l'βop( A )*X = alpha*B.SIDE = 'R' or 'r'βX*op( A ) = alpha*B.
UPLOβUPLOisCHARACTER*1. On entry,UPLOsays whether the matrixAis upper or lower triangular:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
TRANSAβTRANSAisCHARACTER*1. On entry,TRANSAsays what form ofop( A )is being used in the matrix multiplication:TRANSA = 'N' or 'n'βop( A ) = A.TRANSA = 'T' or 't'βop( A ) = A**T.TRANSA = 'C' or 'c'βop( A ) = A**H.
DIAG
DIAG
DIAG is CHARACTER*1
On entry, DIAG specifies whether or not A is unit triangular, and honestly? Itβs giving options:
DIAG = 'U' or 'u'βAis assumed to be unit triangular. (Like, the diagonal is lowkey just 1.0 energy. β¨)DIAG = 'N' or 'n'βAis not assumed to be unit triangular. (So you actually have to look at the diagonal. No shortcuts. π )
M
M is INTEGER
On entry, M specifies the number of rows of B. M must be at least zero. (Negative rows? Not on this campus. π«)
N
N is INTEGER
On entry, N specifies the number of columns of B. N must be at least zero. (Same vibe, bestie. π«Ά)
ALPHA
ALPHA is COMPLEX
On entry, ALPHA specifies the scalar alpha. When alpha is zero then A is not referenced and B need not be set before entry. (Not me ignoring A and B entirely when alpha is 0. Itβs called efficiency, look it up. π
)
A
A is COMPLEX array, dimension ( LDA, k ), where k is m when SIDE = 'L' or 'l' and k is n when SIDE = 'R' or 'r'.
Before entry with UPLO = 'U' or 'u', the leading k by k upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced.
Before entry with UPLO = 'L' or 'l', the leading k by k lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced.
Note that whenDIAG = 'U' or 'u', the diagonal elements ofAare not referenced either, but are assumed to be unity. (So donβt even worry about setting them. Theyβre just 1.0 coded in. π)
LDA
LDA is INTEGER
On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. When SIDE = 'L' or 'l' then LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' then LDA must be at least max( 1, n ). (Respect the dimension, okay? Itβs not a suggestion. π)
B
B is COMPLEX array, dimension ( LDB, N )
Before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X. (So B walks in, X walks out. Character development. π
)
LDB
LDB is INTEGER
On entry, LDB specifies the first dimension of B as declared in the calling (sub) program. LDB must be at least max( 1, m ). (Again: at least. No tiny LDB energy. π)
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
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.
Author
Generated automatically by Doxygen for LAPACK from the source code.
And thatβs the whole vibe, bestie. This masterpiece is from LAPACK version 3.11.0, dated Sun Nov 27 2022, and it lives at complex_blas_level3(3). Slay. πβ¨π
π¦ where this page comes from
- debian bookworm: liblapack-doc 3.11.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms