cgesylv(3)

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

🌸 cgesylv β€” C-Interface 🌸

okay so bestie, we're in the MEPACK manual, section 3, and this page is cgesylv πŸ’– it's the C-side of the standard Sylvester equation game, and it is long, so buckle up πŸŽ€


πŸ“› NAME πŸ“›

cgesylv β€” C-Interface

  • C-Interface for standard Sylvester equations.

✨ SYNOPSIS ✨

Functions

okay so here's the whole squad, no cap 🫢 every single one of them:

mepack_double_gesylv

void mepack_double_gesylv (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, double SGN, int M, int N, double *A, int LDA, double *B, int LDB, double *QA, int LDQA, double *QB, int LDQB, double *X, int LDX, double *SCALE, double *WORK, size_t LDWORK, int *INFO)

Frontend for the solution of Standard Sylvester Equations.

mepack_single_gesylv

void mepack_single_gesylv (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, float SGN, int M, int N, float *A, int LDA, float *B, int LDB, float *QA, int LDQA, float *QB, int LDQB, float *X, int LDX, float *SCALE, float *WORK, size_t LDWORK, int *INFO)

Frontend for the solution of Standard Sylvester Equations.

mepack_double_gesylv2

void mepack_double_gesylv2 (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, double SGN, int M, int N, double *A, int LDA, double *B, int LDB, double *QA, int LDQA, double *QB, int LDQB, double *X, int LDX, double *SCALE, double *WORK, size_t LDWORK, int *INFO)

Frontend for the solution of Standard Sylvester Equations.

mepack_single_gesylv2

void mepack_single_gesylv2 (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, float SGN, int M, int N, float *A, int LDA, float *B, int LDB, float *QA, int LDQA, float *QB, int LDQB, float *X, int LDX, float *SCALE, float *WORK, size_t LDWORK, int *INFO)

Frontend for the solution of Standard Sylvester Equations.

mepack_double_gesylv_refine

void mepack_double_gesylv_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, double SGN, int M, int N, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double *AS, int LDAS, double *BS, int LDBS, double *Q, int LDQ, double *U, int LDU, int *MAXIT, double *TAU, double *CONVLOG, double *WORK, size_t LDWORK, int *INFO)

Iterative Refinement for the standard Sylvester Equations.

mepack_single_gesylv_refine

void mepack_single_gesylv_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, float SGN, int M, int N, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float *AS, int LDAS, float *BS, int LDBS, float *Q, int LDQ, float *U, int LDU, int *MAXIT, float *TAU, float *CONVLOG, float *WORK, size_t LDWORK, int *INFO)

Iterative Refinement for the standard Sylvester Equations.

mepack_double_gesylv2_refine

void mepack_double_gesylv2_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, double SGN, int M, int N, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double *AS, int LDAS, double *BS, int LDBS, double *Q, int LDQ, double *U, int LDU, int *MAXIT, double *TAU, double *CONVLOG, double *WORK, size_t LDWORK, int *INFO)

Iterative Refinement for the standard Sylvester Equations.

mepack_single_gesylv2_refine

void mepack_single_gesylv2_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, float SGN, int M, int N, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float *AS, int LDAS, float *BS, int LDBS, float *Q, int LDQ, float *U, int LDU, int *MAXIT, float *TAU, float *CONVLOG, float *WORK, size_t LDWORK, int *INFO)

Iterative Refinement for the standard Sylvester Equations.


πŸ’« Detailed Description πŸ’«

C-Interface for standard Sylvester equations.

so like, the Fortran routines that solve the standard Sylvester equation with arbitrary coefficients got wrapped in C so you don't have to suffer, bestie 🧚 easier access, that's the whole point.

and here's the tea: all the wrapper routines are direct wrappers to the corresponding Fortran subroutines, and they do no sanity checks of their own. none. zero. the Fortran routines do all of that. πŸ™ˆ

the only difference is that the C interface does not</> allow LAPACK-like work_space queries. for that you gotta go use the mepack_memory_frontend function instead, periodt πŸ’…


πŸ”§ Function Documentation πŸ”§

🌟 mepack_double_gesylv 🌟

void mepack_double_gesylv (const char * FACTA, const char * FACTB, const char * TRANSA, const char * TRANSB, double SGN, int M, int N, double * A, int LDA, double * B, int LDB, double * QA, int LDQA, double * QB, int LDQB, double * X, int LDX, double * SCALE, double * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of Standard Sylvester Equations.

Purpose:

mepack_double_gesylv solves a Sylvester equation of the following forms

op1(A) * X  +  X * op2(B) = SCALE * Y                              (1)

or

op1(A) * X  -  X * op2(B) = SCALE * Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix πŸ¦‹ the right hand side Y and the solution X are M-by-N matrices. and the matrices A and B can be either a general unreduced matrix, or an upper Hessenberg form, or a (quasi-) upper triangular factor πŸ‘‘ in that last case, QA and QB are the ones handing you the Schur-vectors of the matrices A and B, iykyk.

Remarks

  • This function is a wrapper for dla_gesylv.

See also

  • dla_gesylv

Parameters

  • FACTA β€” FACTA is String. Specifies how the matrix A is given.
    • == 'N': The matrix A is given as a general matrix and its Schur decomposition A = QA*S*QA**T will be computed.
    • == 'F': The matrix A is given as its Schur decomposition in terms of S and QA form A = QA*S*QA**T
    • == 'H': The matrix A is given in upper Hessenberg form and its Schur decomposition A = QA*S*QA**T will be computed
  • FACTB β€” FACTB is String. Specifies how the matrix B is given.
    • == 'N': The matrix B is given as a general matrix and its Schur decomposition B = QB*R*QB**T will be computed.
    • == 'F': The matrix B is given as its Schur decomposition in terms of R and QB form B = QB*R*QB**T
    • == 'H': The matrix B is given in upper Hessenberg form and its Schur decomposition B = QB*R*QB**T will be computed
  • TRANSA β€” TRANSA is String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” TRANSB is String. Specifies the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN β€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M β€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N β€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M).
    • If FACTA == "N", the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACTA == "F", the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
    • If FACTA == "H", the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N).
    • If FACTB == "N", the matrix B is a general matrix and it is overwritten with its schur decomposition R.
    • If FACTB == "F", the matrix B contains its (quasi-) upper triangular matrix R being the Schur decomposition of B.
    • If FACTB == "N", the matrix B is an upper Hessenberg matrix and it is overwritten with its schur decomposition R.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • QA β€” QA is DOUBLE PRECISION array, dimension (LDQA,M).
    • If FACT == "N", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACT == "F", the matrix QA contains the Schur vectors of A.
    • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
  • LDQA β€” LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • QB β€” QB is DOUBLE PRECISION array, dimension (LDQB,N).
    • If FACT == "N", the matrix QB is an empty N-by-N matrix on input and contains the Schur vectors of B on output.
    • If FACT == "F", the matrix QB contains the Schur vectors of B.
    • If FACT == "H", the matrix QB is an empty N-by-N matrix on input and contains the Schur vectors of B on output.
  • LDQB β€” LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,N).
  • 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 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 (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given either by \ref mepack_memory_frontend.
  • LDWORK β€” LDWORK is INTEGER. Size of the workspace for the algorithm counted in floating point numbers of the actual precision. The C interface does not support the workspace query by setting LDWORK == -1 on input. In this case, the \ref mepack_memory_frontend function have to be used.
⚠️ okay listen up bestie, this one matters: no workspace query for you here. setting LDWORK == -1 on input is not supported by the C interface. go call \ref mepack_memory_frontend like the icon you are πŸ’…
  • INFO β€” INFO is INTEGER.
    • == 0: successful exit
    • = 1: DHGEES failed
    • = 2: DLA_SORT_EV failed
    • = 3: DLA_TRLYAP_DAG failed
    • < 0: if INFO == -i, the i-Th argument had an illegal value

and that's literally just the opening act, the rest of the functions are pulling up next πŸ’–

Attention

Okay bestie, real talk for a sec β€” the whole Fortran/LAPACK-style workspace query thing where you set LDWORK=-1 on input? That does NOT work in the C interface. Not a vibe, not a thing, not happening. πŸ™ˆ If you want that behaviour, you have to use the mepack_memory_frontend function for this purpose. That's the move. That's the only move.

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition at line 234 of file gesylv.c.


void mepack_double_gesylv2 (const char * FACTA, const char * FACTB, const char * TRANSA, const char * TRANSB, double SGN, int M, int N, double * A, int LDA, double * B, int LDB, double * QA, int LDQA, double * QB, int LDQB, double * X, int LDX, double * SCALE, double * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of Standard Sylvester Equations. βœ¨πŸ‘‘

Purpose

So like β€” mepack_double_gesylv2 solves a Sylvester equation, and it can do it in one of these two forms:

op1(A) * X * op2(B) + X  = SCALE * Y                              (1)

or

op1(A) * X * op2(B) - X = SCALE * Y                               (2)

where A is a M-by-M matrix and B is a N-by-N matrix. The right hand side Y and the solution X are M-by-N matrices. The matrices A and B can be either a general unreduced matrix or an upper Hessenberg form or a (quasi-) upper triangular factor. In the latter case QA and QB provide the Schur-vectors of the matrices A and B. πŸ’–

Remarks

This function is a wrapper for dla_gesylv2. iykyk πŸ¦‹

See also

dla_gesylv2

Parameters

  • FACTA β€” String. Tells you how the matrix A is showing up. vibe check time
    • == 'N': The matrix A is given as a general matrix and its Schur decomposition A = QA*S*QA**T will be computed.
    • == 'F': The matrix A is given as its Schur decomposition in terms of S and QA form A = QA*S*QA**T
    • == 'H': The matrix A is given in upper Hessenberg form and its Schur decomposition A = QA*S*QA**T will be computed
  • FACTB β€” String. Tells you how the matrix B is showing up.
    • == 'N': The matrix B is given as a general matrix and its Schur decomposition B = QB*R*QB**T will be computed.
    • == 'F': The matrix B is given as its Schur decomposition in terms of R and QB form B = QB*R*QB**T
    • == 'H': The matrix B is given in upper Hessenberg form and its Schur decomposition B = QB*R*QB**T will be computed
  • TRANSA β€” String. Sets the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” String. Sets the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN β€” DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation. pick your fighter
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M β€” INTEGER. The order of the matrices A and C. M >= 0.
  • N β€” INTEGER. The order of the matrices B and D. N >= 0.
  • A β€” DOUBLE PRECISION array, dimension (LDA,M).
    • If FACTA == "N", the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACTA == "F", the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
    • If FACTA == "H", the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” DOUBLE PRECISION array, dimension (LDB,N).
    • If FACTB == "N", the matrix B is a general matrix and it is overwritten with its schur decomposition R.
    • If FACTB == "F", the matrix B contains its (quasi-) upper triangular matrix R beeping the Schur decomposition of B.
    • If FACTB == "H", the matrix B is an upper Hessenberg matrix and it is overwritten with its schur decomposition R.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • QA β€” DOUBLE PRECISION array, dimension (LDQA,M).
    • If FACTA == "N", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACTA == "F", the matrix QA contains the Schur vectors of A.
    • If FACTA == "H", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
  • LDQA β€” INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • QB β€” DOUBLE PRECISION array, dimension (LDQB,N).
    • If FACTB == "N", the matrix QB is an empty N-by-N matrix on input and contains the Schur vectors of B on output.
    • If FACTB == "F", the matrix QB contains the Schur vectors of B.
    • QB is DOUBLE PRECISION array, dimension (LDQB,N) (yes bestie, it really does say that twice, we keep it πŸ’…)
    • If FACTB == "H", the matrix QB is an empty N-by-N matrix on input and contains the Schur vectors of B on output.
  • LDQB β€” INTEGER. The leading dimension of the array QB. LDQB >= max(1,N).
  • X β€” 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 M-by-N matrices.
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE β€” 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 β€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given either by \ref mepack_memory_frontend.
  • LDWORK β€” INTEGER. Size of the workspace for the algorithm counted in floating point numbers of the actual precision. The C interface does not support the workspace query by setting LDWORK == -1 on input. In this case, the \ref mepack_memory_frontend function have to be used.
  • INFO β€” INTEGER.
    • == 0: successful exit
    • = 1: DHGEES failed
    • = 2: DLA_SORT_EV failed
    • = 3: DLA_TRLYAP_DAG failed
    • < 0: if INFO == -i, the i-Th argument had an illegal value

Attention

Same warning, same energy: the Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose. 🫢

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition at line 235 of file gesylv2.c.


void mepack_double_gesylv2_refine (const char * TRANSA, const char * TRANSB, const char * GUESS, double SGN, int M, int N, double * A, int LDA, double * B, int LDB, double * X, int LDX, double * Y, int LDY, double * AS, int LDAS, double * BS, int LDBS, double * Q, int LDQ, double * U, int LDU, int * MAXIT, double * TAU, double * CONVLOG, double * WORK, size_t LDWORK, int * INFO)

Iterative Refinement for the standard Sylvester Equations. πŸ”₯πŸŒ€

Purpose

mepack_double_gesylv2_refine solves a Sylvester equation of the following forms

op1(A) * X * op2(B) + X = Y                              (1)

or

op1(A) * X  * op2(B) - X = Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix using iterative refinement. The right hand side Y and the solution X are M-by-N matrices. The matrix A and B need to be given in the original form as well as in their Schur decomposition since both are required in the iterative refinement procedure. yeah you heard her, both. no skipping. πŸŽ€

Remarks

This function is a wrapper for dla_gesylv2_refine

See also

dla_gesylv2_refine

Parameters

  • TRANSA β€” String. Sets the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” String. Sets the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS β€” String. Tells you whether X contains an initial guess on input or not. do we have a starting point or not, bestie?
    • = 'I': X contains an initial guess for the solution
    • == 'N': No initial guess is provided. X is set to zero.
  • SGN β€” DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between both terms.
  • M β€” INTEGER. The order of the matrix A. M >= 0.
  • N β€” INTEGER. The order of the matrix B. N >= 0.
  • A β€” DOUBLE PRECISION array, dimension (LDA,M). The array A contains the original matrix A defining the equation.
  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” DOUBLE PRECISION array, dimension (LDB,N). The array B contains the original matrix B defining the equation.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” DOUBLE PRECISION array, dimension (LDX,N).
    • On input, the array X contains the initial guess.
    • On output, the array X contains the solution X.
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” DOUBLE PRECISION array, dimension (LDY,N). On input, the array Y contains the right hand side.
  • LDY β€” INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” DOUBLE PRECISION array, dimension (LDAS,M). The array AS contains the Schur decomposition of the A.
  • LDAS β€” INTEGER, it's the leading dimension of the array AS. House rule: LDAS >= max(1,M). πŸ’…
  • BS β€” DOUBLE PRECISION array, dimension (LDBS,N). This one's carrying the Schur decomposition of B. ✨
  • LDBS β€” INTEGER, the leading dimension of the array BS. House rule again: LDBS >= max(1,N). 🫢
  • Q β€” DOUBLE PRECISION array, dimension (LDQ,M). It's holding the Schur vectors of A as returned by DGEES. πŸ‘‘
  • LDQ β€” INTEGER, leading dimension of the array Q. And yes: LDQ >= max(1,M). 🌸
  • U β€” DOUBLE PRECISION array, dimension (LDU,N). Contains the Schur vectors of B as returned by DGEES. πŸ’œ
  • LDU β€” INTEGER, leading dimension of the array U. You already know: LDU >= max(1,N). ⭐
  • MAXIT β€” INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, and bestie, note this: MAXIT <= 100. On exit, MAXIT contains the number of iteration steps taken by the algorithm. So it walks in as a limit and struts out as a receipt. πŸ”₯
  • TAU β€” DOUBLE PRECISION. On input, TAU contains the additional security factor for the stopping criterion, typical values are 0.1. On exit, TAU contains the last relative residual when the stopping criterion got valid. πŸŽ€
  • CONVLOG β€” DOUBLE PRECISION array, dimension (MAXIT). The CONVLOG array contains the convergence history of the iterative refinement. CONVLOG(I) contains the maximum relative residual before it is solved for the I-Th time. It's giving diary entries but for residuals. πŸ““
  • WORK β€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. 🌈
  • LDWORK β€” INTEGER. Size of the workspace for the algorithm. This can be determined by a call \ref mepack_memory_frontend. 🧚
  • INFO β€” INTEGER. The vibe check at the end:
    • == 0: Success πŸ’–
    • > 0: Iteration failed in step INFO 😭
    • < 0: if INFO == -i, the i-Th argument had an illegal value πŸ’€
🚨 Attention β€” The Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose. No cap, do not try the -1 thing here. πŸ™ˆ

Author β€” Martin Koehler, MPI Magdeburg πŸ‘‘

Date β€” October 2025 πŸ“…

Definition at line 245 of file gesylv2.c. ✨


πŸ”₯ mepack_double_gesylv_refine πŸ”₯

void mepack_double_gesylv_refine (const char * TRANSA, const char * TRANSB,
    const char * GUESS, double SGN, int M, int N, double * A, int LDA,
    double * B, int LDB, double * X, int LDX, double * Y, int LDY, double *
    AS, int LDAS, double * BS, int LDBS, double * Q, int LDQ, double * U,
    int LDU, int * MAXIT, double * TAU, double * CONVLOG, double * WORK,
    size_t LDWORK, int * INFO)

Iterative Refinement for the standard Sylvester Equations. πŸ¦‹

Purpose β€” mepack_double_gesylv_refine solves a Sylvester equation of the following forms

op1(A) * X  +  X * op2(B) = Y                              (1)

or

op1(A) * X  -  X * op2(B) = Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix using iterative refinement. The right hand side Y and the solution X are M-by-N matrices. The matrix A and B need to be given in the original form as well as in their Schur decomposition since both are required in the iterative refinement procedure. Yes bestie, you're handing over both versions β€” that's the whole bit. πŸ’…

Remarks β€” This function is a wrapper for dla_gesylv_refine. 🫢

See also β€” dla_gesylv_refine ⭐

Parameters

  • TRANSA β€” TRANSA is String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” TRANSB is String. Specifies the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS β€” GUESS is String. Specifies whether X contains an initial guess on input or not.
    • = 'I': X contains an initial guess for the solution
    • == 'N': No initial guess is provided. X is set to zero.
  • SGN β€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between both terms. βž•βž–
  • M β€” M is INTEGER. The order of the matrix A. M >= 0.
  • N β€” N is INTEGER. The order of the matrix B. N >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M). The array A contains the original matrix A defining the equation. 🌸
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N). The array B contains the original matrix B defining the equation. 🌸
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the array X contains the initial guess. On output, the array X contains the solution X. It's giving glow up. ✨
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” Y is DOUBLE PRECISION array, dimension (LDY,N). On input, the array Y contains the right hand side. πŸ’œ
  • LDY β€” LDY is INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” AS is DOUBLE PRECISION array, dimension (LDAS,M). The array AS contains the Schur decomposition of the A. πŸŽ€
  • LDAS β€” LDAS is INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • BS β€” BS is DOUBLE PRECISION array, dimension (LDBS,N). The array BS contains the Schur decomposition of B. πŸŽ€
  • LDBS β€” LDBS is INTEGER. The leading dimension of the array BS. LDBS >= max(1,N).
  • Q β€” Q is DOUBLE PRECISION array, dimension (LDQ,M). The array Q contains the Schur vectors of A as returned by DGEES. πŸ‘‘
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • U β€” U is DOUBLE PRECISION array, dimension (LDU,N). The array U contains the Schur vectors of B as returned by DGEES. πŸ‘‘
  • LDU β€” LDU is INTEGER. The leading dimension of the array U. LDU >= max(1,N).
  • MAXIT β€” MAXIT is INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, MAXIT <= 100. On exit, MAXIT contains the number of iteration steps taken by the algorithm. πŸ”₯
  • TAU β€” TAU is DOUBLE PRECISION. On input, TAU contains the additional security factor for the stopping criterion, typical values are 0.1. On exit, TAU contains the last relative residual when the stopping criterion got valid. πŸŽ€
  • CONVLOG β€” CONVLOG is DOUBLE PRECISION array, dimension (MAXIT). The CONVLOG array contains the convergence history of the iterative refinement. CONVLOG(I) contains the maximum relative residual before it is solved for the I-Th time. πŸ““
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. 🌈
  • LDWORK β€” LDWORK is INTEGER. Size of the workspace for the algorithm. This can be determined by a call \ref mepack_memory_frontend. 🧚
  • INFO β€” INFO is INTEGER.
    • == 0: Success πŸ’–
    • > 0: Iteration failed in step INFO 😭
    • < 0: if INFO == -i, the i-Th argument had an illegal value πŸ’€
🚨 Attention β€” The Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose. Fr fr, don't come for me, that's just how it is. πŸ™ˆ

Author β€” Martin Koehler, MPI Magdeburg πŸ‘‘

Date β€” October 2025 πŸ“…

Definition at line 246 of file gesylv.c. ✨


πŸ¦‹ mepack_single_gesylv πŸ¦‹

void mepack_single_gesylv (const char * FACTA, const char * FACTB, const
    char * TRANSA, const char * TRANSB, float SGN, int M, int N, float * A,
    int LDA, float * B, int LDB, float * QA, int LDQA, float * QB, int LDQB,
    float * X, int LDX, float * SCALE, float * WORK, size_t LDWORK, int *
    INFO)

Frontend for the solution of Standard Sylvester Equations. ✨

Purpose β€” mepack_single_gesylv solves a Sylvester equation of the following forms

op1(A) * X  +  X * op2(B) = SCALE * Y                              (1)

or

op1(A) * X  -  X * op2(B) = SCALE * Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix. The right hand side Y and the solution X are M-by-N matrices. The matrices A and B can be either a general unreduced matrix or an upper Hessenberg form or a (quasi-) upper triangular factor. In the latter case QA and QB provide the Schur-vectors of the matrices A and B. So yeah β€” you get options on how you hand over A and B, and if you're already sitting on the Schur form, QA and QB are the ones serving the vectors. πŸ‘‘

Remarks β€” This function is a wrapper for sla_gesylv. 🫢

See also β€” dla_gesylv ⭐

Parameters

  • FACTA β€” FACTA is String. Specifies how the matrix A is given.
    • == 'N': The matrix A is given as a general matrix and its Schur decomposition A = QA*S*QA**T will be computed.
    • == 'F': The matrix A is given as its Schur decomposition in terms of S and QA form A = QA*S*QA**T
    • == 'H': The matrix A is given in upper Hessenberg form and its Schur decomposition A = QA*S*QA**T will be computed
  • FACTB β€” FACTB is String. Specifies how the matrix B is given.
    • == 'N': The matrix B is given as a general matrix and its Schur decomposition B = QB*R*QB**T will be computed.
    • == 'F': The matrix B is given as its Schur decomposition in terms of R and QB form B = QB*R*QB**T
    • == 'H': The matrix B is given in upper Hessenberg form and its Schur decomposition B = QB*R*QB**T will be computed
  • TRANSA β€” TRANSA is String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB
  • TRANSB β€” a String πŸŽ€ that tells the solver which shape the system takes around B, bestie:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN β€” SGN is DOUBLE PRECISION, allowed values: +/-1. it's the sign that sits between the two halves of the Sylvester equation πŸ’…
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M β€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N β€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M) ✨ and what happens to it depends on FACTA, so listen up:
    • If FACTA == "N", the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACTA == "F", the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
    • If FACTA == "H", the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N) 🌸 and again, FACTB decides everything:
    • If FACTB == "N", the matrix B is a general matrix and it is overwritten with its schur decomposition R.
    • If FACTB == "F", the matrix B contains its (quasi-) upper triangular matrix R being the Schur decomposition of B.
    • If FACTB == "H", the matrix B is an upper Hessenberg matrix and it is overwritten with its schur decomposition R.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • QA β€” QA is DOUBLE PRECISION array, dimension (LDA,M) πŸ¦‹ the Schur-vector zone, and it's giving very FACTA-dependent:
    • If FACTA == "N", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACTA == "F", the matrix QA contains the Schur vectors of A.
    • If FACTA == "H", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
  • LDQA β€” LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • QB β€” QB is DOUBLE PRECISION array, dimension (LDA,M) πŸ’œ same energy as QA but for B, and FACTB runs the show:
    • If FACTB == "N", the matrix QB is an empty M-by-M matrix on input and contains the Schur vectors of B on output.
    • If FACTB == "F", the matrix QB contains the Schur vectors of B.
    • If FACTB == "H", the matrix QB is an empty M-by-M matrix on input and contains the Schur vectors of B on output.
  • LDQB β€” LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,N) 🫢 the main character of this whole situation:
    • 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. It's the scaling factor that stops the result from overflowing πŸ”₯
    • 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 (MAX(1,LDWORK)) β€” Workspace for the algorithm. The optimal workspace is given either by \ref mepack_memory_frontend.
  • LDWORK β€” LDWORK is INTEGER. Size of the workspace for the algorithm counted in floating point numbers of the actual precision. The C interface does not support the workspace query by setting LDWORK == -1 on input. In this case, the \ref mepack_memory_frontend function have to be used.
  • INFO β€” INFO is INTEGER, the receipts πŸ“‹:
    • == 0: successful exit
    • = 1: DHGEES failed
    • = 2: DLA_SORT_EV failed
    • = 3: DLA_TRLYAP_DAG failed
    • < 0: if INFO == -i, the i-Th argument had an illegal value

🚨 Attention

The Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose.

πŸ–‹οΈ Author

Martin Koehler, MPI Magdeburg

πŸ“… Date

October 2025

Definition at line 468 of file gesylv.c.


🌈 mepack_single_gesylv2

void mepack_single_gesylv2 (const char * FACTA, const char * FACTB, const
    char * TRANSA, const char * TRANSB, float SGN, int M, int N, float * A,
    int LDA, float * B, int LDB, float * QA, int LDQA, float * QB, int LDQB,
    float * X, int LDX, float * SCALE, float * WORK, size_t LDWORK, int *
    INFO)

Frontend for the solution of Standard Sylvester Equations.

🎯 Purpose

mepack_single_gesylv2 solves a Sylvester equation of the following forms

op1(A) * X * op2(B) +  X = SCALE * Y                              (1)

or

op1(A) * X * op2(B) -  X = SCALE * Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix. The right hand side Y and the solution X are M-by-N matrices. The matrices A and B can be either a general unreduced matrix or an upper Hessenberg form or a (quasi-) upper triangular factor. In the latter case QA and QB provide the Schur-vectors of the matrices A and B. πŸ‘‘

πŸ“ Remarks

This function is a wrapper for sla_gesylv2.

πŸ‘€ See also

dla_gesylv2

🧚 Parameters

  • FACTA β€” FACTA is String. Specifies how the matrix A is given:
    • == 'N': The matrix A is given as a general matrix and its Schur decomposition A = QA*S*QA**T will be computed.
    • == 'F': The matrix A is given as its Schur decomposition in terms of S and QA form A = QA*S*QA**T
    • == 'H': The matrix A is given in upper Hessenberg form and its Schur decomposition A = QA*S*QA**T will be computed
  • FACTB β€” FACTB is String. Specifies how the matrix B is given:
    • == 'N': The matrix B is given as a general matrix and its Schur decomposition B = QB*R*QB**T will be computed.
    • == 'F': The matrix B is given as its Schur decomposition in terms of R and QB form B = QB*R*QB**T
    • == 'H': The matrix B is given in upper Hessenberg form and its Schur decomposition B = QB*R*QB**T will be computed
  • TRANSA β€” TRANSA is String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” TRANSB is String. Specifies the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN β€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M β€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N β€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M)
    • If FACTA == "N", the matrix A is a general matrix and it is overwritten with its schur decomposition S.
    • If FACTA == "F", the matrix A contains its (quasi-) upper triangular matrix S being the Schur decomposition of A.
    • If FACTA == "H", the matrix A is an upper Hessenberg matrix and it is overwritten with its schur decomposition S.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N)
    • If FACTB == "N", the matrix B is a general matrix and it is overwritten with its schur decomposition R.
    • If FACTB == "F", the matrix B contains its (quasi-) upper triangular matrix R being the Schur decomposition of B.
    • If FACTB == "H", the matrix B is an upper Hessenberg matrix and it is overwritten with its schur decomposition R.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • QA β€” QA is DOUBLE PRECISION array, dimension (LDA,M)
    • If FACTA == "N", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
    • If FACTA == "F", the matrix QA contains the Schur vectors of A.
    • If FACTA == "H", the matrix QA is an empty M-by-M matrix on input and contains the Schur vectors of A on output.
  • LDQA β€” LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • QB β€” QB is DOUBLE PRECISION array, dimension (LDA,M)
    • If FACTB == "N", the matrix QB is an empty M-by-M matrix on input and contains the Schur vectors of B on output.
    • If FACTB == "F", the matrix QB contains the Schur vectors of B.
    • If FACTB == "H", the matrix QB is an empty M-by-M matrix on input and contains the Schur vectors of B on output.
  • LDQB β€” LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,N).
  • 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 β€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm, and the optimal workspace is given either by mepack_memory_frontend. πŸ› οΈ
  • LDWORK β€” INTEGER. Size of the workspace for the algorithm, counted in floating point numbers of the actual precision. Heads up bestie: the C interface does NOT support the workspace query by setting LDWORK == -1 on input. In that case, the mepack_memory_frontend function have to be used. πŸ’…
  • INFO β€” INTEGER
    • == 0: successful exit πŸŽ‰
    • = 1: DHGEES failed πŸ’€
    • = 2: DLA_SORT_EV failed πŸ’€
    • = 3: DLA_TRLYAP_DAG failed πŸ’€
    • < 0: if INFO == -i, the i-Th argument had an illegal value πŸ™ˆ

⚠️ Attention ⚠️

The Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose.

πŸ’– Author πŸ’–

Martin Koehler, MPI Magdeburg

πŸ“… Date πŸ“…

October 2025

Definition at line 469 of file gesylv2.c.


πŸ¦‹ mepack_single_gesylv2_refine πŸ¦‹

void mepack_single_gesylv2_refine (const char * TRANSA, const char * TRANSB,
    const char * GUESS, float SGN, int M, int N, float * A, int LDA, float *
    B, int LDB, float * X, int LDX, float * Y, int LDY, float * AS, int
    LDAS, float * BS, int LDBS, float * Q, int LDQ, float * U, int LDU, int
    * MAXIT, float * TAU, float * CONVLOG, float * WORK, size_t LDWORK, int
    * INFO)

Iterative Refinement for the standard Sylvester Equations. ✨

🎯 Purpose 🎯

mepack_single_gesylv2_refine solves a Sylvester equation of the following forms

op1(A) * X * op2(B) + X = Y                              (1)

or

op1(A) * X * op2(B) - X = Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix, using iterative refinement. The right hand side Y and the solution X are M-by-N matrices. 🫢

The matrix A and B need to be given in the original form as well as in their Schur decomposition, since both are required in the iterative refinement procedure. No shortcuts bestie, you need both. πŸ’…

πŸ“ Remarks πŸ“

This function is a wrapper for sla_gesylv2_refine. 🧚

πŸ‘€ See also πŸ‘€

sla_gesylv2_refine

🌸 Parameters 🌸

  • TRANSA β€” String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” String. Specifies the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS β€” String. Specifies whether X contains an initial guess on input or not.
    • = 'I': X contains an initial guess for the solution
    • == 'N': No initial guess is provided. X is set to zero.
  • SGN β€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign between both terms. βž•βž–
  • M β€” INTEGER. The order of the matrix A. M >= 0.
  • N β€” INTEGER. The order of the matrix B. N >= 0.
  • A β€” SINGLE PRECISION array, dimension (LDA,M). The array A contains the original matrix A defining the equation.
  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” SINGLE PRECISION array, dimension (LDB,N). The array B contains the original matrix B defining the equation.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” SINGLE PRECISION array, dimension (LDX,M). On input, the array X contains the initial guess. On output, the array X contains the solution X. ✨
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” SINGLE PRECISION array, dimension (LDY,M). On input, the array Y contains the right hand side.
  • LDY β€” INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” SINGLE PRECISION array, dimension (LDAS,M). The array AS contains the Schur decomposition of the A.
  • LDAS β€” INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • BS β€” SINGLE PRECISION array, dimension (LDBS,N). The array AS contains the Schur decomposition of B. (yep, that's literally what it says πŸ™ˆ)
  • LDBS β€” INTEGER. The leading dimension of the array BS. LDBS >= max(1,N).
  • Q β€” SINGLE PRECISION array, dimension (LDQ,M). The array Q contains the Schur vectors of A as returned by DGEES.
  • LDQ β€” INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • U β€” SINGLE PRECISION array, dimension (LDU,N). The array U contains the Schur vectors of B as returned by DGEES.
  • LDU β€” INTEGER. The leading dimension of the array U. LDU >= max(1,N).
  • MAXIT β€” INTEGER. On input, MAXIT contains the maximum number of iteration that are performed, MAXIT <= 100. On exit, MAXIT contains the number of iteration steps taken by the algorithm. πŸ”
  • TAU β€” SINGLE PRECISION. On input, TAU contains the additional security factor for the stopping criterion, typical values are 0.1. On exit, TAU contains the last relative residual when the stopping criterion got valid.
  • CONVLOG β€” SINGLE PRECISION array, dimension (MAXIT). The CONVLOG array contains the convergence history of the iterative refinement. CONVLOG(I) contains the maximum relative residual before it is solved for the I-Th time. πŸ“ˆ
  • WORK β€” SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm.
  • LDWORK β€” INTEGER. Size of the workspace for the algorithm. This can be determined by a call mepack_memory_frontend.
  • INFO β€” INTEGER
    • == 0: Success πŸŽ‰
    • > 0: Iteration failed in step INFO πŸ’€
    • < 0: if INFO == -i, the i-Th argument had an illegal value πŸ™ˆ

⚠️ Attention ⚠️

The Fortran/LAPACK-like workspace query with setting LDWORK=-1 on input will not work in the C interface. One have to use the mepack_memory_frontend function for this purpose.

πŸ’– Author πŸ’–

Martin Koehler, MPI Magdeburg

πŸ“… Date πŸ“…

October 2025

Definition at line 496 of file gesylv2.c.


🧚 mepack_single_gesylv_refine 🧚

void mepack_single_gesylv_refine (const char * TRANSA, const char * TRANSB,
    const char * GUESS, float SGN, int M, int N, float * A, int LDA, float *
    B, int LDB, float * X, int LDX, float * Y, int LDY, float * AS, int
    LDAS, float * BS, int LDBS, float * Q, int LDQ, float * U, int LDU, int
    * MAXIT, float * TAU, float * CONVLOG, float * WORK, size_t LDWORK, int
    * INFO)

Iterative Refinement for the standard Sylvester Equations. ✨

🎯 Purpose 🎯

mepack_single_gesylv_refine solves a Sylvester equation of the following forms

op1(A) * X  +  X * op2(B) = Y                              (1)

or

op1(A) * X  -  X * op2(B) = Y                              (2)

where A is a M-by-M matrix and B is a N-by-N matrix, using iterative refinement. The right hand side Y and the solution X are M-by-N matrices. 🫢

The matrix A and B need to be given in the original form as well as in their Schur decomposition, since both are required in the iterative refinement procedure. Both, bestie. Both. πŸ’…

πŸ“ Remarks πŸ“

This function is a wrapper for sla_gesylv_refine. 🧚

πŸ‘€ See also πŸ‘€

sla_gesylv_refine

🌸 Parameters 🌸

  • TRANSA β€” String. Specifies the form of the system of equations with respect to A:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB β€” String. Specifies the form of the system of equations with respect to B:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS β€” String. Specifies whether X contains an initial guess on input or not.
    • = 'I': X contains an initial guess for the solution
    • == 'N': No initial guess is provided. X is set to zero.
  • SGN β€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign between both terms. βž•βž–
  • M β€” INTEGER. The order of the matrix A. M >= 0.
  • N β€” INTEGER. The order of the matrix B. N >= 0.
  • A β€” SINGLE PRECISION array, dimension (LDA,M). The array A contains the original matrix A defining the equation.
  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B β€” SINGLE PRECISION array, dimension (LDB,N). The array B contains the original matrix B defining the equation.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” SINGLE PRECISION array, dimension (LDX,M). On input, the array X contains the initial guess. On output, the array X contains the solution X. ✨
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • Y β€” SINGLE PRECISION array, dimension (LDY,M). On input, the array Y contains the right hand side.
  • LDY β€” INTEGER. The leading dimension of the array Y. LDY >= max(1,M).
  • AS β€” SINGLE PRECISION array, dimension (LDAS,M). The array AS contains the Schur decomposition of the A.
  • LDAS β€” INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • BS β€” SINGLE PRECISION array, dimension (LDBS,N). The array AS contains the Schur decomposition of B. (same energy as before, it really does say AS πŸ™ˆ)
  • LDBS β€” INTEGER. The leading dimension of the array BS. LDBS >= max(1,N).
  • Q β€”
  • Q β€” this is a SINGLE PRECISION</p> array, dimension (LDQ,M). It's holding the Schur vectors of A, exactly as DGEES handed them back to you. πŸ’…
  • LDQ β€” INTEGER, bestie. The leading dimension of the array Q. Rule of the house: LDQ >= max(1,M). No exceptions, she checks. πŸ‘‘
  • U β€” SINGLE PRECISION array, dimension (LDU,N). Same energy as Q but for B: it's got the Schur vectors of B, as returned by DGEES.
  • LDU β€” INTEGER. Leading dimension of the array U. And yes, LDU >= max(1,N). The math is math-ing, don't fight it. ✨
  • MAXIT β€” INTEGER. On input? It's the max number of iterations that get performed, and heads up: MAXIT <= 100. On exit? It's been updated to tell you how many iteration steps the algorithm actually took. Character development fr fr.
  • TAU β€” SINGLE PRECISION. On input it's your extra security factor for the stopping criterion β€” typical values are 0.1, she's a little cautious like that. On exit, TAU holds the last relative residual from when the stopping criterion finally got valid. She came through. 🫢
  • CONVLOG β€” SINGLE PRECISION array, dimension (MAXIT). This is the convergence history of the iterative refinement, the whole glow-up arc. CONVLOG(I) contains the maximum relative residual before it gets solved for the I-th time. Obsessed with the transparency honestly.
  • WORK β€” SINGLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm. Every icon needs her backstage. πŸŽ€
  • LDWORK β€” INTEGER. Size of the workspace for the algorithm. Wanna know what to set it to? You figure that out with a call to mepack_memory_frontend. 🌸
  • INFO β€” INTEGER, and she's the one reporting back:
    • == 0: Success πŸ’– slay
    • > 0: Iteration failed in step INFO 😭
    • < 0: if INFO == -i, the i-Th argument had an illegal value πŸ’€

⚠️ Attention ⚠️

Okay so big important thing, do not skip this: the Fortran/LAPACK-like workspace query where you set LDWORK=-1 on input? That will not work in the C interface. Like, at all. If you want to do the workspace thing, you have to use the mepack_memory_frontend function for this purpose. Periodt.


πŸ‘‘ Author πŸ‘‘

Martin Koehler, MPI Magdeburg

πŸ—“οΈ Date πŸ—“οΈ

October 2025

Definition at line 498 of file gesylv.c.


Generated automatically by Doxygen for MEPACK from the source code 🧚 β€” and that's a wrap on this whole page bestie, we did it!! Version 1.1.2, dated Thu Oct 9 2025 00:00:00, and yes I know the timestamp is giving midnight sharp, she's punctual. Byeee πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from