BLAS/SRC/cgemmtr.f(3)
π BLAS/SRC/cgemmtr.f(3) β Library Functions Manual
okay so bestie, we're in BLAS/SRC/cgemmtr.f(3) today and honestly? this one's a whole vibe. it's a Level 3 BLAS routine, it does matrix-matrix math, and it has the AUDACITY to only touch half your matrix. iconic behavior, honestly. let me walk you through it π«Ά
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cgemmtr (uplo, transa, transb, n, k, alpha, a, lda, b, ldb, beta, c, ldc)β literallyCGEMMTR. that's the name, that's the function, slay π
π¦ Function/Subroutine Documentation π¦
subroutine cgemmtr (character uplo, character transa, character transb,
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)
CGEMMTR
πΈ Purpose πΈ
!> !> CGEMMTR 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, !> !> alpha and beta are scalars, and A, B and C are matrices, with op( A ) !> an n by k matrix, op( B ) a k by n matrix and C an n by n matrix. !> Thereby, the routine only accesses and updates the upper or lower !> triangular part of the result matrix C. This behaviour can be used if !> the resulting matrix C is known to be Hermitian or symmetric. !>
so it's giving C := alpha*op( A )*op( B ) + beta*C β the classic. op( X ) is either X or X**T, alpha and beta are scalars, A, B, C are matrices, op( A ) is n by k, op( B ) is k by n, and C is n by n. and here's the main character detail π: it only accesses and updates the upper or the lower triangular part of the result matrix C. which is literally perfect if you already know C is Hermitian or symmetric β no cap, that's the whole point.
π Parameters π
π UPLO
!> UPLO is CHARACTER*1 !> On entry, UPLO specifies whether the lower or the upper !> triangular part of C is access and updated. !> !> UPLO = 'L' or 'l', the lower triangular part of C is used. !> !> UPLO = 'U' or 'u', the upper triangular part of C is used. !>
CHARACTER*1. on entry it tells us which triangle of C we're accessing and updating:
UPLO = 'L'or'l'β the lower triangular part ofCis used πUPLO = 'U'or'u'β the upper triangular part ofCis used πΈ
π TRANSA
!> TRANSA is CHARACTER*1 !> On entry, TRANSA specifies the form of op( 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. !>
CHARACTER*1. on entry, TRANSA picks the form of op( A ) for the multiplication:
TRANSA = 'N'or'n'βop( A ) = AπTRANSA = 'T'or't'βop( A ) = A**Tπ₯TRANSA = 'C'or'c'βop( A ) = A**Hβ¨
π TRANSB
!> TRANSB is CHARACTER*1 !> On entry, TRANSB specifies the form of op( 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. !>
CHARACTER*1, same energy as TRANSA but for B:
TRANSB = 'N'or'n'βop( B ) = BπTRANSB = 'T'or't'βop( B ) = B**Tπ₯TRANSB = 'C'or'c'βop( B ) = B**Hβ¨
π N
!> N is INTEGER !> On entry, N specifies the number of rows and columns of !> the matrix C, the number of columns of op(B) and the number !> of rows of op(A). N must be at least zero. !>
INTEGER. on entry, N = number of rows and columns of C, number of columns of op(B), and number of rows of op(A). N must be at least zero β respect the boundary bestie π«Ά
π K
!> K is INTEGER !> On entry, K specifies the number of columns of the matrix !> op( A ) and the number of rows of the matrix op( B ). K must !> be at least zero. !>
INTEGER. on entry, K = number of columns of op( A ) and number of rows of op( B ). K must be at least zero π«
π ALPHA
!> ALPHA is COMPLEX. !> On entry, ALPHA specifies the scalar alpha. !>
COMPLEX. on entry, ALPHA is literally just the scalar alpha. mystery solved π
π A
!> A is COMPLEX array, dimension ( LDA, ka ), where ka is !> k when TRANSA = 'N' or 'n', and is n otherwise. !> Before entry with TRANSA = 'N' or 'n', the leading n 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. !>
COMPLEX array, dimension ( LDA, ka ), where ka is k when TRANSA = 'N' or 'n', and is n otherwise. before entry with TRANSA = 'N' or 'n', the leading n 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. yes, m β that's what the doc says, i don't make the rules π
π LDA
!> LDA is INTEGER !> On entry, LDA specifies 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, n ), otherwise LDA must be at !> least max( 1, k ). !>
INTEGER. on entry, LDA = the first dimension of A as declared in the calling (sub) program. when TRANSA = 'N' or 'n', LDA must be at least max( 1, n ); otherwise LDA must be at least max( 1, k ) π§
π B
!> B is COMPLEX array, dimension ( LDB, kb ), where kb is !> n when TRANSB = 'N' or 'n', and is k otherwise. !> 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. !>
COMPLEX array, dimension ( LDB, kb ), where kb is n when TRANSB = 'N' or 'n', and is k otherwise. 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 specifies 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 ). !>
INTEGER. on entry, LDB = the first dimension of B as declared in the calling (sub) program. when TRANSB = 'N' or 'n', LDB must be at least max( 1, k ); otherwise LDB must be at least max( 1, n ) β
π BETA
!> BETA is COMPLEX. !> On entry, BETA specifies the scalar beta. When BETA is !> supplied as zero then C need not be set on input. !>
COMPLEX. on entry, BETA = the scalar beta. and the cute shortcut: when BETA is supplied as zero, then C need not be set on input ππ
π C
!> C is COMPLEX array, dimension ( LDC, N ) !> Before entry, the leading n 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 upper or lower triangular part of the matrix !> C is overwritten by the n by n matrix !> ( alpha*op( A )*op( B ) + beta*C ). !>
COMPLEX array, dimension ( LDC, N ).
before entry, the leading n 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 upper or lower triangular part of the matrix C is overwritten by the n by n matrix ( alpha*op( A )*op( B ) + beta*C ). only the triangle, bestie β the other half stays untouched, and that's the whole serve π
π LDC
!> LDC is INTEGER !> On entry, LDC specifies the first dimension of C as declared !> in the calling (sub) program. LDC must be at least !> max( 1, n ). !>
INTEGER. on entry, LDC = the first dimension of C as declared in the calling (sub) program. LDC must be at least max( 1, n ) π
π Author π
Martin Koehler β yeah, he wrote it. we stan π«Ά
π Further Details π
!> !> Level 3 Blas routine. !> !> -- Written on 19-July-2023. !> Martin Koehler, MPI Magdeburg !>
Level 3 Blas routine, periodt. written on 19-July-2023 by Martin Koehler, MPI Magdeburg π₯
π§ Definition π§
Definition at line 189 of file cgemmtr.f.
π¦ Author π¦
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page, bestie, you ate that π
LAPACK β Version 3.12.0 πΈ and yes, this lil page is BLAS/SRC/cgemmtr.f(3), so go forth and only update the triangle you were assigned, no cap ππ
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms