dbltrlyap(3)

πŸ“¦
version 1.1.2 Β· 3 versions
, in fedora 43

πŸ’– 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: 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_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 DSYR2 operation. ✨

πŸŽ€ Parameters

  • 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 β€” 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, 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. 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: 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 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 DSYR2 operation. πŸ”₯

πŸŽ€ Parameters

  • 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 β€” 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, 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 β€” 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 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, 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. 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: 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. πŸ’€
  • INFO β€” an INTEGER, 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 β€” 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 flavour:

  • == 0 β€” successful exit, we ate πŸ’…
  • < 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_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 β€” a CHARACTER, and she picks which form of the system of equations we're solving with respect to A:
    • == 'N' β€” op1(A) = A
    • == 'T' β€” op1(A) = A**T
  • M β€” an INTEGER. The order of the matrices A and C. M >= 0. Periodt. πŸŽ€
  • A β€” a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular, bestie, don't try anything else πŸ™ˆ
  • LDA β€” an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” a 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 β€” an INTEGER. The leading dimension of the array X. LDB >= max(1,M). (yes it says LDB, we are simply passing the message along πŸ’€)
  • SCALE β€” a 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's here to catch you before you overflow 🌸
  • WORK β€” a DOUBLE PRECISION array, dimension LWORK. 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 == -1 on input.
    • The required workspace is then returned in INFO.
  • INFO β€” an 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_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 β€” a CHARACTER(1). Specifies the form of the system of equations with respect to A:
    • == 'N' β€” op1(A) = A
    • == 'T' β€” op1(A) = A**T
  • M β€” an INTEGER. The order of the matrices A and C. M >= 0.
  • A β€” a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. πŸŽ€
  • LDA β€” an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” a 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 β€” an INTEGER. The leading dimension of the array X. LDB >= max(1,M). (again, LDB β€” iconic typo, we report, we do not judge πŸ™ˆ)
  • SCALE β€” a 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 β€” a DOUBLE PRECISION array, dimension 1. Workspace for the algorithm. Just one, bestie. Recursion carries the rest πŸ¦‹
  • INFO β€” an INTEGER.
    • == 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.
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 β€” a 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 β€” an INTEGER. The order of the matrices A and C. M >= 0. πŸŽ€
  • A β€” a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA β€” an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” a 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. (yes, the page says TRANSA, TRANSB and SGN here β€” I said what I said πŸ’€)
    • Right hand side Y and the solution X are M-by-N matrices. πŸ’œ
  • LDX β€” an INTEGER. The leading dimension of the array X. LDX >= max(1,M). Look at that, actual LDX this time, growth πŸ’…
  • SCALE β€” a 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 β€” a 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 β€” it's an INTEGER, 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 : 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 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 a 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 β€” it's an INTEGER. The order of the matrices A and C. M >= 0.
  • A β€” it's a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA β€” it's an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” it's a 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 β€” it's an INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” it's a 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 β€” it's a 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 β€” it's an 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 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 a CHARACTER. 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 β€” it's an INTEGER. The order of the matrices A and C. M >= 0.
  • A β€” it's a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA β€” it's an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” it's a 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 β€” it's an INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” it's a 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 β€” it's a 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 β€” it's an 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 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 a 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 β€” it's an INTEGER. The order of the matrices A and C. M >= 0.
  • A β€” it's a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA β€” it's an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • X β€” it's a 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 β€” it's an INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” it's a 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 β€” DOUBLE PRECISION array, dimension LWORK ✨ 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 with INFO == -1 on input, and the required workspace comes right back at you in INFO. πŸ’…
  • INFO β€” INTEGER πŸ¦‹

On input:

  • == -1 β€” perform a workspace query πŸ”
  • <> -1 β€” normal operation, we're actually doing the thing ✨

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, slay πŸ’–
  • < 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 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 β€” 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 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