sgltrlyap(3)
π sgltrlyap(3) β MEPACK π
okay bestie, buckle up, we're in the sgltrlyap(3) section of the MEPACK manual and it's a whole journey. β¨
πΈ NAME πΈ
sgltrlyap β Single Precision routines.
- Single precision routines for standard Lyapunov and Stein equations with triangular coefficient matrices.
π SYNOPSIS π
β¨ Functions β¨
subroutine sla_trlyap_dag (trans, m, a, lda, x, ldx, scale, work, info)β DAG Scheduled Bartels-Stewart Algorithm for the standard Lyapunov Equation.subroutine sla_trstein_dag (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the Stein equation.subroutine sla_trlyap_kernel_44n (m, a, lda, x, ldx, scale, info)β Solver for a 4x4 standard Lyapunov equation (TRANS = N)subroutine sla_trlyap_kernel_44t (m, a, lda, x, ldx, scale, info)β Solver for a 4x4 standard Lyapunov equation (TRANS = T)subroutine sla_trlyap_l2 (transa, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation.subroutine sla_trlyap_l2_opt (transa, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation (Optimized)subroutine sla_trstein_l2 (trans, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Stein equation.subroutine sla_trlyap_l3 (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation.subroutine sla_trlyap_l3_2s (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation with 2 stage blocking.subroutine sla_trstein_l3 (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the Stein equation.subroutine sla_trstein_l3_2s (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the Stein equation with 2 stage blocking.recursive subroutine sla_trlyap_recursive (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Recursive Blocked Algorithm for the standard Lyapunov Equation.recursive subroutine sla_trstein_recursive (trans, m, a, lda, x, ldx, scale, work, info)β Recursive Blocked Algorithm for the Stein equation.
π¦ Detailed Description π¦
Single precision routines for standard Lyapunov and Stein equations with triangular coefficient matrices. that's the whole vibe. π
π Function Documentation π
π subroutine sla_trlyap_dag
subroutine sla_trlyap_dag (character, dimension(1) trans, integer m, real,
dimension(lda, m) a, integer lda, real, dimension(ldx, m) x, integer
ldx, real scale, real, dimension(*) work, integer info)
DAG Scheduled Bartels-Stewart Algorithm for the standard Lyapunov Equation.
β¨ Purpose β¨
!> SLA_TRLYAP_DAG solves a Lyapunov equation of the following forms
!>
!> A * X + X * A**T = SCALE * Y (1)
!>
!> or
!>
!> A ** T * X + X * A = SCALE * Y (2)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A
!> is generated by SGEES from LAPACK.
!>
π Remarks π
The algorithm is implemented using DAG Scheduling. that's the whole thing, she's scheduled. ποΈ
π Parameters π
- TRANS
!> TRANS is CHARACTER(1)
!> Specifies the form of the system of equations with respect to A:
!> == 'N': op1(A) = A
!> == 'T': op1(A) = A**T
!>
- M
!> M is INTEGER
!> The order of the matrices A and C. M >= 0.
!>
- A
!> A is REAL array, dimension (LDA,M)
!> The matrix A must be (quasi-) upper triangular.
!>
- LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
- X
!> X is REAL array, dimension (LDX,N)
!> On input, the matrix X contains the right hand side Y.
!> On output, the matrix X contains the solution of Equation (1) or (2)
!> Right hand side Y and the solution X are symmetric M-by-M matrices.
!>
- LDX
!> LDX is INTEGER
!> The leading dimension of the array X. LDB >= max(1,M).
!>
(yes bestie, it literally says LDB in there β we do not question the ancestors, we just report the lore. π)
- SCALE
!> SCALE is REAL
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems
!> could not be solved correctly, 0 < SCALE <= 1 holds true.
!>
- WORK
!> WORK is REAL array, dimension LWORK
!> Workspace for the algorithm.
!> The workspace needs to queried before the running the computation.
!> The query is performed by calling the subroutine with INFO == -1 on input.
!> The required workspace is then returned in INFO.
!>
- INFO
!> INFO is INTEGER
!>
!> On input:
!> == -1 : Perform a workspace query
!> <> -1: normal operation
!>
!> On exit, workspace query:
!> < 0 : if INFO = -i, the i-th argument had an illegal value
!> >= 0: The value of INFO is the required number of elements in the workspace.
!>
!> On exit, normal operation:
!> == 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!> > 0: The equation is not solved correctly. One of the arising inner
!> system got singular.
!>
π Author π
Martin Koehler, MPI Magdeburg
πΈ Date πΈ
October 2025
Definition at line 137 of file sla_trlyap_dag.f90.
π subroutine sla_trlyap_kernel_44n
subroutine sla_trlyap_kernel_44n (integer m, real, dimension(lda, *) a,
integer lda, real, dimension(ldx, *) x, integer ldx, real scale, integer
info)
Solver for a 4x4 standard Lyapunov equation (TRANS = N)
β¨ Purpose β¨
!>
!> SLA_TRLYAP_KERNEL_44N solves a Lyapunov equation of the following form
!>
!> A * X + X * A**T = SCALE * Y (1)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> The right hand side Y and the solution X M-by-M matrices.
!> Typically the matrix A is created by SGEES from LAPACK.
!> The algorithm is implemented without BLAS level 2
!> operations. Thereby the order of M and N is at most 4. Furthermore, for fast execution
!> the function does not check the input arguments.
!>
!>
π¨ heads up bestie: no input checking, no BLAS level 2,MandNcapped at 4. she is tiny and she is fast and she trusts you completely. do not betray her. π
π Parameters π
- M
!> M is INTEGER
!> The order of the matrices A and C. 4 >= M >= 0.
!>
- A
!> A is REAL array, dimension (LDA,M)
!> The matrix A must be (quasi-) upper triangular.
!>
- LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
- X
!> X is REAL array, dimension (LDX,N)
!> On input, the matrix X contains the right hand side Y.
!> On output, the matrix X contains the solution of Equation (1) or (2)
!> as selected by TRANSA, TRANSB, and SGN.
!> Right hand side Y and the solution X are M-by-N matrices.
!>
- LDX
!> LDX is INTEGER
!> The leading dimension of the array X. LDB >= max(1,M).
!>
- SCALE
!> SCALE is REAL
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems
!> could not be solved correctly, 0 < SCAL <= 1 holds true.
!>
(SCAL here, LDB above β the manpage is serving typo realness and we are keeping every single character, periodt. π
)
- INFO
!> INFO is INTEGER
!> On output:
!> == 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!> > 0: The equation is not solved correctly. One of the arising inner
!> system got singular.
!>
π Author π
Martin Koehler, MPI Magdeburg
πΈ Date πΈ
October 2025
Definition at line 109 of file sla_trlyap_kernel_44_n.f90.
π subroutine sla_trlyap_kernel_44t
subroutine sla_trlyap_kernel_44t (integer m, real, dimension(lda, *) a,
integer lda, real, dimension(ldx, *) x, integer ldx, real scale, integer
info)
Solver for a 4x4 standard Lyapunov equation (TRANS = T)
β¨ Purpose β¨
!>
!> SLA_TRLYAP_KERNEL_44T solves a Lyapunov equation of the following form
!>
!> A **T * X + X * A = SCALE * Y (1)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> The right hand side Y and the solution X M-by-M matrices.
!> Typically the matrix A is created by SGEES from LAPACK.
!> The algorithm is implemented without BLAS level 2
!> operations. Thereby the order of M and N is at most 4. Furthermore, for fast execution
!> the function does not check the input arguments.
!>
!>
π¨ same energy as her sibling: no input checking, no BLAS level 2, order capped at 4. iconic, unhinged, correct. π₯
π Parameters π
- M
!> M is INTEGER
!> The order of the matrices A and C. 4 >= M >= 0.
!>
- A
!> A is REAL array, dimension (LDA,M)
!> The matrix A must be (quasi-) upper triangular.
!>
- LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
- X
!> X is REAL array, dimension (LDX,N)
!> On input, the matrix X contains the right hand side Y.
!> On output, the matrix X contains the solution of Equation (1) or (2)
!> as selected by TRANSA, TRANSB, and SGN.
!> Right hand side Y and the solution X are M-by-N matrices.
!>
- LDX
!> LDX is INTEGER
!> The leading dimension of the array X. LDB >= max(1,M).
!>
- SCALE
!> SCALE is REAL
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems
!> could not be solved correctly, 0 < SCAL <= 1 holds true.
!>
- INFO
!> INFO is INTEGER
!> On output:
!> == 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!> > 0: The equation is not solved correctly. One of the arising inner
!> system got singular.
!>
π Author π
Martin Koehler, MPI Magdeburg
okay that's it for part 1 bestie, there's more coming and we are NOT done yet π
Date: October 2025
Definition at line 109 of file sla_trlyap_kernel_44_t.f90.
πΈ sla_trlyap_l2 πΈ
Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation.
okay bestie, this one is lowkey the whole moment π
subroutine sla_trlyap_l2 (character, dimension(1) transa, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
β¨ Purpose
!> !> SLA_TRLYAP_L2 solves a Lyapunov equation of the following forms !> !> A * X + X * A**T = SCALE * Y (1) !> !> or !> !> A **T * X - X * A = SCALE * Y (2) !> !> where A is a M-by-M quasi upper triangular matrix. !> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A !> is generated by SGEES from LAPACK. !>
fr fr, that's equations (1) and (2), no cap π«Ά
π Remarks
The algorithm is implemented using BLAS level 2 operations.
The transposed case (2) is optimized w.r.t. to the usage of the SSYR2 operation. β¨
π Parameters
TRANSA
!> TRANSA is CHARACTER(1) !> Specifies the form of the system of equations with respect to A: !> == 'N': op1(A) = A !> == 'T': op1(A) = A**T !>
M
!> M is INTEGER !> The order of the matrices A and C. M >= 0. !>
A
!> A is REAL array, dimension (LDA,M) !> The matrix A must be (quasi-) upper triangular. !>
LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !>
X
!> X is REAL array, dimension (LDX,N) !> On input, the matrix X contains the right hand side Y. !> On output, the matrix X contains the solution of Equation (1) or (2) !> Right hand side Y and the solution X are symmetric M-by-M matrices. !>
LDX
!> LDX is INTEGER !> The leading dimension of the array X. LDB >= max(1,M). !>
not me noticing the original saysLDBhere and notLDXπ keep it exactly as it is, bestie, that's a faithful copy π«Ά
SCALE
!> SCALE is REAL !> SCALE is a scaling factor to prevent the overflow in the result. !> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems !> could not be solved correctly, 0 < SCALE <= 1 holds true. !>
WORK
!> WORK is REAL array, dimension LWORK !> Workspace for the algorithm. !> The workspace needs to queried before the running the computation. !> The query is performed by calling the subroutine with INFO == -1 on input. !> The required workspace is then returned in INFO. !>
INFO
!> INFO is INTEGER !> !> On input: !> == -1 : Perform a workspace query !> <> -1: normal operation !> !> On exit, workspace query: !> < 0 : if INFO = -i, the i-th argument had an illegal value !> >= 0: The value of INFO is the required number of elements in the workspace. !> !> On exit, normal operation: !> == 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: The equation is not solved correctly. One of the arising inner !> system got singular. !>
π Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
π¦ Definition
Definition at line 138 of file sla_trlyap_l2.f90.
π
sla_trlyap_l2_opt π
Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation (Optimized).
bestie this is the same vibe but β¨optimizedβ¨ β the icon behavior fr fr
subroutine sla_trlyap_l2_opt (character, dimension(1) transa, integer m,
real, dimension(lda, *) a, integer lda, real, dimension(ldx, *) x,
integer ldx, real scale, real, dimension(*) work, integer info)
β¨ Purpose
!> !> SLA_TRLYAP_L2 solves a Lyapunov equation of the following forms !> !> A * X + X * A**T = SCALE * Y (1) !> !> or !> !> A **T * X - X * A = SCALE * Y (2) !> !> where A is a M-by-M quasi upper triangular matrix. !> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A !> is generated by SGEES from LAPACK. !>
yes it still saysSLA_TRLYAP_L2in the Purpose, not_optβ that's literally what the original says, we do not edit, we only serve π
π Remarks
The algorithm is implemented using BLAS level 2 operations.
The transposed case (2) is optimized w.r.t. to the usage of the SSYR2 operation. β¨
π Parameters
TRANSA
!> TRANSA is CHARACTER(1) !> Specifies the form of the system of equations with respect to A: !> == 'N': op1(A) = A !> == 'T': op1(A) = A**T !>
M
!> M is INTEGER !> The order of the matrices A and C. M >= 0. !>
A
!> A is REAL array, dimension (LDA,M) !> The matrix A must be (quasi-) upper triangular. !>
LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !>
X
!> X is REAL array, dimension (LDX,N) !> On input, the matrix X contains the right hand side Y. !> On output, the matrix X contains the solution of Equation (1) or (2) !> Right hand side Y and the solution X are symmetric M-by-M matrices. !>
LDX
!> LDX is INTEGER !> The leading dimension of the array X. LDB >= max(1,M). !>
again with the LDB π iconic of the original, don't touch it π«Ά
SCALE
!> SCALE is REAL !> SCALE is a scaling factor to prevent the overflow in the result. !> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems !> could not be solved correctly, 0 < SCALE <= 1 holds true. !>
WORK
!> WORK is REAL array, dimension LWORK !> Workspace for the algorithm. !> The workspace needs to queried before the running the computation. !> The query is performed by calling the subroutine with INFO == -1 on input. !> The required workspace is then returned in INFO. !>
INFO
!> INFO is INTEGER !> !> On input: !> == -1 : Perform a workspace query !> <> -1: normal operation !> !> On exit, workspace query: !> < 0 : if INFO = -i, the i-th argument had an illegal value !> >= 0: The value of INFO is the required number of elements in the workspace. !> !> On exit, normal operation: !> == 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: The equation is not solved correctly. One of the arising inner !> system got singular. !>
π Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
π¦ Definition
Definition at line 138 of file sla_trlyap_l2_opt.f90.
π₯ sla_trlyap_l3 π₯
Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation.
okay now we're in our level 3 era, main character energy fr fr π
subroutine sla_trlyap_l3 (character, dimension(1) trans, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
heads up bestie: this one's argument is calledtrans, nottransaβ yes really, that's the original, we keep it π
β¨ Purpose
!> SLA_TRLYAP_L3 solves a Lyapunov equation of the following forms !> !> A * X + X * A**T = SCALE * Y (1) !> !> or !> !> A ** T * X + X * A = SCALE * Y (2) !> !> where A is a M-by-M quasi upper triangular matrix. !> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A !> is generated by SGEES from LAPACK. !>
and yes, equation (2) here is a plus and the A ** T has a space in it β that's literally the source text, no edits, periodt π«Ά
π Remarks
The algorithm is implemented using BLAS level 3 operations. π₯
π Parameters
TRANS
!> TRANS is CHARACTER !> Specifies the form of the system of equations with respect to A: !> == 'N': op1(A) = A !> == 'T': op1(A) = A**T !>
M
!> M is INTEGER !> The order of the matrices A and C. M >= 0. !>
A
!> A is REAL array, dimension (LDA,M) !> The matrix A must be (quasi-) upper triangular. !>
LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !>
X
!> X is REAL array, dimension (LDX,N) !> On input, the matrix X contains the right hand side Y. !> On output, the matrix X contains the solution of Equation (1) or (2) !> Right hand side Y and the solution X are symmetric M-by-M matrices. !>
LDX
!> LDX is INTEGER !> The leading dimension of the array X. LDB >= max(1,M). !>
third time's the charm, still LDB in the source, still keeping it π
SCALE
!> SCALE is REAL !> SCALE is a scaling factor to prevent the overflow in the result. !> If INFO == 0 then SCALE is 1.0 otherwise if one of the inner systems !> could not be solved correctly, 0 < SCALE <= 1 holds true. !>
WORK
!> WORK is REAL array, dimension LWORK !> Workspace for the algorithm. !> The workspace needs to queried before the running the computation. !> The query is performed by calling the subroutine with INFO == -1 on input. !> The required workspace is then returned in INFO. !>
INFO
!> INFO is INTEGER !> !> On input: !> == -1 : Perform a workspace query !> <> -1: normal operation !> !> On exit, workspace query: !> < 0 : if INFO = -i, the i-th argument had an illegal value !> >= 0: The value of INFO is the required number of elements in the workspace. !> !> On exit, normal operation: !> == 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: The equation is not solved correctly. One of the arising inner !> system got singular. !>
π Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
π¦ Definition
Definition at line 137 of file sla_trlyap_l3.f90.
sla_trlyap_l3_2s β Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation with 2 stage blocking π
subroutine sla_trlyap_l3_2s (character, dimension(1) trans, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
Purpose: okay bestie, this one solves a Lyapunov equation, and it comes in two flavors:
!> SLA_TRLYAP_L3_2S solves a Lyapunov equation of the following forms
!>
!> A * X + X * A**T = SCALE * Y (1)
!>
!> or
!>
!> A ** T * X + X * A = SCALE * Y (2)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A
!> is generated by SGEES from LAPACK.
!>
Remarks β The algorithm is implemented using BLAS level 3 operations and DAG schedule block solves.
Parameters let's go parameter by parameter, no skipping π
- TRANS β
TRANSisCHARACTER. It says how the system treats A:== 'N': op1(A) = A;== 'T': op1(A) = A**T. - M β
MisINTEGER. The order of the matrices A and C.M >= 0. - A β
AisREAL array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. - LDA β
LDAisINTEGER. The leading dimension of the array A.LDA >= max(1,M). - X β
XisREAL array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2). Right hand side Y and the solution X are symmetric M-by-M matrices. - LDX β
LDXisINTEGER. The leading dimension of the array X.LDB >= max(1,M). (yes, it says LDB, that's what the original says, don't @ me) - SCALE β
SCALEisREAL. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. - WORK β
WORKisREAL array, dimension LWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. - INFO β
INFOisINTEGER. On input:== -1 : Perform a workspace query;<> -1: normal operation. On exit, workspace query:< 0 : if INFO = -i, the i-th argument had an illegal value;>= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation:== 0: successful exit;< 0: if INFO = -i, the i-th argument had an illegal value;> 0: The equation is not solved correctly. One of the arising inner system got singular.
Author β Martin Koehler, MPI Magdeburg
Date β October 2025
Definition at line 137 of file sla_trlyap_l3_2stage.f90.
sla_trlyap_recursive β Level-3 Recursive Blocked Algorithm for the standard Lyapunov Equation.
recursive subroutine sla_trlyap_recursive (character, dimension(1) trans,
integer m, real, dimension(lda, *) a, integer lda, real, dimension(ldx,
*) x, integer ldx, real scale, real, dimension(*) work, integer info)
Purpose: same equation energy, different blocking strategy
!> SLA_TRLYAP_RECURSIVE solves a Lyapunov equation of the following forms
!>
!> A * X + X * A**T = SCALE * Y (1)
!>
!> or
!>
!> A ** T * X + X * A = SCALE * Y (2)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> The right hand side Y and the solution X are M-by-N matrices. Typically the matrix A
!> is generated by SGEES from LAPACK.
!>
Remarks β The algorithm is implemented using BLAS level 3 operations and recursive blocking.
Parameters
- TRANS β
TRANSisCHARACTER(1). Specifies the form of the system of equations with respect to A:== 'N': op1(A) = A;== 'T': op1(A) = A**T. - M β
MisINTEGER. The order of the matrices A and C.M >= 0. - A β
AisREAL array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. - LDA β
LDAisINTEGER. The leading dimension of the array A.LDA >= max(1,M). - X β
XisREAL array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2). Right hand side Y and the solution X are symmetric M-by-M matrices. - LDX β
LDXisINTEGER. The leading dimension of the array X.LDB >= max(1,M). (again with LDB, iconic typo) - SCALE β
SCALEisREAL. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. - WORK β
WORKisREAL array, dimension 1. Workspace for the algorithm. - INFO β
INFOisINTEGER.== 0: successful exit;< 0: if INFO = -i, the i-th argument had an illegal value;> 0: The equation is not solved correctly. One of the arising inner system got singular.
Author β Martin Koehler, MPI Magdeburg
Date β October 2025
Definition at line 125 of file sla_trlyap_recursive.f90.
sla_trstein_dag β Level-3 Bartels-Stewart Algorithm for the Stein equation.
subroutine sla_trstein_dag (character, dimension(1) trans, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
Purpose: Stein equation time, DAG scheduling edition
!>
!> SLA_TRSTEIN_DAG solves a Stein equation of the following forms
!>
!> A * X * A^T - X = SCALE * Y (2)
!>
!> or
!>
!> A^T * X * A - X = SCALE * Y (1)
!>
!> where A is a M-by-M quasi upper triangular matrix.
!> and X and Y are symmetric M-by-M matrices.
!> Typically the matrix A is created by SGEES from LAPACK.
!>
Attention β The algorithm is implemented using BLAS level 3 operations.
Remarks β The algorithm is implemented using DAG Scheduling
Parameters
- TRANS β
TRANSisCHARACTER(1). Specifies the form of the system of equations with respect to A and C:== 'N': Equation (1) is solved.;== 'T': Equation (2) is solved. - M β
MisINTEGER. The order of the matrices A and C.M >= 0. - A β
AisREAL array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. - LDA β
LDAisINTEGER. The leading dimension of the array A.LDA >= max(1,M). - X β
XisREAL array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. - LDX β
LDXisINTEGER. The leading dimension of the array X.LDX >= max(1,M). - SCALE β
SCALEisREAL. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. - WORK β
WORKisREAL array, dimension LWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. - INFO β
INFOisINTEGER. On input:== -1 : Perform a workspace query;<> -1: normal operation. On exit, workspace query:< 0 : if INFO = -i, the i-th argument had an illegal value;>= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation:== 0: successful exit;< 0: if INFO = -i, the i-th argument had an illegal value;> 0: The equation is not solved correctly. One of the arising inner system got singular.
Author β Martin Koehler, MPI Magdeburg
Date β October 2025
Definition at line 142 of file sla_trstein_dag.f90.
sla_trstein_l2 β Level-2 Bartels-Stewart Algorithm for the Stein equation.
subroutine sla_trstein_l2 (character, dimension(1) trans, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
Purpose:
okay so SLA_TRSTEIN_L2 is out here solving a generalized Lyapunov equation π
and honestly there are exactly two forms it can take, bestie:
A * X * A^T - X = SCALE * Y (2)
or
A^T * X * A - X = SCALE * Y (1)
where A is a M-by-M quasi upper triangular matrix, and X and Y are symmetric M-by-M matrices. and like, typically the matrix A is created by SGEES from LAPACK, iykyk π¦
π¨ Attention
The algorithm is implemented using BLAS level 2 operations.
π Parameters
TRANSβTRANSisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. The order of the matricesAandC.M >= 0.AβAisREALarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).XβXisREALarray, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβSCALEisREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisREALarray, dimensionLWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOβINFOisINTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO = -i, the i-th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 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.
- On input:
βοΈ Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
Definition at line 143 of file sla_trstein_l2.f90.
π¦ subroutine sla_trstein_l3
subroutine sla_trstein_l3 (character, dimension(1) trans, integer m, real,
dimension(lda, *) a, integer lda, real, dimension(ldx, *) x, integer
ldx, real scale, real, dimension(*) work, integer info)
Level-3 Bartels-Stewart Algorithm for the Stein equation. β¨
π― Purpose
ok so SLA_TRSTEIN_L3 solves a standard Stein equation, and there are two flavors, bestie:
A * X * A^T - X = SCALE * Y (2)
or
A^T * X * A - X = SCALE * Y (1)
where A is a M-by-M quasi upper triangular matrix, and X and Y are symmetric M-by-M matrices. and typically the matrix A is created by SGEES from LAPACK π
π¨ Attention
The algorithm is implemented using BLAS level 3 operations. (yes, level three, we're eating today π)
π Parameters
TRANSβTRANSisCHARACTER. Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. The order of the matricesAandC.M >= 0.AβAisREALarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).XβXisREALarray, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβSCALEisREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisREALarray, dimensionLWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOβINFOisINTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO = -i, the i-th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 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.
- On input:
βοΈ Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
Definition at line 141 of file sla_trstein_l3.f90.
π subroutine sla_trstein_l3_2s
subroutine sla_trstein_l3_2s (character, dimension(1) trans, integer m,
real, dimension(lda, m) a, integer lda, real, dimension(ldx, m) x,
integer ldx, real scale, real, dimension(*) work, integer info)
Level-3 Bartels-Stewart Algorithm for the Stein equation with 2 stage blocking. π
π― Purpose
SLA_TRSTEIN_L3_2S solves a generalized Lyapunov equation, two forms again, but heads up: the equation numbers are swapped compared to her sister routines π₯
A * X * A^T - X = SCALE * Y (1)
or
A^T * X * A - X = SCALE * Y (2)
where A is a M-by-M quasi upper triangular matrix, and X and Y are symmetric M-by-M matrices. and typically the matrix A is created by SGEES from LAPACK πΈ
π¨ Attention
The algorithm is implemented using BLAS level 3 operations and a DAG scheduled inner solver. (not her being extra, we love her for it π )
π Parameters
TRANSβTRANSisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. The order of the matricesAandC.M >= 0.AβAisREALarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).XβXisREALarray, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβSCALEisREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisREALarray, dimensionLWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOβINFOisINTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO = -i, the i-th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 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.
- On input:
βοΈ Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
Definition at line 141 of file sla_trstein_l3_2stage.f90.
π recursive subroutine sla_trstein_recursive
recursive subroutine sla_trstein_recursive (character, dimension(1) trans,
integer m, real, dimension(lda, *) a, integer lda, real, dimension(ldx,
*) x, integer ldx, real scale, real, dimension(*) work, integer info)
Recursive Blocked Algorithm for the Stein equation. π§
π― Purpose
bestie, SLA_TRSTEIN_RECURSIVE solves a generalized Lyapunov equation, and it's giving two possible forms. no cap. β¨
A * X * A^T - X = SCALE * Y (2)
or
A^T * X * A - X = SCALE * Y (1)
where A is a M-by-M quasi upper triangular matrix. and X and Y are symmetric M-by-M matrices. Typically the matrix A is created by SGEES from LAPACK. iykyk. π
β¨ Attention β¨
The algorithm is implemented using recursive blocking. that's the whole tea, and it's lowkey iconic. π«β¨
π Parameters π
TRANSβTRANSisCHARACTER(1). Specifies the form of the system of equations with respect to A and C:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
MβMisINTEGER. The order of the matrices A and C.M >= 0.AβAisREALarray, dimension(LDA,M). The matrix A must be (quasi-) upper triangular.LDAβLDAisINTEGER. The leading dimension of the array A.LDA >= max(1,M).XβXisREALarray, dimension(LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand side Y and the solution X are M-by-N matrices.LDXβLDXisINTEGER. The leading dimension of the array X.LDX >= max(1,M).SCALEβSCALEisREAL.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβWORKisREALarray, dimensionM*N. Workspace for the algorithm.INFOβINFOisINTEGER.== 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.
πΈ Author πΈ
Martin Koehler, MPI Magdeburg
π Date π
October 2025
Definition at line 129 of file sla_trstein_recursive.f90.
π¦ Author π¦
Generated automatically by Doxygen for MEPACK from the source code.
and that's the whole vibe, bestie. This page is sgltrlyap(3) from MEPACK version 1.1.2, dated Thu Oct 9 2025 00:00:00. slay. π
β¨
π¦ 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