sglaux(3)
π¦ sglaux(3) β Single Precision Auxiliary Routines π¦
manual section 3 Β· MEPACK
okay bestie, sit DOWN, hydrate, and get comfy, because we are diving into the single-precision auxiliary routines and honestly? they're serving real utility. this is the page for sglaux, and it lives in section 3 of the manual. π«Ά
πΈ NAME πΈ
sglaux β Single Precision Auxiliary Routines
- Helper routines for single precision computations.
β¨ SYNOPSIS β¨
π Functions π
subroutine sla_itranspose (k, kh, l, lh, x, ldx)β Solver for 4-by-4 Linear Systems.subroutine sla_qtrmm2 (side, trans, m, n, alpha, a, lda, b, ldb, c, ldc)β Multiply with the sub-diagonal entries of a quasi triangular matrix.subroutine sla_small_solve4 (n, a, rhs, info, eps, smlnum)β Solver for 4-by-4 Linear Systems.subroutine sla_small_solve8 (n, a, rhs, info, eps, smlnum)β Solver for 8-by-8 Linear Systems.subroutine sla_sort_ev (n, a, lda, q, ldq, nb, work, info)β Block Reordering of generalized Eigenvalues.subroutine sla_sort_gev (n, a, lda, b, ldb, q, ldq, z, ldz, nb, work, lwork, info)β Block Reordering of generalized Eigenvalues.subroutine sla_transform_general (trans, m, n, x, ldx, qa, ldqa, qb, ldqb, work)β Transform the Right-Hand Side or Solution for generalized projections.subroutine sla_transform_standard (trans, m, x, ldx, q, ldq, work)β Transform the Right-Hand Side or Solution for standard projections.
π Detailed Description π
Helper routines for single precision computations.
This section contains a set of helper routines for the single precision computational routines. This includes the transformation of the right-hand-sides, the transformation of the solutions, the solution of special linear systems and the sorting of eigenvalues.
likeβ¦ that's the whole vibe. transformation of right-hand sides, transformation of solutions, solving special linear systems, sorting eigenvalues. the auxiliary besties that carry the main character computational routines. π
π Function Documentation π
π subroutine sla_itranspose π
subroutine sla_itranspose (integer k, integer kh, integer l, integer lh,
real, dimension(ldx,*) x, integer ldx)
Solver for 4-by-4 Linear Systems.
not me noticing that the one-liner says "Solver for 4-by-4 Linear Systems" for a transpose routine π we are just reporting what the doc says, no editorializing, periodt.
Purpose:
!>
!> SLA_ITRANSPOSE performs the implicit transpose
!>
!> X(L:LH,K:KH ) <- X(K:KH,L:LH)**T (1)
!>
!>
so it takes that block of X and implicitly transposes it. no cap, that's the move.
Parameters
Kβ INTEGER. First index of the transpose operations as in (1).KHβ INTEGER. Second index of the transpose operations as in (1).Lβ INTEGER. Third index of the transpose operations as in (1).LHβ INTEGER. Fourth index of the transpose operations as in (1).Xβ REAL array, dimension(LDX,*). X is the matrix to perform the transpose on.LDXβ INTEGER. The leading dimension of the array X.LDX >= MAX(1,KH,LH).
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 86 of file sla_itranspose.f90.
π subroutine sla_qtrmm2 π
subroutine sla_qtrmm2 (character(1) side, character(1) trans, integer m,
integer n, real alpha, real, dimension(lda, *) a, integer lda, real,
dimension(ldb, *) b, integer ldb, real, dimension(ldc,*) c, integer ldc)
Multiply with the sub-diagonal entries of a quasi triangular matrix.
Purpose:
!>
!> Multiply a matrix with the sub-diagonal entries of a quasi-triangular matrix.
!> Consider a quasi-triangular matrix A where sub(A) is the matrix only containing
!> the sub-diagonal entries. Than the SLA_QTRMM2 routine computes
!>
!> C = C + ALPHA * op(sub(A)) * B (1)
!>
!> or
!>
!> C = C + ALPHA * B * op(sub(A)) (2)
!>
!>
so A is quasi-triangular, sub(A) is literally just the sub-diagonal entries of it, and we're multiplying. two flavors, pick your fighter β equation (1) or equation (2). π
ATTENTION bestie β The routine does not check the input arguments. so likeβ¦ garbage in, garbage out, she trusts you, do NOT abuse that trust. π
Parameters
SIDEβ CHARACTER(1). On entry,SIDEspecifies whetherop( A )multiplies B from the left or right, like this:SIDE = 'L'or'l'βB := alpha*op( A )*B.SIDE = 'R'or'r'βB := alpha*B*op( A ).
TRANSβ CHARACTER(1). On entry,TRANSspecifies the form ofop( A )to be used in the matrix multiplication, like this:TRANS == 'N'or'n'βop( A ) = A.TRANS == 'T'or't'βop( A ) = A**T.TRANS = 'C'or'c'βop( A ) = A**T.
Mβ INTEGER. On entry,Mspecifies the number of rows ofB.Mmust be at least zero.Nβ INTEGER. On entry,Nspecifies the number of columns ofB.Nmust be at least zero.ALPHAβ REAL. On entry,ALPHAspecifies the scalar alpha. When alpha is zero thenAis not referenced andBneed not be set before entry. (iconic behavior honestly, she doesn't even look.)Aβ REAL array of DIMENSION( LDA, k ), where k is m whenSIDE = 'L'or'l'and is n whenSIDE = 'R'or'r'. The leading k by k upper triangular part of the arrayAmust contain the upper quasi triangular matrix.LDAβ INTEGER. 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β REAL array of DIMENSION( LDB, n ). Before entry, the leading m by n part of the arrayBmust contain the matrixB.LDBβ INTEGER. On entry,LDBspecifies the first dimension ofBas declared in the calling (sub) program.LDBmust be at leastmax( 1, m ).Cβ REAL array of DIMENSION( LDC, n ). Before entry, the leading m by n part of the arrayCmust contain the matrixC, and on exit is overwritten by the update January 2021LDCβ INTEGER. On entry,LDCspecifies the first dimension ofCas declared in the calling (sub) program.LDBmust be at leastmax( 1, m ).
yes bestie, theLDCdescription literally saysLDBin there. iykyk. we do not make the rules, we just transcribe them with love. π«Ά
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 153 of file sla_qtrmm2.f90.
π subroutine sla_small_solve4 π
subroutine sla_small_solve4 (integer n, real, dimension( 4, 4 ) a, real,
dimension(4) rhs, integer info, real eps, real smlnum)
Solver for 4-by-4 Linear Systems.
Purpose:
!>
!> SLA_SMALL_SOLVE4 solves a linear system
!>
!> A * x = b (1)
!>
!> where A is a most a 4 by 4 matrix.
!>
she solves A * x = b for a matrix A that's at most 4 by 4. tiny but mighty. π§
Parameters
Nβ INTEGER. The order of the matrixA.N = (1,2,4).Aβ REAL array, dimension(4,4). The matrixAmust be stored in a 4-by-4 matrix even if it is smaller. On output the matrixAis destroyed. (ripA, she served. π)RHSβ REAL array, dimension(4). The matrixRHScontains the right hand side on input and the solutionXon output ifINFO == 0INFOβ INTEGER.== 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
EPSβ REAL.EPSis the machine epsilon determined by DLAMCHSMLNUMβ REAL.SMLNUMis the smallest number in REAL which can be represented without underflow.
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 98 of file sla_small_solve4.f90.
π subroutine sla_small_solve8 π
subroutine sla_small_solve8 (integer n, real, dimension( 8, 8 ) a, real,
dimension(8) rhs, integer info, real eps, real smlnum)
Solver for 8-by-8 Linear Systems.
Purpose:
!>
!> SLA_SMALL_SOLVE8 solves a linear system
!>
!> A * x = b (1)
!>
!> where A is a most a 8 by 8 matrix with leading dimension 8.
!>
same energy as her little sister but she ate and left no crumbs at 8-by-8 with leading dimension 8. π
Parameters
Nβ INTEGER. The order of the matrixA.N = {1,2,4,8} .Aβ REAL array, dimension(8,8). The matrixAmust be stored in a 4-by-4 matrix even if it is smaller. On output the matrixAis destroyed.RHSβ REAL array, dimension(8). The matrixRHScontains the right hand side on input and the solutionXon output ifINFO == 0INFOβ INTEGER.== 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
EPSβ REAL.EPSis the machine epsilon determined by DLAMCHSMLNUMβ REAL.SMLNUMis the smallest number in REAL which can be represented without underflow.
and yes, the A description for the 8-by-8 routine says "4-by-4 matrix" β that's straight from the doc, we are not touching it, we are simply vibing with it. π
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 98 of file sla_small_solve8.f90.
π subroutine sla_sort_ev π
subroutine sla_sort_ev (integer n, real, dimension( lda, * ) a, integer lda,
real, dimension( ldq, * ) q, integer ldq, integer nb, real, dimension( *
) work, integer info)
Block Reordering of generalized Eigenvalues.
Purpose:
β¦and that's where the page goes quiet bestie, we're still waiting on this one. don't go anywhere. π¦
okay bestie, so like this next bit is literally all about reordering eigenvalues so your complex eigenvalue pairs don't mess with the block size in blocked linear matrix equation solver codes. The function uses STREXC from LAPACK to move the eigenvalues on the diagonal. π
β¨ Parameters β¨
Nβ INTEGER, bestie. It's the order of the matricesAandQ, andN >= 0. No cap. πAβ REAL array, dimension(LDA,N). On entry, the leadingN-by-Nupper Hessenberg part of this array must contain the generalized Schur factorA_sof the matrixA. On exit, the leadingN-by-Npart of this array contains the generalized Schur factorA_sof the matrixAwith no complex eigenvalue pairs atA(k*NB,k*NB), wherekis a non-negative integer. π₯LDAβ INTEGER. The leading dimension of the arrayA.LDA >= MAX(1,N). Periodt.Qβ REAL array, dimension(LDQ,N). On entry, the leadingN-by-Npart of this array must contain the orthogonal matrixQfrom the generalized Schur factorization. On exit, the leadingN-by-Npart of this array contains the update January 2021 factorization with integrated eigenvalue reordering. π¦LDQβ INTEGER. The leading dimension of the arrayQ.LDQ >= MAX(1,N).NBβ INTEGER. Block size of the solver planned to use. Typical values are16,32, or64. The block size must be an even positive integer otherwise an error is returned. πWORKβ INTEGER array, dimension(N). Workspace. β¨INFOβ INTEGER.== 0: successful exit;< 0: ifINFO = -i, thei-th argument had an illegal value;= 1: The internalSTGEX2caused an error. ]
Note: the stray ] is literally in the original, so we're keeping it. π
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition
at line 124 of file sla_sort_ev.f90.
sla_sort_gev
subroutine sla_sort_gev (integer n, real, dimension( lda, * ) a, integer
lda, real, dimension( ldb, * ) b, integer ldb, real, dimension( ldq, * )
q, integer ldq, real, dimension( ldz, * ) z, integer ldz, integer nb,
real, dimension( * ) work, integer lwork, integer info)
Block Reordering of generalized Eigenvalues. π
Purpose
okay so this one reorders the eigenvalues of a matrix pencil (A,B) such that the complex eigenvalue pairs will not cause a change of the block size in blocked linear matrix equation solver codes. It uses STGEX2 from LAPACK for moving the eigenvalues on the diagonal. π
Parameters
Nβ INTEGER. The order of the matricesA,B,Q, andZ,N >= 0.Aβ REAL array, dimension(LDA,N). On entry, the leadingN-by-Nupper Hessenberg part of this array must contain the generalized Schur factorA_sof the matrixA. On exit, the leadingN-by-Npart of this array contains the generalized Schur factorA_sof the matrixAwith no complex eigenvalue pairs atA(k*NB,k*NB), wherekis a non-negative integer.LDAβ INTEGER. The leading dimension of the arrayA.LDA >= MAX(1,N).Bβ REAL array, dimension(LDB,N). On entry, the leadingN-by-Nupper triangular part of this array must contain the generalized Schur factorB_sof the matrixB. On exit, the leadingN-by-Npart of this array contains the generalized Schur factorB_sof the matrixBwith reordered eigenvalues. π¦LDBβ INTEGER. The leading dimension of the arrayB.LDB >= MAX(1,N).Qβ REAL array, dimension(LDQ,N). On entry, the leadingN-by-Npart of this array must contain the orthogonal matrixQfrom the generalized Schur factorization. On exit, the leadingN-by-Npart of this array contains the update January 2021 factorization with integrated eigenvalue reordering.LDQβ INTEGER. The leading dimension of the arrayQ.LDQ >= MAX(1,N).Zβ REAL array, dimension(LDZ,N). On entry, the leadingN-by-Npart of this array must contain the orthogonal matrixZfrom the generalized Schur factorization. On exit, the leadingN-by-Npart of this array contains the update January 2021 factorization with integrated eigenvalue reordering. πLDZβ INTEGER. The leading dimension of the arrayZ.LDZ >= MAX(1,N).NBβ INTEGER. Block size of the solver planned to use. Typical values are16,32, or64. The block size must be an even positive integer otherwise an error is returned. πWORKβ INTEGER array, dimension(LWORK). Workspace. β¨LWORKβ INTEGER. Size of the workspace.LWORK >= MAX(1, 4*N, 256).INFOβ INTEGER.== 0: successful exit;< 0: ifINFO = -i, thei-th argument had an illegal value;= 1: The internalSTGEX2caused an error. ]
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition
at line 165 of file sla_sort_gev.f90.
sla_transform_general
subroutine sla_transform_general (character, dimension(*) trans, integer m,
integer n, real, dimension(ldx, *) x, integer ldx, real, dimension(ldqa,
*) qa, integer ldqa, real, dimension(ldqb, *) qb, integer ldqb, real,
dimension(*) work)
Transform the Right-Hand Side or Solution for generalized projections. π
Purpose
okay so SLA_TRANSFORM_STANDARD computes either
X <- QA*X*QB**T (1)
or
X <- QA**T*X*QB (2)
where QA is a M-by-M matrices, QB is a N-by-N matrix, and X is a M-by-N matrix. π
Remarks
The function does not perform any check on the input arguments. So like, be careful bestie. π
Parameters
TRANSβ CHARACTER(1). Specifies which transformation is applied:== 'N': Transformation (1)== 'T': Transformation (2)
Mβ INTEGER. The order of the matricesQAand the number of rows ofX.M >= 0.Nβ INTEGER. The order of the matricesQBand the number of columns ofX.N >= 0.Xβ REAL array, dimension(LDX,N). The matrixXis a generalM-by-Nmatrix overwritten by (1) or (2). π₯LDXβ INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).QAβ REAL array, dimension(LDQA,M). The matrixQAisM-by-Mthe transformation matrix.LDQAβ INTEGER. The leading dimension of the arrayQA.LDQA >= max(1,M).QBβ REAL array, dimension(LDQB,N). The matrixQBisN-by-Nthe transformation matrix.LDQBβ INTEGER. The leading dimension of the arrayQB.LDQB >= max(1,N).WORKβ REAL array, dimension(M*N). Workspace for the computation. β¨
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition
at line 119 of file sla_transform_general.f90.
sla_transform_standard
subroutine sla_transform_standard (character, dimension(*) trans, integer m,
real, dimension(ldx, *) x, integer ldx, real, dimension(ldq, *) q,
integer ldq, real, dimension(*) work)
Transform the Right-Hand Side or Solution for standard projections. π
Purpose
okay so SLA_TRANSFORM_STANDARD computes either
X <- Q*X*Q**T (1)
or
X <- Q**T*X*Q (2)
where Q and X are M-by-M matrices. π
Remarks
The function does not perform any check on the input arguments. So like, be careful bestie. π
Parameters
TRANSβ CHARACTER(1). Specifies which transformation is applied:== 'N': Transformation (1)== 'T': Transformation (2)
Mβ INTEGER. The order of the matricesQandX.M >= 0.Xβ REAL array, dimension(LDX,M). The matrixXis a generalM-by-Mmatrix overwritten by (1) or (2). π₯LDXβ INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).Qβ REAL array, dimension(LDQ,M). The matrixQisM-by-Mthe transformation matrix.LDQβ INTEGER. The leading dimension of the arrayQ.LDQ >= max(1,M).WORKβ okay bestie, this one is aREALarray with dimension(M**2). It's the workspace for the computation, aka the little scratchpad where the math does its thing. Don't skip it, don't shrink it, just hand it over and let it cook. β¨
π Author
Martin Koehler, MPI Magdeburg
ποΈ Date
October 2025
Definition at line 101 of file sla_transform_standard.f90. πΈ
π Author
Generated automatically by Doxygen for MEPACK from the source code. Not a human typing this out by hand, no cap β the docs wrote themselves. π€π
And that's a wrap on sglaux(3), bestie!! π This one's MEPACK version 1.1.2, dated Thu Oct 9 2025 00:00:00, so if you're reading this and your build says something else, that's your sign to go check which version you're actually holding. π¦ Go forth and compute, you absolute icon. π
π
π¦ where this page comes from
- fedora 43: mepack-devel 1.1.2-1.fc43 Β· GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- fedora 43: mepack-devel 1.1.2-1.fc43 Β· GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms