trmm(3)
β¨ NAME β¨
trmm β trmm: triangular matrix-matrix multiply. that's it, that's the whole vibe π
(and yes bestie, this is the trmm(3) page you were looking for π«Ά)
π SYNOPSIS π
π« Functions π«
here's the whole squad, all four of them, same energy different precision:
subroutine ctrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRMM
subroutine dtrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRMM
subroutine strmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRMM
subroutine ztrmm (side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM
π¦ Detailed Description π¦
(no extra detail up here, the good stuff is all down in Function Documentation, keep scrolling bestie π)
π Function Documentation π
π 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:
okay so CTRMM does one of these two 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.
yes she does conjugates, she's that girl π
Parameters
SIDEβSIDEisCHARACTER*1. On entry,SIDEspecifies whetherop( A )multipliesBfrom the left or right as follows:SIDE = 'L' or 'l'βB := alpha*op( A )*B.SIDE = 'R' or 'r'βB := alpha*B*op( A ).
UPLOβUPLOisCHARACTER*1. On entry,UPLOspecifies whether the matrixAis an upper or lower triangular matrix as follows:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
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.
DIAGβDIAGisCHARACTER*1. On entry,DIAGspecifies whether or notAis unit triangular as follows: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,Mspecifies the number of rows ofB.Mmust be at least zero. (zero is allowed, we're not judging π«Ά)NβNisINTEGER. On entry,Nspecifies the number of columns ofB.Nmust be at least zero.ALPHAβALPHAisCOMPLEX. On entry,ALPHAspecifies the scalaralpha. Whenalphais zero thenAis not referenced andBneed not be set before entry. (free pass, no setup needed, iconic β¨)AβAisCOMPLEXarray, dimension( LDA, k ), wherekismwhenSIDE = 'L' or 'l'and isnwhenSIDE = 'R' or 'r'. Before entry withUPLO = 'U' or 'u', the leadingkbykupper 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 leadingkbyklower 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.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 ), whenSIDE = 'R' or 'r'thenLDAmust be at leastmax( 1, n ).BβBisCOMPLEXarray, dimension( LDB, N ). Before entry, the leadingmbynpart of the arrayBmust contain the matrixB, and on exit is overwritten by the transformed matrix. (yes she eats your input, that's the deal π)LDBβLDBisINTEGER. On entry,LDBspecifies 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.
Definition at line 176 of file ctrmm.f.
π subroutine dtrmm (character side, character uplo, character transa, character diag, integer m, integer n, double precision alpha, double precision, dimension(lda,*) a, integer lda, double precision, dimension(ldb,*) b, integer ldb) π
DTRMM
Purpose:
DTRMM 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.
note: no A**H here bestie, real numbers don't need a conjugate glow-up πΈ
Parameters
SIDEβSIDEisCHARACTER*1. On entry,SIDEspecifies whetherop( A )multipliesBfrom the left or right as follows:SIDE = 'L' or 'l'βB := alpha*op( A )*B.SIDE = 'R' or 'r'βB := alpha*B*op( A ).
UPLOβUPLOisCHARACTER*1. On entry,UPLOspecifies whether the matrixAis an upper or lower triangular matrix as follows:UPLO = 'U' or 'u'βAis an upper triangular matrix.UPLO = 'L' or 'l'βAis a lower triangular matrix.
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**T.
DIAGβDIAGisCHARACTER*1. On entry,DIAGspecifies whether or notAis unit triangular as follows: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,Mspecifies the number of rows ofB.Mmust be at least zero.NβNisINTEGER. On entry,Nspecifies the number of columns ofB.Nmust be at least zero.ALPHAβALPHAisDOUBLE PRECISION.On entry,ALPHAspecifies the scalaralpha. Whenalphais zero thenAis not referenced andBneed not be set before entry.AβAisDOUBLE PRECISIONarray, dimension( LDA, k ), wherekismwhenSIDE = 'L' or 'l'and isnwhenSIDE = 'R' or 'r'. Before entry withUPLO = 'U' or 'u', the leadingkbykupper 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 leadingkbyklower 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.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 ), whenSIDE = 'R' or 'r'thenLDAmust be at leastmax( 1, n ).BβBisDOUBLE PRECISIONarray, dimension( LDB, N ). Before entry, the leadingmbynpart of the arrayBmust contain the matrixB, and on exit is overwritten by the transformed matrix.LDBβLDBisINTEGER. On entry,LDBspecifies 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.
Definition at line 176 of file dtrmm.f.
πΈ subroutine strmm (character side, character uplo, character transa, character diag, integer m, integer n, real alpha, real, dimension(lda,*) a, integer lda, real, dimension(ldb,*) b, integer ldb) πΈ
STRMM
Purpose:
STRMM 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.
Parameters
SIDEβSIDEisCHARACTER*1. On entry,SIDEspecifies whetherop( A )multipliesBfrom the left or right as follows:SIDE = 'L' or 'l'βB := alpha*op( A )*B.SIDE = 'R' or 'r'βB := alpha*B*op( A ).
UPLOβUPLOisCHARACTER*1. On entry,UPLOspecifies whether the matrixAis an upper or lower triangular matrix as follows:UPLO = 'U' or 'u'βAis an upper triangular matrix.
UPLO = 'L' or 'l' β A is a lower triangular matrix. Lower-triangle girlies, this is your moment π
TRANSA β¨
TRANSA is CHARACTER*1. On entry, TRANSA tells you which form of op( A ) we're using in the matrix multiplication, bestie:
TRANSA = 'N'or'n'βop( A ) = A. She's arriving exactly as she is, no edits, no notes πTRANSA = 'T'or't'βop( A ) = A**T.TRANSA = 'C'or'c'βop( A ) = A**T.
π okay so heads up: in this routine'C'maps toA**T, same as'T'. That is literally what the page says, so don't come for me. Write it down. It matters. iykyk.
DIAG π
DIAG is CHARACTER*1. On entry, DIAG says whether A is unit triangular or not, as follows:
DIAG = 'U'or'u'βAis assumed to be unit triangular.DIAG = 'N'or'n'βAis not assumed to be unit triangular.
M
M is INTEGER. On entry, M is the number of rows of B. M must be at least zero. Not "negative-ish", not "basically zero" β at least zero, periodt π«Ά
N
N is INTEGER. On entry, N is the number of columns of B. N must be at least zero. Same energy as M, she's just horizontal about it πΈ
ALPHA π
ALPHA is REAL. On entry, ALPHA is the scalar alpha. And here's the iconic part: when alpha is zero, A is not referenced at all and B doesn't even need to be set before entry. Free real estate, bestie β¨
A π
A is a REAL array, dimension ( LDA, k ), where k is m when SIDE = 'L' or 'l', and 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 stress about filling them in β she's not even looking π
LDA π¦
LDA is INTEGER. On entry, LDA is 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 ). Read it twice, bestie, the m/n swap is sneaky.
B π
B is a REAL array, dimension ( LDB, N ). Before entry, the leading m by n part of the array B must contain the matrix B, and on exit it's overwritten by the transformed matrix. In-place glow-up, we love to see it π
LDB π
LDB is INTEGER. On entry, LDB is the first dimension of B as declared in the calling (sub) program. LDB must be at least max( 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.
Definition at line 176 of file strmm.f.
ZTRMM π
subroutine ztrmm (character side, character uplo, character transa,
character diag, integer m, integer n, complex*16 alpha, complex*16,
dimension(lda,*) a, integer lda, complex*16, dimension(ldb,*) b, integer
ldb)
ZTRMM β the complex one. She's the same girl, different universe πͺ
Purpose β¨
ZTRMM 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βCHARACTER*1. On entry,SIDEsays whetherop( A )multipliesBfrom the left or the right:SIDE = 'L'or'l'βB := alpha*op( A )*B.SIDE = 'R'or'r'βB := alpha*B*op( A ).
UPLOβCHARACTER*1. On entry,UPLOsays whetherAis an upper or lower triangular matrix:UPLO = 'U'or'u'βAis an upper triangular matrix.UPLO = 'L'or'l'βAis a lower triangular matrix.
TRANSAβCHARACTER*1. On entry,TRANSAspecifies the form ofop( A )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.β okay bestie look, here'C'gives you the conjugate transpose,A**H. This is the difference from the real one up top. Learn it, love it, don't mix them up π
DIAGβCHARACTER*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βINTEGER. On entry,Mis the number of rows ofB.Mmust be at least zero.NβINTEGER. On entry,Nis the number of columns ofB.Nmust be at least zero.ALPHAβCOMPLEX*16. On entry,ALPHAis the scalar alpha. When alpha is zero,Ais not referenced andBneed not be set before entry. (Yes, this shortcut is free here too π)AβCOMPLEX*16array, dimension( LDA, k ), wherekismwhenSIDE = 'L'or'l', and isnwhenSIDE = 'R'or'r'. Before entry withUPLO = 'U'or'u', the leadingkbykupper 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 leadingkbyklower 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. π«ΆLDAβINTEGER. 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βCOMPLEX*16array, dimension( LDB, N ).Before entry, the leadingmbynpart of the arrayBmust contain the matrixB, and on exit it's overwritten by the transformed matrix. πLDBβINTEGER. 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.
Definition at line 176 of file ztrmm.f.
Author πΈ
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole page bestie, we did it π₯³ this is LAPACK Version 3.12.0, generated Tue Nov 28 2023 12:08:43, and you just read trmm(3) in full. go forth and multiply your triangular matrices, you absolute icon πβ¨
π¦ where this page comes from
- centos-stream 10: lapack 3.12.0-7.el10 Β· BSD-3-Clause-Open-MPI
- fedora 43: lapack 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 43: lapack 3.12.0-10.fc43 Β· BSD-3-Clause-Open-MPI
- fedora 44: lapack 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- fedora 44: lapack 3.12.0-11.fc44 Β· BSD-3-Clause-Open-MPI
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms