ctglyap(3)

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

πŸ’– ctglyap β€” the C-Interface glow-up πŸ’–

Welcome to the manual page for ctglyap(3) β€” brought to you by the fine folks over at MEPACK. Grab a boba bestie, we're about to make triangular-matrix equations make sense. ✨


🌸 NAME 🌸

ctglyap β€” C-Interface

  • C-Interface for generalized Lyapunov and Stein equations with triangular coefficient matrices.

πŸŽ€ SYNOPSIS πŸŽ€

Functions πŸ’…

void mepack_double_tglyap_dag (const char *TRANS, int M, double *A, int
    LDA, double *B, int LDB, double *X, int LDX, double *SCALE, double
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation with DAG scheduling.

void mepack_single_tglyap_dag (const char *TRANS, int M, float *A, int
    LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation with DAG scheduling.

void mepack_double_tgstein_dag (const char *TRANS, int M, double *A, int
    LDA, double *B, int LDB, double *X, int LDX, double *SCALE, double
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation with DAG scheduling.

void mepack_single_tgstein_dag (const char *TRANS, int M, float *A, int
    LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation with DAG scheduling.

void mepack_double_tglyap_level2 (const char *TRANS, int M, double *A,
    int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_double_tglyap_level2_unopt (const char *TRANS, int M, double
    *A, int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation (Unoptimized)

void mepack_single_tglyap_level2 (const char *TRANS, int M, float *A,
    int LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_single_tglyap_level2_unopt (const char *TRANS, int M, float
    *A, int LDA, float *B, int LDB, float *X, int LDX, float *SCALE,
    float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation (Unoptimized)

void mepack_double_tgstein_level2 (const char *TRANS, int M, double *A,
    int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Stein equation.

void mepack_single_tgstein_level2 (const char *TRANS, int M, float *A,
    int LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Stein equation.

void mepack_double_tglyap_level3 (const char *TRANS, int M, double *A,
    int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_double_tglyap_level3_2stage (const char *TRANS, int M,
    double *A, int LDA, double *B, int LDB, double *X, int LDX, double
    *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Lyapunov equation.

void mepack_single_tglyap_level3 (const char *TRANS, int M, float *A,
    int LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_single_tglyap_level3_2stage (const char *TRANS, int M, float
    *A, int LDA, float *B, int LDB, float *X, int LDX, float *SCALE,
    float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Lyapunov equation.

void mepack_double_tgstein_level3 (const char *TRANS, int M, double *A,
    int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation.

void mepack_double_tgstein_level3_2stage (const char *TRANS, int M,
    double *A, int LDA, double *B, int LDB, double *X, int LDX, double
    *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Stein equation.

void mepack_single_tgstein_level3 (const char *TRANS, int M, float *A,
    int LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation.

void mepack_single_tgstein_level3_2stage (const char *TRANS, int M,
    float *A, int LDA, float *B, int LDB, float *X, int LDX, float
    *SCALE, float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Stein equation.

void mepack_double_tglyap_recursive (const char *TRANS, int M, double
    *A, int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_single_tglyap_recursive (const char *TRANS, int M, float *A,
    int LDA, float *B, int LDB, float *X, int LDX, float *SCALE, float
    *WORK, int *INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

void mepack_double_tgstein_recursive (const char *TRANS, int M, double
    *A, int LDA, double *B, int LDB, double *X, int LDX, double *SCALE,
    double *WORK, int *INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Stein equation.

void mepack_single_tgstein_recursive (const char *TRANS, int M, float
    *A, int LDA, float *B, int LDB, float *X, int LDX, float *SCALE,
    float *WORK, int *INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Stein equation.


✨ Detailed Description ✨

C-Interface for generalized Lyapunov and Stein equations with triangular coefficient matrices.

Okay so here's the tea, bestie 🍡 β€” the Fortran routines that solve generalized Lyapunov and Stein equations with triangular coefficients are wrapped up in C so you get easier access to them. That's the whole point, and it's iconic.

All the wrapper routines are direct wrappers to the corresponding Fortran subroutines, without sanity checks. The Fortran routines are the ones doing those checks, so don't come for the wrappers, okay? πŸ’…

Watch out: since these routines use int values to pass sizes, the work_space query will fail for large scale problems. For this reason you should use the function mepack_memory to query the required work_space from a C code. This function is aware of 64 bit integers if MEPACK is compiled with it. 🫢

πŸ‘‘ Function Documentation πŸ‘‘

void mepack_double_tglyap_dag (const char *TRANS, int M, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation with DAG scheduling. Slay. πŸ”₯

Purpose πŸ’«

mepack_double_tglyap_dag solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices.

Typically the matrix pencil (A,B) is created by DGGES from LAPACK. Ngl that's the vibe. πŸ¦‹

Remarks 🌸

  • This function is a wrapper around dla_tglyap_dag.

See also πŸŽ€

  • dla_tglyap_dag

Parameters 🌈

  • TRANS

TRANS is a string. Specifies the form of the system of equations with respect to A and B:

  • == 'N': Equation (1) is solved.
  • == 'T': Equation (2) is solved.
  • M

M is INTEGER. The order of the matrices A and B. 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).

  • B

B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.

  • LDB

LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tglyap.c.


void mepack_double_tglyap_level2 (const char *TRANS, int M, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation.

Purpose πŸ’«

mepack_double_tglyap_level2 solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or


…and that's where part 1 dips, bestie β€” part 2 is pulling up next and the tea is only getting hotter πŸ«–βœ¨

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

okay so where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular one, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’…

✨ Remarks ✨

This function is a wrapper around dla_tglyap_l2. 🫢

✨ See also ✨

dla_tglyap_l2

✨ Parameters ✨

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tglyap.c.


🌸 mepack_double_tglyap_level2_unopt 🌸

void mepack_double_tglyap_level2_unopt (const char * TRANS, int M, double *
    A, int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation (Unoptimized) πŸ”₯

✨ Purpose ✨

mepack_double_tglyap_level2_unopt solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular one, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’…

✨ Remarks ✨

This function is a wrapper around dla_tglyap_l2_unopt. 🫢

✨ See also ✨

dla_tglyap_l2_unopt

✨ Parameters ✨

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 281 of file tglyap.c.


πŸ’œ mepack_double_tglyap_level3 πŸ’œ

void mepack_double_tglyap_level3 (const char * TRANS, int M, double * A, int
    LDA, double * B, int LDB, double * X, int LDX, double * SCALE, double *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation. πŸ”₯

✨ Purpose ✨

mepack_double_tglyap_level3 solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular one, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’…

✨ Remarks ✨

This function is a wrapper around dla_tglyap_l3. 🫢

✨ See also ✨

dla_tglyap_l3

✨ Parameters ✨

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tglyap.c.


πŸ¦‹ mepack_double_tglyap_level3_2stage πŸ¦‹

void mepack_double_tglyap_level3_2stage (const char * TRANS, int M, double *
    A, int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Lyapunov equation. πŸ”₯

✨ Purpose ✨

mepack_double_tglyap_level3_2stage solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

okay so A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular one, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’«

✨ Remarks ✨

  • This function is a wrapper around dla_tglyap_l3_2s. πŸ’…

πŸ‘€ See also πŸ‘€

  • dla_tglyap_l3_2s

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” TRANS is a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 281 of file tglyap.c.


πŸ’– void mepack_double_tglyap_recursive πŸ’–

void mepack_double_tglyap_recursive (const char * TRANS, int M, double * A,
    int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation. 🧚

Purpose:

mepack_double_tglyap_recursive solves a generalized Lyapunov equation of the following forms πŸ’…

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. ✨

✨ Remarks ✨

  • This function is a wrapper around dla_tglyap_recursive. πŸ’…

πŸ‘€ See also πŸ‘€

  • dla_tglyap_recursive

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” TRANS is a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tglyap.c.


πŸ’œ void mepack_double_tgstein_dag πŸ’œ

void mepack_double_tgstein_dag (const char * TRANS, int M, double * A, int
    LDA, double * B, int LDB, double * X, int LDX, double * SCALE, double *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation with DAG scheduling. πŸ¦‹

Purpose:

mepack_double_tgstein_dag solves a generalized Stein equation of the following forms ✨

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’«

✨ Remarks ✨

  • This function is a wrapper around dla_tgstein_dag. πŸ’…

πŸ‘€ See also πŸ‘€

  • dla_tgstein_dag

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” TRANS is a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tgstein.c.


πŸ“ void mepack_double_tgstein_level2 πŸ“

void mepack_double_tgstein_level2 (const char * TRANS, int M, double * A,
    int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Stein equation. 🌈

Purpose:

mepack_double_tgstein_level2 solves a generalized Stein equation of the following forms πŸ’–

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’«

πŸ’¬ Remarks

This function is a wrapper around dla_tgstein_l2.

πŸ‘€ See also

dla_tgstein_l2

πŸŽ€ Parameters

  • TRANS β€” TRANS is a string. It tells you which form of the system of equations we're solving, with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. Gotta be M >= 0.
  • A β€” A is a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular, bestie, no exceptions. πŸ’…
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is a DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular. πŸ¦‹
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is 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. The 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. It's a scaling factor whose whole job is to stop the result from overflowing. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, 0 < SCALE <= 1 holds true. 🫢
  • WORK β€” WORK is a DOUBLE PRECISION array, dimension LDWORK. This is the workspace for the algorithm. You have to query the workspace before running the computation β€” you do that by calling the subroutine with INFO == -1 on input, and then the required workspace gets handed back to you in INFO. πŸŽ€
  • INFO β€” INFO is INTEGER. Here's the whole vibe:

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 146 of file tgstein.c.


πŸ‘‘ mepack_double_tgstein_level3

void mepack_double_tgstein_level3 (const char * TRANS, int M, double * A,
    int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation. slay

🎯 Purpose

mepack_double_tgstein_level3 solves a generalized Stein equation of the following forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’«

πŸ’¬ Remarks

This function is a wrapper around dla_tgstein_l3.

πŸ‘€ See also

dla_tgstein_l3

πŸŽ€ Parameters

  • TRANS β€” TRANS is a string. It tells you which form of the system of equations we're solving, with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. Gotta be M >= 0.
  • A β€” A is a 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).
  • B β€” B is a DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular. πŸ¦‹
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is 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. The 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. A scaling factor to prevent 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 a DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. It needs to be queried before running the computation β€” you do that by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO. πŸŽ€
  • INFO β€” INFO is INTEGER. The rundown:

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 146 of file tgstein.c.


πŸ’– mepack_double_tgstein_level3_2stage

void mepack_double_tgstein_level3_2stage (const char * TRANS, int M, double
    * A, int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Stein equation. it's giving extra structure

🎯 Purpose

mepack_double_tgstein_level3_2stage solves a generalized Stein equation of the following forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by DGGES from LAPACK. πŸ’«

πŸ’¬ Remarks

This function is a wrapper around dla_tgstein_l3_2s.

πŸ‘€ See also

dla_tgstein_l3_2s

πŸŽ€ Parameters

  • TRANS β€” TRANS is a string. It tells you which form of the system of equations we're solving, with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. Gotta be M >= 0.
  • A β€” A is a 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).
  • B β€” B is a DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular. πŸ¦‹
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is 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. The 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. A scaling factor to prevent 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 a DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. It needs to be queried before running the computation β€” you do that by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO. πŸŽ€
  • INFO β€” INFO is INTEGER. The rundown:

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 281 of file tgstein.c.


πŸ¦‹ mepack_double_tgstein_recursive

void mepack_double_tgstein_recursive (const char * TRANS, int M, double * A,
    int LDA, double * B, int LDB, double * X, int LDX, double * SCALE,
    double * WORK, int * INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Stein equation. recursion said what now

🎯 Purpose

mepack_double_tgstein_recursive solves a generalized Stein equation of the following forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

...where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. πŸ’«

Typically the matrix pencil (A,B) is created by DGGES from LAPACK. iykyk 🧚

Remarks πŸŽ€

This function is a wrapper around dla_tgstein_recursive.

See also πŸ‘€

dla_tgstein_recursive

Parameters πŸ’…

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. 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).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= 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 LDWORK. 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 146 of file tgstein.c.


✨ mepack_single_tglyap_dag ✨

void mepack_single_tglyap_dag (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation with DAG scheduling. πŸ¦‹ (yes bestie, DAG scheduling, we're being fancy)

Purpose: πŸ’–

mepack_single_tglyap_dag solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by SGGES from LAPACK. πŸ‘‘

Remarks πŸŽ€

This function is a wrapper around sla_tglyap_dag.

See also πŸ‘€

sla_tglyap_dag

Parameters πŸ’…

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 281 of file tglyap.c.


🌸 mepack_single_tglyap_level2 🌸

void mepack_single_tglyap_level2 (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation. ✨

Purpose: πŸ’–

mepack_single_tglyap_level2 solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by SGGES from LAPACK. πŸ‘‘

Remarks πŸŽ€

This function is a wrapper around sla_tglyap_l2.

See also πŸ‘€

sla_tglyap_l2

Parameters πŸ’…

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 420 of file tglyap.c.


πŸŽ€ mepack_single_tglyap_level2_unopt πŸŽ€

void mepack_single_tglyap_level2_unopt (const char * TRANS, int M, float *
    A, int LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float
    * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Lyapunov equation (Unoptimized). πŸ™ˆ no frills, no glow-up, just vibes

Purpose: πŸ’–

mepack_single_tglyap_level2_unopt solves a generalized Lyapunov equation of the following forms

A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by SGGES from LAPACK. ✨

πŸŽ€ Remarks πŸŽ€

This function is a wrapper around sla_tglyap_l2_unopt. It's giving "I just forward the vibe to the real one" β€” no cap, it delegates. 🫢

πŸ’– See also πŸ’–

  • sla_tglyap_l2_unopt

🌸 Parameters 🌸

  • TRANS β€” TRANS is a string. It specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. quasi, bestie, don't come for me πŸ’…
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 out here keeping your numbers from yeeting into infinity πŸ”₯
  • WORK β€” WORK is SINGLE PRECISION array, dimension LDWORK. 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 557 of file tglyap.c. πŸ“


mepack_single_tglyap_level3

void mepack_single_tglyap_level3 (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation. 🌈

✨ Purpose ✨

mepack_single_tglyap_level3 solves a generalized Lyapunov equation of the following forms

   A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

   A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by SGGES from LAPACK. ✨

πŸŽ€ Remarks πŸŽ€

This function is a wrapper around sla_tglyap_l3. bestie it's a cute lil glow-up over the real worker 🫢

πŸ’– See also πŸ’–

  • sla_tglyap_l3

🌸 Parameters 🌸

  • TRANS β€” TRANS is a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 416 of file tglyap.c. πŸ“


mepack_single_tglyap_level3_2stage

void mepack_single_tglyap_level3_2stage (const char * TRANS, int M, float *
    A, int LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float
    * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Lyapunov equation. 🌈

✨ Purpose ✨

mepack_single_tglyap_level3_2stage solves a generalized Lyapunov equation of the following forms

   A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

   A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. Typically the matrix pencil (A,B) is created by SGGES from LAPACK. ✨

πŸŽ€ Remarks πŸŽ€

This function is a wrapper around sla_tglyap_l3_2s. two-stage era, we love a lil sub-blocking moment πŸ’…

πŸ’– See also πŸ’–

  • sla_tglyap_l3_2s

🌸 Parameters 🌸

  • TRANS β€” TRANS is a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 overflow from popping off 😭
  • WORK β€” WORK is SINGLE PRECISION array, dimension LDWORK. 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 551 of file tglyap.c. πŸ“


mepack_single_tglyap_recursive

void mepack_single_tglyap_recursive (const char * TRANS, int M, float * A,
    int LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Lyapunov equation. 🌈

✨ Purpose ✨

mepack_single_tglyap_recursive solves a generalized Lyapunov equation of the following forms

   A * X * B^T + A * X * B^T = SCALE * Y                                              (2)

or

   A^T * X * B + A^T * X * B =  SCALE * Y                                             (1)
where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular,
and X and Y are symmetric  M-by-M matrices.
Typically the matrix pencil (A,B) is created by SGGES from LAPACK.

okay so A is M-by-M and quasi upper triangular, B is M-by-M plain upper triangular, and X and Y are both symmetric M-by-M matrices. and like, the matrix pencil (A,B) is normally born from SGGES out of LAPACK β€” that's where it comes from, no cap πŸ’…

✨ Remarks ✨

this one? it's just a wrapper around sla_tglyap_recursive. that's the whole vibe. 🫢

🌸 See also 🌸

  • sla_tglyap_recursive

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” a string, bestie. it says which form of the system of equations we're using, like, with respect to A and B:
    • == 'N': Equation (1) is the one being solved.
    • == 'T': Equation (2) is the one being solved.
  • M β€” M is INTEGER. it's the order of the matrices A and B. and M >= 0, always. ✨
  • A β€” A is a SINGLE PRECISION array, dimension (LDA,M). and it must be (quasi-) upper triangular.
  • LDA β€” LDA is INTEGER. leading dimension of the array A. and it's gotta be LDA >= max(1,M).
  • B β€” B is a SINGLE PRECISION array, dimension (LDB,M). B must be upper triangular.
  • LDB β€” LDB is INTEGER. leading dimension of the array B, and LDB >= max(1,M).
  • X β€” X is a SINGLE PRECISION array, dimension (LDX,N). on input, X is holding the right hand side Y. on output, X is holding the solution of Equation (1) or (2), whichever one got picked by TRANSA, TRANSB, and SGN. the right hand side Y and the solution X are both M-by-N matrices, fyi. πŸ’–
  • LDX β€” LDX is INTEGER. leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” SCALE is SINGLE PRECISION. it's a scaling factor that exists to stop overflow in the result. if INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, then 0 < SCALE <= 1 holds true. 🌈
  • WORK β€” WORK is a SINGLE PRECISION array, dimension LDWORK. it's the workspace for the algorithm. and heads up: you gotta query the workspace before you run the computation. you do the query by calling the subroutine with INFO == -1 on input, and then the required workspace gets handed back to you 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 281 of file tglyap.c. periodt.


πŸ‘‘ mepack_single_tgstein_dag πŸ‘‘

void mepack_single_tgstein_dag (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation with DAG scheduling. okay so this is the DAG-scheduled one, it's giving parallel main character energy.

πŸŽ€ Purpose πŸŽ€

mepack_single_tgstein_dag solves a generalized Stein equation, and it comes in these two forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. typically the matrix pencil (A,B) is created by SGGES from LAPACK. πŸ’…

✨ Remarks ✨

this function is a wrapper around sla_tgstein_dag.

🌸 See also 🌸

  • sla_tgstein_dag

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. the order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE PRECISION array, dimension (LDA,M). A must be (quasi-) upper triangular.
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). B must be upper triangular.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 281 of file tgstein.c. πŸ’–


πŸ‘‘ mepack_single_tgstein_level2 πŸ‘‘

void mepack_single_tgstein_level2 (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Stein equation. the level-2 one, lowkey the chill sibling.

πŸŽ€ Purpose πŸŽ€

mepack_single_tgstein_level2 solves a generalized Stein equation of the following forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. typically the matrix pencil (A,B) is created by SGGES from LAPACK. 🌈

✨ Remarks ✨

this function is a wrapper around sla_tgstein_l2.

🌸 See also 🌸

  • sla_tgstein_l2

πŸŽ€ Parameters πŸŽ€

  • TRANS β€” a string. Specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved.
    • == 'T': Equation (2) is solved.
  • M β€” M is INTEGER. the order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE PRECISION array, dimension (LDA,M). A must be (quasi-) upper triangular.
  • LDA β€” LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). B must be upper triangular.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 282 of file tgstein.c. 🫢


πŸ‘‘ mepack_single_tgstein_level3 πŸ‘‘

void mepack_single_tgstein_level3 (const char * TRANS, int M, float * A, int
    LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Stein equation. level-3, the big one, block-y and efficient, we love her. ✨

πŸŽ€ Purpose πŸŽ€

mepack_single_tgstein_level3 solves a generalized Stein equation of the following forms:

A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. πŸ’–

And bestie, where does that pencil even come from? Typically the matrix pencil (A,B) is created by SGGES from LAPACK. That's just the lore. ✨

Remarks πŸŽ€

This function is a wrapper around sla_tgstein_l3. It's giving delegation, and honestly? We respect it. πŸ’…

See also πŸ‘€

sla_tgstein_l3

Parameters 🧚

  • TRANS β€” a string, and it decides which form of the system of equations we're solving with respect to A and B:
    • == 'N': Equation (1) is solved. πŸ¦‹
    • == 'T': Equation (2) is solved. πŸ¦‹
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0. (Yes, zero counts. We love a degenerate case.) 🌸
  • A β€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. No exceptions, it's not optional. πŸ’œ
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular. Note: just upper triangular, no "quasi" business here. 🫢
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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. So X is doing double duty and honestly? Iconic behaviour. πŸ‘‘
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” SCALE is SINGLE 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. It's the little safety net keeping your numbers from yeeting into infinity. πŸ›Ÿ
  • WORK β€” WORK is SINGLE PRECISION array, dimension LDWORK. 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. So yeah β€” you gotta ask first, it's not just gonna tell you for free. πŸ™ˆ
  • 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 416 of file tgstein.c.


mepack_single_tgstein_level3_2stage πŸ”₯

void mepack_single_tgstein_level3_2stage (const char * TRANS, int M, float *
    A, int LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float
    * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Stein equation. Sub-blocking!! It's giving organised, it's giving structured, we love a subdivided queen. πŸŽ€

Purpose:

mepack_single_tgstein_level3_2stage solves a generalized Stein equation of the following forms

   A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

   A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. πŸ’–

Typically the matrix pencil (A,B) is created by SGGES from LAPACK. Same origin story as always. ✨

Remarks πŸŽ€

This function is a wrapper around sla_tgstein_l3_2s. 🌸

See also πŸ‘€

sla_tgstein_l3_2s

Parameters πŸ’…

  • TRANS β€” a string that specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved. πŸ¦‹
    • == 'T': Equation (2) is solved. πŸ¦‹
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 551 of file tgstein.c.


mepack_single_tgstein_recursive 🌈

void mepack_single_tgstein_recursive (const char * TRANS, int M, float * A,
    int LDA, float * B, int LDB, float * X, int LDX, float * SCALE, float *
    WORK, int * INFO)

Recursive blocking Level-3 Bartels-Stewart Algorithm for the generalized Stein equation. It recurses. It blocks. It does both. Main character energy, fr fr. πŸ‘‘

Purpose:

mepack_single_tgstein_recursive solves a generalized Stein equation of the following forms

   A * X * A^T - B * X * B^T = SCALE * Y                                              (1)

or

   A^T * X * A - B^T * X * B =  SCALE * Y                                             (2)

where A is a M-by-M quasi upper triangular matrix, B is a M-by-M upper triangular, and X and Y are symmetric M-by-M matrices. πŸ’–

Typically the matrix pencil (A,B) is created by SGGES from LAPACK. Yep, same as before, the pencil pipeline is consistent. ✨

Remarks πŸŽ€

This function is a wrapper around sla_tgstein_recursive. 🫢

See also πŸ‘€

sla_tgstein_recursive

Parameters 🧚

  • TRANS β€” a string that specifies the form of the system of equations with respect to A and B:
    • == 'N': Equation (1) is solved. πŸ¦‹
    • == 'T': Equation (2) is solved. πŸ¦‹
  • M β€” M is INTEGER. The order of the matrices A and B. M >= 0.
  • A β€” A is SINGLE 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).
  • B β€” B is SINGLE PRECISION array, dimension (LDB,M). The matrix B must be upper triangular.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M).
  • X β€” X is SINGLE 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 SINGLE 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 SINGLE PRECISION array, dimension LDWORK. 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 281 of file tgstein.c.


Author πŸ’œ

Generated automatically by Doxygen for MEPACK from the source code. So technically Doxygen wrote this whole thing, but I'm the one giving it the glow-up. 😭✨


And that's a wrap on the whole page, bestie!! πŸŒΈπŸŽ€πŸ’– This was version 1.1.2, dated Thu Oct 9 2025 00:00:00, and you just read ctglyap(3). Go forth and solve those generalized Stein equations, you absolute legend. Periodt. πŸ‘‘πŸ¦‹πŸŒˆ

πŸ“¦ where this page comes from