cggsylv(3)

๐Ÿ“ฆ
version 1.1.2 ยท 3 versions
, in fedora 43

๐ŸŒธ cggsylv โ€” the C-Interface, bestie ๐Ÿ’…

okay so welcome to cggsylv(3) from MEPACK, and yes we're doing the whole thing, no skimming, periodt โœจ


๐ŸŽ€ NAME ๐ŸŽ€

cggsylv โ€” C-Interface

  • C-Interface for generalized Sylvester equations. ๐Ÿ’–

โœจ SYNOPSIS โœจ

๐Ÿซถ Functions

void mepack_double_ggcsylv (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, double SGN1, double SGN2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *QA, int LDQA, double *ZA, int LDZA, double *QB, int LDQB, double *ZB, int LDZB, double *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of Coupled Generalized Sylvester Equations. ๐Ÿ”ฅ

void mepack_single_ggcsylv (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, float SGN1, float SGN2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *QA, int LDQA, float *ZA, int LDZA, float *QB, int LDQB, float *ZB, int LDZB, float *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of Coupled Generalized Sylvester Equations. ๐Ÿ”ฅ

void mepack_double_ggcsylv_dual (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, double SGN1, double SGN2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *QA, int LDQA, double *ZA, int LDZA, double *QB, int LDQB, double *ZB, int LDZB, double *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of the dual Coupled Generalized Sylvester Equations. ๐Ÿ’œ

void mepack_single_ggcsylv_dual (const char *FACTA, const char *FACTB, const char *TRANSA, const char *TRANSB, float SGN1, float SGN2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *QA, int LDQA, float *ZA, int LDZA, float *QB, int LDQB, float *ZB, int LDZB, float *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of the dual Coupled Generalized Sylvester Equations. ๐Ÿ’œ

void mepack_double_ggsylv (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 *C, int LDC, double *D, int LDD, double *QA, int LDQA, double *ZA, int LDZA, double *QB, int LDQB, double *ZB, int LDZB, double *X, int LDX, double *SCALE, double *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of Generalized Sylvester Equations. ๐ŸŒˆ

void mepack_single_ggsylv (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 *C, int LDC, float *D, int LDD, float *QA, int LDQA, float *ZA, int LDZA, float *QB, int LDQB, float *ZB, int LDZB, float *X, int LDX, float *SCALE, float *WORK, size_t LDWORK, int *INFO)

  • Frontend for the solution of Generalized Sylvester Equations. ๐ŸŒˆ

void mepack_double_ggcsylv_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, double SGN1, double SGN2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *R, int LDR, double *L, int LDL, double *E, int LDE, double *F, int LDF, double *AS, int LDAS, double *BS, int LDBS, double *CS, int LDCS, double *DS, int LDDS, double *Q, int LDQ, double *Z, int LDZ, double *U, int LDU, double *V, int LDV, int *MAXIT, double *TAU, double *CONVLOG, double *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the Coupled Generalized Sylvester Equations. โœจ

void mepack_single_ggcsylv_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, float SGN1, float SGN2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *R, int LDR, float *L, int LDL, float *E, int LDE, float *F, int LDF, float *AS, int LDAS, float *BS, int LDBS, float *CS, int LDCS, float *DS, int LDDS, float *Q, int LDQ, float *Z, int LDZ, float *U, int LDU, float *V, int LDV, int *MAXIT, float *TAU, float *CONVLOG, float *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the Coupled Generalized Sylvester Equations. โœจ

void mepack_double_ggcsylv_dual_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, double SGN1, double SGN2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *R, int LDR, double *L, int LDL, double *E, int LDE, double *F, int LDF, double *AS, int LDAS, double *BS, int LDBS, double *CS, int LDCS, double *DS, int LDDS, double *Q, int LDQ, double *Z, int LDZ, double *U, int LDU, double *V, int LDV, int *MAXIT, double *TAU, double *CONVLOG, double *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the dual Coupled Generalized Sylvester Equations. ๐Ÿ’ซ

void mepack_single_ggcsylv_dual_refine (const char *TRANSA, const char *TRANSB, const char *GUESS, float SGN1, float SGN2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *R, int LDR, float *L, int LDL, float *E, int LDE, float *F, int LDF, float *AS, int LDAS, float *BS, int LDBS, float *CS, int LDCS, float *DS, int LDDS, float *Q, int LDQ, float *Z, int LDZ, float *U, int LDU, float *V, int LDV, int *MAXIT, float *TAU, float *CONVLOG, float *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the dual Coupled Generalized Sylvester Equations. ๐Ÿ’ซ

void mepack_double_ggsylv_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 *C, int LDC, double *D, int LDD, double *X, int LDX, double *Y, int LDY, double *AS, int LDAS, double *BS, int LDBS, double *CS, int LDCS, double *DS, int LDDS, double *Q, int LDQ, double *Z, int LDZ, double *U, int LDU, double *V, int LDV, int *MAXIT, double *TAU, double *CONVLOG, double *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the Generalized Sylvester Equations. ๐Ÿฆ‹

void mepack_single_ggsylv_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 *C, int LDC, float *D, int LDD, float *X, int LDX, float *Y, int LDY, float *AS, int LDAS, float *BS, int LDBS, float *CS, int LDCS, float *DS, int LDDS, float *Q, int LDQ, float *Z, int LDZ, float *U, int LDU, float *V, int LDV, int *MAXIT, float *TAU, float *CONVLOG, float *WORK, size_t LDWORK, int *INFO)

  • Iterative Refinement for the Generalized Sylvester Equations. ๐Ÿฆ‹

๐Ÿ’– Detailed Description ๐Ÿ’–

C-Interface for generalized Sylvester equations.

So here's the tea โ˜•: the Fortran routines that solve the generalized Sylvester equation with arbitrary coefficients are wrapped in C so you can actually get to them without crying, bestie. The way that these wrapper routines work? Every single one of them is a direct wrapper to the corresponding Fortran subroutine, with no sanity checks โ€” nope, not one. ๐Ÿ™ˆ Those checks are done by the Fortran routines themselves, so don't come for the wrappers.

The only difference is that the C interface does not allow LAPACK-like work_space queries. Not a vibe, I know. ๐Ÿ˜ญ For that, you need to use the mepack_memory_frontend function. iykyk.


๐Ÿ‘‘ Function Documentation ๐Ÿ‘‘

void mepack_double_ggcsylv (const char * FACTA, const char * FACTB, const char * TRANSA, const char * TRANSB, double SGN1, double SGN2, int M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD, double * QA, int LDQA, double * ZA, int LDZA, double * QB, int LDQB, double * ZB, int LDZB, double * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of Coupled Generalized Sylvester Equations. ๐Ÿ”ฅ

๐Ÿงš Purpose

mepack_double_ggcsylv solves a generalized Sylvester equation of the following forms

op1(A) * R  + SGN1 * L  * op2(B) = SCALE * E                              (1)
op1(C) * R  + SGN2 * L  * op2(D) = SCALE * F

where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side (E,F) and the solution (R,L) are M-by-N matrix pencils. The matrix pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed. ๐Ÿ’…

๐Ÿ“ Remarks

  • This function is a wrapper for dla_ggcsylv.

๐ŸŒธ See also

  • dla_ggcsylv

โญ Parameters

  • FACTA โ€” bestie, this one is a String, and it Specifies how the matrix pencil (A,C) is given.
    • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
    • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
    • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • FACTB โ€” also a String ๐ŸŽ€, and it Specifies how the matrix pencil (B,D) is given.
    • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
    • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
    • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • TRANSA โ€” String again, she's consistent ๐Ÿ’โ™€๏ธ. Specifies the form of the system of equations with respect to A and C :
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” you guessed it, a String. โœจ Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN1 โ€” SGN1 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation.
  • SGN2 โ€” SGN2 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation.
  • 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 โ€” a DOUBLE PRECISION array, dimension (LDA,M). bestie this one's whole personality depends on FACT, so listen up:
    • If FACT == "N", the matrix A is a general matrix and it gets overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C). bye original A ๐Ÿ’€
    • If FACT == "F", the matrix A already contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M). no cap.
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). same energy, different letter:
    • If FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
    • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
    • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M):
    • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
    • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N):
    • If FACT == "N", the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
    • If FACT == "F", the matrix D contains its upper triangular matrix V of the Schur decomposition of (B,D).
    • If FACT == "H", the matrix D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • QA โ€” DOUBLE PRECISION array, dimension (LDQA,M):
    • If FACT == "N", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
    • If FACT == "F", the matrix QA contains the left Schur vectors of (A,C).
    • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
  • LDQA โ€” INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • ZA โ€” DOUBLE PRECISION array, dimension (LDZA,M):
    • If FACT == "N", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
    • If FACT == "F", the matrix ZA contains the right Schur vectors of (A,C).
    • If FACT == "H", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
  • LDZA โ€” INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M).
  • QB โ€” DOUBLE PRECISION array, dimension (LDQB,N):
    • If FACT == "N", the matrix QB is an empty N-by-N matrix on input and contains the left Schur vectors of (B,D) on output.
    • If FACT == "F", the matrix QB contains the left Schur vectors of (B,D).
    • If FACT == "H", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
  • LDQB โ€” INTEGER. The leading dimension of the array QB. LDQB >= max(1,N).
  • ZB โ€” DOUBLE PRECISION array, dimension (LDZB,N):
    • If FACT == "N", the matrix ZB is an empty N-by-N matrix on input and contains the right Schur vectors of (B,D) on output.
    • If FACT == "F", the matrix ZB contains the right Schur vectors of (B,D).
    • If FACT == "H", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
  • LDZB โ€” INTEGER. The leading dimension of the array ZB. LDZB >= max(1,N).
  • E โ€” DOUBLE PRECISION array, dimension (LDE,N). On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R. glow up moment fr โœจ
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” DOUBLE PRECISION array, dimension (LDF,N). On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDF >= 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. she's the safety net bestie, respect her ๐Ÿซถ
  • WORK โ€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given 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, the receipts:
    • == 0: successful exit ๐ŸŽ‰
    • = 1: DHGGES failed
    • = 2: DLA_SORT_GEV failed
    • = 3: Inner solver 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 318 of file cgsylv.c.


๐Ÿ‘‘ mepack_double_ggcsylv_dual

void mepack_double_ggcsylv_dual (const char * FACTA, const char * FACTB,
    const char * TRANSA, const char * TRANSB, double SGN1, double SGN2, int
    M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC,
    double * D, int LDD, double * QA, int LDQA, double * ZA, int LDZA,
    double * QB, int LDQB, double * ZB, int LDZB, double * E, int LDE,
    double * F, int LDF, double * SCALE, double * WORK, size_t LDWORK, int *
    INFO)

Frontend for the solution of the dual Coupled Generalized Sylvester Equations. yes she's the dual one, not to be confused, iykyk ๐Ÿ’…

โœจ Purpose

mepack_double_ggcsylv_dual solves a generalized coupled Sylvester equation of the following form

   op1(A)**T * R  + op1(C)**T * L               = SCALE * E                             (1)
   SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F

where A and C are M-by-M matrices and B and D are N-by-N matrices. The right hand sides E, F and the solutions R, L are M-by-N matrices. The equation (1) is the dual to the generalized coupled Sylvester equation

   op1(A) * R + SGN1 * L * op2(B)  = SCALE * E                                          (2)
   op1(C) * R + SGN2 * L * op2(D)  = SCALE * F

The equation (1) is the dual one to equation (2) with respect to the underlying linear system. Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields

        | kron(I, op1(A))   SGN1*kron(op2(B)**T, I) | | Vec R |   | Vec E |
  Z X = |                                           |*|       | = |       |
        | kron(I, op1(C))   SGN2*kron(op2(D)**T, I) | | Vec L |   | Vec F |

Regarding Z**T one obtains

           | kron(I, op1(A)**T )    kron(I, op1(C)**T)   | | Vec R |   | Vec E |
  Z**T X = |                                             |*|       | = |       |
           | SGN1*kron(op2(B), I)   SGN2*kron(op2(D), I) | | Vec L |   | Vec F |

which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). the way the transposes just flip the whole narrative ๐Ÿ˜ญ

๐Ÿ’ฌ Remarks

This function is a wrapper for dla_ggcsylv_dual.

๐Ÿ‘€ See also

dla_ggcsylv_dual

๐ŸŽ€ Parameters

  • FACTA โ€” String. Specifies how the matrix pencil (A,C) is given.
    • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
    • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
    • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • FACTB โ€” String. Specifies how the matrix pencil (B,D) is given.
    • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
    • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
    • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C :
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” String

TRANSB

TRANSB is a String, bestie, and it tells us the form of the system of equations with respect to B and D:

== 'N':  op2(B) = B,
== 'T':  op2(B) = B**T

SGN1

SGN1 is DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between in the first equation. That's the vibe โ€” just a sign flip, but it changes everything. ๐Ÿ’…


SGN2

SGN2 is DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between in the second equation. Yes queen, second equation gets her own sign too. โœจ


M

M is INTEGER. It's the order of the matrices A and C. And it has to be M >= 0, no cap.


N

N is INTEGER. It's the order of the matrices B and D. Also N >= 0. Iconic symmetry fr fr. ๐Ÿฆ‹


A

A is a DOUBLE PRECISION array, dimension (LDA,M). What she is depends on FACT, so pay attention bestie:

  • If FACT == "N", the matrix A is a general matrix and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix A contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).

LDA

LDA is INTEGER โ€” the leading dimension of the array A. Constraint: LDA >= max(1,M). Don't play with her. ๐ŸŽ€


B

B is a DOUBLE PRECISION array, dimension (LDB,N). Again, FACT decides her whole storyline:

  • If FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).

LDB

LDB is INTEGER โ€” the leading dimension of the array B. Constraint: LDB >= max(1,N). โญ


C

C is a DOUBLE PRECISION array, dimension (LDC,M). Three moods, same matrix:

  • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).

LDC

LDC is INTEGER โ€” the leading dimension of the array C. Constraint: LDC >= max(1,M). ๐ŸŒธ


D

D is a DOUBLE PRECISION array, dimension (LDD,N). And yes, she's got range too:

  • If FACT == "N", the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix D contains its upper triangular matrix V of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).

LDD

LDD is INTEGER โ€” the leading dimension of the array D. Constraint: LDD >= max(1,N). ๐Ÿ’œ


QA

QA is a DOUBLE PRECISION array, dimension (LDQA,M). She's all about the left Schur vectors of (A,C):

  • If FACT == "N", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix QA contains the left Schur vectors of (A,C).
  • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.

LDQA

LDQA is INTEGER โ€” the leading dimension of the array QA. Constraint: LDQA >= max(1,M). ๐ŸŽ€


ZA

ZA is a DOUBLE PRECISION array, dimension (LDZA,M). Now we're doing right Schur vectors of (A,C), okurrr:

  • If FACT == "N", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix ZA contains the right Schur vectors of (A,C).
  • If FACT == "H", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.

LDZA

LDZA is INTEGER โ€” the leading dimension of the array ZA. Constraint: LDZA >= max(1,M). โœจ


QB

QB is a DOUBLE PRECISION array, dimension (LDQB,N). Left Schur vectors of (B,D), bestie:

  • If FACT == "N", the matrix QB is an empty N-by-N matrix on input and contains the left Schur vectors of (B,D) on output.
  • If FACT == "F", the matrix QB contains the left Schur vectors of (B,D).
  • If FACT == "H", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
โš ๏ธ heads up: that last FACT == "H" line says M-by-M, not N-by-N. I'm not gonna "fix" it for her โ€” that's literally what the page says, so it stays. ๐Ÿ’€

LDQB

LDQB is INTEGER โ€” the leading dimension of the array QB. Constraint: LDQB >= max(1,N). ๐ŸŒˆ


ZB

ZB is a DOUBLE PRECISION array, dimension (LDZB,N). Right Schur vectors of (B,D), periodt:

  • If FACT == "N", the matrix ZB is an empty N-by-N matrix on input and contains the right Schur vectors of (B,D) on output.
  • If FACT == "F", the matrix ZB contains the right Schur vectors of (B,D).
  • If FACT == "H", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
โš ๏ธ same lil' quirk here: FACT == "H" says M-by-M. Copying the page exactly, no edits. ๐Ÿ™ˆ

LDZB

LDZB is INTEGER โ€” the leading dimension of the array ZB. Constraint: LDZB >= max(1,N). ๐Ÿซถ


E

E is a DOUBLE PRECISION array, dimension (LDE,N).

  • On input, the matrix E contains the right hand side E.
  • On output, the matrix E contains the solution R.

LDE

LDE is INTEGER โ€” the leading dimension of the array E. Constraint: LDE >= max(1,M). ๐ŸŒธ


F

F is a DOUBLE PRECISION array, dimension (LDF,N).

  • On input, the matrix F contains the right hand side F.
  • On output, the matrix F contains the solution L.

LDF

LDF is INTEGER โ€” the leading dimension of the array F. Constraint: LDF >= max(1,M). ๐Ÿ’œ


SCALE

SCALE is DOUBLE PRECISION. She's a scaling factor to prevent the overflow in the result. The tea: 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. So if SCALE is anything but 1, something was lowkey fighting for its life in there. ๐Ÿ˜ญ


WORK

WORK is a DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's workspace for the algorithm. The optimal workspace is given 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.

๐Ÿšจ real talk: the C interface does not support the workspace query by setting LDWORK == -1 on input. In that case, the \ref mepack_memory_frontend function have to be used. No shortcut, bestie.

INFO

INFO is INTEGER. Read her like a mood ring:

== 0:  successful exit
= 1:  DHGGES failed
= 2:  DLA_SORT_GEV failed
= 3:  Inner solver 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. Don't come for me, I'm just the messenger. ๐Ÿ’…


โœ๏ธ Author

Martin Koehler, MPI Magdeburg


๐Ÿ“… Date

October 2025


Definition at line 335 of file cgsylv_dual.c.


๐Ÿ’ซ void mepack_double_ggcsylv_dual_refine

void mepack_double_ggcsylv_dual_refine (const char * TRANSA, const char * TRANSB, const char * GUESS, double SGN1, double SGN2, int M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD, double * R, int LDR, double * L, int LDL, double * E, int LDE, double * F, int LDF, double * AS, int LDAS, double * BS, int LDBS, double * CS, int LDCS, double * DS, int LDDS, double * Q, int LDQ, double * Z, int LDZ, double * U, int LDU, double * V, int LDV, int * MAXIT, double * TAU, double * CONVLOG, double * WORK, size_t LDWORK, int * INFO)

Iterative Refinement for the dual Coupled Generalized Sylvester Equations. She's the glow-up pass, bestie. ๐Ÿงš


Purpose:

mepack_double_ggcsylv_dual_refine solves a generalized coupled Sylvester equation of the following form

   op1(A)**T * R  + op1(C)**T * L               = SCALE * E                             (1)
   SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F

where A and C are M-by-M matrices and B and D are N-by-N matrices. The right hand sides E, F and the solutions R, L are M-by-N matrices.

The equation (1) is the dual to the generalized coupled Sylvester equation

   op1(A) * R + SGN1 * L * op2(B)  = SCALE * E                                          (2)
   op1(C) * R + SGN2 * L * op2(D)  = SCALE * F

The equation (1) is the dual one to equation (2) with respect to the underlying linear system. Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields

        | kron(I, op1(A))   SGN1*kron(op2(B)**T, I) | | Vec R |   | Vec E |
  Z X = |                                           |*|       | = |       |
        | kron(I, op1(C))   SGN2*kron(op2(D)**T, I) | | Vec L |   | Vec F |

Regarding Z**T one obtains

           | kron(I, op1(A)**T )    kron(I, op1(C)**T)   | | Vec R |   | Vec E |
  Z**T X = |                                             |*|       | = |       |
           | SGN1*kron(op2(B), I)   SGN2*kron(op2(D), I) | | Vec L |   | Vec F |

which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). The way that the dual just is the transpose situationโ€ฆ she ate. ๐Ÿ”ฅ


Remarks

This function is a wrapper for dla_ggcsylv_dual_refine.


See also

dla_ggcsylv_dual_refine


Parameters

TRANSA

TRANSA is String. It specifies the form of the system of equations with respect to A and C:

== 'N':  op1(A) = A
== 'T':  op1(A) = A**T

TRANSB

TRANSB is String. It specifies the form of the system of equations with respect to B and D:

== 'N':  op2(B) = B,
== 'T':  op2(B) = B**T

GUESS

GUESS is String. It specifies whether (R,L) contains an initial guess on input or not:

= 'I': (R,L) contains an initial guess for the solution
== 'N': No initial guess is provided. (R,L) are set to zero.
  • SGN1 โ€” DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between in the first equation. ๐ŸŽ€
  • SGN2 โ€” DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between in the second equation. ๐ŸŽ€
  • 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). 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 A. LDB >= max(1,N). ngl bestie, the page literally says A right there and not B โ€” not me fixing it, we keep it exactly how it's written, periodt. ๐Ÿ™ˆ
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The array C contains the original matrix C defining the equation. ๐Ÿ’œ
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M). โœจ
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The array D contains the original matrix D defining the equation. ๐Ÿ’œ
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N). โœจ
  • R โ€” DOUBLE PRECISION array, dimension (LDR,N). On input, the array R contains the initial guess for the first solution. On output, the array R contains the solution R. ๐Ÿซถ
  • LDR โ€” INTEGER. The leading dimension of the array R. LDR >= max(1,M). โœจ
  • L โ€” DOUBLE PRECISION array, dimension (LDL,N). On input, the array L contains the initial guess for the second solution. On output, the array L contains the second solution. ๐Ÿซถ
  • LDL โ€” INTEGER. The leading dimension of the array L. LDL >= max(1,M). โœจ
  • E โ€” DOUBLE PRECISION array, dimension (LDE,N). On input, the array E contains the right hand side E. ๐ŸŒธ
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M). โœจ
  • F โ€” DOUBLE PRECISION array, dimension (LDF,N). On input, the array F contains the right hand side F. ๐ŸŒธ
  • LDF โ€” INTEGER. The leading dimension of the array F. LDF >= max(1,M). โœจ
  • AS โ€” DOUBLE PRECISION array, dimension (LDAS,M). The array AS contains the generalized Schur decomposition of the A. ๐Ÿฆ‹
  • LDAS โ€” INTEGER. The leading dimension of the array AS. LDAS >= max(1,M). โœจ
  • BS โ€” DOUBLE PRECISION array, dimension (LDBS,N). The array BS contains the generalized Schur decomposition of the B. ๐Ÿฆ‹
  • LDBS โ€” INTEGER. The leading dimension of the array BS. LDBS >= max(1,N). โœจ
  • CS โ€” DOUBLE PRECISION array, dimension (LDC,M). The array CS contains the generalized Schur decomposition of the C. ๐Ÿฆ‹
  • LDCS โ€” INTEGER. The leading dimension of the array CS. LDCS >= max(1,M). โœจ
  • DS โ€” DOUBLE PRECISION array, dimension (LDDS,N). The array DS contains the generalized Schur decomposition of the D. ๐Ÿฆ‹
  • LDDS โ€” INTEGER. The leading dimension of the array DS. LDDS >= max(1,N). โœจ
  • Q โ€” DOUBLE PRECISION array, dimension (LDQ,M). The array Q contains the left generalized Schur vectors for (A,C) as returned by DGGES. ๐Ÿ‘‘
  • LDQ โ€” INTEGER. The leading dimension of the array Q. LDQ >= max(1,M). โœจ
  • Z โ€” DOUBLE PRECISION array, dimension (LDZ,M). The array Z contains the right generalized Schur vectors for (A,C) as returned by DGGES. ๐Ÿ‘‘
  • LDZ โ€” INTEGER. The leading dimension of the array Z. LDZ >= max(1,M). โœจ
  • U โ€” DOUBLE PRECISION array, dimension (LDU,N). The array U contains the left generalized Schur vectors for (B,D) as returned by DGGES. ๐Ÿ‘‘
  • LDU โ€” INTEGER. The leading dimension of the array U. LDU >= max(1,N). โœจ
  • V โ€” DOUBLE PRECISION array, dimension (LDV,N). The array V contains the right generalized Schur vectors for (B,D) as returned by DGGES. ๐Ÿ‘‘
  • LDV โ€” INTEGER. The leading dimension of the array V. LDV >= 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 โ€” 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 of both equations before it is solved for the I-Th time. ๐Ÿ“ˆ
  • 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. == 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, do not try the LDWORK=-1 trick here, it's giving C interface and it simply does not go. ๐Ÿ˜ญ

โœ๏ธ Author

Martin Koehler, MPI Magdeburg ๐ŸŒˆ

๐Ÿ“… Date

October 2025 ๐Ÿ“

Definition at line 374 of file cgsylv_dual.c.


๐Ÿฆ‹ mepack_double_ggcsylv_refine ๐Ÿ’œ

Iterative Refinement for the Coupled Generalized Sylvester Equations.

void mepack_double_ggcsylv_refine (const char * TRANSA, const char * TRANSB,
    const char * GUESS, double SGN1, double SGN2, int M, int N, double * A,
    int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD,
    double * R, int LDR, double * L, int LDL, double * E, int LDE, double *
    F, int LDF, double * AS, int LDAS, double * BS, int LDBS, double * CS,
    int LDCS, double * DS, int LDDS, double * Q, int LDQ, double * Z, int
    LDZ, double * U, int LDU, double * V, int LDV, int * MAXIT, double *
    TAU, double * CONVLOG, double * WORK, size_t LDWORK, int * INFO)

โœจ Purpose โœจ

mepack_double_ggcsylv_refine solves a coupled generalized Sylvester equation of the following forms

op1(A) * R  + SGN1 * L  * op2(B) =  E                              (1)
op1(C) * R  + SGN2 * L  * op2(D) =  F

with iterative refinement, Thereby (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side (E,F) and the solution (R,L) are M-by-N matrices. The matrix pencils (A,C) and (B,D) need to be given in the original form as well as in their generalized Schur decomposition since both are required in the iterative refinement procedure. ๐ŸŒŸ

๐Ÿ’… Remarks ๐Ÿ’…

This function is a wrapper for dla_ggcsylv_refine.

๐Ÿ‘€ See also ๐Ÿ‘€

dla_ggcsylv_refine

๐ŸŽ€ Parameters ๐ŸŽ€

  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS โ€” String. Specifies whether (R,L) contains an initial guess on input or not.
    • = 'I': (R,L) contains an initial guess for the solution
    • == 'N': No initial guess is provided. (R,L) are set to zero.
  • SGN1 โ€” DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐ŸŽ€
  • SGN2 โ€” DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. ๐ŸŽ€
  • 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). 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 A. LDB >= max(1,N). (yes bestie, again it says A โ€” same energy as before, we are NOT editing it, iykyk) ๐Ÿ™ˆ
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The array C contains the original matrix C defining the equation. ๐Ÿ’œ
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M). โœจ
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The array D contains the original matrix D defining the equation. ๐Ÿ’œ
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N). โœจ
  • R โ€” DOUBLE PRECISION array, dimension (LDR,N). On input, the array R contains the initial guess for the first solution. On output, the array R contains the solution R. ๐Ÿซถ
  • LDR โ€” INTEGER. The leading dimension of the array R. LDR >= max(1,M). โœจ
  • L
  • L (DOUBLE PRECISION array, dimension (LDL,N)) โ€” on the way in, L is carrying your initial guess for the second solution ๐Ÿซถ. on the way out? it's carrying the actual second solution. character development fr.
  • LDL (INTEGER) โ€” the leading dimension of L. rule of the land: LDL >= max(1,M). no exceptions bestie ๐Ÿ’…
  • E (DOUBLE PRECISION array, dimension (LDE,N)) โ€” on input, E holds the right hand side E. that's it, that's the vibe โœจ
  • LDE (INTEGER) โ€” leading dimension of E. you need LDE >= max(1,M).
  • F (DOUBLE PRECISION array, dimension (LDF,N)) โ€” on input, F holds the right hand side F. iconic, no notes ๐ŸŒธ
  • LDF (INTEGER) โ€” leading dimension of F, and LDF >= max(1,M).
  • AS (DOUBLE PRECISION array, dimension (LDAS,M)) โ€” AS contains the generalized Schur decomposition of the A. it's giving structured ๐Ÿ’œ
  • LDAS (INTEGER) โ€” leading dimension of AS. LDAS >= max(1,M).
  • BS (DOUBLE PRECISION array, dimension (LDBS,N)) โ€” BS contains the generalized Schur decomposition of the B.
  • LDBS (INTEGER) โ€” leading dimension of BS. LDBS >= max(1,N).
  • CS (DOUBLE PRECISION array, dimension (LDCS,M)) โ€” CS contains the generalized Schur decomposition of the C.
  • LDCS (INTEGER) โ€” leading dimension of CS. LDCS >= max(1,M).
  • DS (DOUBLE PRECISION array, dimension (LDDS,N)) โ€” DS contains the generalized Schur decomposition of the D.
  • LDDS (INTEGER) โ€” leading dimension of DS. LDDS >= max(1,N).
  • Q (DOUBLE PRECISION array, dimension (LDQ,M)) โ€” Q contains the left generalized Schur vectors for (A,C) as returned by DGGES. ๐Ÿ’ซ
  • LDQ (INTEGER) โ€” leading dimension of Q. LDQ >= max(1,M).
  • Z (DOUBLE PRECISION array, dimension (LDZ,M)) โ€” Z contains the right generalized Schur vectors for (A,C) as returned by DGGES.
  • LDZ (INTEGER) โ€” leading dimension of Z. LDZ >= max(1,M).
  • U (DOUBLE PRECISION array, dimension (LDU,N)) โ€” U contains the left generalized Schur vectors for (B,D) as returned by DGGES.
  • LDU (INTEGER) โ€” leading dimension of U. LDU >= max(1,N).
  • V (DOUBLE PRECISION array, dimension (LDV,N)) โ€” V contains the right generalized Schur vectors for (B,D) as returned by DGGES. ๐ŸŒˆ
  • LDV (INTEGER) โ€” leading dimension of V. LDV >= max(1,N).
  • MAXIT (INTEGER) โ€” okay so on input, MAXIT is the maximum number of iterations that get performed, and heads up: MAXIT <= 100 ๐Ÿšจ. on exit, MAXIT becomes the number of iteration steps the algorithm actually took. glow-up AND a receipt.
  • TAU (DOUBLE PRECISION) โ€” on input, TAU is the additional security factor for the stopping criterion, and typical values are 0.1. on exit, TAU is the last relative residual from when the stopping criterion got valid. it tells on itself, we love that ๐Ÿ™ˆ
  • CONVLOG (DOUBLE PRECISION array, dimension (MAXIT)) โ€” the CONVLOG array holds the convergence history of the iterative refinement, like a lil diary ๐Ÿ““. CONVLOG(I) contains the maximum relative residual of both equations before it is solved for the I-Th time.
  • WORK (DOUBLE PRECISION array, dimension (MAX(1,LDWORK))) โ€” workspace for the algorithm. the behind-the-scenes bestie.
  • LDWORK (INTEGER) โ€” the size of the workspace for the algorithm. you can figure this out with a call to mepack_memory_frontend.
  • INFO (INTEGER) โ€” the verdict โœจ
    • == 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.

bestie listen. the LDWORK=-1 trick? it does NOT work here. do not try it. call mepack_memory_frontend instead. periodt ๐Ÿ’…

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 353 of file cgsylv.c.


โœจ mepack_double_ggsylv โœจ

void mepack_double_ggsylv (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 * C, int LDC, double * D, int
    LDD, double * QA, int LDQA, double * ZA, int LDZA, double * QB, int
    LDQB, double * ZB, int LDZB, double * X, int LDX, double * SCALE, double
    * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of Generalized Sylvester Equations. main character energy honestly ๐Ÿ‘‘

Purpose

mepack_double_ggsylv solves a generalized Sylvester equation of the following forms

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

or

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

where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X M-by-N matrices. The matrix pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed. ๐Ÿ”ฅ

Remarks

This function is a wrapper for dla_ggsylv.

See also

dla_ggsylv

Parameters

  • FACTA (String) โ€” Specifies how the matrix pencil (A,C) is given. ๐Ÿฆ‹
    • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
    • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
    • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • FACTB (String) โ€” Specifies how the matrix pencil (B,D) is given. ๐Ÿ’ซ
    • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
    • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
    • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • TRANSA (String) โ€” Specifies the form of the system of equations with respect to A and C ๐ŸŽ€
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB (String) โ€” Specifies the form of the system of equations with respect to B and D:
    • == '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. โœจ
    • = 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 FACT == "N", the matrix A is a general matrix and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
    • If FACT == "F", the matrix A contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • LDA (INTEGER) โ€” The leading dimension of the array A. LDA >= max(1,M).
  • B (DOUBLE PRECISION array, dimension (LDB,N)) โ€” ๐ŸŒˆ
    • If FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
    • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
    • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • LDB (INTEGER) โ€” The leading dimension of the array B. LDB >= max(1,N).
  • C (DOUBLE PRECISION array, dimension (LDC,M)) โ€” ๐Ÿ’œ
    • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
    • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • LDC (INTEGER) โ€” The leading dimension of the array C. LDC >= max(1,M).
  • D
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N).
    • If FACT == "N", D is a general matrix and it gets overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
    • If FACT == "F", D already contains its upper triangular matrix V of the Schur decomposition of (B,D).
    • If FACT == "H", D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it gets overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N). ๐Ÿ’…
  • QA โ€” DOUBLE PRECISION array, dimension (LDQA,M).
    • If FACT == "N", QA is an empty M-by-M matrix on input and holds the left Schur vectors of (A,C) on output.
    • If FACT == "F", QA already contains the left Schur vectors of (A,C).
    • If FACT == "H", QA is an empty M-by-M matrix on input and holds the left Schur vectors of (A,C) on output.
  • LDQA โ€” INTEGER. The leading dimension of the array QA. LDQA >= max(1,M). โœจ
  • ZA โ€” DOUBLE PRECISION array, dimension (LDZA,M).
    • If FACT == "N", ZA is an empty M-by-M matrix on input and holds the right Schur vectors of (A,C) on output.
    • If FACT == "F", ZA already contains the right Schur vectors of (A,C).
    • If FACT == "H", ZA is an empty M-by-M matrix on input and holds the right Schur vectors of (A,C) on output.
  • LDZA โ€” INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M). ๐Ÿฆ‹
  • QB โ€” DOUBLE PRECISION array, dimension (LDQB,N).
    • If FACT == "N", QB is an empty N-by-N matrix on input and holds the left Schur vectors of (B,D) on output.
    • If FACT == "F", QB already contains the left Schur vectors of (B,D).
    • If FACT == "H", QB is an empty M-by-M matrix on input and holds the left Schur vectors of (B,D) on output.
okay bestie keep your eyes peeled ๐Ÿ‘€ โ€” yes, that last one really does say M-by-M, not N-by-N. That's straight from the source, no cap. Not my typo, not your typo, we just report it. ๐Ÿซถ
  • LDQB โ€” INTEGER. The leading dimension of the array QB. LDQB >= max(1,N). ๐Ÿ’–
  • ZB โ€” DOUBLE PRECISION array, dimension (LDZB,N).
    • If FACT == "N", ZB is an empty N-by-N matrix on input and holds the right Schur vectors of (B,D) on output.
    • If FACT == "F", ZB already contains the right Schur vectors of (B,D).
    • If FACT == "H", ZB is an empty M-by-M matrix on input and holds the right Schur vectors of (B,D) on output.
  • LDZB โ€” INTEGER. The leading dimension of the array ZB. LDZB >= max(1,N). ๐ŸŒธ
  • X โ€” DOUBLE PRECISION array, dimension (LDX,N).
    • On input, X holds the right hand side Y.
    • On output, X holds 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. It's the scaling factor that keeps the result from overflowing, bestie โ€” it's literally here to protect your numbers. 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 โ€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given 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 that case, you have to use the \ref mepack_memory_frontend function. ๐Ÿ’€
  • INFO โ€” INTEGER, the receipts:
    • == 0: successful exit ๐ŸŽ‰
    • = 1: DHGGES failed
    • = 2: DLA_SORT_GEV failed
    • = 3: Inner solver 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 has to use the mepack_memory_frontend function for this purpose.

fr fr, do not try the -1 trick here, it will not slay, it will simply not work. ๐Ÿซ 

Author โœ๏ธ

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 303 of file ggsylv.c.


void mepack_double_ggsylv_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 * C, int LDC, double * D, int LDD, double *
    X, int LDX, double * Y, int LDY, double * AS, int LDAS, double * BS, int
    LDBS, double * CS, int LDCS, double * DS, int LDDS, double * Q, int LDQ,
    double * Z, int LDZ, double * U, int LDU, double * V, int LDV, int *
    MAXIT, double * TAU, double * CONVLOG, double * WORK, size_t LDWORK, int
    * INFO)

Iterative Refinement for the Generalized Sylvester Equations. โœจ๐Ÿ’…

Purpose:

mepack_double_ggsylv_refine solves a generalized Sylvester equation of the following forms

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

with iterative refinement. Thereby (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X are M-by-N matrices.

The matrix pencils (A,C) and (B,D) need to be given in the original form as well as in their generalized Schur decomposition, since both are required in the iterative refinement procedure. Like, you can't skip one, bestie, they both pull their weight. ๐Ÿซถ

Remarks

This function is a wrapper for dla_ggsylv_refine. ๐Ÿ’ซ

See also

dla_ggsylv_refine

Parameters

  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” String. Specifies the form of the system of equations with respect to B and D:
    • == '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 โ€” DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐Ÿ’…
  • 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). 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).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The array C contains the original matrix C defining the equation.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The array D contains the original matrix D defining the equation.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 generalized Schur decomposition of the A.
  • LDAS โ€” INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • BS โ€” DOUBLE PRECISION array, dimension (LDBS,N). The array BS contains the generalized Schur decomposition of the B.
  • LDBS โ€” INTEGER. The leading dimension of the array BS. LDBS >= max(1,N).
  • CS โ€” DOUBLE PRECISION array, dimension (LDCS,M). The array CS contains the generalized Schur decomposition of the C.
  • LDCS โ€” INTEGER. The leading dimension of the array CS. LDCS >= max(1,M).
  • DS โ€” DOUBLE PRECISION array, dimension (LDDS,N). The array DS contains the generalized Schur decomposition of the D.
  • LDDS โ€” INTEGER. The leading dimension of the array DS. LDDS >= max(1,N).
  • Q โ€” DOUBLE PRECISION array, dimension (LDQ,M). The array Q contains the left generalized Schur vectors for (A,C) as returned by DGGES.
  • LDQ โ€” INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • Z โ€” DOUBLE PRECISION array, dimension (LDZ,M). The array Z contains the right generalized Schur vectors for (A,C) as returned by DGGES.
  • LDZ โ€” INTEGER. The leading dimension of the array Z. LDZ >= max(1,M).
  • U โ€” DOUBLE PRECISION array, dimension (LDU,N). The array U contains the left generalized Schur vectors for (B,D) as returned by DGGES.
  • LDU โ€” INTEGER. The leading dimension of the array U. LDU >= max(1,N).
  • V โ€” ๐ŸŒธ to be continued, bestie...

V โ€” V is a DOUBLE PRECISION array, dimension (LDV,N). She's holding the right generalized Schur vectors for (B,D), literally exactly as DGGES handed them over. no editing, no vibes, just receipts. ๐Ÿ’…

LDV

LDV is INTEGER. It's the leading dimension of the array V, and LDV >= max(1,N). that's the rule, bestie, don't fight it.

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

so it comes in as a limit and leaves as a flex. ๐Ÿ’€

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

she's giving "before and after" โœจ

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. it's the diary, the group chat scrollback, the whole storyline ๐ŸŒธ

WORK

WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. just the little backstage area, yk? ๐ŸŽ€

LDWORK

LDWORK is INTEGER. Size of the workspace for the algorithm. This can be determined by a call to 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.

bestie. i am begging. the LDWORK=-1 trick? iconic in Fortran, absolutely does NOT hit in C. use mepack_memory_frontend instead, periodt. ๐Ÿšซ

๐Ÿซถ Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 324 of file ggsylv.c.


๐Ÿฆ‹ void mepack_single_ggcsylv ๐Ÿฆ‹

void mepack_single_ggcsylv (const char * FACTA, const char * FACTB, const
    char * TRANSA, const char * TRANSB, float SGN1, float SGN2, int M, int
    N, float * A, int LDA, float * B, int LDB, float * C, int LDC, float *
    D, int LDD, float * QA, int LDQA, float * ZA, int LDZA, float * QB, int
    LDQB, float * ZB, int LDZB, float * E, int LDE, float * F, int LDF,
    float * SCALE, float * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of Coupled Generalized Sylvester Equations. ๐ŸŽ€

โœจ Purpose โœจ

mepack_single_ggcsylv solves a generalized Sylvester equation of the following forms

op1(A) * R  + SGN1 * L  * op2(B) = SCALE * E                              (1)
op1(C) * R  + SGN2 * L  * op2(D) = SCALE * F

where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side (E,F) and the solution (R,L) M-by-N matrices. The matrix pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed. ๐Ÿฆ‹

๐Ÿ’œ Remarks ๐Ÿ’œ

This function is a wrapper for sla_ggcsylv.

๐Ÿ‘€ See also ๐Ÿ‘€

sla_ggcsylv

๐ŸŒˆ Parameters ๐ŸŒˆ

FACTA

FACTA is String. Specifies how the matrix pencil (A,C) is given.

  • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
  • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.

FACTB

FACTB is String. Specifies how the matrix pencil (B,D) is given.

  • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
  • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.

TRANSA

TRANSA is String. Specifies the form of the system of equations with respect to A and C:

  • == '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 and D:

  • == 'N': op2(B) = B,
  • == 'T': op2(B) = B**T

SGN1

SGN1 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐Ÿ’…

SGN2

SGN2 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. ๐Ÿ’…

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 FACT == "N", the matrix A is a general matrix and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix A contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).

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 FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).

LDB

LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).

C

C is DOUBLE PRECISION array, dimension (LDC,M).

  • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).

LDC

LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).

D

D is DOUBLE PRECISION array, dimension (LDD,N).

  • If FACT == "N", the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix D contains its upper triangular matrix V of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).

LDD

LDD is INTEGER. The leading dimension of the array D. LDD >= 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 left Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix QA contains the left Schur vectors of (A,C).
  • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.

LDQA

LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).

ZA

ZA is DOUBLE PRECISION array, dimension (LDZA,M).

  • If FACT == "N", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix ZA contains the right Schur vectors of (A,C).
  • If FACT == "H", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.

LDZA

LDZA is INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M).

QB

QB is DOUBLE PRECISION array, dimension (LDQB,M).

  • If FACT == "N", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
  • If FACT == "F", the matrix QB contains the left Schur vectors of (B,D).
  • If FACT == "H", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.

LDQB

LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,M).

ZB

ZB is DOUBLE PRECISION array, dimension (LDZB,M).

  • If FACT == "N", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
  • If FACT == "F", the matrix ZB contains the right Schur vectors of (B,D).
  • If FACT == "H", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.

LDZB

LDZB is INTEGER. The leading dimension of the array ZB. LDZB >= max(1,M).

E

E is DOUBLE PRECISION array, dimension (LDE,N).

  • On input, the matrix E contains the right hand side E.
  • On output, the matrix E contains the solution R.

the glow-up is real, she literally becomes the answer โœจ

LDE

LDE is INTEGER. The leading dimension of the array X. LDE >= max(1,M).

F

so F, right โ€” it's a DOUBLE PRECISION array, dimension (LDF,N). ๐ŸŽ€

On input, the matrix F contains the right hand side F. On output, that very same matrix F contains the solution L. yes bestie, same array, it gets overwritten โ€” that's just the vibe ๐Ÿ™ˆ

LDF

LDF is INTEGER. It's the leading dimension of the array X. LDF >= max(1,M). (it says X, no we're not fixing it, it literally says X, iykyk ๐Ÿ’€)

SCALE

SCALE is DOUBLE PRECISION.

SCALE is a scaling factor whose whole entire job is 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, then 0 < SCALE <= 1 holds true.

WORK

WORK is a DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm, and the optimal workspace is handed to you by \ref mepack_memory_frontend. โœจ

LDWORK

LDWORK is INTEGER. It's the 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 that case you have to use the \ref mepack_memory_frontend function instead. fr fr.

INFO

INFO is INTEGER:

  • == 0: successful exit ๐ŸŽ‰
  • = 1: DHGGES failed ๐Ÿ˜ญ
  • = 2: DLA_SORT_GEV failed ๐Ÿ˜ญ
  • = 3: Inner solver 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 has to use the mepack_memory_frontend function for this purpose. periodt.

Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

Date ๐Ÿ—“๏ธ

October 2025

Definition at line 644 of file cgsylv.c.


mepack_single_ggcsylv_dual ๐Ÿ’…

void mepack_single_ggcsylv_dual (const char * FACTA, const char * FACTB,
    const char * TRANSA, const char * TRANSB, float SGN1, float SGN2, int M,
    int N, float * A, int LDA, float * B, int LDB, float * C, int LDC, float
    * D, int LDD, float * QA, int LDQA, float * ZA, int LDZA, float * QB,
    int LDQB, float * ZB, int LDZB, float * E, int LDE, float * F, int LDF,
    float * SCALE, float * WORK, size_t LDWORK, int * INFO)

Frontend for the solution of the dual Coupled Generalized Sylvester Equations. bestie this one's the single precision sibling and it's lowkey iconic ๐ŸŒˆ

Purpose โœจ

mepack_single_ggcsylv_dual solves a generalized coupled Sylvester equation of the following form

   op1(A)**T * R  + op1(C)**T * R               = SCALE * E                             (1)
   SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F

where A and C are M-by-M matrices and B and D are N-by-N matrices. The right hand sides E, F and the solutions R, L are M-by-N matrices.

The equation (1) is the dual to the generalized coupled Sylvester equation

   op1(A) * R + SGN1 * L * op2(B)  = SCALE * E                                          (2)
   op1(C) * R + SGN2 * L * op2(D)  = SCALE * F

The equation (1) is the dual one to equation (2) with respect to the underlying linear system. Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields

        | kron(I, op1(A))   SGN1*kron(op2(B)**T, I) | | Vec R |   | Vec E |
  Z X = |                                           |*|       | = |       |
        | kron(I, op1(C))   SGN2*kron(op2(D)**T, I) | | Vec L |   | Vec F |

Regarding Z**T one obtains

           | kron(I, op1(A)**T )    kron(I, op1(C)**T)   | | Vec R |   | Vec E |
  Z**T X = |                                             |*|       | = |       |
           | SGN1*kron(op2(B), I)   SGN2*kron(op2(D), I) | | Vec L |   | Vec F |

which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). ๐Ÿ‘‘

Remarks

This function is a wrapper for sla_ggcsylv_dual.

See also

sla_ggcsylv_dual

Parameters ๐ŸŽ€

FACTA

FACTA is String.

Specifies how the matrix pencil (A,C) is given.

  • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
  • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.

FACTB

FACTB is String.

Specifies how the matrix pencil (B,D) is given.

  • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
  • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.

TRANSA

TRANSA is String.

Specifies the form of the system of equations with respect to A and C:

  • == '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 and D:

  • == 'N': op2(B) = B,
  • == 'T': op2(B) = B**T

SGN1

SGN1 is SINGLE PRECISION, allowed values: +/-1.

Specifies the sign between in the first equation.

SGN2

SGN2 is SINGLE PRECISION, allowed values: +/-1.

Specifies the sign between in the second equation.

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 SINGLE PRECISION array, dimension (LDA,M).

  • If FACT == "N", the matrix A is a general matrix and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix A contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).

LDA

LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).

B

B is SINGLE PRECISION array, dimension (LDB,N).

  • If FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).

LDB

LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).

C

C is SINGLE PRECISION array, dimension (LDC,M).

  • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
  • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).

LDC

LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).

D

D is SINGLE PRECISION array, dimension (LDD,N).

  • If FACT == "N", the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • If FACT == "F", the matrix D contains its upper triangular matrix V of the Schur decomposition of (B,D).
  • If FACT == "H", the matrix D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).

LDD

LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).

QA

QA is SINGLE PRECISION array, dimension (LDQA,M).

  • If FACT == "N", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix QA contains the left Schur vectors of (A,C).
  • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.

LDQA

LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).

ZA

ZA is SINGLE PRECISION array, dimension (LDZA,M).

  • If FACT == "N", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
  • If FACT == "F", the matrix ZA contains the right Schur vectors of (A,C).
  • If FACT == "H", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.

LDZA

LDZA is INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M).

QB

QB is SINGLE PRECISION array, dimension (LDQB,M).

  • If FACT == "N", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
  • If FACT == "F", the matrix QB contains the left Schur vectors of (B,D).
  • If FACT == "H", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.

LDQB

LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,M).

ZB

  • ZB โ€” ZB is a SINGLE PRECISION array, dimension (LDZB,M). ๐Ÿ’ซ
    • If FACT == "N", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
    • If FACT == "F", the matrix ZB contains the right Schur vectors of (B,D).
    • If FACT == "H", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
  • LDZB โ€” LDZB is INTEGER. It's the leading dimension of the array ZB, and bestie, LDZB >= max(1,M). no exceptions โœจ
  • E โ€” E is a SINGLE PRECISION array, dimension (LDE,N). On input, the matrix E holds the right hand side E. On output, the matrix E holds the solution R. it's giving glow-up ๐Ÿ’…
  • LDE โ€” LDE is INTEGER. The leading dimension of the array X. LDE >= max(1,M).
  • F โ€” F is a SINGLE PRECISION array, dimension (LDF,N). On input, the matrix F holds the right hand side F. On output, the matrix F holds the solution L. ๐Ÿฆ‹
  • LDF โ€” LDF is INTEGER. The leading dimension of the array X. LDF >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. It's the scaling factor that keeps the result from overflowing, aka the moment of self-control ๐Ÿ™ˆ. 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 SINGLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm, and the optimal workspace is given by \ref mepack_memory_frontend. ๐Ÿ‘‘
  • LDWORK โ€” LDWORK is INTEGER. It's the 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, you have to use the \ref mepack_memory_frontend function. periodt.
  • INFO โ€” INFO is INTEGER, and it's literally the vibe check on how it all went down:
    • == 0: successful exit ๐ŸŽ‰
    • = 1: DHGGES failed ๐Ÿ˜ญ
    • = 2: DLA_SORT_GEV failed ๐Ÿ’€
    • = 3: Inner solver 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. You have to use the mepack_memory_frontend function for this purpose. fr fr, don't try it the other way. ๐Ÿซถ


๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg


๐ŸŽ€ Date ๐ŸŽ€

October 2025


Definition at line 677 of file cgsylv_dual.c.


void mepack_single_ggcsylv_dual_refine (const char * TRANSA, const char *
    TRANSB, const char * GUESS, float SGN1, float SGN2, int M, int N, float
    * A, int LDA, float * B, int LDB, float * C, int LDC, float * D, int
    LDD, float * R, int LDR, float * L, int LDL, float * E, int LDE, float *
    F, int LDF, float * AS, int LDAS, float * BS, int LDBS, float * CS, int
    LDCS, float * DS, int LDDS, float * Q, int LDQ, float * Z, int LDZ,
    float * U, int LDU, float * V, int LDV, int * MAXIT, float * TAU, float
    * CONVLOG, float * WORK, size_t LDWORK, int * INFO)

okay so this one is the Iterative Refinement for the dual Coupled Generalized Sylvester Equations. yeah. the whole name. iconic. ๐Ÿ”ฅ


โœจ Purpose โœจ

mepack_single_ggcsylv_dual_refine solves a generalized coupled Sylvester equation of the following form:

   op1(A)**T * R  + op1(C)**T * R               = SCALE * E                             (1)
   SGN1 * R * op2(B)**T + SGN2 * L * op2(D)** T = SCALE * F

where A and C are M-by-M matrices and B and D are N-by-N matrices. The right hand sides E, F and the solutions R, L are M-by-N matrices.

The equation (1) is the dual to the generalized coupled Sylvester equation:

   op1(A) * R + SGN1 * L * op2(B)  = SCALE * E                                          (2)
   op1(C) * R + SGN2 * L * op2(D)  = SCALE * F

The equation (1) is the dual one to equation (2) with respect to the underlying linear system. Let Z be the matrix formed by rewriting (2) into its Kronecker form. This yields:

        | kron(I, op1(A))   SGN1*kron(op2(B)**T, I) | | Vec R |   | Vec E |
  Z X = |                                           |*|       | = |       |
        | kron(I, op1(C))   SGN2*kron(op2(D)**T, I) | | Vec L |   | Vec F |

Regarding Z**T one obtains:

           | kron(I, op1(A)**T )    kron(I, op1(C)**T)   | | Vec R |   | Vec E |
  Z**T X = |                                             |*|       | = |       |
           | SGN1*kron(op2(B), I)   SGN2*kron(op2(D), I) | | Vec L |   | Vec F |

which belongs to the Sylvester equation (1). For this reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). lowkey elegant ngl ๐Ÿ’œ


๐ŸŒˆ Remarks ๐ŸŒˆ

This function is a wrapper for sla_ggcsylv_dual_refine.


๐Ÿงš See also ๐Ÿงš

sla_ggcsylv_dual_refine


๐Ÿ’œ Parameters ๐Ÿ’œ

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • GUESS โ€” GUESS is String. It says whether (R,L) has an initial guess on input or not:
    • = 'I': (R,L) contains an initial guess for the solution
    • == 'N': No initial guess is provided. (R,L) are set to zero.
  • SGN1 โ€” SGN1 is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between in the first equation.
  • SGN2 โ€” SGN2 is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between in the second equation.
  • 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 a SINGLE 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 a SINGLE 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 A. LDB >= max(1,N). (yes bestie, it says A โ€” we keep it exactly as written ๐Ÿซ )
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The array C contains the original matrix C defining the equation.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDA,N). The array D contains the original matrix D defining the equation.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • R โ€” R is a SINGLE PRECISION array, dimension (LDR,N). On input, the array R contains the initial guess for the first solution. On output, the array R contains the solution R. ๐Ÿ’ซ
  • LDR โ€” LDR is INTEGER. The leading dimension of the array R. LDR >= max(1,M).
  • L โ€” L is a SINGLE PRECISION array, dimension (LDL,N). On input, the array L contains the initial guess for the second solution. On output, the array L contains the second solution.
  • LDL โ€” LDL is INTEGER. The leading dimension of the array L. LDL >= max(1,M).
  • E โ€” E is a SINGLE PRECISION array, dimension (LDE,N). On input, the array E contains the right hand side E.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is a SINGLE PRECISION array, dimension (LDF,N). On input, the array F contains the right hand side F.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDF >= max(1,M).
  • AS โ€” AS is a SINGLE PRECISION array, dimension (LDAS,M). The array AS contains the generalized Schur decomposition of the A.
  • LDAS โ€” LDAS is INTEGER. The leading dimension of the array AS. LDAS >= max(1,M).
  • BS โ€” BS is a SINGLE PRECISION array, dimension (LDBS,N). The array AS contains the generalized Schur decomposition of the B.
  • LDBS โ€” LDBS is INTEGER. The leading dimension of the array BS. LDBS >= max(1,N).
  • CS โ€” CS is a SINGLE PRECISION array, dimension (LDCS,M). The array CS contains the generalized Schur decomposition of the C.
  • LDCS โ€” LDCS is INTEGER. The leading dimension of the array CS. LDCS >= max(1,M).
  • DS โ€” DS is a SINGLE PRECISION array, dimension (LDDS,N). The array DS contains the generalized Schur decomposition of the D.
  • LDDS โ€” LDDS is INTEGER. The leading dimension of the array DS. LDAS >= max(1,N). (again, it says LDAS โ€” copying verbatim, no cap ๐Ÿ’€)
  • Q โ€” Q is a SINGLE PRECISION array, dimension (LDQ,M). The array Q contains the left generalized Schur vectors for (A,C) as returned by DGGES.
  • LDQ โ€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M).
  • Z โ€” Z is a SINGLE PRECISION array, dimension (LDZ,M). The array Z contains the right generalized Schur vectors for (A,C) as returned by DGGES.
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,M).
  • U โ€” U is a SINGLE PRECISION array, dimension (LDU,N). The array U contains the left generalized Schur vectors for (B,D) as returned by DGGES.
  • LDU โ€” LDU is INTEGER. The leading dimension of the array U. LDU >= max(1,N).
  • V โ€” V is a SINGLE PRECISION array, dimension (LDV,N). The array V contains the right generalized Schur vectors for (B,D) as returned by DGGES.
  • LDV โ€” LDV is INTEGER. The leading dimension of the array V. LDV >= 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 SINGLE PRECISION โœจ

On the way in, TAU is holding the extra security factor for the stopping criterion โ€” typical values are 0.1. On the way out, TAU has the last relative residual from when the stopping criterion got valid. It's giving โœจbefore-and-afterโœจ, bestie.

  • CONVLOG โ€” CONVLOG is a SINGLE PRECISION array, dimension (MAXIT) ๐Ÿ“ˆ

The CONVLOG array is literally the convergence history of the iterative refinement, bestie โ€” receipts on receipts. CONVLOG(I) holds the maximum relative residual of both equations before it gets solved for the I-Th time. No cap.

  • WORK โ€” WORK is a SINGLE PRECISION array, dimension (MAX(1,LDWORK)) ๐Ÿ› ๏ธ

It's the workspace for the algorithm. Just vibing there, holding numbers.

  • LDWORK โ€” LDWORK is INTEGER ๐Ÿ”ข

Size of the workspace for the algorithm. You can figure this out by calling \ref mepack_memory_frontend. She'll tell you. ๐Ÿ’…

  • INFO โ€” INFO is INTEGER ๐Ÿ“‹
    • == 0: Success โ€” slay, we ate โœจ
    • > 0: Iteration failed in step INFO โ€” not the vibe ๐Ÿ˜ญ
    • < 0: if INFO == -i, the i-Th argument had an illegal value โ€” bestie what did you do ๐Ÿ™ˆ

Attention โ€” The Fortran/LAPACK-like workspace query where you set LDWORK=-1 on input will not work in the C interface. Fr fr. You have to use the mepack_memory_frontend function for this purpose instead. Periodt.

Author Martin Koehler, MPI Magdeburg ๐Ÿซถ

Date October 2025 ๐ŸŒธ

Definition at line 763 of file cgsylv_dual.c.


   void mepack_single_ggcsylv_refine (const char * TRANSA, const char * TRANSB,
       const char * GUESS, float SGN1, float SGN2, int M, int N, float * A, int
       LDA, float * B, int LDB, float * C, int LDC, float * D, int LDD, float *
       R, int LDR, float * L, int LDL, float * E, int LDE, float * F, int LDF,
       float * AS, int LDAS, float * BS, int LDBS, float * CS, int LDCS, float
       * DS, int LDDS, float * Q, int LDQ, float * Z, int LDZ, float * U, int
       LDU, float * V, int LDV, int * MAXIT, float * TAU, float * CONVLOG,
       float * WORK, size_t LDWORK, int * INFO)

Iterative Refinement for the Coupled Generalized Sylvester Equations. ๐Ÿ‘‘

Purpose: ๐Ÿ’–

mepack_single_ggcsylv_refine solves a coupled generalized Sylvester equation of the following forms

     op1(A) * R  + SGN1 * L  * op2(B) =  E                              (1)
     op1(C) * R  + SGN2 * L  * op2(D) =  F

with iterative refinement. Thereby (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side (E,F) and the solution (R,L) are M-by-N matrices. The matrix pencils (A,C) and (B,D) need to be given in the original form as well as in their generalized Schur decomposition โ€” because both are required in the iterative refinement procedure. It's giving "you need both outfits for the function to slay", bestie. ๐Ÿ‘—โœจ

Remarks ๐ŸŽ€

This function is a wrapper for sla_ggcsylv_refine. She's the front, but the real one is behind her. Iykyk. ๐Ÿ’…

See also ๐Ÿ”

sla_ggcsylv_refine


Parameters ๐Ÿซถ

  • TRANSA โ€” TRANSA is String ๐ŸŒˆ

Specifies the form of the system of equations with respect to A and C:

  • == '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 and D:

  • == 'N': op2(B) = B,
  • == 'T': op2(B) = B**T
  • GUESS โ€” GUESS is String ๐Ÿ”ฎ

Specifies whether (R,L) contains an initial guess on input or not.

  • = 'I': (R,L) contains an initial guess for the solution
  • == 'N': No initial guess is provided. (R,L) are set to zero.
  • SGN1 โ€” SGN1 is SINGLE PRECISION, allowed values: +/-1 โž•โž–

Specifies the sign between in the first equation.

  • SGN2 โ€” SGN2 is SINGLE PRECISION, allowed values: +/-1 โž•โž–

Specifies the sign between in the second equation.

  • 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 a SINGLE 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 a SINGLE 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 A. LDB >= max(1,N).

  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M) ๐Ÿ“

The array C contains the original matrix C defining the equation.

  • LDC โ€” LDC is INTEGER ๐Ÿ”ข

The leading dimension of the array C. LDC >= max(1,M).

  • D โ€” D is a SINGLE PRECISION array, dimension (LDA,N) ๐Ÿ“

The array D contains the original matrix D defining the equation.

  • LDD โ€” LDD is INTEGER ๐Ÿ”ข

The leading dimension of the array D. LDD >= max(1,N).

  • R โ€” R is a SINGLE PRECISION array, dimension (LDR,N) ๐Ÿ’œ

On input, the array R contains the initial guess for the first solution. On output, the array R contains the solution R.

  • LDR โ€” LDR is INTEGER ๐Ÿ”ข

The leading dimension of the array R. LDR >= max(1,M).

  • L โ€” L is a SINGLE PRECISION array, dimension (LDL,N) ๐Ÿ’œ

On input, the array L contains the initial guess for the second solution. On output, the array L contains the second solution.

  • LDL โ€” LDL is INTEGER ๐Ÿ”ข

The leading dimension of the array L. LDL >= max(1,M).

  • E โ€” E is a SINGLE PRECISION array, dimension (LDE,N) ๐ŸŒธ

On input, the array E contains the right hand side E.

  • LDE โ€” LDE is INTEGER ๐Ÿ”ข

The leading dimension of the array E. LDE >= max(1,M).

  • F โ€” F is a SINGLE PRECISION array, dimension (LDF,N) ๐ŸŒธ

On input, the array F contains the right hand side F.

  • LDF โ€” LDF is INTEGER ๐Ÿ”ข

The leading dimension of the array F. LDF >= max(1,M).

  • AS โ€” AS is a SINGLE PRECISION array, dimension (LDAS,M) โœจ

The array AS contains the generalized Schur decomposition of the A.

  • LDAS โ€” LDAS is INTEGER ๐Ÿ”ข

The leading dimension of the array AS. LDAS >= max(1,M).

  • BS โ€” BS is a SINGLE PRECISION array, dimension (LDBS,N) โœจ

The array AS contains the generalized Schur decomposition of the B.

  • LDBS โ€” LDBS is INTEGER ๐Ÿ”ข

The leading dimension of the array BS. LDBS >= max(1,N).

  • CS โ€” CS is a SINGLE PRECISION array, dimension (LDCS,M) โœจ

The array CS contains the generalized Schur decomposition of the C.

  • LDCS โ€” LDCS is INTEGER ๐Ÿ”ข

The leading dimension of the array CS. LDCS >= max(1,M).

  • DS โ€” DS is a SINGLE PRECISION array, dimension (LDDS,N) โœจ

The array DS contains the generalized Schur decomposition of the D.

  • LDDS โ€” LDDS is INTEGER ๐Ÿ”ข

The leading dimension of the array DS. LDAS >= max(1,N).

  • Q โ€” Q is a SINGLE PRECISION array, dimension (LDQ,M) ๐Ÿฆ‹

The array Q contains the left generalized Schur vectors for (A,C) as returned by DGGES.

  • LDQ โ€” LDQ is INTEGER ๐Ÿ”ข

The leading dimension of the array Q. LDQ >= max(1,M).

  • Z โ€” Z is a SINGLE PRECISION array, dimension (LDZ,M) ๐Ÿฆ‹

The array Z contains the right generalized Schur vectors for (A,C) as returned by DGGES.

  • LDZ โ€” LDZ is INTEGER ๐Ÿ”ข

The leading dimension of the array Z. LDZ >= max(1,M).

  • U โ€” U is a SINGLE PRECISION array, dimension (LDU,N) ๐Ÿฆ‹

The array U contains the left generalized Schur vectors for (B,D) as returned by DGGES.

  • LDU โ€” LDU is INTEGER ๐Ÿ”ข

The leading dimension of the array U. LDU >= max(1,N).

  • V โ€” V is a SINGLE PRECISION array, dimension (LDV,N) ๐Ÿฆ‹

The array V contains the right generalized Schur vectors for (B,D) as returned by DGGES.

  • LDV โ€” LDV is INTEGER ๐Ÿ”ข

The leading dimension of the array V. LDV >= 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 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 โ€” CONVLOG is a SINGLE PRECISION array, dimension (MAXIT) ๐Ÿ“ˆ

The CONVLOG array contains the convergence history of the iterative refinement. CONVLOG(I) contains the maximum relative residual of both equations before it is solved for the I-Th time.

  • WORK โ€” WORK is a SINGLE 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. Don't come for me, that's just how it is. ๐Ÿ’…

Author Martin Koehler, MPI Magdeburg ๐Ÿซถ

Date October 2025 ๐ŸŒธ

Definition at line 722 of file cgsylv.c.


   void mepack_single_ggsylv (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 * C, int LDC, float * D, int LDD,
       float * QA, int LDQA, float * ZA, int LDZA, float * QB, int LDQB, float
       * ZB, int LDZB, float * X, int LDX, float * SCALE, float * WORK, size_t
       LDWORK, int * INFO)

Frontend for the solution of Generalized Sylvester Equations. ๐Ÿ‘‘

Purpose: ๐Ÿ’–

mepack_single_ggsylv solves a generalized Sylvester equation of the following forms

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

or

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

