dbltrlyap(3)
π dbltrlyap(3) β MEPACK π
okay bestie, sit down, hydrate, because we're about to talk about dbltrlyap from MEPACK and it's honestly giving solver royalty β¨
π NAME π
dbltrlyap β Double Precision routines.
Like, the whole vibe is: double precision routines for standard Lyapunov and Stein equations with triangular coefficient matrices. no cap. that's the whole thing. π¦
β¨ SYNOPSIS β¨
πΈ Functions πΈ
subroutine dla_trlyap_dag (trans, m, a, lda, x, ldx, scale, work, info)β DAG Scheduled Bartels-Stewart Algorithm for the standard Lyapunov Equation. πsubroutine dla_trstein_dag (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the Stein equation. πsubroutine dla_trlyap_kernel_44n (m, a, lda, x, ldx, scale, info)β Solver for a 4x4 standard Lyapunov equation (TRANS = N). πsubroutine dla_trlyap_kernel_44t (m, a, lda, x, ldx, scale, info)β Solver for a 4x4 standard Lyapunov equation (TRANS = T). πsubroutine dla_trlyap_l2 (transa, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation. πsubroutine dla_trlyap_l2_opt (transa, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation (Optimized). β‘subroutine dla_trstein_l2 (trans, m, a, lda, x, ldx, scale, work, info)β Level-2 Bartels-Stewart Algorithm for the Stein equation. πsubroutine dla_trlyap_l3 (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation. π₯subroutine dla_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 dla_trstein_l3 (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Bartels-Stewart Algorithm for the Stein equation. πΈsubroutine dla_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 dla_trlyap_recursive (trans, m, a, lda, x, ldx, scale, work, info)β Level-3 Recursive Blocked Algorithm for the standard Lyapunov Equation. πrecursive subroutine dla_trstein_recursive (trans, m, a, lda, x, ldx, scale, work, info)β Recursive Blocked Algorithm for the Stein equation. π
π« Detailed Description π«
Double precision routines for standard Lyapunov and Stein equations with triangular coefficient matrices. periodt. π
π«Ά Function Documentation π«Ά
β subroutine dla_trlyap_dag (character, dimension(1) trans, integer m, double precision, dimension(lda, m) a, integer lda, double precision, dimension(ldx, m) x, integer ldx, double precision scale, double precision, dimension(*) work, integer info) β
DAG Scheduled Bartels-Stewart Algorithm for the standard Lyapunov Equation. okay so this one is the DAG scheduled girlie and she's iconic π
πΈ Purpose: πΈ
!> DLA_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 DGEES from LAPACK.
!>
π Remarks π
The algorithm is implemented using DAG Scheduling. lowkey the whole personality tbh.
π 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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).
!>
SCALE
!> SCALE is DOUBLE PRECISION
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems
!> could not be solved correctly, 0 < SCALE <= 1 holds true.
!>
WORK
!> WORK is DOUBLE PRECISION 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 dla_trlyap_dag.f90.
β subroutine dla_trlyap_kernel_44n (integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldx, *) x, integer ldx, double precision scale, integer info) β
Solver for a 4x4 standard Lyapunov equation (TRANS = N). tiny lil 4x4, so cute, so fast π
πΈ Purpose: πΈ
!>
!> DLA_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 DGEES 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.
!>
!>
β οΈ bestie. it says the function does not check the input arguments. so like, you GOTTA have your inputs correct yourself. no safety net. we die like the fast path we are π
π Parameters π
M
!> M is INTEGER
!> The order of the matrices A and C. 4 >= M >= 0.
!>
A
!> A is DOUBLE PRECISION 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 DOUBLE PRECISION 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 DOUBLE PRECISION
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0D0 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
ποΈ Date ποΈ
October 2025
Definition at line 109 of file dla_trlyap_kernel_44_n.f90.
β subroutine dla_trlyap_kernel_44t (integer m, double precision, dimension(lda, *) a, integer lda, double precision, dimension(ldx, *) x, integer ldx, double precision scale, integer info) β
Solver for a 4x4 standard Lyapunov equation (TRANS = T). the transposed twin of 44n, serving looks π
β¨
πΈ Purpose: πΈ
!>
!> DLA_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 DGEES 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 warning bestie: the function does not check the input arguments. you've been warned fr fr π
π Parameters π
M
!> M is INTEGER
!> The order of the matrices A and C. 4 >= M >= 0.
!>
A
!> A is DOUBLE PRECISION 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 DOUBLE PRECISION 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 DOUBLE PRECISION
!> SCALE is a scaling factor to prevent the overflow in the result.
!> If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems
!> could not be solved correctly, 0 < SCAL <= 1 holds true.
!>
INFO
(bestie the page cuts off right here mid-INFO and I am NOT about to invent the rest β part 2 is coming, stay tuned π¦)
INFOβ is INTEGER π«Ά
On output:
== 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 109 of file dla_trlyap_kernel_44_t.f90.
π¦ dla_trlyap_l2 β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation π¦
subroutine dla_trlyap_l2 (character, dimension(1) transa, integer m, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
okay bestie, this one is the level-2 glow-up of the Bartels-Stewart algorithm for the Lyapunov equation π
π― Purpose
DLA_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 DGEES from LAPACK. she's giving LAPACK-origin realness, no cap π₯
π Remarks
- The algorithm is implemented using BLAS level 2 operations. level 2, level iconic
- The transposed case (2) is optimized w.r.t. to the usage of the
DSYR2operation. β¨
π Parameters
TRANSAβ isCHARACTER(1)
Specifies the form of the system of equations with respect to A:
== 'N':op1(A) = A== 'T':op1(A) = A**T
Mβ is INTEGER
The order of the matrices A and C. M >= 0.
Aβ is DOUBLE PRECISION array, dimension(LDA,M)
The matrix A must be (quasi-) upper triangular. quasi, meaning she's got those lil 2x2 blocks living their truth
LDAβ is INTEGER
The leading dimension of the array A. LDA >= max(1,M).
Xβ is DOUBLE PRECISION 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. in goes Y, out comes the solution, it's a whole transformation arc π¦
LDXβ is INTEGER
The leading dimension of the array X. LDB >= max(1,M). (yes it literally says LDB in there, i'm just the messenger bestie π)
SCALEβ is DOUBLE PRECISION
SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. she scales so your numbers don't explode, very protective, very mindful
WORKβ is DOUBLE PRECISION array, dimensionLWORK
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. you gotta ASK first, don't just show up π
INFOβ is INTEGER
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. π
βοΈ Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
π Definition
at line 138 of file dla_trlyap_l2.f90.
π dla_trlyap_l2_opt β Level-2 Bartels-Stewart Algorithm for the Lyapunov Equation (Optimized) π
subroutine dla_trlyap_l2_opt (character, dimension(1) transa, integer m,
double precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
the optimized sister of the last one β same energy, extra polish π
π― Purpose
DLA_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 DGEES from LAPACK. same facts, same vibes, just optimized β¨
π Remarks
- The algorithm is implemented using BLAS level 2 operations.
- The transposed case (2) is optimized w.r.t. to the usage of the
DSYR2operation. π₯
π Parameters
TRANSAβ isCHARACTER(1)
Specifies the form of the system of equations with respect to A:
== 'N':op1(A) = A== 'T':op1(A) = A**T
Mβ is INTEGER
The order of the matrices A and C. M >= 0.
Aβ is DOUBLE PRECISION array, dimension(LDA,M)
The matrix A must be (quasi-) upper triangular.
LDAβ is INTEGER
The leading dimension of the array A. LDA >= max(1,M).
Xβ is DOUBLE PRECISION 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β is INTEGER
The leading dimension of the array X. LDB >= max(1,M). (still says LDB, still not my fault π)
SCALEβ is DOUBLE PRECISION
SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. anti-overflow queen behavior
WORKβ is DOUBLE PRECISION array, dimensionLWORK
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β is INTEGER
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. π
βοΈ Author
Martin Koehler, MPI Magdeburg
π Date
October 2025
π Definition
at line 138 of file dla_trlyap_l2_opt.f90.
π dla_trlyap_l3 β Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation π
subroutine dla_trlyap_l3 (character, dimension(1) trans, integer m, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
now THIS one is level 3, she moved up in the world, she's doing level-3 BLAS things π
π― Purpose
DLA_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 DGEES from LAPACK. yes bestie, case (2) is a PLUS here, not a minus β read it again, it's right there π
π Remarks
- The algorithm is implemented using BLAS level 3 operations. level 3 baby, we're in the big leagues now π₯
π Parameters
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β is INTEGER
The order of the matrices A and C. M >= 0.
Aβ is DOUBLE PRECISION array, dimension(LDA,M)
The matrix A must be (quasi-) upper triangular.
LDAβ is INTEGER
The leading dimension of the array A. LDA >= max(1,M).
Xβ is DOUBLE PRECISION 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. same in-and-out deal as her level-2 sisters π¦
LDXβ is INTEGER
The leading dimension of the array X. LDB >= max(1,M). (yep. LDB. again. we're all just living with it π)
SCALEβ is DOUBLE PRECISION
SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. keeping your doubles from going feral
WORKβ is DOUBLE PRECISION array, dimensionLWORK
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. query first, allocate later, that's the rule π
INFOβ is INTEGER
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. π
INFOβ anINTEGER, and honestly she's the whole narrator of this story π
On input:
== -1β bestie, this means do a workspace query β¨<> -1β normal operation, business as usual
On exit, workspace query flavour:
< 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 flavour:
== 0β successful exit, we ate π< 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 137 of file dla_trlyap_l3.f90.
π dla_trlyap_l3_2s
subroutine dla_trlyap_l3_2s (character, dimension(1) trans, integer m,
double precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
Level-3 Bartels-Stewart Algorithm for the standard Lyapunov Equation with 2 stage blocking. Two stages, zero chill. π¦
π― Purpose
DLA_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 DGEES from LAPACK. No cap. π
π Remarks
The algorithm is implemented using BLAS level 3 operations and DAG schedule block solves. That's the whole vibe β level 3, DAG-scheduled, iconic. β¨
π§© Parameters
TRANSβ aCHARACTER, and she picks which form of the system of equations we're solving with respect toA:== 'N'βop1(A) = A== 'T'βop1(A) = A**T
Mβ anINTEGER. The order of the matricesAandC.M >= 0. Periodt. πAβ aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular, bestie, don't try anything else πLDAβ anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ aDOUBLE PRECISIONarray, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2). - Right hand side
Yand the solutionXare symmetric M-by-M matrices. π
- On input, the matrix
LDXβ anINTEGER. The leading dimension of the arrayX.LDB >= max(1,M). (yes it saysLDB, we are simply passing the message along π)SCALEβ aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. She's here to catch you before you overflow πΈWORKβ aDOUBLE PRECISIONarray, dimensionLWORK. Workspace for the algorithm.- The workspace needs to queried before the running the computation. (verbatim, she's doing her best π)
- The query is performed by calling the subroutine with
INFO == -1on input. - The required workspace is then returned in
INFO.
INFOβ anINTEGER.
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.
π Author
Martin Koehler, MPI Magdeburg
ποΈ Date
October 2025
π Definition
At line 137 of file dla_trlyap_l3_2stage.f90.
π dla_trlyap_recursive
recursive subroutine dla_trlyap_recursive (character, dimension(1) trans,
integer m, double precision, dimension(lda, *) a, integer lda, double
precision, dimension(ldx, *) x, integer ldx, double precision scale,
double precision, dimension(*) work, integer info)
Level-3 Recursive Blocked Algorithm for the standard Lyapunov Equation. She recurses. She blocks. She slays. π§
π― Purpose
DLA_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 DGEES from LAPACK. π₯
π Remarks
The algorithm is implemented using BLAS level 3 operations and recursive blocking. Lowkey the most elegant thing on this whole page, ngl π
π§© Parameters
TRANSβ aCHARACTER(1). Specifies the form of the system of equations with respect toA:== 'N'βop1(A) = A== 'T'βop1(A) = A**T
Mβ anINTEGER. The order of the matricesAandC.M >= 0.Aβ aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. πLDAβ anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ aDOUBLE PRECISIONarray, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2). - Right hand side
Yand the solutionXare symmetric M-by-M matrices. β¨
- On input, the matrix
LDXβ anINTEGER. The leading dimension of the arrayX.LDB >= max(1,M). (again,LDBβ iconic typo, we report, we do not judge π)SCALEβ aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. πWORKβ aDOUBLE PRECISIONarray, dimension1. Workspace for the algorithm. Just one, bestie. Recursion carries the rest π¦INFOβ anINTEGER.== 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.
Heads up: this one has no workspace query mode. The INFO == -1 thing is simply not a thing here, don't come for me π
π Author
Martin Koehler, MPI Magdeburg
ποΈ Date
October 2025
π Definition
At line 125 of file dla_trlyap_recursive.f90.
β dla_trstein_dag
subroutine dla_trstein_dag (character, dimension(1) trans, integer m, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
Level-3 Bartels-Stewart Algorithm for the Stein equation. New equation, same impeccable energy π
π― Purpose
DLA_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 DGEES from LAPACK.
Not me pointing out that the labels go (2) then (1). That's just how it is, bestie, I am merely the messenger π«Ά
π¨ Attention
The algorithm is implemented using BLAS level 3 operations.
π Remarks
The algorithm is implemented using DAG Scheduling. Two whole notes about implementation, she's thorough like that β¨
π§© Parameters
TRANSβ aCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N'β Equation (1) is solved.== 'T'β Equation (2) is solved.
Mβ anINTEGER. The order of the matricesAandC.M >= 0. πAβ aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβ anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ aDOUBLE PRECISIONarray, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. (yes, the page saysTRANSA,TRANSBandSGNhere β I said what I said π) - Right hand side
Yand the solutionXare M-by-N matrices. π
- On input, the matrix
LDXβ anINTEGER. The leading dimension of the arrayX.LDX >= max(1,M). Look at that, actualLDXthis time, growth πSCALEβ aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. πΈWORKβ aDOUBLE PRECISIONarray, dimensionLWORK. Workspace for the algorithm.- The workspace needs to queried before the running the computation.
- The query is performed by calling the subroutine with
INFO == -1on input. - The required workspace is then returned in
INFO. π¦
INFOβINFOβ it's anINTEGER, bestie, and it's literally the vibe check of the entire call π
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.
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 142 of file dla_trstein_dag.f90.
dla_trstein_l2
Level-2 Bartels-Stewart Algorithm for the Stein equation.
subroutine dla_trstein_l2 (character, dimension(1) trans, integer m, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
Purpose:
DLA_TRSTEIN_L2 solves a generalized Lyapunov equation of the following forms, okurrr π¦
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 DGEES from LAPACK. Periodt. β¨
Attention
The algorithm is implemented using BLAS level 2 operations. No cap, that's just how it is π«Ά
Parameters
TRANSβ it's aCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
Mβ it's anINTEGER. The order of the matricesAandC.M >= 0.Aβ it's aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβ it's anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ it's aDOUBLE PRECISIONarray, 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β it's anINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβ it's aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβ it's aDOUBLE PRECISIONarray, 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β it's anINTEGER.
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.
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 143 of file dla_trstein_l2.f90.
dla_trstein_l3
Level-3 Bartels-Stewart Algorithm for the Stein equation.
subroutine dla_trstein_l3 (character, dimension(1) trans, integer m, double
precision, dimension(lda, *) a, integer lda, double precision,
dimension(ldx, *) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
Purpose:
DLA_TRSTEIN_L3 solves a standard Stein equation of the following forms, 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. Typically the matrix A is created by DGEES from LAPACK. Slay. π₯
Attention
The algorithm is implemented using BLAS level 3 operations. She leveled up, fr fr π§
Parameters
TRANSβ it's aCHARACTER. Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
Mβ it's anINTEGER. The order of the matricesAandC.M >= 0.Aβ it's aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβ it's anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ it's aDOUBLE PRECISIONarray, 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β it's anINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβ it's aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKβ it's aDOUBLE PRECISIONarray, 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β it's anINTEGER.
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.
Author
Martin Koehler, MPI Magdeburg
Date
October 2025
Definition at line 141 of file dla_trstein_l3.f90.
dla_trstein_l3_2s
Level-3 Bartels-Stewart Algorithm for the Stein equation with 2 stage blocking.
subroutine dla_trstein_l3_2s (character, dimension(1) trans, integer m,
double precision, dimension(lda, m) a, integer lda, double precision,
dimension(ldx, m) x, integer ldx, double precision scale, double
precision, dimension(*) work, integer info)
Purpose:
DLA_TRSTEIN_L3_2S solves a generalized Lyapunov equation of the following forms, and she's doing it in two stages because she's that girl π
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. Typically the matrix A is created by DGEES from LAPACK. Iconic behaviour only. π
Attention
The algorithm is implemented using BLAS level 3 operations and a DAG scheduled inner solver. Yes bestie, a whole dependency graph, we're not playing games π
Parameters
TRANSβ it's aCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N': Equation (1) is solved.== 'T': Equation (2) is solved.
Mβ it's anINTEGER. The order of the matricesAandC.M >= 0.Aβ it's aDOUBLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAβ it's anINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Xβ it's aDOUBLE PRECISIONarray, 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β it's anINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEβ it's aDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKWORKβ DOUBLE PRECISION array, dimensionLWORKβ¨ it's the workspace for the algorithm, bestie. Heads up: you gotta query that workspace before you run the computation. You do the query by calling the subroutine withINFO == -1on input, and the required workspace comes right back at you inINFO. πINFOβ INTEGER π¦
On input:
== -1β perform a workspace query π<> -1β normal operation, we're actually doing the thing β¨
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, slay π< 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 141 of file dla_trstein_l3_2stage.f90.
π¦ recursive subroutine dla_trstein_recursive π¦
recursive subroutine dla_trstein_recursive (character, dimension(1) trans,
integer m, double precision, dimension(lda, *) a, integer lda, double
precision, dimension(ldx, *) x, integer ldx, double precision scale,
double precision, dimension(*) work, integer info)
Recursive Blocked Algorithm for the Stein equation. π
β¨ Purpose β¨
DLA_TRSTEIN_RECURSIVE solves a generalized Lyapunov 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 DGEES from LAPACK. β
π Attention π
The algorithm is implemented using recursive blocking. π§
πΈ Parameters πΈ
TRANS
TRANS is CHARACTER(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
M is INTEGER The order of the matrices A and C. M >= 0. π
A
A is DOUBLE PRECISION 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 DOUBLE PRECISION 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. LDX >= max(1,M). π¦
SCALE
SCALE is DOUBLE PRECISION SCALE is a scaling factor to prevent the overflow in the result. π If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. πΈ
WORK
WORK is DOUBLE PRECISION array, dimension M*N Workspace for the algorithm. β¨
INFO
INFO is 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. π
Author
Martin Koehler, MPI Magdeburg π
Date
October 2025 πΈ
Definition at line 129 of file dla_trstein_recursive.f90.
π« Author π«
Generated automatically by Doxygen for MEPACK from the source code. π€β¨
okay bestie that's the whole entire page, no cap π«Ά this was Version 1.1.2, dated Thu Oct 9 2025 00:00:00, and the page is dbltrlyap(3) β literally iconic, go solve something symmetric, periodt π
π
π¦ 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