ctgsylv(3)

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

โœจ NAME โœจ

ctgsylv โ€” it's the C-Interface, bestie ๐Ÿ’…

Okay so boom: ctgsylv is your girl for the C-Interface for triangular generalized Sylvester equations. That's it, that's the whole vibe โ€” it's giving "C interface" and it's giving "triangular generalized Sylvester equations" and honestly? She ate. ๐Ÿ‘‘

This is a page from the MEPACK manual, section 3 (that's library calls, iykyk ๐Ÿฆ‹). More sections coming, so stay tuned, don't go anywhere. ๐Ÿ’–

โœจ SYNOPSIS โœจ

okay so bestie, this is the function roster. Every single one returns void, and they're all doing the same kind of mathematical slay but with different precision, variants, and scheduling. Let's get into it. ๐Ÿ’…

๐ŸŒธ Functions ๐ŸŒธ

mepack_double_tgcsylv_dag โ€” Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation with DAG scheduling. Double precision, DAG scheduling, main character energy. ๐Ÿฆ‹

void mepack_double_tgcsylv_dag (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 *E, int
    LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

mepack_single_tgcsylv_dag โ€” Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation with DAG scheduling. Same algorithm, but make it float, bestie. ๐Ÿ’–

void mepack_single_tgcsylv_dag (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 *E, int LDE,
    float *F, int LDF, float *SCALE, float *WORK, int *INFO)

mepack_double_tgcsylv_dual_dag โ€” OpenMP4 - DAG Algorithm for the dual generalized coupled Sylvester equation. It's giving dual, it's giving OpenMP4, it's giving DAG. ๐Ÿ’…

void mepack_double_tgcsylv_dual_dag (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
    *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int
    *INFO)

mepack_single_tgcsylv_dual_dag โ€” OpenMP4 - DAG Algorithm for the dual generalized coupled Sylvester equation. Single precision dual DAG, periodt. โœจ

void mepack_single_tgcsylv_dual_dag (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 *E,
    int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

mepack_double_tgsylv_dag โ€” Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation with DAG based parallelization. This is the generalized Sylvester one, not the coupled one. Iconic. ๐Ÿ‘‘

void mepack_double_tgsylv_dag (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 *X, int LDX, double
    *SCALE, double *WORK, int *INFO)

mepack_single_tgsylv_dag โ€” Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation with DAG based parallelization. Same DAG based parallelization, single precision cutie. ๐Ÿ’œ

void mepack_single_tgsylv_dag (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 *X, int LDX, float *SCALE,
    float *WORK, int *INFO)

mepack_double_tgcsylv_level2 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. Level-2 era, no cap. ๐Ÿ’–

void mepack_double_tgcsylv_level2 (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
    *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int
    *INFO)

mepack_double_tgcsylv_level2_unopt โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Unoptimized variant). Yes, it's the unoptimized one, but still valid. ๐Ÿซถ

void mepack_double_tgcsylv_level2_unopt (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
    *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int
    *INFO)

mepack_double_tgcsylv_level2_reorder โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Reordered variant). Reordered and ready. ๐ŸŽ€

void mepack_double_tgcsylv_level2_reorder (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK,
    int *INFO)

mepack_double_tgcsylv_level2_local_copy โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, unaligned). Local copies, unaligned, still cute. ๐Ÿฆ‹

void mepack_double_tgcsylv_level2_local_copy (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK,
    int *INFO)

mepack_double_tgcsylv_level2_local_copy_32 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=32). M,N<=32, tiny but mighty. ๐ŸŒธ

void mepack_double_tgcsylv_level2_local_copy_32 (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 *E, int LDE, double *F, int LDF, double *SCALE, double
    *WORK, int *INFO)

mepack_double_tgcsylv_level2_local_copy_64 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=64). M,N<=64, slay. ๐Ÿ’œ

void mepack_double_tgcsylv_level2_local_copy_64 (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 *E, int LDE, double *F, int LDF, double *SCALE, double
    *WORK, int *INFO)

mepack_double_tgcsylv_level2_local_copy_96 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=96). M,N<=96, periodt. โญ

void mepack_double_tgcsylv_level2_local_copy_96 (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 *E, int LDE, double *F, int LDF, double *SCALE, double
    *WORK, int *INFO)

mepack_double_tgcsylv_level2_local_copy_128 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=128). M,N<=128, iconic. ๐Ÿ”ฅ

void mepack_double_tgcsylv_level2_local_copy_128 (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 *E, int LDE, double *F, int LDF, double *SCALE, double
    *WORK, int *INFO)

mepack_single_tgcsylv_level2 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. Single precision level-2, bestie. ๐Ÿ’…

void mepack_single_tgcsylv_level2 (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 *E,
    int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

mepack_single_tgcsylv_level2_unopt โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Unoptimized variant). Single precision unoptimized, still valid. ๐Ÿซถ

void mepack_single_tgcsylv_level2_unopt (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 *E,
    int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

mepack_single_tgcsylv_level2_reorder โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Reordered variant). Reordered, single precision. ๐ŸŽ€

void mepack_single_tgcsylv_level2_reorder (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
    *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_single_tgcsylv_level2_local_copy โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, unaligned). Single precision local copies, unaligned. ๐Ÿฆ‹

void mepack_single_tgcsylv_level2_local_copy (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
    *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_single_tgcsylv_level2_local_copy_32 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=32). M,N<=32, single precision, tiny queen. ๐ŸŒธ

void mepack_single_tgcsylv_level2_local_copy_32 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_single_tgcsylv_level2_local_copy_64 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=64). M,N<=64, single precision, slay. ๐Ÿ’œ

void mepack_single_tgcsylv_level2_local_copy_64 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_single_tgcsylv_level2_local_copy_96 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=96). M,N<=96, single precision, periodt. โญ

void mepack_single_tgcsylv_level2_local_copy_96 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_single_tgcsylv_level2_local_copy_128 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=128). M,N<=128, single precision, iconic. ๐Ÿ”ฅ

void mepack_single_tgcsylv_level2_local_copy_128 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int
    *INFO)

mepack_double_tgcsylv_dual_level2 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. Dual level-2, bestie. ๐Ÿ’…

void mepack_double_tgcsylv_dual_level2 (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
    *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int
    *INFO)

mepack_double_tgcsylv_dual_level2_local_copy โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant). Local copy variant, obsessed. ๐ŸŽ€

void mepack_double_tgcsylv_dual_level2_local_copy (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 *E, int LDE, double *F, int LDF, double *SCALE, double
    *WORK, int *INFO)

mepack_double_tgcsylv_dual_level2_local_copy_32 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, M,N <= 32). M,N <= 32, tiny queen. ๐ŸŒˆ

void mepack_double_tgcsylv_dual_level2_local_copy_32 (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 *E, int LDE, double *F, int LDF, double *SCALE,
    double *WORK, int *INFO)

mepack_double_tgcsylv_dual_level2_local_copy_64 โ€” Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual

void mepack_double_tgcsylv_dual_level2_local_copy_64 (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 *E, int LDE, double *F, int LDF, double *SCALE,
    double *WORK, int *INFO)

okay so the next batch of prototypes is literally the whole tgcsylv / tgsylv family, and they all share the same shape โ€” TRANSA, TRANSB, a sign (or two), M, N, then a parade of matrices, leading dimensions, SCALE, WORK and INFO ๐Ÿ‘€ watch this:

void mepack_double_tgcsylv_dual_level2_local_copy_96 (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation, local-copy style, sized for M,N <= 96 ๐Ÿ’–

void mepack_double_tgcsylv_dual_level2_local_copy_128 (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

same energy, same level-2 Kagstroem-Westin/Bartels-Stewart algorithm for the dual generalized coupled Sylvester equation, local copy variant but now it goes all the way to M,N <= 128 โœจ

void mepack_single_tgcsylv_dual_level2 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

the single-precision no-frills one ๐ŸŽ€ Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. that's it, that's the whole vibe.

void mepack_single_tgcsylv_dual_level2_local_copy (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation, and this one is the Local Copies girlie ๐Ÿซถ

void mepack_single_tgcsylv_dual_level2_local_copy_32 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation โ€” Local Copies, and she's built for M,N <= 32 ๐ŸŒธ

void mepack_single_tgcsylv_dual_level2_local_copy_64 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Local Copies again, this time the level-2 Kagstroem-Westin/Bartels-Stewart algorithm for the dual generalized coupled Sylvester equation handles M,N <= 64 ๐Ÿ’…

void mepack_single_tgcsylv_dual_level2_local_copy_96 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Local Copies, level-2 Kagstroem-Westin/Bartels-Stewart algorithm, dual generalized coupled Sylvester equation, M,N <= 96 โ€” the middle child but make it โœจiconicโœจ

void mepack_single_tgcsylv_dual_level2_local_copy_128 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

and the biggest local-copy one: Local Copies, level-2 Kagstroem-Westin/Bartels-Stewart algorithm for the dual generalized coupled Sylvester equation, M,N <= 128 ๐Ÿ‘‘


okay now we pivot to the non-dual generalized Sylvester equation squad ๐Ÿฆ‹ these ones take SGN (singular, bestie โ€” not two), and they write into X with LDX instead of the E/F situation:

void mepack_double_tgsylv_level2_local_copy_32 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=32 ๐Ÿ’–

void mepack_double_tgsylv_level2_local_copy_64 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=64 โœจ

void mepack_double_tgsylv_level2_local_copy_96 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=96 ๐ŸŽ€

void mepack_double_tgsylv_level2_local_copy_128 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=128 โ€” big-girl numbers, no cap ๐ŸŒˆ

void mepack_double_tgsylv_level2_local_copy (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” local copies, and this is the unaligned one, so she does not care about your alignment ๐Ÿ˜Œ

void mepack_double_tgsylv_level2_reorder (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, Reordered variant ๐Ÿ”ฅ

void mepack_double_tgsylv_level2 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” the Classical level 2 variant, the original main character ๐Ÿ’œ

void mepack_double_tgsylv_level2_rowwise (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, Row-by-Row variant โ€” she walks the rows, one at a time, no skips ๐Ÿšถโ€โ™€๏ธ

void mepack_double_tgsylv_level2_colwise (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, Column-by-column variant โ€” column girlies rise ๐ŸŒฑ

void mepack_double_tgsylv_gardiner_laub (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

GARDINER-Laub Algorithm for the generalized Sylvester equation. yes, in all caps, and yes, she earned it ๐Ÿ’…


and now the exact same tour again but in single precision, because equality ๐ŸŒŸ

void mepack_single_tgsylv_level2_local_copy_32 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=32 ๐ŸŒธ

void mepack_single_tgsylv_level2_local_copy_64 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=64 ๐ŸŽ€

void mepack_single_tgsylv_level2_local_copy_96 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=96 โœจ

void mepack_single_tgsylv_level2_local_copy_128 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, local copies, M,N<=128 ๐Ÿ‘‘

void mepack_single_tgsylv_level2_local_copy (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” local copies, unaligned, zero alignment opinions ๐Ÿซถ

void mepack_single_tgsylv_level2_reorder (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, the Reordered variant ๐Ÿ”ฅ

void mepack_single_tgsylv_level2 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” the Classic level 2variant ๐Ÿ’œ (yes the docs really did fuse those two words together, and honestly? iconic typo, we respect it)

void mepack_single_tgsylv_level2_rowwise (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, Row-by-row variant โ€” lowercase row, same slay ๐ŸŒˆ

void mepack_single_tgsylv_level2_colwise (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation, Column-by-column variant ๐ŸŒฑ

void mepack_single_tgsylv_gardiner_laub (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Gardiner-Laub Algorithm for the generalized Sylvester equation โ€” the single-precision edition, title case this time, she contains multitudes ๐ŸŒธ

void mepack_double_tgcsylv_level3 (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

โœจ the Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation, double precision, bestie ๐Ÿ’–

void mepack_double_tgcsylv_level3_unopt (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

the Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation, but the Unoptimized variant ๐Ÿซถ

void mepack_double_tgcsylv_level3_2stage (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

the Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm with sub-blocking for the generalized coupled Sylvester equation ๐Ÿฆ‹

void mepack_single_tgcsylv_level3 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation, single precision edition ๐Ÿ’…

void mepack_single_tgcsylv_level3_unopt (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation ๐ŸŒธ

void mepack_single_tgcsylv_level3_2stage (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation ๐Ÿ’œ

void mepack_double_tgcsylv_dual_level3 (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation, double precision ๐Ÿ˜Œ

void mepack_single_tgcsylv_dual_level3 (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation, single precision ๐ŸŽ€

void mepack_double_tgcsylv_dual_level3_2stage (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

Level-3 with sub blocking Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation, double precision ๐ŸŒˆ

void mepack_single_tgcsylv_dual_level3_2stage (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm with sub blocking for the dual generalized coupled Sylvester equation, single precision โœจ

void mepack_double_tgsylv_level3 (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation, double precision ๐Ÿ‘‘

void mepack_double_tgsylv_level3_rowwise (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation, the Row-by-row variant ๐Ÿ“

void mepack_double_tgsylv_level3_colwise (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation, the Column-by-Column variant ๐Ÿ“

void mepack_double_tgsylv_level3_2stage (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Sylvester equation, double precision ๐Ÿงš

void mepack_single_tgsylv_level3 (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester, single precision ๐Ÿ’–

void mepack_single_tgsylv_level3_rowwise (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester, the Row-by-row variant ๐ŸŽ€

void mepack_single_tgsylv_level3_colwise (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester, the Column-by-column variant ๐ŸŽ€

void mepack_single_tgsylv_level3_2stage (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Sylvester, single precision ๐Ÿฆ‹

void mepack_double_tgcsylv_recursive (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

Recursive blocking Algorithm for the generalized coupled Sylvester equation, double precision ๐Ÿ”ฅ

void mepack_single_tgcsylv_recursive (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Recursive blocking Algorithm for the generalized coupled Sylvester equation, single precision ๐Ÿ”ฅ

void mepack_double_tgcsylv_dual_recursive (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 *E, int LDE, double *F, int LDF, double *SCALE, double *WORK, int *INFO)

Recursive blocking algorithm for the dual generalized coupled Sylvester equation, double precision ๐Ÿ’œ

void mepack_single_tgcsylv_dual_recursive (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 *E, int LDE, float *F, int LDF, float *SCALE, float *WORK, int *INFO)

Recursive blocking algorithm for the dual generalized coupled Sylvester equation, single precision ๐Ÿ’œ

void mepack_double_tgsylv_recursive (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 *X, int LDX, double *SCALE, double *WORK, int *INFO)

Recursive blocking Algorithm for the generalized Sylvester equation, double precision โญ

void mepack_single_tgsylv_recursive (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 *X, int LDX, float *SCALE, float *WORK, int *INFO)

Recursive blocking algorithm for the generalized Sylvester equation, single precision โญ


โœจ Detailed Description โœจ

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

okay so basically: the Fortran routines that solve the generalized Sylvester equation with triangular coefficients get wrapped in C so you can actually reach them without losing your whole entire mind. Every single wrapper routine here is a direct wrapper to the corresponding Fortran subroutine โ€” no sanity checks ๐Ÿ™ˆ โ€” because the Fortran routines are the ones doing the checking. So like, behave, bestie.

and here's the catch: since these routines use int values to pass sizes, the work_space query will fail for large scale problems ๐Ÿ’€. so for that you gotta use mepack_memory to query the required work_space from C code. that function is aware of 64 bit integers if MEPACK is compiled with it. no cap. โœจ


๐Ÿ’… Function Documentation ๐Ÿ’…

๐Ÿฆ‹ void mepack_double_tgcsylv_dag (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation with DAG scheduling. ๐Ÿ‘‘

๐ŸŽ€ Purpose:

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

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

so like โ€” where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices ๐Ÿ’ซ. and plot twist: either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. iykyk ๐Ÿงš

๐Ÿ’€ Remarks

The function is a wrapper for dla_tgcsylv_dag โœจ

See also ๐Ÿ’ซ

dla_tgcsylv_dag โ€” yeah bestie, that's the one, go give her a read.


Parameters ๐ŸŽ€

  • TRANSA โ€” it's a String, and it sets the form of the system of equations when it comes to A and C:
    • == 'N': op1(A) = A, op1(C) = C (no transpose for A and C, we're keeping it chill)
    • == 'T': op1(A) = A**T, op1(C) = C **T (transpose A and C, flipping the whole vibe)
  • TRANSB โ€” also a String, same deal but for B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN1 โ€” a DOUBLE PRECISION, allowed values +/-1. It specifies the sign between the terms in the first equation. โœจ
  • SGN2 โ€” a DOUBLE PRECISION, allowed values +/-1. It specifies the sign between the terms 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 โ€” a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular, no exceptions ๐Ÿ’…
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” a DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. But heads up: if the matrix D is already quasi-upper triangular, then the matrix B must be plain upper triangular. It's giving โœจtrading constraintsโœจ.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” a DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” a DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And same plot twist as before: if the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. She's a dual-purpose queen ๐Ÿ‘‘
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M).
okay yes, that literally says LDE and not LDF in the LDF description โ€” not me catching that, it's just what the docs say bestie, I'm not touching it ๐Ÿซถ
  • SCALE โ€” a DOUBLE PRECISION. SCALE is a scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” a DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. And no cap, you gotta query the workspace before running the computation โ€” you do that by calling the subroutine with INFO == -1 on input, and the required workspace comes back to you in INFO. So iconic ๐ŸŒˆ
  • INFO โ€” INTEGER. Here's the whole lore:
    • On input:
      • == -1: Perform a workspace query
      • <> -1: normal operation
    • On exit, workspace query:
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • >= 0: the value of INFO is the required number of elements in the workspace
    • On exit, normal operation:
      • == 0: successful exit ๐ŸŽ‰
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: the equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition at line 214 of file tgcsylv.c.


void mepack_double_tgcsylv_dual_dag ( ... )

void mepack_double_tgcsylv_dual_dag (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 *
    E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int *
    INFO)

OpenMP4 - DAG Algorithm for the dual generalized coupled Sylvester equation. Okay she's fancy AND parallel, we love to see it ๐Ÿฆ‹

Purpose ๐ŸŒธ

mepack_double_tgcsylv_dual_dag solves a generalized coupled Sylvester equation that looks like this:

   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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And plot twist: either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) (or (D,B)) are created by DGGES from LAPACK. iykyk ๐Ÿ’…

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

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. That gives you:

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

And when you look at Z**T, you get:

           | 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). And that's the reason the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). Periodt. ๐ŸŽ€

Remarks ๐Ÿ™ˆ

This function is a wrapper for dla_tgcsylv_dual_dag. She's the face, dla_tgcsylv_dual_dag is the engine, we respect both.

See also โญ

dla_tgcsylv_dual_dag

Parameters ๐Ÿ’œ

  • TRANSA โ€” CHARACTER(1). Sets the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (no transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (transpose A and C)
  • TRANSB โ€” CHARACTER(1). Sets the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN1 โ€” DOUBLE PRECISION, allowed values +/-1. It specifies the sign between the terms in the first equation.
  • SGN2 โ€” DOUBLE PRECISION, allowed values +/-1. It specifies the sign between the terms 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 matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€” DOUBLE PRECISION. SCALE is a scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INTEGER. Here's the rundown:
    • On input:
      • == -1: Perform a workspace query (not recommended in the C interface)
      • <> -1: normal operation
    • On exit, workspace query:
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • >= 0: the value of INFO is the required number of elements in the workspace

On exit, normal operation:

  • == 0: successful exit โœจ
  • < 0: if INFO == -i, the i-Th argument had an illegal value ๐Ÿ™ˆ
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition at line 232 of file tgcsylv_dual.c.


๐Ÿซถ void mepack_double_tgcsylv_dual_level2 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. ๐Ÿ‘‘

Purpose:

okay so mepack_double_tgcsylv_dual_level2 solves a generalized coupled Sylvester equation of the following form, bestie:

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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

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). no cap, that's literally the whole reason ๐Ÿ’…

Remarks

This function is a wrapper for dla_tgcsylv_dual_l2. ๐ŸŽ€

See also

dla_tgcsylv_dual_l2

Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes bestie, it really does say LDE there, we don't make the rules ๐Ÿ™ˆ)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query ( not recommended in the C interface)
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit โœจ
  • < 0: if INFO == -i, the i-Th argument had an illegal value ๐Ÿ™ˆ
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition at line 231 of file tgcsylv_dual.c.


๐Ÿฆ‹ void mepack_double_tgcsylv_dual_level2_local_copy (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant) ๐Ÿ’–

Purpose:

mepack_double_tgcsylv_dual_level2_local_copy 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒธ

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 dla_tgcsylv_dual_l2_local_copy.

See also

dla_tgcsylv_dual_l2_local_copy

Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. It's the leading dimension of the array B, and the vibe check says LDB >= max(1,N). ๐Ÿ’–
  • C โ€” C is a DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. That's not optional, bestie, it's giving "upper triangular only". โœจ
  • LDC โ€” LDC is INTEGER. Leading dimension of the array C, and LDC >= max(1,M). Periodt. ๐Ÿ’…
  • D โ€” D is a DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And here's the tea: if the matrix B is already quasi-upper triangular, then D must be upper triangular. ๐Ÿซถ
  • LDD โ€” LDD is INTEGER. Leading dimension of the array D, and LDD >= max(1,N). Slay. ๐ŸŒธ
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. The right hand side E and the solution R are M-by-N matrices. Main character energy, honestly. ๐Ÿ‘‘
  • LDE โ€” LDE is INTEGER. Leading dimension of the array E, and 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and solution L are both M-by-N matrices. Iconic. โญ
  • LDF โ€” LDF is INTEGER. Leading dimension of the array F. And the doc says LDE >= max(1,M) โ€” yes, we're all looking at it, it says LDE, and I'm reporting it exactly as written, no notes. ๐Ÿ™ˆ
  • SCALE โ€” SCALE is DOUBLE PRECISION. It's the scaling factor that stops the result from overflowing, and it's lowkey the hero of the whole thing. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, then 0 < SCALE <= 1 holds true. ๐Ÿ’œ
  • WORK โ€” WORK is a DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm, and the optimal workspace is given by \ref mepack_memory. โœจ
  • INFO โ€” INFO is INTEGER. She's got layers, so let's break it down:
On input:
  == -1 : Perform a workspace query ( not recommended in the C interface)
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

๐Ÿ“ Definition

Definition at line 460 of file tgcsylv_dual.c.


๐Ÿฆ‹ mepack_double_tgcsylv_dual_level2_local_copy_128

void mepack_double_tgcsylv_dual_level2_local_copy_128 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, M,N <= 128)

๐ŸŽฏ Purpose

mepack_double_tgcsylv_dual_level2_local_copy_128 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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 dla_tgcsylv_dual_l2_local_copy_128.

๐Ÿ‘€ See also

dla_tgcsylv_dual_l2_local_copy_128

๐ŸŽ€ Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. ๐ŸŒธ
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M). ๐Ÿซถ
  • B โ€” B is a DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐ŸŒˆ
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N). ๐Ÿ’–
  • C โ€” C is a DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. Periodt. ๐Ÿ’…
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M). ๐ŸŒธ
  • D โ€” D is a DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿฆ‹
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ‘‘
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’œ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. And once again the doc says LDE >= max(1,M) โ€” reporting it exactly as it stands, no edits from me. ๐Ÿ™ˆ
  • SCALE โ€” SCALE is DOUBLE PRECISION. A scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. โœจ
  • WORK โ€” WORK is a DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐ŸŽ€
  • INFO โ€” INFO is INTEGER:
On input:
  == -1 : Perform a workspace query ( not recommended in the C interface)
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

๐Ÿ“ Definition

Definition at line 1376 of file tgcsylv_dual.c.


๐Ÿงš mepack_double_tgcsylv_dual_level2_local_copy_32

void mepack_double_tgcsylv_dual_level2_local_copy_32 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, M,N <= 32)

๐ŸŽฏ Purpose

mepack_double_tgcsylv_dual_level2_local_copy_32 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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

So equation (1) is the dual of equation (2) with respect to the underlying linear system, bestie. Like, they're mirrors. ๐Ÿ’ซ Let Z be the matrix you get by rewriting (2) into its Kronecker form. Which gives you:

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

And then looking at Z**T, you get:

           | 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). โœจ And that's literally why the parameters TRANSA and TRANSB are expressed in terms of the Sylvester equation (2). iykyk ๐Ÿง 


๐ŸŒธ Remarks ๐ŸŒธ

This function is a wrapper for dla_tgcsylv_dual_l2_local_copy_32. it's giving "delegation, but make it chic" ๐Ÿ’…

๐Ÿ‘€ See also ๐Ÿ‘€

  • dla_tgcsylv_dual_l2_local_copy_32

๐ŸŽ€ Parameters ๐ŸŽ€

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN1 โ€” SGN1 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. yes, it's just a sign, but it's load-bearing bestie ๐Ÿ™ˆ
  • SGN2 โ€” SGN2 is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. same energy, 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). The matrix A must be (quasi-) upper triangular. no cap, it has to be ๐Ÿ“
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. read that twice, it's a whole vibe check โš ๏ธ
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. strictly upper triangular, she doesn't do quasi โœ‹
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. the โœจreciprocalโœจ of the B situation, obsessed ๐Ÿฆ‹
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. she transforms on the way out, main character energy ๐Ÿ‘‘
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes, it says LDE in the original, we do not correct the manpage, we simply report it ๐Ÿ’€)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. it's the seatbelt of this whole operation ๐Ÿซถ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.
heads up: that INFO > 0 case is not a "lol whatever" situation โ€” one of the inner systems went singular and the equation did not get solved correctly. ๐Ÿ˜ญ

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

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 689 of file tgcsylv_dual.c.


๐Ÿฆ‹ void mepack_double_tgcsylv_dual_level2_local_copy_64 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO) ๐Ÿฆ‹

void mepack_double_tgcsylv_dual_level2_local_copy_64 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, M,N <= 64)

okay so this is the 64 version, the bigger sibling of the 32 one. same algorithm, same energy, just built for when your matrices are up to M,N <= 64. ๐Ÿ’–

โœจ Purpose โœจ

mepack_double_tgcsylv_dual_level2_local_copy_64 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ‘‘

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 dla_tgcsylv_dual_l2_local_copy_64. ๐Ÿ’…

๐Ÿ‘€ See also ๐Ÿ‘€

  • dla_tgcsylv_dual_l2_local_copy_64

๐ŸŽ€ Parameters ๐ŸŽ€

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. โš ๏ธ
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. โš ๏ธ
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€”
  • F โ€” it's 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’…
  • LDF โ€” INTEGER, bestie. It's the leading dimension of the array F. So: LDE >= max(1,M).
  • SCALE โ€” DOUBLE PRECISION. This is the scaling factor whose whole job is to stop the result from overflowing ๐ŸŒŠ. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm ๐Ÿ› ๏ธ, and the optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INTEGER. She's the receipts, periodt:
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿซถ Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

๐ŸŽ€ Date ๐ŸŽ€

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 917 of file tgcsylv_dual.c.


void mepack_double_tgcsylv_dual_level3 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

void mepack_double_tgcsylv_dual_level3 (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 *
    E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int *
    INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. ๐Ÿ‘‘

โœจ Purpose โœจ

mepack_double_tgcsylv_dual_level3 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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 dla_tgcsylv_dual_l3.

๐ŸŒˆ See also ๐ŸŒˆ

dla_tgcsylv_dual_l3

๐ŸŒธ Parameters ๐ŸŒธ

  • TRANSA
  • TRANSA โ€” bestie, this one's a CHARACTER(1) and it tells us the form of the system of equations with respect to A and C. The options, verbatim:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)

So 'N' = no transpose, 'T' = transpose. Periodt. ๐Ÿ’…

  • TRANSB โ€” also a CHARACTER(1), but this one's about the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN1 โ€” a DOUBLE PRECISION, and the allowed values are +/-1. It specifies the sign between in the first equation. ๐ŸŽ€
  • SGN2 โ€” also DOUBLE PRECISION, allowed values +/-1, and it specifies the sign between in the second equation. Matching set, we love to see it. โœจ
  • M โ€” an INTEGER. The order of the matrices A and C. Constraint: M >= 0.
  • N โ€” an INTEGER. The order of the matrices B and D. Constraint: N >= 0.
  • A โ€” a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. no cap.
  • LDA โ€” an INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” a DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. And heads up: if the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular. ๐Ÿ‘€
  • LDB โ€” an INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” a DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” an INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” a DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And same deal as before, flipped: if the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular. ๐Ÿ”„
  • LDD โ€” an INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Both the right hand side E and the solution R are M-by-N matrices. she's a multitasker ๐Ÿ’–
  • LDE โ€” an INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and solution L are M-by-N matrices.
  • LDF โ€” an INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes, that's what the docs say โ€” it says LDE in the LDF entry, and we are simply reporting the lore as it was written ๐Ÿ“–)
  • SCALE โ€” a DOUBLE PRECISION. It's a scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿซถ
  • WORK โ€” a DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). It's the workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” an INTEGER. Bestie, read this one slowly because it changes meaning depending on when you look at it:
On input:
  == -1 : Perform a workspace query ( not recommended in the C interface)
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.
so real talk: INFO > 0 means the equation isn't solved correctly because one of the arising inner systems got singular. That's not a vibe, that's a genuine "your answer is not trustworthy" situation. ๐Ÿ™ˆ

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 231 of file tgcsylv_dual.c.


โœจ void mepack_double_tgcsylv_dual_level3_2stage (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO) โœจ

Level-3 with sub blocking Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. okay she has a whole title, main character energy fr fr ๐Ÿ’…

void mepack_double_tgcsylv_dual_level3_2stage (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

๐ŸŒธ Purpose:

mepack_double_tgcsylv_dual_level3_2stage 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ”ฅ

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 dla_tgcsylv_dual_l3_2s.

๐Ÿ‘€ See also

dla_tgcsylv_dual_l3_2s

๐ŸŽ€ Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’–
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (again โ€” the original says LDE here, we're just the messenger ๐Ÿงš)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER.
On input:
  == -1 : Perform a workspace query ( not recommended in the C interface)
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.
  • On exit, normal operation does its thing ๐Ÿ’…
    • == 0: successful exit โ€” we love to see it โœจ
    • < 0: if INFO == -i, the i-Th argument had an illegal value (bestie, check ur args)
    • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 687 of file tgcsylv_dual.c.


๐Ÿซถ mepack_double_tgcsylv_dual_recursive ๐Ÿซถ

okay so here's the whole signature, exactly as it lives, no cap:

void mepack_double_tgcsylv_dual_recursive (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 *
    E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int *
    INFO)

Recursive blocking algorithm for the dual generalized coupled Sylvester equation. ๐Ÿฆ‹

๐Ÿ’– Purpose ๐Ÿ’–

so mepack_double_tgcsylv_dual_recursive solves a generalized coupled Sylvester equation that looks like this:

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

(yes, that op2(D)** T has a space in it, and yes, we are keeping it exactly like that ๐Ÿ˜ญ do not touch it)

Where, listen:

  • A is a M-by-M quasi upper triangular matrix ๐ŸŒธ
  • C is a M-by-M upper triangular matrix
  • B and D are N-by-N upper triangular matrices
  • and furthermore either B or D can be quasi upper triangular as well
  • the right hand side Y and the solution X are M-by-N matrices
  • Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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

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 |

and 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). โœจ iykyk

๐ŸŽ€ Remarks ๐ŸŽ€

This function is a wrapper for dla_tgcsylv_dual_recursive. ๐Ÿซถ

๐Ÿฆ‹ See also ๐Ÿฆ‹

dla_tgcsylv_dual_recursive

๐ŸŒธ Parameters ๐ŸŒธ

  • TRANSA โ€” TRANSA is CHARACTER(1)
    • Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1)
    • Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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)
    • The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER
    • The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N)
    • The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER
    • The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M)
    • The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER
    • The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N)
    • The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER
    • The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side E and the solution R are M-by-N matrices. ๐ŸŒˆ
  • LDE โ€” LDE is INTEGER
    • The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’œ
  • LDF โ€” LDF is INTEGER
    • The leading dimension of the array F. LDE >= max(1,M).
โš ๏ธ bestie that's not a typo on my end โ€” the original literally says LDE >= max(1,M) under LDF. keep it fr fr.
  • SCALE โ€” SCALE is DOUBLE PRECISION
    • SCALE is a scaling factor to prevent the overflow in the result.
    • If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK))
    • Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit โœจ
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 231 of file tgcsylv_dual.c.


๐Ÿ”ฅ mepack_double_tgcsylv_level2 ๐Ÿ”ฅ

void mepack_double_tgcsylv_level2 (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 * E, int LDE,
    double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. ๐Ÿ‘‘

๐Ÿ’– Purpose ๐Ÿ’–

mepack_double_tgcsylv_level2 solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿฆ‹

๐ŸŽ€ Remarks ๐ŸŽ€

The function is a wrapper for dla_tgcsylv_l2. ๐Ÿซถ

๐Ÿฆ‹ See also ๐Ÿฆ‹

dla_tgcsylv_l2

๐ŸŒธ Parameters ๐ŸŒธ

  • TRANSA โ€” TRANSA is String
    • Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String
    • Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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)
    • The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER
    • The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N)
    • The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER
    • The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M)
    • The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER
    • The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N)
    • The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER
    • The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side E and the solution R are M-by-N matrices. โญ
  • LDE โ€”
  • LDE โ€” LDE is INTEGER, bestie, and it's the leading dimension of the array E. Rule of the land: LDE >= max(1,M). ๐Ÿ’…
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. โœจ
  • LDF โ€” LDF is INTEGER, the leading dimension of the array F. And yes, the original really does say LDE >= max(1,M) right here, we are not fixing it, we are reporting it, fr fr. ๐Ÿ’€
  • SCALE โ€” SCALE is DOUBLE PRECISION. It's a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿซถ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. It's workspace for the algorithm. The workspace needs to queried before the running the computation (their words, iconic grammar, we stan). The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿ”ฅ
  • INFO โ€” INFO is INTEGER. Buckle up, it's giving multi-mode:
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 214 of file tgcsylv.c.


void mepack_double_tgcsylv_level2_local_copy (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, unaligned) โœจ

Purpose:

mepack_double_tgcsylv_level2_local_copy solves a generalized coupled Sylvester equation of the following form, and yes it's a whole mood:

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿฆ‹

Remarks

The function is a wrapper for dla_tgcsylv_l2_local_copy. (Just a lil handoff, no cap. ๐Ÿ’…)

See also

dla_tgcsylv_l2_local_copy

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐ŸŒธ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (Same lil typo, same energy, we report it faithfully. ๐Ÿ’€)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 847 of file tgcsylv.c.


void mepack_double_tgcsylv_level2_local_copy_128 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=128) โœจ

Purpose:

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ‘‘

Remarks

The function is a wrapper for dla_tgcsylv_l2_local_copy_128. (The _128 sibling, same vibe, different size gate. ๐Ÿ’…)

See also

dla_tgcsylv_l2_local_copy_128

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D
  • D โ€” D is a DOUBLE PRECISION array, dimension (LDD,N). Bestie, this matrix must be (quasi-) upper triangular. And heads up: if matrix B is already quasi-upper triangular, then D has to be plain upper triangular. no exceptions ๐Ÿ’…
  • LDD โ€” LDD is INTEGER. It's the leading dimension of the array D. LDD >= max(1,N). fr fr.
  • E โ€” E is a DOUBLE 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Both the right hand side E and the solution R are M-by-N matrices. she's a glow-up on the way out โœจ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is a DOUBLE 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are both M-by-N matrices. ๐Ÿ’–
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes, the source literally says LDE here, we're just telling you what it says, don't @ me ๐Ÿ™ˆ)
  • SCALE โ€” SCALE is DOUBLE PRECISION. She's a scaling factor whose whole job is to stop the result from overflowing. If INFO == 0 then SCALE is 1.0D0, otherwise โ€” if one of the inner systems couldn't be solved correctly โ€” 0 < SCALE <= 1 holds true. ๐Ÿซถ
  • WORK โ€” WORK is a DOUBLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. Important: you gotta query the workspace before you run the computation. You do that by calling the subroutine with INFO == -1 on input. The required workspace then comes back to you in INFO. main character move, honestly ๐Ÿ‘‘
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-th argument had an illegal value
  • >= 0: the value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit, slay ๐ŸŽ€
  • < 0: if INFO == -i, the i-th argument had an illegal value
  • > 0: the equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition

Definition at line 1688 of file tgcsylv.c.


๐ŸŒธ mepack_double_tgcsylv_level2_local_copy_32 ๐ŸŒธ

void mepack_double_tgcsylv_level2_local_copy_32 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=32).

Purpose:

mepack_double_tgcsylv_level2_local_copy_32 solves a generalized coupled Sylvester equation that looks like this:

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. Also, either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. iykyk ๐Ÿ’ซ

Remarks

The function is a wrapper for dla_tgcsylv_l2_local_copy_32.

See also

dla_tgcsylv_l2_local_copy_32

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yep, still says LDE, quoted verbatim ๐Ÿ’œ)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is a DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition

Definition at line 1058 of file tgcsylv.c.


๐Ÿฆ‹ mepack_double_tgcsylv_level2_local_copy_64 ๐Ÿฆ‹

void mepack_double_tgcsylv_level2_local_copy_64 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=64).

Purpose:

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. obsessed with her honestly ๐ŸŒˆ

Remarks

The function is a wrapper for dla_tgcsylv_l2_local_copy_64.

See also

dla_tgcsylv_l2_local_copy_64

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 a DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • LDA โ€” LDA is INTEGER, bestie. It's the leading dimension of the array A, and you need LDA >= max(1,M). no cap, don't skimp on this one ๐Ÿ’…
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. And listen โ€” if the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular. it's giving โœจconditional requirementsโœจ fr fr
  • LDB โ€” LDB is INTEGER. Leading dimension of the array B, and LDB >= max(1,N). periodt ๐ŸŽ€
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. that's it, that's the vibe ๐ŸŒธ
  • LDC โ€” LDC is INTEGER. Leading dimension of the array C, with LDC >= max(1,M). ๐Ÿฆ‹
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And the flip side of earlier: if the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular. iconic reciprocity tbh ๐Ÿ‘‘
  • LDD โ€” LDD is INTEGER. Leading dimension of the array D, and LDD >= max(1,N). ๐Ÿ’œ
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. glow-up arc honestly ๐Ÿ˜ญ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. Leading dimension of the array E, and LDE >= max(1,M). โญ
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. same energy as E but make it F ๐Ÿ’…
  • LDF โ€” LDF is INTEGER. Leading dimension of the array F. LDE >= max(1,M). (yes it literally says LDE in the source, we're keeping it exactly as written, no edits bestie ๐Ÿซถ)
  • SCALE โ€” SCALE is DOUBLE PRECISION. It's a scaling factor whose whole job is to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise โ€” if one of the inner systems could not be solved correctly โ€” 0 < SCALE <= 1 holds true. it's giving ๐Ÿ›Ÿlifeguard energy๐Ÿ›Ÿ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. Now listen carefully because this matters: the workspace needs to be queried before running the computation. You do the query by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. don't skip the vibe check ๐ŸŒˆ
  • INFO โ€” INFO is INTEGER. here's the whole rundown:
On input:
  == -1 : Perform a workspace query
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.
fr fr read your INFO on the way out. INFO > 0 means the equation is not solved correctly because one of the arising inner system got singular. that's the ๐Ÿ’€ moment, don't ignore it.

Author โ€” Martin Koehler, MPI Magdeburg ๐Ÿซถ

Date โ€” October 2025 ๐Ÿ“…

Definition at line 1268 of file tgcsylv.c.


๐Ÿ’– mepack_double_tgcsylv_level2_local_copy_96 ๐Ÿ’–

void mepack_double_tgcsylv_level2_local_copy_96 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK,
    int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=96). ok the name is a whole paragraph but we move โœจ

๐ŸŽ€ Purpose ๐ŸŽ€

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. iykyk ๐Ÿ’…

๐ŸŒธ Remarks ๐ŸŒธ

The function is a wrapper for dla_tgcsylv_l2_local_copy_96. it's giving delegation, we love a middle manager ๐Ÿซถ

๐Ÿฆ‹ See also ๐Ÿฆ‹

dla_tgcsylv_l2_local_copy_96

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐Ÿ‘‘
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M). ๐Ÿ’…
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐ŸŒธ
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N). ๐ŸŽ€
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. ๐Ÿฆ‹
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M). โœจ
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ’œ
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N). โญ
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ˜ญ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M). ๐ŸŒˆ
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ“
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (again, that's LDE exactly as written in the source, we keep it character for character, no notes ๐Ÿ™ˆ)
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿ›Ÿ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿงš
  • INFO โ€” INFO is INTEGER.
On input:
  == -1 : Perform a workspace query
  <> -1 : normal operation

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

Author โ€” Martin Koehler, MPI Magdeburg ๐Ÿซถ

Date โ€” October 2025 ๐Ÿ“…

Definition at line 1478 of file tgcsylv.c.


๐Ÿ’– mepack_double_tgcsylv_level2_reorder ๐Ÿ’–

void mepack_double_tgcsylv_level2_reorder (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 *
    E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int *
    INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Reordered variant). yes bestie, the reordered variant, we're in the remix era ๐Ÿ’…โœจ

๐ŸŽ€ Purpose ๐ŸŽ€

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ‘‘

๐ŸŒธ Remarks ๐ŸŒธ

The function is a wrapper for dla_tgcsylv_l2_reorder. ๐Ÿซถ

๐Ÿฆ‹ See also ๐Ÿฆ‹

dla_tgcsylv_l2_reorder

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB
  • TRANSB โ€” a String that tells the routine which form of the system of equations to use with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN1 โ€” DOUBLE PRECISION, allowed values: +/-1. Tells you the sign between in the first equation. ๐Ÿ’…
  • SGN2 โ€” DOUBLE PRECISION, allowed values: +/-1. Tells you 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 matrix A must be (quasi-) upper triangular. ๐Ÿ”บ
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. The right hand side E and the solution R are M-by-N matrices. โœจ
  • 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. The right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (ngl bestie, the page really does say LDE on this line โ€” we are keeping it character for character ๐Ÿ™ˆ)
  • SCALE โ€” DOUBLE PRECISION. A scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. You have to query the workspace before running the computation โ€” the query happens by calling the subroutine with INFO == -1 on input, and the required workspace comes back to you in INFO.
  • INFO โ€” INTEGER. The whole vibe check of the call:

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit โœจ
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 636 of file tgcsylv.c.


mepack_double_tgcsylv_level2_unopt

void mepack_double_tgcsylv_level2_unopt (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Unoptimized variant) ๐Ÿฆ‹

Purpose

mepack_double_tgcsylv_level2_unopt solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

Remarks

The function is a wrapper for dla_tgcsylv_l2_unopt.

See also

dla_tgcsylv_l2_unopt

Parameters

  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. The right hand side E and the solution R are M-by-N matrices.
  • 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 of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. The right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (same LDE situation, same energy, we're not touching it ๐Ÿซถ)
  • SCALE โ€” DOUBLE PRECISION. A scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to be queried before running the computation โ€” you do that by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO.
  • INFO โ€” INTEGER. The receipts:

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit โœจ
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 425 of file tgcsylv.c.


mepack_double_tgcsylv_level3

void mepack_double_tgcsylv_level3 (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. ๐Ÿ‘‘

Purpose

mepack_double_tgcsylv_level3 solves a generalized coupled Sylvester equation of the following form

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

โ€ฆwhere A is an M-by-M quasi upper triangular matrix, C is an M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And here's the tea ๐Ÿซ– โ€” either B or D gets to be quasi upper triangular as well, like one of them is the extra one, no cap. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. That's the whole pipeline bestie โœจ

๐ŸŽ€ Remarks ๐ŸŽ€

  • The function is a wrapper for dla_tgcsylv_l3. That's the entire remark. Short, sweet, iconic. ๐Ÿ’…

๐Ÿฆ‹ See also ๐Ÿฆ‹

  • dla_tgcsylv_l3

๐ŸŒธ Parameters ๐ŸŒธ

  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes bestie, it really says LDE there โ€” we are reading it exactly as written, not a single character changed ๐Ÿ’€)
  • SCALE โ€” DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date ๐Ÿ—“๏ธ

October 2025

๐Ÿ“Œ Definition ๐Ÿ“Œ

Definition at line 214 of file tgcsylv.c.


๐Ÿ’– mepack_double_tgcsylv_level3_2stage ๐Ÿ’–

void mepack_double_tgcsylv_level3_2stage (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 *
    E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int *
    INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm with sub-blocking for the generalized coupled Sylvester equation. ๐ŸŒˆ

๐Ÿ“ Purpose ๐Ÿ“

mepack_double_tgcsylv_level3_2stage solves a generalized coupled Sylvester equation of the following form, bestie:

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

โ€ฆwhere A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. And also either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. Same energy as the level 3 version, just with the sub-blocking glow-up โœจ

๐ŸŽ€ Remarks ๐ŸŽ€

  • The function is a wrapper for dla_tgcsylv_l3_2s. ๐Ÿ’…

๐Ÿฆ‹ See also ๐Ÿฆ‹

  • dla_tgcsylv_l3_2s

๐ŸŒธ Parameters ๐ŸŒธ

  • TRANSA โ€” String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (again โ€” LDE, verbatim, we are not touching it ๐Ÿ™ˆ)
  • SCALE โ€” DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date ๐Ÿ—“๏ธ

October 2025

๐Ÿ“Œ Definition ๐Ÿ“Œ

Definition at line 636 of file tgcsylv.c.


๐Ÿ’– void mepack_double_tgcsylv_level3_unopt (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO) ๐Ÿ’–

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation โ€” but make it the Unoptimized variant bestie, no glow-up, just vibes ๐Ÿฆ‹

๐ŸŒธ Purpose ๐ŸŒธ

mepack_double_tgcsylv_level3_unopt solves a generalized coupled Sylvester equation that looks like this:

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

okay so here's the tea โ˜• โ€” A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And either B or D can be quasi upper triangular as well, flexible queen ๐Ÿ’… The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. iykyk โœจ

๐ŸŽ€ Remarks ๐ŸŽ€

  • The function is a wrapper for dla_tgcsylv_l3_unopt

๐Ÿฆ‹ See also ๐Ÿฆ‹

  • dla_tgcsylv_l3_unopt

๐Ÿ’œ Parameters ๐Ÿ’œ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐Ÿ‘‘
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. โš ๏ธ careful bestie
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. โš ๏ธ same energy, flip the names
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿซถ glow up moment
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. โœจ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐ŸŒˆ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿ”
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

โญ Date โญ

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 425 of file tgcsylv.c.


๐Ÿ’– void mepack_double_tgcsylv_recursive (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 * E, int LDE, double * F, int LDF, double * SCALE, double * WORK, int * INFO) ๐Ÿ’–

Recursive blocking Algorithm for the generalized coupled Sylvester equation. bestie it recurses, it blocks, it solves ๐Ÿงšโœจ

๐ŸŒธ Purpose ๐ŸŒธ

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿฆ‹

๐ŸŽ€ Remarks ๐ŸŽ€

  • The function is a wrapper for dla_tgcsylv_recursive

๐Ÿฆ‹ See also ๐Ÿฆ‹

  • dla_tgcsylv_recursive

๐Ÿ’œ Parameters ๐Ÿ’œ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐Ÿ‘‘
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. โš ๏ธ
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. โš ๏ธ
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿซถ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. โœจ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐ŸŒˆ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿ”
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation

On exit, when it's doing a workspace query:

  • < 0 โ€” if INFO == -i, the i-Th argument had an illegal value ๐Ÿ™ˆ
  • >= 0 โ€” the value of INFO is the required number of elements in the workspace โœจ

On exit, during normal operation:

  • == 0 โ€” successful exit, we ate ๐Ÿ’…
  • < 0 โ€” if INFO == -i, the i-Th argument had an illegal value ๐Ÿ˜ญ
  • > 0 โ€” the equation is not solved correctly. One of the arising inner systems got singular ๐Ÿ’€

Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition at line 214 of file tgcsylv.c.


void mepack_double_tgsylv_dag ๐ŸŒˆ

void mepack_double_tgsylv_dag (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 * X, int LDX, double *
    SCALE, double * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation with DAG based parallelization. bestie this one is out here parallelizing, it's giving main character energy fr fr ๐Ÿ”ฅ

Purpose:

mepack_double_tgsylv_dag 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. no cap ๐Ÿงš

Remarks

This function is a wrapper for dla_tgsylv_dag. ๐Ÿ’œ

See also

dla_tgsylv_dag

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1: Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. โš ๏ธ like, do not ignore this one bestie.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. โœจ
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition at line 195 of file tgsylv.c.


void mepack_double_tgsylv_gardiner_laub ๐ŸŒธ

void mepack_double_tgsylv_gardiner_laub (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 * X, int LDX,
    double * SCALE, double * WORK, int * INFO)

GARDINER-Laub Algorithm for the generalized Sylvester equation. okay so this one is named after Gardiner and Laub, iconic duo energy fr ๐Ÿ’…

Purpose:

mepack_double_tgsylv_gardiner_laub 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿฆ‹

Remarks

This function is a wrapper for dla_tgsylv_gardiner_laub. ๐Ÿ’œ

See also

dla_tgsylv_gardiner_laub

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1: Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ yes this again, and yes it still matters.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. โœจ
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐Ÿ’–
  • < 0: if INFO == -i, the i-Th argument had an illegal value ๐Ÿ˜ญ
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg Date: October 2025 Definition at line 1941 of file tgsylv.c.


๐Ÿ‘‘ mepack_double_tgsylv_level2 ๐Ÿ‘‘

void mepack_double_tgsylv_level2 (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 * X, int LDX, double *
    SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Classical level 2 variant)

Purpose:

mepack_double_tgsylv_level2 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

Remarks

This function is a wrapper for dla_tgsylv_l2.

See also

dla_tgsylv_l2

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1: Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1: Perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author: Martin Koehler, MPI Magdeburg Date: October 2025 Definition at line 1359 of file tgsylv.c.


๐Ÿฆ‹ mepack_double_tgsylv_level2_colwise ๐Ÿฆ‹

void mepack_double_tgsylv_level2_colwise (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 * X, int LDX,
    double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Column-by-column variant)

Purpose:

mepack_double_tgsylv_level2_colwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

Remarks

This function is a wrapper for dla_tgsylv_l2_colwise.

See also

dla_tgsylv_l2_colwise

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1: Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1: Perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.
                      == 0:  successful exit
                      < 0:  if INFO == -i, the i-Th argument had an illegal value
                      > 0:  The equation is not solved correctly. One of the arising inner
                            system got singular.

Author โ€” Martin Koehler, MPI Magdeburg ๐Ÿ’–

Date โ€” October 2025 โœจ

Definition at line 1747 of file tgsylv.c.


๐ŸŒธ mepack_double_tgsylv_level2_local_copy ๐ŸŒธ

void mepack_double_tgsylv_level2_local_copy (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 * X, int LDX, double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” and this one is the Local copies, unaligned flavor, bestie ๐Ÿ’…

Purpose:

mepack_double_tgsylv_level2_local_copy 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore, either B or D can be quasi upper triangular as well ๐Ÿ‘€. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK ๐Ÿฆ‹

Remarks โ€” bestie this one is literally just a wrapper for dla_tgsylv_l2_local_copy, no cap ๐Ÿ™ˆ

See also โ€” go peek at dla_tgsylv_l2_local_copy ๐Ÿ‘‘

Parameters

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation ๐Ÿ’ซ
= 1 :  Solve Equation (1)
== -1:  Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular ๐ŸŽ€
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, the matrix B must be upper triangular ๐Ÿ‘€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular ๐ŸŽ€
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, the matrix D must be upper triangular ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X holds the right hand side Y. On output, the matrix X holds the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. It's the scaling factor that keeps the result from overflowing ๐Ÿซถ. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is not solved correctly and in that case you have to use another solver, fr fr ๐Ÿ˜ญ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to be queried before running the computation. The query is performed by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.

On input:

  == -1 : Perform a workspace query
  <> -1 : normal operation

On exit, workspace query:

  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

Author โ€” Martin Koehler, MPI Magdeburg ๐Ÿ’–

Date โ€” October 2025 โœจ

Definition at line 971 of file tgsylv.c.


๐Ÿฆ‹ mepack_double_tgsylv_level2_local_copy_128 ๐Ÿฆ‹

void mepack_double_tgsylv_level2_local_copy_128 (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 * X, int LDX, double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation โ€” this is the Local copies, M,N<=128 version, and she is giving tiny-matrix main character energy ๐Ÿ‘‘๐Ÿ’…

Purpose:

mepack_double_tgsylv_level2_local_copy_128 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore, either B or D can be quasi upper triangular as well ๐Ÿ‘€. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK ๐Ÿฆ‹

Remarks โ€” once again, she's just a wrapper, this time for dla_tgsylv_l2_local_copy_128 ๐Ÿ™ˆ

See also โ€” the icon herself, dla_tgsylv_l2_local_copy_128 โœจ

Parameters

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation ๐Ÿ’ซ
= 1 :  Solve Equation (1)
== -1:  Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular ๐ŸŽ€
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, the matrix B must be upper triangular ๐Ÿ‘€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular ๐ŸŽ€
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, the matrix D must be upper triangular ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X holds the right hand side Y. On output, the matrix X holds the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. It's the scaling factor that keeps the result from overflowing ๐Ÿซถ. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is not solved correctly and in that case you have to use another solver, fr fr ๐Ÿ˜ญ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to be queried before running the computation. The query is performed by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.

On input:

  == -1 : Perform a workspace query
  <> -1 : normal operation

On exit, workspace query:

  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.
  • == 0: successful exit โœจ literally the dream
  • < 0: if INFO == -i, the i-Th argument had an illegal value ๐Ÿ˜ญ somebody handed me a bad argument
  • > 0: the equation is not solved correctly. One of the arising inner system got singular ๐Ÿ’€

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition โ€” at line 777 of file tgsylv.c.


mepack_double_tgsylv_level2_local_copy_32</p>

void mepack_double_tgsylv_level2_local_copy_32 (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 * X, int
    LDX, double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=32) ๐Ÿฆ‹

Purpose:

mepack_double_tgsylv_level2_local_copy_32 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ”ฅ

Remarks

This function is a wrapper for dla_tgsylv_l2_local_copy_32. ๐Ÿ’…

See also

dla_tgsylv_l2_local_copy_32

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿซถ
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition โ€” at line 195 of file tgsylv.c.


mepack_double_tgsylv_level2_local_copy_64</p>

void mepack_double_tgsylv_level2_local_copy_64 (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 * X, int
    LDX, double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=64) ๐ŸŽ€

Purpose:

mepack_double_tgsylv_level2_local_copy_32 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

Remarks

This function is a wrapper for dla_tgsylv_l2_local_copy_64. โœจ

See also

dla_tgsylv_l2_local_copy_64

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘‘
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿฆ‹
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. ๐Ÿ’–
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿ’œ
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit, we love to see it ๐Ÿ’…
  • < 0: if INFO == -i, the i-Th argument had an illegal value (rude, but okay)
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ˜ญ

Author โœจ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition at line 389 of file tgsylv.c.


๐Ÿ’– void mepack_double_tgsylv_level2_reorder (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 * X, int LDX, double * SCALE, double * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Reordered variant) ๐ŸŒธ

Purpose ๐Ÿ’œ

mepack_double_tgsylv_level2_reorder 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿฆ‹

Remarks ๐ŸŒธ

This function is a wrapper for dla_tgsylv_l2_reorder. (iconic behavior honestly ๐Ÿ‘‘)

See also โญ

dla_tgsylv_l2_reorder

Parameters ๐ŸŽ€

  • TRANSA

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

  • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
  • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB

TRANSB is String Specifies the form of the system of equations with respect to B and D:

  • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
  • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN

SGN is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between the two parts of the Sylvester equation.

  • = 1 : Solve Equation (1)
  • == -1: Solve Equation (2)
  • M

M is INTEGER The order of the matrices A and C. M >= 0.

  • N

N is INTEGER The order of the matrices B and D. N >= 0.

  • A

A is DOUBLE PRECISION array, dimension (LDA,M) The matrix A must be (quasi-) upper triangular.

  • LDA

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

  • B

B is DOUBLE PRECISION array, dimension (LDB,N) The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.

  • LDB

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

  • C

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

  • LDC

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

  • D

D is DOUBLE PRECISION array, dimension (LDD,N) The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.

  • LDD

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

  • X

X is DOUBLE PRECISION array, dimension (LDX,N) On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.

  • LDX

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

  • SCALE

SCALE is DOUBLE PRECISION SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ

  • WORK

WORK is DOUBLE PRECISION array, dimension LDWORK Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.

  • INFO

INFO is INTEGER

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.
On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.
okay so decode the vibe check: 0 = we ate, no notes ๐Ÿ’…. A negative number means INFO == -i and argument number i was illegal (rude of it). A positive number means the equation did NOT get solved correctly because one of the arising inner systems came out singular โ€” that's a big yikes, not a you problem. ๐Ÿ˜ญ

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 1165 of file tgsylv.c.


mepack_double_tgsylv_level2_rowwise ๐Ÿฆ‹

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Row-by-Row variant)

Purpose:

bestie, mepack_double_tgsylv_level2_rowwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. โœจ

Remarks

This function is a wrapper for dla_tgsylv_l2_rowwise.

See also

dla_tgsylv_l2_rowwise

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
= 1 :  Solve Equation (1)
== -1:  Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER

On input:

== -1 : Perform a workspace query
<> -1 : normal operation

On exit, workspace query:

< 0 :  if INFO == -i, the i-Th argument had an illegal value
>= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

== 0:  successful exit
< 0:  if INFO == -i, the i-Th argument had an illegal value
> 0:  The equation is not solved correctly. One of the arising inner
      system got singular.

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 1553 of file tgsylv.c.


mepack_double_tgsylv_level3 ๐Ÿ‘‘

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

Purpose:

mepack_double_tgsylv_level3 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

Remarks

This function is a wrapper for dla_tgsylv_l3.

See also

dla_tgsylv_l3

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
== 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
== 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
== 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
== 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
= 1 :  Solve Equation (1)
== -1:  Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER

On input:

== -1 : Perform a workspace query
<> -1 : normal operation

On exit, workspace query:

< 0 :  if INFO == -i, the i-Th argument had an illegal value
>= 0:  The value of INFO is the required number of elements in the workspace.
heads up bestie, the page keeps going โ€” there's more of this INFO block coming in the next part, don't close the tab ๐Ÿ’œ

On exit, normal operation:

  • == 0: slayed, successful exit ๐Ÿ’–
  • < 0: if INFO == -i, then the i-th argument was giving illegal value energy (not it) ๐Ÿ˜ญ
  • > 0: the equation did not get solved correctly โ€” one of the inner systems it spawned came out singular ๐Ÿ’€

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition

At line 195 of file tgsylv.c.


void mepack_double_tgsylv_level3_2stage (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 * X, int LDX, double * SCALE, double * WORK, int * INFO)

okay bestie, this one is the Level-3 Bartels-Stewart Algorithm with sub-blocking for the generalized Sylvester equation ๐ŸŽ€

Purpose

mepack_double_tgsylv_level3_2stage 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. โœจ

Remarks

This function is literally just a wrapper for dla_tgsylv_l3_2s โ€” it's giving middle-manager, but make it iconic ๐Ÿซถ

See also

dla_tgsylv_l3_2s

Parameters

  • TRANSA โ€” TRANSA is String. It says what form the system of equations takes with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (no transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (transpose A and C)
  • TRANSB โ€” TRANSB is String. It says what form the system of equations takes with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. It sets the sign between the two parts of the Sylvester equation.
    • = 1: solve Equation (1)
    • == -1: solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular, no cap.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘‘
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
bestie listen ๐Ÿ’€ if SCALE .NE. 1 you did not get a correct solve, so you gotta go grab a different solver. that's not a vibe, that's a fact.
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐ŸŽ€
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1: perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-th argument had an illegal value
  • >= 0: the value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐Ÿ’–
  • < 0: if INFO == -i, the i-th argument had an illegal value
  • > 0: the equation is not solved correctly. One of the arising inner system got singular.

Author

Martin Koehler, MPI Magdeburg

Date

October 2025

Definition

At line 777 of file tgsylv.c.


void mepack_double_tgsylv_level3_colwise (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 * X, int LDX, double * SCALE, double * WORK, int * INFO)

this is the Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation but make it Column-by-Column ๐Ÿฆ‹ (the variant name said it first)

Purpose

mepack_double_tgsylv_level3_colwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. โœจ

Remarks

This function is a wrapper for dla_tgsylv_l3_colwise. periodt ๐Ÿ’…

See also

dla_tgsylv_l3_colwise

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1: solve Equation (1)
    • == -1: solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘‘
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. ๐ŸŒธ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver.
fr fr, if SCALE .NE. 1 the solve did not land โ€” go find another solver, bestie ๐Ÿ˜ญ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐ŸŽ€
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1: perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-th argument had an illegal value
  • >= 0: the value of INFO is the required number of elements in the workspace.
  • On exit, normal operation:
    • == 0: successful exit, we ate and left no crumbs ๐Ÿ’…
    • < 0: if INFO == -i, then the i-th argument had an illegal value โ€” so like, you passed something cursed bestie ๐Ÿ˜ญ
    • > 0: the equation is not solved correctly. One of the arising inner systems got singular ๐Ÿ’€

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

๐Ÿ“ Definition

Definition at line 583 of file tgsylv.c.


โœจ void mepack_double_tgsylv_level3_rowwise โœจ

void mepack_double_tgsylv_level3_rowwise (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 * X, int LDX,
    double * SCALE, double * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation (Row-by-row variant) ๐Ÿซถ

Purpose:

mepack_double_tgsylv_level3_rowwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

Remarks

This function is a wrapper for dla_tgsylv_l3_rowwise.

See also

dla_tgsylv_l3_rowwise

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N).
    • On input, the matrix X contains the right hand side Y.
    • On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN.
    • Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. โœจ
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

๐Ÿ“ Definition

Definition at line 389 of file tgsylv.c.


โœจ void mepack_double_tgsylv_recursive โœจ

void mepack_double_tgsylv_recursive (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 * X, int LDX,
    double * SCALE, double * WORK, int * INFO)

Recursive blocking Algorithm for the generalized Sylvester equation. ๐ŸŒ€

Purpose:

mepack_double_tgsylv_recursive 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

Remarks

This function is a wrapper for dla_tgsylv_recursive.

See also

dla_tgsylv_recursive

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is DOUBLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is DOUBLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is DOUBLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is DOUBLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is DOUBLE PRECISION array, dimension (LDX,N).
    • On input, the matrix X contains the right hand side Y.
    • On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN.
    • Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is DOUBLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. โœจ
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, when we're in normal operation mode (aka not a workspace query, bestie, just vibes):

== 0:  successful exit
< 0:  if INFO == -i, the i-Th argument had an illegal value
> 0:  The equation is not solved correctly. One of the arising inner
      system got singular.

Author ๐Ÿซถ Martin Koehler, MPI Magdeburg

Date ๐ŸŒธ October 2025

Definition at line 195 of file tgsylv.c.


๐Ÿ’ซ mepack_single_tgcsylv_dag

void mepack_single_tgcsylv_dag (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 * E, int LDE, float *
    F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation with DAG scheduling. โœจ

Purpose:

mepack_single_tgcsylv_dag solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿฆ‹

Remarks

The function is a wrapper for sla_tgcsylv_dag ๐Ÿซถ

See also

sla_tgcsylv_dag

Parameters

  • TRANSA โ€” TRANSA is String
    • Specifies the form of the system of equations with respect to A and C:
      • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
      • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String
    • Specifies the form of the system of equations with respect to B and D:
      • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
      • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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)
    • The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER
    • The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N)
    • The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER
    • The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N)
    • The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER
    • The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER
    • The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER
    • The leading dimension of the array F. LDE >= max(1,M).
๐Ÿ’€ bestie, no cap, the page literally says LDE >= max(1,M) in the LDF description โ€” that's what's written, we're just reading it out loud, we do not make the rules ๐Ÿ™ˆ
  • SCALE โ€” SCALE is SINGLE PRECISION
    • SCALE is a scaling factor to prevent the overflow in the result.
    • If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK
    • Workspace for the algorithm.
    • The workspace needs to queried before the running the computation.
    • The query is performed by calling the subroutine with INFO == -1 on input.
    • The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐Ÿซถ Martin Koehler, MPI Magdeburg

Date ๐ŸŒธ October 2025

Definition at line 425 of file tgcsylv.c.


๐Ÿ”ฅ mepack_single_tgcsylv_dual_dag

void mepack_single_tgcsylv_dual_dag (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

OpenMP4 - DAG Algorithm for the dual generalized coupled Sylvester equation. ๐Ÿ‘‘

Purpose:

mepack_single_tgcsylv_dual_dag 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐ŸŒˆ

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_tgcsylv_dual_dag. ๐Ÿซถ

See also

sla_tgcsylv_dual_dag

Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1)
    • Specifies the form of the system of equations with respect to A and C:
      • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
      • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1)
    • Specifies the form of the system of equations with respect to B and D:
      • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
      • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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)
    • The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER
    • The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N)
    • The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER
    • The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N)
    • The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER
    • The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2.
    • Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. It's the leading dimension of the array E. You need LDE >= max(1,M) or it's not giving. ๐Ÿ’…
  • F โ€” F is a SINGLE PRECISION array with dimension (LDF,N). On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿฆ‹
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
bestie, yes it literally says LDE here and not LDF. We're just reading the manpage, not fixing it. ๐Ÿ’€
  • SCALE โ€” SCALE is SINGLE PRECISION. It's a scaling factor to prevent overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. โœจ
  • WORK โ€” WORK is a SINGLE PRECISION array with dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐Ÿ› ๏ธ
  • INFO โ€” INFO is INTEGER. Here's the whole situation:
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author โ€” Martin Koehler, MPI Magdeburg

Date โ€” October 2025

Definition at line 459 of file tgcsylv_dual.c.


mepack_single_tgcsylv_dual_level2

   void mepack_single_tgcsylv_dual_level2 (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 * E, int
       LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation. ๐Ÿ”ฅ

Purpose:

mepack_single_tgcsylv_dual_level2 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK. ๐Ÿ’…

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_tgcsylv_dual_l2.

See also:

sla_tgcsylv_dual_l2

Parameters:

  • TRANSA โ€”
  • TRANSA โ€” CHARACTER(1) โœจ tells you what form the system of equations takes with respect to A and C, bestie:
    • == 'N': op1(A) = A, op1(C) = C (no transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (transpose A and C)
  • TRANSB โ€” CHARACTER(1) ๐Ÿ’ซ same energy, but for B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN1 โ€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐ŸŽ€
  • SGN2 โ€” SINGLE 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 โ€” SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. ๐Ÿ‘‘
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿซถ
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. โœจ
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿซถ
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’–
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes bestie, the original literally says LDE here, we do not fix it, we report it ๐Ÿ™ˆ)
  • SCALE โ€” SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿงš
  • WORK โ€” SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐ŸŒธ
  • INFO โ€” INTEGER. The whole vibe check, right here:
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit ๐ŸŽ‰
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

๐Ÿ’œ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

๐Ÿ“ Definition

At line 1832 of file tgcsylv_dual.c.


void mepack_single_tgcsylv_dual_level2_local_copy_128 (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 * E, int LDE, float * F, int LDF, float * SCALE, float * WORK, int
    * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation ( Local Copies, M,N <= 128 ) ๐Ÿฆ‹


โœจ Purpose

mepack_single_tgcsylv_dual_level2_local_copy_128 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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_tgcsylv_dual_l2_local_copy_128. iykyk ๐Ÿ’…


๐Ÿ‘€ See also

sla_tgcsylv_dual_l2_local_copy_128


๐ŸŽ€ Parameters

  • TRANSA โ€” CHARACTER(1) โœจ Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” CHARACTER(1) ๐Ÿ’ซ Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN1 โ€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation.
  • SGN2 โ€” SINGLE 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 โ€” SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿซถ
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿซถ
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’–
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (again, that's the original's LDE, not a typo of mine, we simply report ๐Ÿ™ˆ)
  • SCALE โ€” SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿงš
  • WORK โ€” SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐ŸŒธ
  • INFO โ€” INTEGER. Here we go again:
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
  • On exit, normal operation:
    • == 0: successful exit ๐ŸŽ‰ she did it, we're so proud
    • < 0: if INFO == -i, the i-Th argument had an illegal value ๐Ÿ™ˆ
    • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€ not the singular inner system

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date

October 2025

๐Ÿ“ Definition

at line 2752 of file tgcsylv_dual.c.


๐Ÿฆ‹ mepack_single_tgcsylv_dual_level2_local_copy_32

void mepack_single_tgcsylv_dual_level2_local_copy_32 (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 * E, int LDE, float * F, int LDF, float * SCALE, float * WORK, int
    * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation ( Local Copies, M,N <= 32 )

bestie. Look at that name. It's giving "I memorized the whole algorithm and also I'm not afraid to say it out loud." ๐Ÿ’…

โœจ Purpose

mepack_single_tgcsylv_dual_level2_local_copy_32 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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 the whole Kronecker thing is the vibe check of this function. She said "let me re-derive it in block form" and then did. no cap.

๐ŸŒธ Remarks

This function is a wrapper for sla_tgcsylv_dual_l2_local_copy_32.

๐Ÿ”ญ See also

sla_tgcsylv_dual_l2_local_copy_32

๐ŸŽ€ Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
๐Ÿ˜ญ yes bestie, it literally says LDE in the LDF spot. That's what the page says. We do not editorialize, we report. ๐Ÿซถ
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER
    • On input:
      • == -1 : Perform a workspace query ( not recommended in the C interface)
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿ‘‘ Author

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date

October 2025

๐Ÿ“ Definition

at line 2062 of file tgcsylv_dual.c.


๐Ÿฆ‹ mepack_single_tgcsylv_dual_level2_local_copy_64

void mepack_single_tgcsylv_dual_level2_local_copy_64 (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 * E, int LDE, float * F, int LDF, float * SCALE, float * WORK, int
    * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation ( Local Copies, M,N <= 64 )

same algorithm, bigger energy. The 32 said "small blocks only," the 64 said "okay but what if we went twice." โญ

โœจ Purpose

mepack_single_tgcsylv_dual_level2_local_copy_64 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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

๐Ÿ“ yes it's the same derivation as the _32. It's the same equation, bestie. The derivation doesn't change just because the block size did. icon behavior honestly.

๐ŸŒธ Remarks

This function is a wrapper for sla_tgcsylv_dual_l2_local_copy_64.

๐Ÿ”ญ See also

sla_tgcsylv_dual_l2_local_copy_64

๐ŸŽ€ Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. And here's the little plot twist bestie: if the matrix D is already quasi-upper triangular, then B has to be plain old upper triangular. The way they take turns being the special one ๐Ÿ’…
  • LDB โ€” LDB is INTEGER, aka the leading dimension of the array B. And LDB >= max(1,N). periodt.
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. no quasi, no games, just triangular ๐ŸŽ€
  • LDC โ€” LDC is INTEGER, the leading dimension of the array C, and LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. Flip side of the earlier rule: if the matrix B is already quasi-upper triangular, then D must be upper triangular. They're matching, it's giving coordinated outfits ๐Ÿ’–
  • LDD โ€” LDD is INTEGER, the leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is a SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Both the right hand side E and the solution R are M-by-N matrices. She's a dual citizen, input queen and output queen ๐Ÿ‘‘
  • 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 matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and solution L are M-by-N matrices. yes she's the other half of the duo ๐Ÿฆ‹
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
okay bestie I need you to know I copied that exactly ๐Ÿ™ˆ the docs really do say LDE in the LDF description. I don't make the rules, I just deliver them faithfully with my whole chest.
  • SCALE โ€” SCALE is SINGLE PRECISION. It's the scaling factor that exists purely to stop the result from overflowing (the classic villain of numerical linear algebra ๐Ÿ’€). 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 SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. It's the behind-the-scenes bestie doing all the heavy lifting while everyone else takes credit โœจ
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query ( not recommended in the C interface)
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

So basically INFO is the group chat narrator: she tells you if you did something illegal, if you need more workspace, if you slayed, or if an inner system went singular on you. read her carefully fr fr ๐Ÿ“–

Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 2291 of file tgcsylv_dual.c.


void mepack_single_tgcsylv_dual_level2_local_copy_96 ( ... ) โœจ

void mepack_single_tgcsylv_dual_level2_local_copy_96 (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 * E, int LDE, float * F, int LDF, float * SCALE, float * WORK, int
    * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation ( Local Copies, M,N <= 96 )

Purpose ๐ŸŽฏ

mepack_single_tgcsylv_dual_level2_local_copy_96 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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

Like, the duality here is genuinely iconic โ€” it's giving mirror selfie, it's giving the same equation but transposed, it's giving main character energy ๐Ÿ”ฅ

Remarks ๐Ÿ’ฌ

This function is a wrapper for sla_tgcsylv_dual_l2_local_copy_96.

See also ๐Ÿ‘€

sla_tgcsylv_dual_l2_local_copy_96

Parameters ๐ŸŽ€

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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 matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is a SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • 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 matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
still LDE in the LDF blurb, bestie ๐Ÿซถ I promise I'm not playing games, that's genuinely what the original says.
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is a SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query ( not recommended in the C interface)
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 2521 of file tgcsylv_dual.c.


void mepack_single_tgcsylv_dual_level3 ( ... ) โœจ

void mepack_single_tgcsylv_dual_level3 (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation.

Purpose ๐ŸŽฏ

mepack_single_tgcsylv_dual_level3 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

LDE ๐ŸŽ€

LDE is INTEGER.

It's the leading dimension of the array E, and the rule is LDE >= max(1,M). That's the whole vibe check, bestie. ๐Ÿ’–

LDF โœจ

LDF is INTEGER.

The leading dimension of the array F, and the constraint is written as LDE >= max(1,M).

ngl that's exactly how it's written in the source โ€” it says LDE in the LDF blurb. not me editing it, i'm just the messenger ๐Ÿ’…

SCALE ๐ŸŒธ

SCALE is SINGLE PRECISION.

SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.

so like... it's the safety net that keeps your numbers from absolutely losing it ๐Ÿซถ

WORK ๐Ÿงš

WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)).

Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

you do not want to be guessing at this one, trust. โœจ

INFO ๐Ÿ’…

INFO is INTEGER.

On input:

  • == -1: Perform a workspace query ( not recommended in the C interface)
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.
okay so < 0 is "girl, one of your arguments is illegal" in both modes, and > 0 is "the math gave up" โ€” one of the arising inner system got singular ๐Ÿ˜ญ. read your INFO fr fr, it's literally telling you what happened ๐Ÿ‘‘
  • LDE โ€” INTEGER, bestie. The leading dimension of the array E. LDE >= max(1,M). ๐Ÿ’…
  • F โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿฆ‹
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes it says LDE, we are literally quoting the page, no notes ๐Ÿ“)
  • SCALE โ€” SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. โœจ
  • WORK โ€” SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐Ÿ”ฅ
  • INFO โ€” INTEGER. Okay so this one has layers, pay attention:

On input:

  • == -1 : Perform a workspace query ( not recommended in the C interface)
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ˜ญ

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 915 of file tgcsylv_dual.c.


void mepack_single_tgcsylv_dual_recursive ๐Ÿ‘‘

void mepack_single_tgcsylv_dual_recursive (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Recursive blocking algorithm for the dual generalized coupled Sylvester equation. Bestie. We're going recursive. ๐ŸŒ€

Purpose:

mepack_single_tgcsylv_dual_recursive 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

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_tgcsylv_dual_recursive. It's giving "I just delegate" energy and honestly? respect. ๐Ÿซถ

See also

sla_tgcsylv_dual_recursive

Parameters

  • TRANSA โ€” TRANSA is CHARACTER(1). Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is CHARACTER(1). Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐ŸŽ€
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • 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 matrix C must be upper triangular. ๐ŸŽ€
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. โœจ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. โœจ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (again with the LDE, quoting verbatim, not my typo I promise ๐Ÿ’€)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory. ๐Ÿ”ฅ
  • INFO โ€” INFO is INTEGER. Same three-way deal as always:

On input:

  • == -1 : Perform a workspace query ( not recommended in the C interface)
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 459 of file tgcsylv_dual.c.


void mepack_single_tgcsylv_level2 ๐ŸŒˆ

void mepack_single_tgcsylv_level2 (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 * E, int LDE, float *
    F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. Say that five times fast, bestie, I dare you. ๐Ÿ—ฃ๏ธ๐Ÿ’–

Purpose:

mepack_single_tgcsylv_level2 solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿฆ‹

Remarks

The function is a wrapper for sla_tgcsylv_l2. ๐Ÿ‘‘

See also

sla_tgcsylv_l2

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐ŸŽ€
  • LDA
  • TRANSB โ€” bestie this is a String and it picks what shape the system takes when it comes to B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D, they're living their truth as-is)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D, flip 'em)
  • SGN1 โ€” SGN1 is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between in the first equation. That little plus-or-minus is doing SO much heavy lifting fr.
  • SGN2 โ€” SGN2 is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between in the second equation. Same energy, second equation. ๐Ÿ’…
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0. (Zero is allowed, she's inclusive like that.)
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0. Periodt.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. No exceptions, the vibes demand it. ๐Ÿฆ‹
  • 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 matrix B must be (quasi-) upper triangular. And here's the tea: if the matrix D is already quasi-upper triangular, the matrix B must be upper triangular. They can't both be out here being quasi, that's not the vibe check.
  • 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 matrix C must be upper triangular. Strictly. Iconic, no notes. โœจ
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And same rule as before, just flipped: if the matrix B is already quasi-upper triangular, the matrix D must be upper triangular. It's giving mutual exclusivity, and honestly? We respect it. ๐Ÿ’–
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. So she goes in as the problem and comes out as the answer, main character arc honestly. ๐Ÿ‘‘
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. Same glow-up energy as E, we love a transformation. ๐Ÿฆ‹
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (Yes bestie, it says LDE here โ€” that's literally what the original says, so we're keeping it exactly as-is, no cap. Don't come for me, come for the source. ๐Ÿ˜ญ)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. She's the bodyguard keeping your numbers from overflowing into the void. ๐Ÿซถ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. So basically you gotta ASK her how much space she needs first, like a true diva. And honestly? Deserved. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.

On input:

== -1 : Perform a workspace query
<> -1 : normal operation

On exit, workspace query:

< 0 :  if INFO == -i, the i-Th argument had an illegal value
>= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

== 0:  successful exit
< 0:  if INFO == -i, the i-Th argument had an illegal value
> 0:  The equation is not solved correctly. One of the arising inner
      system got singular.

So INFO is the group chat that tells you what went down: negative means somebody handed over an illegal value (an argument said something wrong, we've all been there ๐Ÿ™ˆ), >= 0 after a query means "here's how much workspace I need", and a positive number on a real run means one of the inner systems went singular and the equation didn't get solved correctly. ๐Ÿ’€


Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

Date โญ

October 2025

Definition ๐Ÿ“Œ

Definition at line 2533 of file tgcsylv.c.


๐Ÿงš void mepack_single_tgcsylv_level2_local_copy_128 (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 * E, int LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO) ๐Ÿ’œ

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=128)

Purpose:

mepack_single_tgcsylv_level2_local_copy_128 solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK.

Remarks ๐Ÿ”ฅ

The function is a wrapper for sla_tgcsylv_l2_local_copy_128

See also ๐ŸŽ€

sla_tgcsylv_l2_local_copy_128

Parameters โœจ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (Again bestie โ€” this is verbatim what the page says, keeping it EXACTLY as written, we do not edit the source, we only serve cunt while quoting it faithfully. ๐Ÿ’–)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

== -1 : Perform a workspace query
<> -1 : normal operation

On exit, workspace query:

< 0 :  if INFO == -i, the i-Th argument had an illegal value
>= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

== 0:  successful exit
< 0:  if INFO == -i, the i-Th argument had an illegal value
> 0:  The equation is not solved correctly. One of the arising inner
      system got singular.

Author ๐ŸŒˆ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition ๐Ÿ“Ž

Definition at line 2533 of file tgcsylv.c.

  • TRANSB โ€” a string, and it picks the form of the system of equations for B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN1 โ€” SINGLE PRECISION, allowed values: +/-1. It's the sign hanging out between the two terms in the first equation.
  • SGN2 โ€” SINGLE PRECISION, allowed values: +/-1. Same deal, but for the second equation.
  • M โ€” INTEGER. The order of the matrices A and C. So like, M >= 0, no negativity allowed bestie.
  • N โ€” INTEGER. The order of the matrices B and D. Also N >= 0.
  • A โ€” SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. And here's the lil plot twist: if the matrix D is already quasi-upper triangular, then B must be plain upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular. No quasi business here, just upper.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And mirroring the earlier vibe: if B is already quasi-upper triangular, then D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” SINGLE PRECISION array, dimension (LDE,N). On input, E is holding the right hand side E. On output, E is holding the solution R of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Both the right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” SINGLE PRECISION array, dimension (LDF,N). On input, F is holding the right hand side F. On output, F is holding the solution L of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. Both the right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yeah bestie, the page literally says LDE there โ€” we're not fixing it, we're reporting it ๐Ÿ’…)
  • SCALE โ€” 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 couldn't be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. Heads up: you gotta query the workspace before running the computation. You do that by calling the subroutine with INFO == -1 on input, and the required workspace comes back to you in INFO. Iconic, honestly.
  • INFO โ€” INTEGER.

On input:

  • == -1: perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • >= 0: the value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐ŸŽ‰
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: the equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ˜ญ yeah, that one hurts.

Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition

Definition at line 3374 of file tgcsylv.c.


๐ŸŒธ mepack_single_tgcsylv_level2_local_copy_32 ๐ŸŒธ

void mepack_single_tgcsylv_level2_local_copy_32 (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 * E,
    int LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=32)

Purpose ๐Ÿ’–

mepack_single_tgcsylv_level2_local_copy_32 solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And plot twist: furthermore, either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) (or (D,B)) are created by SGGES from LAPACK.

Remarks ๐Ÿ™ˆ

The function is a wrapper for sla_tgcsylv_l2_local_copy_32

See also ๐Ÿ‘€

sla_tgcsylv_l2_local_copy_32

Parameters โœจ

  • TRANSA โ€” a string. It specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (no transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (transpose A and C)
  • TRANSB โ€” a string. It specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (no transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (transpose B and D)
  • SGN1 โ€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign in between in the first equation.
  • SGN2 โ€” SINGLE PRECISION, allowed values: +/-1. Specifies the sign in 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 โ€” SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” INTEGER. The leading dimension of the array F. LDE >= max(1,M). (still says LDE, still not our problem ๐Ÿซถ)
  • SCALE โ€” SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INTEGER.

On input:

  • == -1: Perform a workspace query
  • <> -1: normal operation

On exit, workspace query:

  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author ๐Ÿซถ

Martin Koehler, MPI Magdeburg

Date ๐ŸŽ€

October 2025

Definition

Definition at line 2744 of file tgcsylv.c.


๐Ÿฆ‹ mepack_single_tgcsylv_level2_local_copy_64 ๐Ÿฆ‹

void mepack_single_tgcsylv_level2_local_copy_64 (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 * E,
    int LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=64)

Purpose ๐Ÿ’–

mepack_single_tgcsylv_level2_local_copy_64 solves a generalized coupled Sylvester equation of the following form

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

...where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And bestie, plot twist โœจ โ€” either B or D can be quasi upper triangular too. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) (or (D,B)) are created by SGGES from LAPACK. iykyk ๐Ÿ’…

๐ŸŒธ Remarks ๐ŸŒธ

The function is a wrapper for sla_tgcsylv_l2_local_copy_64. She's giving delegation, she's giving girlboss, she is not doing the math herself ๐Ÿ˜Œ

๐Ÿฆ‹ See also ๐Ÿฆ‹

sla_tgcsylv_l2_local_copy_64 โ€” go say hi to the real one doing the work ๐Ÿซถ

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN1 โ€” SGN1 is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. It's giving "which way does the vibe go" โž•โž–
  • SGN2 โ€” SGN2 is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. Same energy, 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). The matrix A must be (quasi-) upper triangular. No exceptions bestie ๐Ÿ™ˆ
  • 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 matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. Read that twice, it's a whole conditional situation ๐Ÿ’€
  • 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 matrix C must be upper triangular. Strictly upper triangular, no quasi-ness here, she said what she said โœ‹
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. The other half of that conditional, love that for them ๐ŸŽ€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. She comes in as one thing and leaves as another โ€” glow up ๐ŸŒˆ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. Same transformation arc, different matrix ๐Ÿ’œ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (Yes bestie, the original says LDE here โ€” not me fixing it, that's literally what it says ๐Ÿ˜ญ)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. She's the safety net fr fr ๐Ÿ›Ÿ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. Ask first, then run โ€” that's the rule ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.
Bestie, that > 0 case? That's the "one of the inner systems got singular" jump scare. Not a crash, not a bug โ€” just the math saying "nope, can't solve this one" ๐Ÿ™ˆ

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 2954 of file tgcsylv.c.


void mepack_single_tgcsylv_level2_local_copy_96 (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 * E,
    int LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

๐ŸŒŸ Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation (Local copies, M,N<=96) ๐ŸŒŸ

๐Ÿ’– Purpose: ๐Ÿ’–

mepack_single_tgcsylv_level2_local_copy_96 solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. She's the bigger sister of the _64 version, same vibe, more room to breathe โœจ

๐ŸŒธ Remarks ๐ŸŒธ

The function is a wrapper for sla_tgcsylv_l2_local_copy_96. Once again, delegation, queen behavior ๐Ÿ‘‘

๐Ÿฆ‹ See also ๐Ÿฆ‹

sla_tgcsylv_l2_local_copy_96 โ€” the actual MVP ๐Ÿซถ

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. Yes, same conditional as before, she's consistent ๐Ÿ’€
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐ŸŽ€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐ŸŒˆ
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’œ
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (And again, bestie โ€” the original still says LDE. I'm just the messenger ๐Ÿซ )
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐Ÿ›Ÿ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. Query first, bestie ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.
Same warning as always, no cap: > 0 means the equation is not solved correctly because one of the arising inner systems got singular. Not a drill ๐Ÿ”ฅ

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 3164 of file tgcsylv.c.

mepack_single_tgcsylv_level2_reorder</p> ๐Ÿ’…

void mepack_single_tgcsylv_level2_reorder (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 * E, int LDE, float * F, int LDF,
    float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation โ€” the Reordered variant, bestie โœจ

Purpose: ๐Ÿ’–

okay so mepack_single_tgcsylv_level2_reorder solves a generalized coupled Sylvester equation that looks like this, no cap:

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Also, either B or D can be quasi upper triangular as well, bestie โ€” it's giving flexibility ๐ŸŒธ. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. iconic behavior honestly ๐Ÿ‘‘

Remarks ๐ŸŽ€

  • The function is a wrapper for sla_tgcsylv_l2_reorder

See also ๐Ÿฆ‹

  • sla_tgcsylv_l2_reorder

Parameters ๐Ÿ’œ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐Ÿ“
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • 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 matrix C must be upper triangular. ๐Ÿ“
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’–
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (yes bestie, that's literally what the page says โ€” LDE, not LDF ๐Ÿ’€ keeping it real)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐ŸŒˆ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿงš
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.
โš ๏ธ bestie watch out โ€” a > 0 INFO on normal operation means the equation is not solved correctly. One of the arising inner system got singular. not the vibe, fr fr ๐Ÿ˜ญ

Author โœ๏ธ

  • Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

  • October 2025

Definition at line 2322 of file tgcsylv.c. ๐Ÿ”ฅ


mepack_single_tgcsylv_level2_unopt</p> ๐Ÿฆ‹

void mepack_single_tgcsylv_level2_unopt (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 * E, int LDE, float * F, int LDF,
    float * SCALE, float * WORK, int * INFO)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation โ€” the Unoptimized variant ๐ŸŽ€

Purpose: ๐Ÿ’–

okay so mepack_single_tgcsylv_level2_unopt solves a generalized coupled Sylvester equation of this exact form:

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐ŸŒธ

Remarks ๐ŸŽ€

  • The function is a wrapper for sla_tgcsylv_l2_unopt

See also ๐Ÿฆ‹

  • sla_tgcsylv_l2_unopt

Parameters ๐Ÿ’œ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular. ๐Ÿ“
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘€
  • 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 matrix C must be upper triangular. ๐Ÿ“
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ‘€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. ๐Ÿ’–
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. ๐Ÿ’–
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M). (same energy as before bestie, the page really do be saying LDE ๐Ÿ’€)
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. ๐ŸŒˆ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿงš
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation

โ€ฆand here's the tea on what INFO spills on the way out, bestie ๐Ÿ‘‡

On exit, workspace query:
  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:
  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

Author ๐Ÿ’–

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 2111 of file tgcsylv.c.


mepack_single_tgcsylv_level3 ๐Ÿ”ฅ

okay so, full signature first, no edits, character-for-character, because we do NOT play with function prototypes in this house:

void mepack_single_tgcsylv_level3 (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 * E, int LDE, float *
    F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. it's giving math, it's giving structure, we love to see it ๐Ÿฆ‹

Purpose ๐Ÿ’œ

mepack_single_tgcsylv_level3 solves a generalized coupled Sylvester equation that looks exactly like this:

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Also? Either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. periodt.

Remarks ๐Ÿ“

  • The function is a wrapper for sla_tgcsylv_l3

See also ๐Ÿ‘€

  • sla_tgcsylv_l3

Parameters ๐ŸŒธ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

< 0 :  if INFO == -i, the i-Th argument had an illegal value
>= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

== 0:  successful exit
< 0:  if INFO == -i, the i-Th argument had an illegal value
> 0:  The equation is not solved correctly. One of the arising inner
      system got singular.

Author ๐Ÿ’–

Martin Koehler, MPI Magdeburg

Date ๐Ÿ“…

October 2025

Definition at line 847 of file tgcsylv.c.


mepack_single_tgcsylv_level3_2stage โœจ

and here's the two-stage sibling, signature in full, untouched, exactly as written:

void mepack_single_tgcsylv_level3_2stage (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. same energy, different pipeline, we stan ๐ŸŒˆ

Purpose ๐Ÿ’œ

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

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK.

Remarks ๐Ÿ“

  • The function is a wrapper for sla_tgcsylv_l3_2s

See also ๐Ÿ‘€

  • sla_tgcsylv_l3_2s

Parameters ๐ŸŒธ

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€”

SCALE is SINGLE PRECISION, and it's the lil safety net for your numbers ๐Ÿ’… โ€” a 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 LDWORK. It's the workspace for the algorithm. Bestie, you have to query that workspace before running the computation โ€” you do it by calling the subroutine with INFO == -1 on input. The required workspace then gets handed back to you in INFO. ๐Ÿซถ
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: the value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: the equation is not solved correctly. One of the arising inner system got singular.

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 1269 of file tgcsylv.c.


๐Ÿงฎ mepack_single_tgcsylv_level3_unopt ๐Ÿงฎ

void mepack_single_tgcsylv_level3_unopt (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Level-3 Kagstroem-Westin/Bartels-Stewart Algorithm for the generalized coupled Sylvester equation. โœจ

๐ŸŽฏ Purpose:

mepack_single_tgcsylv_level3_unopt solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK.

๐Ÿ—’๏ธ Remarks

The function is a wrapper for sla_tgcsylv_l3_unopt

๐Ÿ‘€ See also

sla_tgcsylv_l3_unopt

๐Ÿ”ง Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€” LDE is INTEGER. The leading dimension of the array E. LDE >= max(1,M).
  • F โ€” F is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.
  • LDF โ€” LDF is INTEGER. The leading dimension of the array F. LDE >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 1058 of file tgcsylv.c.


๐ŸŒ€ mepack_single_tgcsylv_recursive ๐ŸŒ€

void mepack_single_tgcsylv_recursive (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 * E, int
    LDE, float * F, int LDF, float * SCALE, float * WORK, int * INFO)

Recursive blocking Algorithm for the generalized coupled Sylvester equation. ๐Ÿ”

๐ŸŽฏ Purpose:

mepack_single_tgcsylv_recursive solves a generalized coupled Sylvester equation of the following form

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

where A is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK.

๐Ÿ—’๏ธ Remarks

The function is a wrapper for sla_tgcsylv_recursive

๐Ÿ‘€ See also

sla_tgcsylv_recursive

๐Ÿ”ง Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • 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). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • E โ€” E is SINGLE 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 of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.
  • LDE โ€”

โ€ฆand we are back in the parameter roll-call, bestie ๐Ÿ’…

  • LDE โ€” it's an INTEGER, and it's the leading dimension of the array E. The rule is LDE >= max(1,M). ๐Ÿ”ฅ
  • F โ€” a SINGLE PRECISION array, dimension (LDF,N). On the way in, the matrix F is carrying the right hand side F (yes, the array F holds the thing called F, we love a self-titled moment ๐Ÿ‘‘). On the way out, the matrix F is carrying the solution L of Equation (1), as selected by TRANSA, TRANSB, and SGN1/SGN2. And just so we're clear: the right hand side F and the solution L are both M-by-N matrices. periodt โœจ
  • LDF โ€” INTEGER, the leading dimension of the array F. And the doc says LDE >= max(1,M) ๐Ÿ™ˆ that's literally what it says, i'm not editing the vibes.
  • SCALE โ€” a SINGLE PRECISION. SCALE is the scaling factor that stops the result from overflowing, iconic behaviour honestly ๐Ÿซถ. If INFO == 0 then SCALE is 1.0D0, otherwise โ€” if one of the inner systems could not be solved correctly โ€” 0 < SCALE <= 1 holds true.
  • WORK โ€” a SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. Big heads up: you have to query the workspace before you run the computation. You do the query by calling the subroutine with INFO == -1 on input, and then the required workspace gets handed back to you in INFO. ๐ŸŽ€
  • INFO โ€” INTEGER. the whole plot basically ๐Ÿ’€
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0 : The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0 : successful exit
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • > 0 : The equation is not solved correctly. One of the arising inner system got singular.

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

๐Ÿฆ‹ Date ๐Ÿฆ‹

October 2025

Definition at line 423 of file tgcsylv.c.


โญ mepack_single_tgsylv_dag โญ

void mepack_single_tgsylv_dag (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 * X, int LDX, float * SCALE, float
    * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester equation with DAG based parallelization.

๐Ÿ’– Purpose ๐Ÿ’–

mepack_single_tgsylv_dag 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿงš

๐ŸŽ€ Remarks ๐ŸŽ€

This function is a wrapper for sla_tgsylv_dag.

๐Ÿ’… See also ๐Ÿ’…

sla_tgsylv_dag

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. ๐Ÿ‘‘
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. (yes bestie, that's a real warning โ€” if SCALE isn't 1 you gotta go find another solver, no cap ๐Ÿšจ)
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : Perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0: The value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0: successful exit
      • < 0: if INFO == -i, the i-Th argument had an illegal value
      • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

๐Ÿฆ‹ Date ๐Ÿฆ‹

October 2025

Definition at line 389 of file tgsylv.c.


๐Ÿ“ mepack_single_tgsylv_gardiner_laub ๐Ÿ“

void mepack_single_tgsylv_gardiner_laub (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

Gardiner-Laub Algorithm for the generalized Sylvester equation.

๐Ÿ’– Purpose ๐Ÿ’–

mepack_single_tgsylv_gardiner_laub 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿงš

๐ŸŽ€ Remarks ๐ŸŽ€

This function is a wrapper for sla_tgsylv_gardiner_laub.

๐Ÿ’… See also ๐Ÿ’…

sla_tgsylv_gardiner_laub

โœจ Parameters โœจ

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N) ๐Ÿ’– On input, the matrix X holds the right hand side Y. On output, the matrix X holds the solution of Equation (1) or (2), whichever one you picked with TRANSA, TRANSB, and SGN. Both the right hand side Y and the solution X are M-by-N matrices, no cap.
  • LDX โ€” LDX is INTEGER. It's the leading dimension of the array X, and honestly bestie, LDX >= max(1,M). That's the vibe check. ๐Ÿฆ‹
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor that exists purely to stop the result from overflowing. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, 0 < SCALE <= 1 holds true. And listen โ€” if SCALE .NE. 1 the problem is not solved correctly, so in that case you have to use another solver. Periodt. ๐Ÿšจ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. The workspace needs to be queried before running the computation โ€” the query happens by calling the subroutine with INFO == -1 on input, and the required workspace is then returned in INFO. No guessing, we ask first. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ˜ญ

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 3894 of file tgsylv.c.


๐ŸŒธ mepack_single_tgsylv_level2

void mepack_single_tgsylv_level2 (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Classic level 2 variant)

๐ŸŽฏ Purpose:

mepack_single_tgsylv_level2 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. slay โœจ

๐Ÿ‘€ Remarks

This function is a wrapper for sla_tgsylv_l2.

๐Ÿ”— See also

sla_tgsylv_l2

๐Ÿ“‹ Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0. ๐ŸŽ€
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0. ๐ŸŽ€
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. No exceptions bestie. ๐Ÿฆ‹
  • 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 matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. iykyk ๐Ÿ’…
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐Ÿ’–
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. โš ๏ธ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 3311 of file tgsylv.c.


๐ŸŒˆ mepack_single_tgsylv_level2_colwise

void mepack_single_tgsylv_level2_colwise (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Column-by-column variant)

๐ŸŽฏ Purpose:

mepack_single_tgsylv_level2_colwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿฆ‹โœจ

๐Ÿ‘€ Remarks

This function is a wrapper for sla_tgsylv_l2_colwise.

๐Ÿ”— See also

sla_tgsylv_l2_colwise

๐Ÿ“‹ Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. ๐Ÿ’…
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐ŸŽ€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N). On the way in, the matrix X is holding the right hand side Y. On the way out, X is holding the solution to Equation (1) or (2), whichever one TRANSA, TRANSB, and SGN picked for you. And just so we're clear: the right hand side Y and the solution X are both M-by-N matrices. ๐Ÿ’–
  • LDX โ€” LDX is INTEGER. It's the leading dimension of the array X, and LDX >= max(1,M) bestie, no exceptions. ๐Ÿ’…
  • SCALE โ€” SCALE is SINGLE PRECISION. It's a scaling factor whose whole job is to stop the result from overflowing. If INFO == 0 then SCALE is 1.0D0, otherwise โ€” if one of the inner systems couldn't be solved correctly โ€” 0 < SCALE <= 1 holds true. And if SCALE .NE. 1, the problem is not solved correctly, and in that case you have to go use a different solver. Periodt. ๐Ÿ˜ญ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. And listen: the workspace needs to be queried before you run the computation. You do the query by calling the subroutine with INFO == -1 on input, and then the required workspace gets handed back to you in INFO. ๐ŸŽ€
  • INFO โ€” INFO is INTEGER.

On input:

  == -1 : Perform a workspace query
  <> -1 : normal operation

On exit, workspace query:

  < 0 :  if INFO == -i, the i-Th argument had an illegal value
  >= 0:  The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  == 0:  successful exit
  < 0:  if INFO == -i, the i-Th argument had an illegal value
  > 0:  The equation is not solved correctly. One of the arising inner
        system got singular.

๐Ÿ‘‘ Author ๐Ÿ‘‘

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date ๐Ÿ“…

October 2025

Definition at line 3699 of file tgsylv.c.


๐ŸŒธ mepack_single_tgsylv_level2_local_copy_128 ๐ŸŒธ

void mepack_single_tgsylv_level2_local_copy_128 (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 * X, int LDX,
    float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=128) โœจ

Purpose:

mepack_single_tgsylv_level2_local_copy_128 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿ”ฅ

Remarks

This function is a wrapper for sla_tgsylv_l2_local_copy_128. ๐Ÿซถ

See also

sla_tgsylv_l2_local_copy_128

Parameters

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
  == 'N':  op1(A) = A, op1(C) = C (No transpose for A and C)
  == 'T':  op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
  == 'N':  op2(B) = B, op2(D) = D (No transpose for B and D)
  == 'T':  op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation.
  = 1 :  Solve Equation (1)
  == -1:  Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0. ๐Ÿ’œ
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0. ๐Ÿ’œ
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. No notes, bestie, that's just the vibe it has to have. ๐Ÿ‘‘
  • 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 matrix B must be (quasi-) upper triangular. And heads up: if the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular. iykyk. ๐Ÿฆ‹
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. And same energy as before, flipped: if the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular. ๐ŸŒˆ
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X
  • X โ€” X</p> is a SINGLE PRECISION array, dimension (LDX,N). On input, X is holding your right hand side Y bestie. On output, X is holding the solution to Equation (1) or (2) โ€” whichever one TRANSA, TRANSB and SGN picked for you ๐Ÿ’…. And fr fr: the right hand side Y and the solution X are both M-by-N matrices, that's just the vibe.
  • LDX โ€” LDX is INTEGER. It's the leading dimension of the array X, and you need LDX >= max(1,M). no cap ๐Ÿ“
  • SCALE โ€” SCALE is SINGLE PRECISION. She's the scaling factor that keeps your result from overflowing, iconic behaviour honestly ๐Ÿซถ. 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. And lowkey this is important: if SCALE .NE. 1 the problem is no solved correctly, in this case one have to use an other solver. not me finding out the hard way ๐Ÿ˜ญ
  • WORK โ€” WORK is a SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm, and the workspace needs to queried before the running the computation ๐Ÿ‘‘. The query is performed by calling the subroutine with INFO == -1 on input, and then the required workspace is returned in INFO. it's giving "ask before you take" โœจ
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐ŸŽ€
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. we do NOT love that ๐Ÿ’€

Author Martin Koehler, MPI Magdeburg

Date October 2025

Definition at line 2725 of file tgsylv.c.


๐ŸŒธ void mepack_single_tgsylv_level2_local_copy_32 (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=32) ๐Ÿฆ‹

Purpose:

mepack_single_tgsylv_level2_local_copy_32 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well ๐Ÿ‘€. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. iykyk ๐Ÿ’œ

Remarks

This function is a wrapper for sla_tgsylv_l2_local_copy_32. periodt.

See also

sla_tgsylv_l2_local_copy_32

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐ŸŽ€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐ŸŽ€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is a SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. again bestie, other solver, no exceptions ๐Ÿ™ˆ
  • WORK โ€” WORK is a SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular.

Author Martin Koehler, MPI Magdeburg

Date October 2025

Definition at line 2137 of file tgsylv.c.


๐ŸŒˆ void mepack_single_tgsylv_level2_local_copy_64 (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=64) ๐Ÿฆ‹

Purpose:

mepack_single_tgsylv_level2_local_copy_64 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well ๐Ÿ‘€. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. same energy, bigger sizes ๐Ÿ’œ

Remarks

This function is a wrapper for sla_tgsylv_l2_local_copy_64. periodt.

See also

sla_tgsylv_l2_local_copy_64

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐ŸŽ€
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐ŸŽ€
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X
  • LDX โ€” INTEGER ๐Ÿฆ‹ the leading dimension of the array X. Constraint: LDX >= max(1,M). that's it that's the rule ๐Ÿ’…
  • SCALE โ€” SINGLE PRECISION ๐Ÿ’– the scaling factor whose whole job is preventing 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. And heads up bestie: if SCALE .NE. 1 the problem is no solved correctly, in this case one have to use an other solver. ๐Ÿšจ not a slay moment, go get a different solver.
  • WORK โ€” SINGLE PRECISION array, dimension LDWORK ๐ŸŒธ workspace for the algorithm. And the way you HAVE to query it before running the computation โ€” the query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. no cap, ask first, then compute โœจ
  • INFO โ€” INTEGER ๐Ÿ‘‘

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐ŸŽ‰
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 2333 of file tgsylv.c.


mepack_single_tgsylv_level2_local_copy_96

void mepack_single_tgsylv_level2_local_copy_96 (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Local copies, M,N<=96) ๐ŸŒˆโœจ

Purpose:

mepack_single_tgsylv_level2_local_copy_96 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿงš

Remarks

This function is a wrapper for sla_tgsylv_l2_local_copy_96. ๐Ÿ’œ

See also

sla_tgsylv_l2_local_copy_96

Parameters

  • TRANSA โ€” TRANSA is String ๐Ÿ’… Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String ๐ŸŒธ Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1 โœจ Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER ๐Ÿฆ‹ The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER ๐Ÿฆ‹ The order of the matrices B and D. N >= 0.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M) ๐Ÿ’– The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER ๐ŸŒˆ The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N) ๐Ÿ’œ The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘‘
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER ๐Ÿฆ‹ The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N) ๐Ÿ’– The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. (it's giving "one of them has to stay simple" energy fr fr)
  • LDD โ€” LDD is INTEGER ๐ŸŒˆ The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N) ๐Ÿ’œ On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices.
  • LDX โ€” LDX is INTEGER ๐Ÿฆ‹ The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION ๐Ÿ’– SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0 otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly in this case one have to use an other solver. ๐Ÿšจ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK ๐ŸŒธ Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. โœจ
  • INFO โ€” INFO is INTEGER ๐Ÿ‘‘

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0: The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0: successful exit ๐ŸŽ‰
  • < 0: if INFO == -i, the i-Th argument had an illegal value
  • > 0: The equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

๐Ÿซถ Author

Martin Koehler, MPI Magdeburg

๐Ÿ“… Date

October 2025

Definition at line 2529 of file tgsylv.c.


mepack_single_tgsylv_level2_reorder

void mepack_single_tgsylv_level2_reorder (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 * X, int LDX, float * SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Reordered variant) ๐ŸŒˆโœจ

Purpose:

mepack_single_tgsylv_level2_reorder 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿงš

Remarks

This function is a wrapper for sla_tgsylv_l2_reorder. ๐Ÿ’œ

See also

sla_tgsylv_l2_reorder

Parameters

  • TRANSA โ€” TRANSA is String ๐Ÿ’… Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String ๐ŸŒธ Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1 โœจ Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1: Solve Equation (2)
  • M โ€” M is INTEGER ๐Ÿฆ‹ The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER ๐Ÿฆ‹ The order of the matrices B and D. N >= 0.
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M) ๐Ÿ’– The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER ๐ŸŒˆ The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N) ๐Ÿ’œ The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular. ๐Ÿ‘‘
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER ๐Ÿฆ‹ The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N) ๐Ÿ’– The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular. ๐ŸŒˆ
  • LDD โ€” LDD is INTEGER ๐Ÿ’œ The leading dimension of the array D. LDD >= max(1,N).
  • X โ€”
  • X โ€” X is a SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Both the right hand side Y and the solution X are M-by-N matrices. โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. It's the scaling factor that keeps your 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. And bestie, listen: if SCALE .NE. 1 the problem is no solved correctly โ€” in this case one has to use another solver. ๐Ÿšฉ
  • WORK โ€” WORK is a SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. You gotta query the workspace before you run the computation, okay? The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then handed back to you in INFO. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0 : The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0 : successful exit
  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • > 0 : The equation is not solved correctly. One of the arising inner system got singular.

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

๐ŸŒธ Date ๐ŸŒธ

October 2025

Definition at line 3115 of file tgsylv.c.


void mepack_single_tgsylv_level2_rowwise (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

Level-2 Bartels-Stewart Algorithm for the generalized Sylvester equation (Row-by-row variant) ๐Ÿ‘‘

๐Ÿ’– Purpose ๐Ÿ’–

mepack_single_tgsylv_level2_reorder 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿฆ‹

๐Ÿซถ Remarks ๐Ÿซถ

This function is a wrapper for sla_tgsylv_l2_rowwise.

๐Ÿ‘€ See also ๐Ÿ‘€

sla_tgsylv_l2_rowwise

๐ŸŽ€ Parameters ๐ŸŽ€

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1 : Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is a SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Both the right hand side Y and the solution X are M-by-N matrices. โœจ
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. It's the scaling factor that keeps your 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. And bestie, listen: if SCALE .NE. 1 the problem is no solved correctly โ€” in this case one has to use another solver. ๐Ÿšฉ
  • WORK โ€” WORK is a SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm. You gotta query the workspace before you run the computation, okay? The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then handed back to you in INFO. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0 : The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0 : successful exit
  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • > 0 : The equation is not solved correctly. One of the arising inner system got singular.

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg

๐ŸŒธ Date ๐ŸŒธ

October 2025

Definition at line 3505 of file tgsylv.c.


void mepack_single_tgsylv_level3 (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 * X, int LDX, float * SCALE, float
    * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester. ๐ŸŒˆ

๐Ÿ’– Purpose ๐Ÿ’–

mepack_single_tgsylv_level3 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿฆ‹

๐Ÿซถ Remarks ๐Ÿซถ

This function is a wrapper for sla_tgsylv_l3.

๐Ÿ‘€ See also ๐Ÿ‘€

sla_tgsylv_l3

๐ŸŽ€ Parameters ๐ŸŽ€

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N': op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N': op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : Solve Equation (1)
    • == -1 : Solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0.
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0.
  • A โ€” A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • LDB โ€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • C โ€” C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X

X is a SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X is carrying the right hand side Y. On output, that very same matrix X is carrying the solution of Equation (1) or (2), whichever one TRANSA, TRANSB, and SGN told it to solve. And just so we're crystal clear bestie: the right hand side Y and the solution X are both M-by-N matrices. ๐Ÿ’–

LDX

LDX is INTEGER. It's the leading dimension of the array X, and the rule is LDX >= max(1,M). No negotiating with this one, it's giving boundary condition energy. โœจ

SCALE

SCALE is SINGLE PRECISION. It's the scaling factor that exists purely to stop your result from overflowing. Here's the tea ๐Ÿต: if INFO == 0, then SCALE is 1.0D0. Otherwise โ€” if one of the inner systems couldn't be solved correctly โ€” then 0 < SCALE <= 1 holds true.

โš ๏ธ listen up: if SCALE .NE. 1, the problem is not solved correctly, and in this case you literally have to go use another solver. No cap, don't ignore this.

WORK

WORK is a SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm, and the vibe check here is that you have to query the workspace before you actually run the computation. How do you do that? You call the subroutine with INFO == -1 on input. The required workspace then comes right back to you in INFO. ๐ŸŽ€

INFO

INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0 : The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0 : successful exit
  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • > 0 : The equation is not solved correctly. One of the arising inner system got singular.

โœจ Author โœจ

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date ๐Ÿ—“๏ธ

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 971 of file tgsylv.c.


๐Ÿฆ‹ mepack_single_tgsylv_level3_2stage ๐Ÿฆ‹

void mepack_single_tgsylv_level3_2stage (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

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

๐Ÿ’ซ Purpose

mepack_single_tgsylv_level3_2stage 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. Plot twist: either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿ’…

๐ŸŽ€ Remarks

This function is a wrapper for sla_tgsylv_l3_2s. She's just the cute front-facing layer, the real work is happening underneath. iykyk.

๐Ÿ‘€ See also

sla_tgsylv_l3_2s

๐ŸŒธ Parameters

TRANSA

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

  • == 'N' : op1(A) = A, op1(C) = C (No transpose for A and C)
  • == 'T' : op1(A) = A**T, op1(C) = C **T (Transpose A and C)

TRANSB

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

  • == 'N' : op2(B) = B, op2(D) = D (No transpose for B and D)
  • == 'T' : op2(B) = B**T, op2(D) = D **T (Transpose B and D)

SGN

SGN is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation.

  • = 1 : Solve Equation (1)
  • == -1 : Solve Equation (2)

M

M is INTEGER. The order of the matrices A and C. M >= 0. โœจ

N

N is INTEGER. The order of the matrices B and D. N >= 0. โœจ

A

A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular. Non-negotiable bestie.

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 matrix B must be (quasi-) upper triangular. But watch out: if the matrix D is already quasi-upper triangular, then the matrix B must be upper triangular. One of them gets to be quasi, not both โ€” the drama of it all. ๐Ÿ˜ญ

LDB

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

C

C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.

LDC

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

D

D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. Same deal as before: if the matrix B is already quasi-upper triangular, then the matrix D must be upper triangular.

LDD

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

X

X is a SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. ๐Ÿ’–

LDX

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

SCALE

SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true.

๐Ÿšจ real talk: if SCALE .NE. 1, the problem is not solved correctly, and in this case one has to use an other solver.

WORK

WORK is a SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to be queried before running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO. ๐Ÿซถ

INFO

INFO is INTEGER.

On input:

  • == -1 : Perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0 : The value of INFO is the required number of elements in the workspace.

On exit, normal operation:

  • == 0 : successful exit
  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • > 0 : The equation is not solved correctly. One of the arising inner system got singular.

โœจ Author โœจ

Martin Koehler, MPI Magdeburg

๐Ÿ—“๏ธ Date ๐Ÿ—“๏ธ

October 2025

๐Ÿ“ Definition ๐Ÿ“

Definition at line 1557 of file tgsylv.c.


๐ŸŒˆ mepack_single_tgsylv_level3_colwise ๐ŸŒˆ

void mepack_single_tgsylv_level3_colwise (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

Level-3 Bartels-Stewart Algorithm for the generalized Sylvester (Column-by-column variant)

๐Ÿ’ซ Purpose

mepack_single_tgsylv_level3_colwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿ’…

๐ŸŽ€ Remarks

This function is a wrapper for sla_tgsylv_l3_colwise. She's the column-by-column edition, and yes she ate. ๐Ÿ’…

๐Ÿ‘€ See also

sla_tgsylv_l3_colwise

๐ŸŒธ Parameters

TRANSA

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

  • == 'N' : op1(A) = A, op1(C) = C (No transpose for A and C)
  • == 'T' : op1(A) = A**T, op1(C) = C **T (Transpose A and C)

TRANSB

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

  • == 'N' : op2(B) = B, op2(D) = D (No transpose for B and D)
  • == 'T' : op2(B) = B**T, op2(D) = D **T (Transpose B and D)

SGN

SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.

  • = 1 : Solve Equation (1)
  • == -1 : Solve Equation (2)

M

M is INTEGER. The order of the matrices A and C. M >= 0.

N

N is INTEGER. The order of the matrices B and D. N >= 0.

A

A is a SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.

LDA

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

B

B is a SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.

LDB

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

C

C is a SINGLE PRECISION array, dimension (LDC,M). The matrix C must be upper triangular.

LDC

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

D

D is a SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.

LDD

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

X

  • X โ€” SINGLE PRECISION array, dimension (LDX,N). On the way in, this bad boy holds the right-hand side Y. On the way out, it holds the solution to Equation (1) or (2), whichever one TRANSA, TRANSB, and SGN picked. Both the right-hand side Y and the solution X are M-by-N matrices. ๐Ÿ’–
  • LDX โ€” INTEGER. The leading dimension of the array X. Rule of the day: LDX >= max(1,M). โœจ
  • SCALE โ€” SINGLE PRECISION. It's a scaling factor whose whole job is stopping the result from overflowing. If INFO == 0 then SCALE is 1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, then 0 < SCALE <= 1 holds true. And if SCALE .NE. 1, the problem is not solved correctly โ€” in that case you have to reach for another solver. No cap. ๐Ÿ˜ญ
  • WORK โ€” SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. You have to query the workspace before running the computation, and you do that by calling the subroutine with INFO == -1 on input. The required workspace then comes back to you in INFO. ๐Ÿซถ
  • INFO โ€” INTEGER. Okay listen close, there are three whole modes:
    • On input:
      • == -1 : perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0 : the value of INFO is the required number of elements in the workspace
    • On exit, normal operation:
      • == 0 : successful exit ๐ŸŒˆ
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • > 0 : the equation is not solved correctly. One of the arising inner systems got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 1362 of file tgsylv.c.


mepack_single_tgsylv_level3_rowwise โ€” Level-3 Bartels-Stewart Algorithm for the generalized Sylvester (Row-by-row variant) ๐ŸŽ€

void mepack_single_tgsylv_level3_rowwise (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

Purpose:

mepack_single_tgsylv_level3_rowwise 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. And not only that โ€” either B or D can be quasi upper triangular as well. The right-hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. iykyk ๐Ÿ’…

Remarks

This function is a wrapper for sla_tgsylv_l3_rowwise.

See also

sla_tgsylv_l3_rowwise

Parameters

  • TRANSA โ€” TRANSA is String. It specifies the form of the system of equations with respect to A and C:
    • == 'N' : op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T' : op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. It specifies the form of the system of equations with respect to B and D:
    • == 'N' : op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T' : op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between the two parts of the Sylvester equation.
    • = 1 : solve Equation (1)
    • == -1 : solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0. โœจ
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0. โœจ
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular, the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular, the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X โ€” X is SINGLE PRECISION array, dimension (LDX,N). On input, the matrix X contains the right hand side Y. On output, the matrix X contains the solution of Equation (1) or (2) as selected by TRANSA, TRANSB, and SGN. Right hand side Y and the solution X are M-by-N matrices. ๐Ÿ’–
  • LDX โ€” LDX is INTEGER. The leading dimension of the array X. LDX >= max(1,M).
  • SCALE โ€” SCALE is SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. If INFO == 0 then SCALE is 1.0D0, otherwise if one of the inner systems could not be solved correctly, 0 < SCALE <= 1 holds true. If SCALE .NE. 1 the problem is no solved correctly โ€” in this case one have to use an other solver. ๐Ÿ˜ญ
  • WORK โ€” WORK is SINGLE PRECISION array, dimension LDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine with INFO == -1 on input. The required workspace is then returned in INFO.
  • INFO โ€” INFO is INTEGER.
    • On input:
      • == -1 : perform a workspace query
      • <> -1 : normal operation
    • On exit, workspace query:
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • >= 0 : the value of INFO is the required number of elements in the workspace.
    • On exit, normal operation:
      • == 0 : successful exit ๐ŸŒธ
      • < 0 : if INFO == -i, the i-Th argument had an illegal value
      • > 0 : the equation is not solved correctly. One of the arising inner system got singular. ๐Ÿ’€

Author: Martin Koehler, MPI Magdeburg

Date: October 2025

Definition at line 1166 of file tgsylv.c.


mepack_single_tgsylv_recursive โ€” Recursive blocking algorithm for the generalized Sylvester equation ๐Ÿฆ‹

void mepack_single_tgsylv_recursive (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 * X, int LDX, float *
    SCALE, float * WORK, int * INFO)

Purpose:

mepack_single_tgsylv_recursive 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 is a M-by-M quasi upper triangular matrix, C is a M-by-M upper triangular matrix, and B and D are N-by-N upper triangular matrices. Furthermore either B or D can be quasi upper triangular as well. The right hand side Y and the solution X are M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by SGGES from LAPACK. ๐Ÿ”ฅ

Remarks

This function is a wrapper for sla_tgsylv_recursive.

See also

sla_tgsylv_recursive

Parameters

  • TRANSA โ€” TRANSA is String. Specifies the form of the system of equations with respect to A and C:
    • == 'N' : op1(A) = A, op1(C) = C (No transpose for A and C)
    • == 'T' : op1(A) = A**T, op1(C) = C **T (Transpose A and C)
  • TRANSB โ€” TRANSB is String. Specifies the form of the system of equations with respect to B and D:
    • == 'N' : op2(B) = B, op2(D) = D (No transpose for B and D)
    • == 'T' : op2(B) = B**T, op2(D) = D **T (Transpose B and D)
  • SGN โ€” SGN is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between the two parts of the Sylvester equation.
    • = 1 : solve Equation (1)
    • == -1 : solve Equation (2)
  • M โ€” M is INTEGER. The order of the matrices A and C. M >= 0. ๐Ÿ’œ
  • N โ€” N is INTEGER. The order of the matrices B and D. N >= 0. ๐Ÿ’œ
  • A โ€” A is SINGLE PRECISION array, dimension (LDA,M). The matrix A must be (quasi-) upper triangular.
  • LDA โ€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • B โ€” B is SINGLE PRECISION array, dimension (LDB,N). The matrix B must be (quasi-) upper triangular. If the matrix D is already quasi-upper triangular the matrix B must be upper triangular.
  • 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 matrix C must be upper triangular.
  • LDC โ€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • D โ€” D is SINGLE PRECISION array, dimension (LDD,N). The matrix D must be (quasi-) upper triangular. If the matrix B is already quasi-upper triangular the matrix D must be upper triangular.
  • LDD โ€” LDD is INTEGER. The leading dimension of the array D. LDD >= max(1,N).
  • X
  • LDX โ€” INTEGER, obviously ๐Ÿ’…
    • It's the leading dimension of the array X. The vibe check: LDX >= max(1,M). Don't fight it, just give it what it wants ๐Ÿซถ
  • SCALE โ€” SINGLE PRECISION and honestly kind of the emotional support number here ๐ŸŽ€
    • SCALE is a scaling factor whose whole job is preventing overflow in the result. protect the result at all costs โœจ
    • 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.
    • If SCALE .NE. 1, the problem did not get solved correctly, and in this case you have to go use another solver. Not a vibe. ๐Ÿ˜ญ do not ignore this
  • WORK โ€” SINGLE PRECISION array, dimension LDWORK. It's the workspace for the algorithm, bestie ๐Ÿงš
    • You have to query the workspace before you run the computation. Like asking the group chat how many people are coming before you book the table, fr fr.
    • The query happens by calling the subroutine with INFO == -1 on input.
    • The required workspace then gets returned in INFO. That's the whole trick ๐Ÿ‘‘
  • INFO โ€” INTEGER, and it's the narrator of the entire story ๐ŸŒˆ

On input:

  • == -1 : perform a workspace query
  • <> -1 : normal operation

On exit, workspace query:

  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • >= 0 : the value of INFO is the required number of elements in the workspace

On exit, normal operation:

  • == 0 : successful exit, slay ๐Ÿ’–
  • < 0 : if INFO == -i, the i-Th argument had an illegal value
  • > 0 : the equation is not solved correctly. One of the arising inner system got singular. tragic ๐Ÿ’€

๐ŸŒธ Author ๐ŸŒธ

Martin Koehler, MPI Magdeburg ๐Ÿ‘‘

๐ŸŽ€ Date ๐ŸŽ€

October 2025

Definition at line 389 of file tgsylv.c.

โœจ Author โœจ

Generated automatically by Doxygen for MEPACK from the source code. (Not me, not you, not Martin โ€” Doxygen did that. Iconic behaviour, honestly ๐Ÿฆ‹)


okay bestie, that's the whole page ๐Ÿ’œ Version 1.1.2, dated Thu Oct 9 2025 00:00:00, and this was ctgsylv(3) โ€” go forth, query your workspace first, and may all your INFO values be 0 ๐ŸŒŸ๐Ÿ’…๐Ÿซถ
๐Ÿ“ฆ where this page comes from