where (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X M-by-N matrices. The matrix pencils (A,C) and (B,D) can be either given as general unreduced matrices, as generalized Hessenberg form, or in terms of their generalized Schur decomposition. If they are given as general matrices or as a generalized Hessenberg form their generalized Schur decomposition will be computed.

๐Ÿ’ซ Remarks ๐Ÿ’ซ

This function is a wrapper for sla_ggsylv.

๐Ÿ‘€ See also ๐Ÿ‘€

sla_ggsylv


๐ŸŽ€ Parameters ๐ŸŽ€

  • FACTA โ€” okay bestie, FACTA is a String and it tells us how the matrix pencil (A,C) is given. Pick one:
    • == 'N': The matrix pencil (A,C) is given as a general matrices and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
    • == 'F': The matrix pencil (A,C) is already in generalized Schur form and S, R, QA, and ZA are given.
    • == 'H': The matrix pencil (A,C) is given in generalized Hessenberg form and its Schur decomposition A = QA*S*ZA**T, C = QA*R*ZA**T will be computed.
  • FACTB โ€” FACTB is a String too, and it says how the matrix pencil (B,D) is given:
    • == 'N': The matrix pencil (B,D) is given as a general matrices and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
    • == 'F': The matrix pencil (B,D) is already in generalized Schur form and U, V, QB, and ZB are given.
    • == 'H': The matrix pencil (B,D) is given in generalized Hessenberg form and its Schur decomposition B = QB*U*ZB**T, D = QB*V*ZB**T will be computed.
  • TRANSA โ€” TRANSA is a String, and it sets the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A
    • == 'T': op1(A) = A**T
  • TRANSB โ€” TRANSB is a String, and it sets the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B,
    • == 'T': op2(B) = B**T
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. It's literally just 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 SINGLE PRECISION array, dimension (LDA,M). Depends on your vibe, i.e. your FACT:
    • If FACT == "N", the matrix A is a general matrix and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
    • If FACT == "F", the matrix A contains its (quasi-) upper triangular matrix S of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix A is an upper Hessenberg matrix of the generalized Hessenberg form (A,C) and it is overwritten with the (quasi-) upper triangular factor S of the Schur decomposition of (A,C).
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N):
    • If FACT == "N", the matrix B is a general matrix and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
    • If FACT == "F", the matrix B contains its (quasi-) upper triangular matrix U of the Schur decomposition of (B,D).
    • If FACT == "H", the matrix B is an upper Hessenberg matrix of the generalized Hessenberg form (B,D) and it is overwritten with the (quasi-) upper triangular factor U of the Schur decomposition of (B,D).
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is SINGLE PRECISION array, dimension (LDC,M):
    • If FACT == "N", the matrix C is a general matrix and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
    • If FACT == "F", the matrix C contains its upper triangular matrix R of the Schur decomposition of (A,C).
    • If FACT == "H", the matrix C is the upper triangular matrix of the generalized Hessenberg form (A,C) and it is overwritten with the upper triangular factor R of the Schur decomposition of (A,C).
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N):
    • If FACT == "N", the matrix D is a general matrix and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
    • If FACT == "F", the matrix D contains its upper triangular matrix V of the Schur decomposition of (B,D).
    • If FACT == "H", the matrix D is the upper triangular matrix of the generalized Hessenberg form (B,D) and it is overwritten with the upper triangular factor V of the Schur decomposition of (B,D).
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • QA โ€” QA is SINGLE PRECISION array, dimension (LDQA,M):
    • If FACT == "N", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
    • If FACT == "F", the matrix QA contains the left Schur vectors of (A,C).
    • If FACT == "H", the matrix QA is an empty M-by-M matrix on input and contains the left Schur vectors of (A,C) on output.
  • LDQA โ€” LDQA is INTEGER. The leading dimension of the array QA. LDQA >= max(1,M).
  • ZA โ€” ZA is SINGLE PRECISION array, dimension (LDZA,M):
    • If FACT == "N", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
    • If FACT == "F", the matrix ZA contains the right Schur vectors of (A,C).
    • If FACT == "H", the matrix ZA is an empty M-by-M matrix on input and contains the right Schur vectors of (A,C) on output.
  • LDZA โ€” LDZA is INTEGER. The leading dimension of the array ZA. LDZA >= max(1,M).
  • QB โ€” QB is SINGLE PRECISION array, dimension (LDQB,M):
    • If FACT == "N", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
    • If FACT == "F", the matrix QB contains the left Schur vectors of (B,D).
    • If FACT == "H", the matrix QB is an empty M-by-M matrix on input and contains the left Schur vectors of (B,D) on output.
  • LDQB โ€” LDQB is INTEGER. The leading dimension of the array QB. LDQB >= max(1,M).
  • ZB โ€” ZB is SINGLE PRECISION array, dimension (LDZB,M):
    • If FACT == "N", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
    • If FACT == "F", the matrix ZB contains the right Schur vectors of (B,D).
    • If FACT == "H", the matrix ZB is an empty M-by-M matrix on input and contains the right Schur vectors of (B,D) on output.
  • LDZB โ€” LDZB is INTEGER. The leading dimension of the array ZB. LDZB >= 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). 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).
no that's not a typo bestie, that's literally what the page says ๐Ÿ˜ญ LDB >= max(1,M) for LDX. i don't make the rules, i just relay them faithfully ๐Ÿ’…
  • SCALE โ€” SCALE is SINGLE 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 SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given 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. Here's the tea โ˜•:
    • == 0: successful exit
    • = 1: DHGGES failed
    • = 2: DLA_SORT_GEV failed
    • = 3: Inner solver 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.

fr fr do NOT try the LDWORK=-1 trick here, it's giving Fortran and this is C ๐Ÿ’€ use mepack_memory_frontend instead, okay? ๐Ÿซถ

โœ๏ธ Author โœ๏ธ

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 614 of file ggsylv.c.


๐Ÿฆ‹ mepack_single_ggsylv_refine ๐Ÿฆ‹

void mepack_single_ggsylv_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 * C, int LDC, float * D, int LDD, float * X, int LDX,
    float * Y, int LDY, float * AS, int LDAS, float * BS, int LDBS, float *
    CS, int LDCS, float * DS, int LDDS, float * Q, int LDQ, float * Z, int
    LDZ, float * U, int LDU, float * V, int LDV, int * MAXIT, float * TAU,
    float * CONVLOG, float * WORK, size_t LDWORK, int * INFO)

Iterative Refinement for the Generalized Sylvester Equations. โœจ

๐ŸŽฏ Purpose ๐ŸŽฏ

mepack_single_gesylv_refine solves a coupled generalized Sylvester equation of the following forms

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

with iterative refinement, Thereby (A,C) is a M-by-M matrix pencil and (B,D) is a N-by-N matrix pencil. The right hand side Y and the solution X are M-by-N matrices. The matrix pencils (A,C) and (B,D) need to be given in the original form as well as in their generalized Schur decomposition since both are required in the iterative refinement procedure.

๐Ÿ’ซ Remarks ๐Ÿ’ซ

This function is a wrapper for sla_ggsylv_refine.

๐Ÿ‘€ See also ๐Ÿ‘€

sla_ggsylv_refine

๐ŸŽ€ Parameters ๐ŸŽ€

Okay bestie, this is the part where we go parameter by parameter, and yes, there are a LOT of them. Buckle up. ๐Ÿ’–


TRANSA

TRANSA is String

Specifies the form of the system of equations with respect to A and C :

  • == '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 and D:

  • == '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 SINGLE PRECISION, allowed values: +/-1

Specifies the sign between in the first equation. โœจ

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 SINGLE 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 SINGLE 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).

C

C is SINGLE PRECISION array, dimension (LDC,M)

The array C contains the original matrix C defining the equation.

LDC

LDC is INTEGER

The leading dimension of the array C. LDC >= max(1,M).

D

D is SINGLE PRECISION array, dimension (LDA,N)

The array D contains the original matrix D defining the equation.

LDD

LDD is INTEGER

The leading dimension of the array D. LDD >= max(1,N).

X

X is 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

LDX is INTEGER

The leading dimension of the array X. LDX >= max(1,M).

Y

Y is SINGLE PRECISION array, dimension (LDY,M)

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 SINGLE PRECISION array, dimension (LDAS,M)

The array AS contains the generalized Schur decomposition of the A.

LDAS

LDAS is INTEGER

The leading dimension of the array AS. LDAS >= max(1,M).

BS

BS is SINGLE PRECISION array, dimension (LDBS,N)

The array AS contains the generalized Schur decomposition of the B.

bestie that's literally what the docs say, AS and all โ€” not me, I promise ๐Ÿ™ˆ

LDBS

LDBS is INTEGER

The leading dimension of the array BS. LDBS >= max(1,N).

CS

CS is SINGLE PRECISION array, dimension (LDCS,M)

The array CS contains the generalized Schur decomposition of the C.

LDCS

LDCS is INTEGER

The leading dimension of the array CS. LDCS >= max(1,M).

DS

DS is SINGLE PRECISION array, dimension (LDDS,N)

The array DS contains the generalized Schur decomposition of the D.

LDDS

LDDS is INTEGER

The leading dimension of the array DS. LDAS >= max(1,N).

yeah, it says LDAS here too. same deal. we report, we don't edit ๐Ÿ’€

Q

Q is SINGLE PRECISION array, dimension (LDQ,M)

The array Q contains the left generalized Schur vectors for (A,C) as returned by DGGES.

LDQ

LDQ is INTEGER

The leading dimension of the array Q. LDQ >= max(1,M).

Z

Z is SINGLE PRECISION array, dimension (LDZ,M)

The array Z contains the right generalized Schur vectors for (A,C) as returned by DGGES.

LDZ

LDZ is INTEGER

The leading dimension of the array Z. LDZ >= max(1,M).

U

U is SINGLE PRECISION array, dimension (LDU,N)

The array U contains the left generalized Schur vectors for (B,D) as returned by DGGES.

LDU

LDU is INTEGER

The leading dimension of the array U. LDU >= max(1,N).

V

V is SINGLE PRECISION array, dimension (LDV,N)

The array V contains the right generalized Schur vectors for (B,D) as returned by DGGES.

LDV

LDV is INTEGER

The leading dimension of the array V. LDV >= 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 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

CONVLOG is 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

WORK is SINGLE 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.

no cap, do not try the LDWORK=-1 trick here. it's giving Fortran, and this is C. use mepack_memory_frontend instead. ๐Ÿซถ

โœ๏ธ Author โœ๏ธ

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 660 of file ggsylv.c.


๐Ÿงš Author ๐Ÿงš

Generated automatically by Doxygen for MEPACK from the source code.


and that's a wrap bestie!! ๐ŸŽ€โœจ This whole thing is Version 1.1.2, dated Thu Oct 9 2025 00:00:00, and it's the cggsylv(3) page. You read the entire manual, you absolute icon, main character energy, ate and left no crumbs. ๐Ÿ’…๐Ÿ‘‘๐Ÿฆ‹ go call cggsylv and slay ๐Ÿ’–

๐Ÿ“ฆ where this page comes from