ctgsylv(3)
โจ 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 aString, 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 aString, 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โ aDOUBLE PRECISION, allowed values+/-1. It specifies the sign between the terms in the first equation. โจSGN2โ aDOUBLE 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โ aDOUBLE PRECISIONarray, 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โ aDOUBLE PRECISIONarray, 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โ aDOUBLE PRECISIONarray, dimension(LDC,M). The matrix C must be upper triangular.LDCโINTEGER. The leading dimension of the array C.LDC >= max(1,M).Dโ aDOUBLE PRECISIONarray, 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โ aDOUBLE PRECISIONarray, 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โ aDOUBLE PRECISIONarray, 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 saysLDEand notLDFin the LDF description โ not me catching that, it's just what the docs say bestie, I'm not touching it ๐ซถ
SCALEโ aDOUBLE PRECISION. SCALE is a scaling factor to prevent overflow in the result. IfINFO == 0then SCALE is1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโ aDOUBLE PRECISIONarray, dimensionLDWORK. Workspace for the algorithm. And no cap, you gotta query the workspace before running the computation โ you do that by calling the subroutine withINFO == -1on 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: ifINFO == -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: ifINFO == -i, the i-Th argument had an illegal value> 0: the equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
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 PRECISIONarray, 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 PRECISIONarray, 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 PRECISIONarray, 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 PRECISIONarray, 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 PRECISIONarray, 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 PRECISIONarray, 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. IfINFO == 0then SCALE is1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโDOUBLE PRECISIONarray, 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: ifINFO == -i, the i-Th argument had an illegal value>= 0: the value of INFO is the required number of elements in the workspace
- On input:
On exit, normal operation:
== 0: successful exit โจ< 0: ifINFO == -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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. โจSGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. โจMโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisDOUBLE PRECISION array, dimension(LDE,N).- On input, the matrix
Econtains the right hand sideE. - On output, the matrix
Econtains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Eand the solutionRare M-by-N matrices.
- On input, the matrix
LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisDOUBLE PRECISION array, dimension(LDF,N).- On input, the matrix
Fcontains the right hand sideF. - On output, the matrix
Fcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Fand the solutionLare M-by-N matrices.
- On input, the matrix
LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes bestie, it really does sayLDEthere, we don't make the rules ๐)SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKisDOUBLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory.INFOโINFOisINTEGER.
On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit โจ< 0: ifINFO == -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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. It's the leading dimension of the arrayB, and the vibe check saysLDB >= max(1,N). ๐CโCis a DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. That's not optional, bestie, it's giving "upper triangular only". โจLDCโLDCis INTEGER. Leading dimension of the arrayC, andLDC >= max(1,M). Periodt. ๐DโDis a DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. And here's the tea: if the matrixBis already quasi-upper triangular, thenDmust be upper triangular. ๐ซถLDDโLDDis INTEGER. Leading dimension of the arrayD, andLDD >= max(1,N). Slay. ๐ธEโEis a DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. The right hand sideEand the solutionRareM-by-Nmatrices. Main character energy, honestly. ๐LDEโLDEis INTEGER. Leading dimension of the arrayE, andLDE >= max(1,M). ๐FโFis a DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand solutionLare bothM-by-Nmatrices. Iconic. โญLDFโLDFis INTEGER. Leading dimension of the arrayF. And the doc saysLDE >= max(1,M)โ yes, we're all looking at it, it saysLDE, and I'm reporting it exactly as written, no notes. ๐SCALEโSCALEis DOUBLE PRECISION. It's the scaling factor that stops the result from overflowing, and it's lowkey the hero of the whole thing. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, then0 < SCALE <= 1holds true. ๐WORKโWORKis 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โINFOis 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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐SGN2โSGN2is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐MโMis INTEGER. The order of the matricesAandC.M >= 0. โจNโNis INTEGER. The order of the matricesBandD.N >= 0. โจAโAis a DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐ธLDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M). ๐ซถBโBis a DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N). ๐CโCis a DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. Periodt. ๐LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M). ๐ธDโDis a DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐ฆLDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N). โจEโEis a DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. ๐LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M). โญFโFis a DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices. ๐LDFโLDFis INTEGER. The leading dimension of the arrayF. And once again the doc saysLDE >= max(1,M)โ reporting it exactly as it stands, no edits from me. ๐SCALEโSCALEis DOUBLE PRECISION. A scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. โจWORKโWORKis a DOUBLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory. ๐INFOโINFOis 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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE 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โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. same energy, second equation ๐MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. no cap, it has to be ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. read that twice, it's a whole vibe check โ ๏ธLDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. strictly upper triangular, she doesn't do quasi โLDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. the โจreciprocalโจ of theBsituation, obsessed ๐ฆLDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisDOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. she transforms on the way out, main character energy ๐LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisDOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices.LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes, it saysLDEin the original, we do not correct the manpage, we simply report it ๐)SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. it's the seatbelt of this whole operation ๐ซถWORKโWORKisDOUBLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.INFOโINFOisINTEGER.- On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, thei-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, thei-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. โจSGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. โจMโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. โ ๏ธLDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. โ ๏ธLDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisDOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. ๐LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFโ it's aDOUBLE PRECISIONarray, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices. ๐LDFโINTEGER, bestie. It's the leading dimension of the arrayF. So:LDE >= max(1,M).SCALEโDOUBLE PRECISION. This is the scaling factor whose whole job is to stop the result from overflowing ๐. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโDOUBLE PRECISIONarray, 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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ซถ 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 ๐ธ
TRANSATRANSAโ bestie, this one's aCHARACTER(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 aCHARACTER(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โ aDOUBLE PRECISION, and the allowed values are+/-1. It specifies the sign between in the first equation. ๐SGN2โ alsoDOUBLE PRECISION, allowed values+/-1, and it specifies the sign between in the second equation. Matching set, we love to see it. โจMโ anINTEGER. The order of the matrices A and C. Constraint:M >= 0.Nโ anINTEGER. The order of the matrices B and D. Constraint:N >= 0.Aโ aDOUBLE PRECISIONarray, dimension(LDA,M). The matrix A must be (quasi-) upper triangular. no cap.LDAโ anINTEGER. The leading dimension of the array A.LDA >= max(1,M).Bโ aDOUBLE PRECISIONarray, 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โ anINTEGER. The leading dimension of the array B.LDB >= max(1,N).Cโ aDOUBLE PRECISIONarray, dimension(LDC,M). The matrix C must be upper triangular.LDCโ anINTEGER. The leading dimension of the array C.LDC >= max(1,M).Dโ aDOUBLE PRECISIONarray, 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โ anINTEGER. The leading dimension of the array D.LDD >= max(1,N).Eโ aDOUBLE PRECISIONarray, 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 byTRANSA,TRANSB, andSGN1/SGN2. Both the right hand side E and the solution R areM-by-Nmatrices. she's a multitasker ๐LDEโ anINTEGER. The leading dimension of the array E.LDE >= max(1,M).Fโ aDOUBLE PRECISIONarray, 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 byTRANSA,TRANSB, andSGN1/SGN2. Right hand side F and solution L areM-by-Nmatrices.LDFโ anINTEGER. The leading dimension of the array F.LDE >= max(1,M). (yes, that's what the docs say โ it saysLDEin theLDFentry, and we are simply reporting the lore as it was written ๐)SCALEโ aDOUBLE PRECISION. It's a scaling factor to prevent overflow in the result. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐ซถWORKโ aDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK)). It's the workspace for the algorithm. The optimal workspace is given by\ref mepack_memory.INFOโ anINTEGER. 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โTRANSAisCHARACTER(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โTRANSBisCHARACTER(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โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. โญSGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. โญMโMisINTEGER. The order of the matrices A and C.M >= 0.NโNisINTEGER. The order of the matrices B and D.N >= 0.AโAisDOUBLE PRECISIONarray, dimension(LDA,M). The matrix A must be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBisDOUBLE PRECISIONarray, 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โLDBisINTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCisDOUBLE PRECISIONarray, dimension(LDC,M). The matrix C must be upper triangular.LDCโLDCisINTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDisDOUBLE PRECISIONarray, 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โLDDisINTEGER. The leading dimension of the array D.LDD >= max(1,N).EโEisDOUBLE PRECISIONarray, 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 byTRANSA,TRANSB, andSGN1/SGN2. Right hand side E and the solution R areM-by-Nmatrices. ๐LDEโLDEisINTEGER. The leading dimension of the array E.LDE >= max(1,M).FโFisDOUBLE PRECISIONarray, 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 byTRANSA,TRANSB, andSGN1/SGN2. Right hand side F and the solution L areM-by-Nmatrices. ๐LDFโLDFisINTEGER. The leading dimension of the array F.LDE >= max(1,M). (again โ the original saysLDEhere, we're just the messenger ๐ง)SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory.INFOโINFOisINTEGER.
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: ifINFO == -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:
Ais a M-by-M quasi upper triangular matrix ๐ธCis a M-by-M upper triangular matrixBandDare N-by-N upper triangular matrices- and furthermore either
BorDcan be quasi upper triangular as well - the right hand side
Yand the solutionXare M-by-N matrices - Typically the matrix pencils
(A,C)and(B,D)( or(D,B)) are created byDGGESfrom 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โTRANSAisCHARACTER(1)- Specifies the form of the system of equations with respect to
AandC: == '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)
- Specifies the form of the system of equations with respect to
TRANSBโTRANSBisCHARACTER(1)- Specifies the form of the system of equations with respect to
BandD: == '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)
- Specifies the form of the system of equations with respect to
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1- Specifies the sign between in the first equation.
SGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1- Specifies the sign between in the second equation.
MโMisINTEGER- The order of the matrices
AandC.M >= 0.
- The order of the matrices
NโNisINTEGER- The order of the matrices
BandD.N >= 0.
- The order of the matrices
AโAisDOUBLE PRECISIONarray, dimension(LDA,M)- The matrix
Amust be (quasi-) upper triangular.
- The matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,M).
- The leading dimension of the array
BโBisDOUBLE PRECISIONarray, dimension(LDB,N)- The matrix
Bmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.
- The matrix
LDBโLDBisINTEGER- The leading dimension of the array
B.LDB >= max(1,N).
- The leading dimension of the array
CโCisDOUBLE PRECISIONarray, dimension(LDC,M)- The matrix
Cmust be upper triangular.
- The matrix
LDCโLDCisINTEGER- The leading dimension of the array
C.LDC >= max(1,M).
- The leading dimension of the array
DโDisDOUBLE PRECISIONarray, dimension(LDD,N)- The matrix
Dmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.
- The matrix
LDDโLDDisINTEGER- The leading dimension of the array
D.LDD >= max(1,N).
- The leading dimension of the array
EโEisDOUBLE PRECISIONarray, dimension(LDE,N)- On input, the matrix
Econtains the right hand sideE. - On output, the matrix
Econtains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Eand the solutionRare M-by-N matrices. ๐
- On input, the matrix
LDEโLDEisINTEGER- The leading dimension of the array
E.LDE >= max(1,M).
- The leading dimension of the array
FโFisDOUBLE PRECISIONarray, dimension(LDF,N)- On input, the matrix
Fcontains the right hand sideF. - On output, the matrix
Fcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Fand the solutionLare M-by-N matrices. ๐
- On input, the matrix
LDFโLDFisINTEGER- The leading dimension of the array
F.LDE >= max(1,M).
- The leading dimension of the array
โ ๏ธ bestie that's not a typo on my end โ the original literally saysLDE >= max(1,M)underLDF. keep it fr fr.
SCALEโSCALEisDOUBLE PRECISIONSCALEis a scaling factor to prevent the overflow in the result.- If
INFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.
WORKโWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LDWORK))- Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.
INFOโINFOisINTEGER- On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit โจ< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
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โTRANSAisString- Specifies the form of the system of equations with respect to
AandC: == '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)
- Specifies the form of the system of equations with respect to
TRANSBโTRANSBisString- Specifies the form of the system of equations with respect to
BandD: == '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)
- Specifies the form of the system of equations with respect to
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1- Specifies the sign between in the first equation.
SGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1- Specifies the sign between in the second equation.
MโMisINTEGER- The order of the matrices
AandC.M >= 0.
- The order of the matrices
NโNisINTEGER- The order of the matrices
BandD.N >= 0.
- The order of the matrices
AโAisDOUBLE PRECISIONarray, dimension(LDA,M)- The matrix
Amust be (quasi-) upper triangular.
- The matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,M).
- The leading dimension of the array
BโBisDOUBLE PRECISIONarray, dimension(LDB,N)- The matrix
Bmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.
- The matrix
LDBโLDBisINTEGER- The leading dimension of the array
B.LDB >= max(1,N).
- The leading dimension of the array
CโCisDOUBLE PRECISIONarray, dimension(LDC,M)- The matrix
Cmust be upper triangular.
- The matrix
LDCโLDCisINTEGER- The leading dimension of the array
C.LDC >= max(1,M).
- The leading dimension of the array
DโDisDOUBLE PRECISIONarray, dimension(LDD,N)- The matrix
Dmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.
- The matrix
LDDโLDDisINTEGER- The leading dimension of the array
D.LDD >= max(1,N).
- The leading dimension of the array
EโEisDOUBLE PRECISIONarray, dimension(LDE,N)- On input, the matrix
Econtains the right hand sideE. - On output, the matrix
Econtains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Eand the solutionRare M-by-N matrices. โญ
- On input, the matrix
LDEโLDEโLDEis INTEGER, bestie, and it's the leading dimension of the arrayE. Rule of the land:LDE >= max(1,M). ๐FโFis DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices. โจLDFโLDFis INTEGER, the leading dimension of the arrayF. And yes, the original really does sayLDE >= max(1,M)right here, we are not fixing it, we are reporting it, fr fr. ๐SCALEโSCALEis DOUBLE PRECISION. It's a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐ซถWORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input. The required workspace is then returned inINFO. ๐ฅINFOโINFOis INTEGER. Buckle up, it's giving multi-mode:- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGN1is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. ๐ธLDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices.LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (Same lil typo, same energy, we report it faithfully. ๐)SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGN1is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DDโDis a DOUBLE PRECISION array, dimension(LDD,N). Bestie, this matrix must be (quasi-) upper triangular. And heads up: if matrixBis already quasi-upper triangular, thenDhas to be plain upper triangular. no exceptions ๐LDDโLDDis INTEGER. It's the leading dimension of the arrayD.LDD >= max(1,N). fr fr.EโEis a DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEholds the right hand sideE. On output, the matrixEholds the solutionRof Equation (1), as selected byTRANSA,TRANSB, andSGN1/SGN2. Both the right hand sideEand the solutionRareM-by-Nmatrices. she's a glow-up on the way out โจLDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis a DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFholds the right hand sideF. On output, the matrixFholds the solutionLof Equation (1), as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare bothM-by-Nmatrices. ๐LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes, the source literally saysLDEhere, we're just telling you what it says, don't @ me ๐)SCALEโSCALEis DOUBLE PRECISION. She's a scaling factor whose whole job is to stop the result from overflowing. IfINFO == 0thenSCALEis1.0D0, otherwise โ if one of the inner systems couldn't be solved correctly โ0 < SCALE <= 1holds true. ๐ซถWORKโWORKis a DOUBLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input. The required workspace then comes back to you inINFO. main character move, honestly ๐INFOโINFOis INTEGER.
On input:
== -1: perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit, slay ๐< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis a DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis a DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis a DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis a DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices.LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis a DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices.LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yep, still saysLDE, quoted verbatim ๐)SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis a DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is DOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).LDAโLDAis INTEGER, bestie. It's the leading dimension of the arrayA, and you needLDA >= max(1,M). no cap, don't skimp on this one ๐BโBis DOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. And listen โ if the matrixDis already quasi-upper triangular, then the matrixBmust be upper triangular. it's giving โจconditional requirementsโจ fr frLDBโLDBis INTEGER. Leading dimension of the arrayB, andLDB >= max(1,N). periodt ๐CโCis DOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular. that's it, that's the vibe ๐ธLDCโLDCis INTEGER. Leading dimension of the arrayC, withLDC >= max(1,M). ๐ฆDโDis DOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. And the flip side of earlier: if the matrixBis already quasi-upper triangular, then the matrixDmust be upper triangular. iconic reciprocity tbh ๐LDDโLDDis INTEGER. Leading dimension of the arrayD, andLDD >= max(1,N). ๐EโEis DOUBLE PRECISION array, dimension (LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. glow-up arc honestly ๐ญ๐LDEโLDEis INTEGER. Leading dimension of the arrayE, andLDE >= max(1,M). โญFโFis DOUBLE PRECISION array, dimension (LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. same energy asEbut make itF๐LDFโLDFis INTEGER. Leading dimension of the arrayF.LDE >= max(1,M). (yes it literally saysLDEin the source, we're keeping it exactly as written, no edits bestie ๐ซถ)SCALEโSCALEis DOUBLE PRECISION. It's a scaling factor whose whole job is to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0, otherwise โ if one of the inner systems could not be solved correctly โ0 < SCALE <= 1holds true. it's giving ๐lifeguard energy๐WORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input. The required workspace is then returned inINFO. don't skip the vibe check ๐INFOโINFOis 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 yourINFOon the way out.INFO > 0means 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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐ฅSGN2โSGN2is DOUBLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation. ๐ฅMโMis INTEGER. The order of the matricesAandC.M >= 0. ๐NโNis INTEGER. The order of the matricesBandD.N >= 0. ๐AโAis DOUBLE PRECISION array, dimension (LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M). ๐BโBis DOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐ธLDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N). ๐CโCis DOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular. ๐ฆLDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M). โจDโDis DOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N). โญEโEis DOUBLE PRECISION array, dimension (LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐ญ๐LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M). ๐FโFis DOUBLE PRECISION array, dimension (LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. ๐LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (again, that'sLDEexactly as written in the source, we keep it character for character, no notes ๐)SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐งINFOโINFOis 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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBTRANSBโ 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 sayLDEon this line โ we are keeping it character for character ๐)SCALEโ DOUBLE PRECISION. A scaling factor to prevent overflow in the result. IfINFO == 0then SCALE is1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโ DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. You have to query the workspace before running the computation โ the query happens by calling the subroutine withINFO == -1on 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: ifINFO == -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: ifINFO == -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). (sameLDEsituation, same energy, we're not touching it ๐ซถ)SCALEโ DOUBLE PRECISION. A scaling factor to prevent overflow in the result. IfINFO == 0then SCALE is1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโ DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to be queried before running the computation โ you do that by calling the subroutine withINFO == -1on 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: ifINFO == -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: ifINFO == -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 toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโ String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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 matricesAandC.M >= 0.Nโ INTEGER. The order of the matricesBandD.N >= 0.Aโ DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโ INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Bโ DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโ INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Cโ DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโ INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).Dโ DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโ INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).Eโ DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโ INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).Fโ DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโ INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes bestie, it really saysLDEthere โ we are reading it exactly as written, not a single character changed ๐)SCALEโ DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโ DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโ INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ 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 toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโ String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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 matricesAandC.M >= 0.Nโ INTEGER. The order of the matricesBandD.N >= 0.Aโ DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโ INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Bโ DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโ INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Cโ DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโ INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).Dโ DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโ INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).Eโ DOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโ INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).Fโ DOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโ INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (again โLDE, verbatim, we are not touching it ๐)SCALEโ DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโ DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโ INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ 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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisString. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. โ ๏ธ careful bestieLDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. โ ๏ธ same energy, flip the namesLDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisDOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐ซถ glow up momentLDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisDOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. โจLDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKisDOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOisINTEGER- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
๐ 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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisString. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. โ ๏ธLDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. โ ๏ธLDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisDOUBLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐ซถLDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisDOUBLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. โจLDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKisDOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOisINTEGER- On input:
== -1: Perform a workspace query<> -1: normal operation
- On input:
On exit, when it's doing a workspace query:
< 0โ ifINFO == -i, the i-Th argument had an illegal value ๐>= 0โ the value ofINFOis the required number of elements in the workspace โจ
On exit, during normal operation:
== 0โ successful exit, we ate ๐< 0โ ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. โ ๏ธ like, do not ignore this one bestie.WORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. โจINFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จ yes this again, and yes it still matters.WORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. โจINFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisString. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNisDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between the two parts of the Sylvester equation.= 1: Solve Equation (1)== -1: Solve Equation (2)
MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXisDOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver.WORKโWORKisDOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOisINTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisString. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNisDOUBLE PRECISION, allowed values:+/-1. Specifies the sign between the two parts of the Sylvester equation.= 1: Solve Equation (1)== -1: Solve Equation (2)
MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXisDOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEisDOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver.WORKโWORKisDOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOisINTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis 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โTRANSAisString. It specifies the form of the system of equations with respect toAandC:
== '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โTRANSBisString. It specifies the form of the system of equations with respect toBandD:
== '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โSGNisDOUBLE 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โMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension (LDA,M). The matrixAmust be (quasi-) upper triangular ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular, the matrixBmust be upper triangular ๐LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular ๐LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular, the matrixDmust be upper triangular ๐LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXisDOUBLE PRECISION array, dimension (LDX,N). On input, the matrixXholds the right hand sideY. On output, the matrixXholds the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXareM-by-Nmatrices โจLDXโLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEisDOUBLE PRECISION. It's the scaling factor that keeps the result from overflowing ๐ซถ. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems couldn't be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is not solved correctly and in that case you have to use another solver, fr fr ๐ญWORKโWORKisDOUBLE 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 withINFO == -1on input, and the required workspace is then returned inINFO๐INFOโINFOisINTEGER.
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โTRANSAisString. It specifies the form of the system of equations with respect toAandC:
== '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โTRANSBisString. It specifies the form of the system of equations with respect toBandD:
== '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โSGNisDOUBLE 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โMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisDOUBLE PRECISION array, dimension (LDA,M). The matrixAmust be (quasi-) upper triangular ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisDOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular, the matrixBmust be upper triangular ๐LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisDOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular ๐LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisDOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular, the matrixDmust be upper triangular ๐LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXisDOUBLE PRECISION array, dimension (LDX,N). On input, the matrixXholds the right hand sideY. On output, the matrixXholds the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXareM-by-Nmatrices โจLDXโLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEisDOUBLE PRECISION. It's the scaling factor that keeps the result from overflowing ๐ซถ. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems couldn't be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is not solved correctly and in that case you have to use another solver, fr fr ๐ญWORKโWORKisDOUBLE 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 withINFO == -1on input, and the required workspace is then returned inINFO๐INFOโINFOisINTEGER.
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: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐ซถLDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices. โจLDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จWORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOis INTEGER- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐ฆLDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices. ๐LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จWORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOis INTEGER- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On input:
On exit, normal operation:
== 0: successful exit, we love to see it ๐< 0: ifINFO == -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 forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
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 forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis 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 meansINFO == -iand 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 toAandC:
== '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 toBandD:
== '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 matricesAandC.M >= 0.Nโ N is INTEGER. The order of the matricesBandD.N >= 0.Aโ A is DOUBLE PRECISION array, dimension (LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโ LDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Bโ B is DOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโ LDB is INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Cโ C is DOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular.LDCโ LDC is INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).Dโ D is DOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโ LDD is INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).Xโ X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXareM-by-Nmatrices.LDXโ LDX is INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโ SCALE is DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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 withINFO == -1on input. The required workspace is then returned inINFO.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 toAandC:
== '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 toBandD:
== '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 matricesAandC.M >= 0.Nโ N is INTEGER. The order of the matricesBandD.N >= 0.Aโ A is DOUBLE PRECISION array, dimension (LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโ LDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).Bโ B is DOUBLE PRECISION array, dimension (LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโ LDB is INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Cโ C is DOUBLE PRECISION array, dimension (LDC,M). The matrixCmust be upper triangular.LDCโ LDC is INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).Dโ D is DOUBLE PRECISION array, dimension (LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโ LDD is INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).Xโ X is DOUBLE PRECISION array, dimension (LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXareM-by-Nmatrices.LDXโ LDX is INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโ SCALE is DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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 withINFO == -1on input. The required workspace is then returned inINFO.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: ifINFO == -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โTRANSAis String. It says what form the system of equations takes with respect toAandC:== 'N':op1(A) = A,op1(C) = C(no transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(transposeAandC)
TRANSBโTRANSBis String. It says what form the system of equations takes with respect toBandD:== 'N':op2(B) = B,op2(D) = D(no transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(transposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular, no cap.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices. โจLDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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โWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOis INTEGER.
On input:
== -1: perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices. ๐ธLDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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โWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐INFOโINFOis INTEGER.
On input:
== -1: perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit, we ate and left no crumbs ๐< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. - Right hand side
Yand the solutionXare M-by-N matrices.
- On input, the matrix
LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จWORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. โจINFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
๐ 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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis DOUBLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis DOUBLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis DOUBLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis DOUBLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis DOUBLE PRECISION array, dimension(LDX,N).- On input, the matrix
Xcontains the right hand sideY. - On output, the matrix
Xcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. - Right hand side
Yand the solutionXare M-by-N matrices.
- On input, the matrix
LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis DOUBLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จWORKโWORKis DOUBLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. โจINFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On input:
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โTRANSAisString- Specifies the form of the system of equations with respect to
AandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
- Specifies the form of the system of equations with respect to
TRANSBโTRANSBisString- Specifies the form of the system of equations with respect to
BandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
- Specifies the form of the system of equations with respect to
SGN1โSGN1isSINGLE PRECISION, allowed values:+/-1- Specifies the sign between in the first equation.
SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1- Specifies the sign between in the second equation.
MโMisINTEGER- The order of the matrices
AandC.M >= 0.
- The order of the matrices
NโNisINTEGER- The order of the matrices
BandD.N >= 0.
- The order of the matrices
AโAisSINGLE PRECISIONarray, dimension(LDA,M)- The matrix
Amust be (quasi-) upper triangular.
- The matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,M).
- The leading dimension of the array
BโBisSINGLE PRECISIONarray, dimension(LDB,N)- The matrix
Bmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.
- The matrix
LDBโLDBisINTEGER- The leading dimension of the array
B.LDB >= max(1,N).
- The leading dimension of the array
CโCisSINGLE PRECISIONarray, dimension(LDC,M)- The matrix
Cmust be upper triangular.
- The matrix
LDCโLDCisINTEGER- The leading dimension of the array
C.LDC >= max(1,M).
- The leading dimension of the array
DโDisSINGLE PRECISIONarray, dimension(LDD,N)- The matrix
Dmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.
- The matrix
LDDโLDDisINTEGER- The leading dimension of the array
D.LDD >= max(1,N).
- The leading dimension of the array
EโEisSINGLE PRECISIONarray, dimension(LDE,N)- On input, the matrix
Econtains the right hand sideE. - On output, the matrix
Econtains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Eand the solutionRareM-by-Nmatrices.
- On input, the matrix
LDEโLDEisINTEGER- The leading dimension of the array
E.LDE >= max(1,M).
- The leading dimension of the array
FโFisSINGLE PRECISIONarray, dimension(LDF,N)- On input, the matrix
Fcontains the right hand sideF. - On output, the matrix
Fcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Fand the solutionLareM-by-Nmatrices.
- On input, the matrix
LDFโLDFisINTEGER- The leading dimension of the array
F.LDE >= max(1,M).
- The leading dimension of the array
๐ bestie, no cap, the page literally saysLDE >= max(1,M)in theLDFdescription โ that's what's written, we're just reading it out loud, we do not make the rules ๐
SCALEโSCALEisSINGLE PRECISIONSCALEis a scaling factor to prevent the overflow in the result.- If
INFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.
WORKโWORKisSINGLE PRECISIONarray, dimensionLDWORK- Workspace for the algorithm.
- The workspace needs to queried before the running the computation.
- The query is performed by calling the subroutine with
INFO == -1on input. - The required workspace is then returned in
INFO.
INFOโINFOisINTEGER- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, thei-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, thei-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAisCHARACTER(1)- Specifies the form of the system of equations with respect to
AandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
- Specifies the form of the system of equations with respect to
TRANSBโTRANSBisCHARACTER(1)- Specifies the form of the system of equations with respect to
BandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
- Specifies the form of the system of equations with respect to
SGN1โSGN1isSINGLE PRECISION, allowed values:+/-1- Specifies the sign between in the first equation.
SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1- Specifies the sign between in the second equation.
MโMisINTEGER- The order of the matrices
AandC.M >= 0.
- The order of the matrices
NโNisINTEGER- The order of the matrices
BandD.N >= 0.
- The order of the matrices
AโAisSINGLE PRECISIONarray, dimension(LDA,M)- The matrix
Amust be (quasi-) upper triangular.
- The matrix
LDAโLDAisINTEGER- The leading dimension of the array
A.LDA >= max(1,M).
- The leading dimension of the array
BโBisSINGLE PRECISIONarray, dimension(LDB,N)- The matrix
Bmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.
- The matrix
LDBโLDBisINTEGER- The leading dimension of the array
B.LDB >= max(1,N).
- The leading dimension of the array
CโCisSINGLE PRECISIONarray, dimension(LDC,M)- The matrix
Cmust be upper triangular.
- The matrix
LDCโLDCisINTEGER- The leading dimension of the array
C.LDC >= max(1,M).
- The leading dimension of the array
DโDisSINGLE PRECISIONarray, dimension(LDD,N)- The matrix
Dmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.
- The matrix
LDDโLDDisINTEGER- The leading dimension of the array
D.LDD >= max(1,N).
- The leading dimension of the array
EโEisSINGLE PRECISIONarray, dimension(LDE,N)- On input, the matrix
Econtains the right hand sideE. - On output, the matrix
Econtains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. - Right hand side
Eand the solutionRareM-by-Nmatrices.
- On input, the matrix
LDEโLDEis INTEGER. It's the leading dimension of the arrayE. You needLDE >= max(1,M)or it's not giving. ๐FโFis a SINGLE PRECISION array with dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. ๐ฆLDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M).
bestie, yes it literally saysLDEhere and notLDF. We're just reading the manpage, not fixing it. ๐
SCALEโSCALEis SINGLE PRECISION. It's a scaling factor to prevent overflow in the result. IfINFO == 0thenSCALEis1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. โจWORKโWORKis a SINGLE PRECISION array with dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory. ๐ ๏ธINFOโINFOis 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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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 toAandC, bestie:== 'N':op1(A) = A,op1(C) = C(no transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(transposeAandC)
TRANSBโCHARACTER(1)๐ซ same energy, but forBandD:== 'N':op2(B) = B,op2(D) = D(no transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(transposeBandD)
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 matricesAandC.M >= 0.NโINTEGER. The order of the matricesBandD.N >= 0.AโSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐ซถLDBโINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. โจLDCโINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐ซถLDDโINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. ๐LDEโINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices. ๐LDFโINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes bestie, the original literally saysLDEhere, we do not fix it, we report it ๐)SCALEโSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds 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: ifINFO == -i, thei-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -i, thei-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
๐ 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 toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโCHARACTER(1)๐ซ Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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 matricesAandC.M >= 0.NโINTEGER. The order of the matricesBandD.N >= 0.AโSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐ซถLDBโINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐ซถLDDโINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices. ๐LDEโINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices. ๐LDFโINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (again, that's the original'sLDE, not a typo of mine, we simply report ๐)SCALEโSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds 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: ifINFO == -i, thei-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On input:
- On exit, normal operation:
== 0: successful exit ๐ she did it, we're so proud< 0: ifINFO == -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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).
๐ญ yes bestie, it literally saysLDEin theLDFspot. That's what the page says. We do not editorialize, we report. ๐ซถ
SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKisSINGLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory.INFOโINFOisINTEGER- On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ 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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BBโBis aSINGLE PRECISIONarray, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. And here's the little plot twist bestie: if the matrixDis already quasi-upper triangular, thenBhas to be plain old upper triangular. The way they take turns being the special one ๐LDBโLDBisINTEGER, aka the leading dimension of the arrayB. AndLDB >= max(1,N). periodt.CโCis aSINGLE PRECISIONarray, dimension(LDC,M). The matrixCmust be upper triangular. no quasi, no games, just triangular ๐LDCโLDCisINTEGER, the leading dimension of the arrayC, andLDC >= max(1,M).DโDis aSINGLE PRECISIONarray, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. Flip side of the earlier rule: if the matrixBis already quasi-upper triangular, thenDmust be upper triangular. They're matching, it's giving coordinated outfits ๐LDDโLDDisINTEGER, the leading dimension of the arrayD.LDD >= max(1,N).EโEis aSINGLE PRECISIONarray, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Both the right hand sideEand the solutionRare M-by-N matrices. She's a dual citizen, input queen and output queen ๐LDEโLDEisINTEGER, the leading dimension of the arrayE.LDE >= max(1,M).FโFis aSINGLE PRECISIONarray, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand solutionLare M-by-N matrices. yes she's the other half of the duo ๐ฆLDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).
okay bestie I need you to know I copied that exactly ๐ the docs really do sayLDEin theLDFdescription. I don't make the rules, I just deliver them faithfully with my whole chest.
SCALEโSCALEisSINGLE PRECISION. It's the scaling factor that exists purely to stop the result from overflowing (the classic villain of numerical linear algebra ๐). IfINFO == 0thenSCALEis1.0D0, otherwise โ if one of the inner systems could not be solved correctly โ then0 < SCALE <= 1holds true.WORKโWORKis aSINGLE PRECISIONarray, 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โINFOisINTEGER.
On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAisCHARACTER(1). Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBisCHARACTER(1). Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAis aSINGLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis aSINGLE PRECISIONarray, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis aSINGLE PRECISIONarray, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis aSINGLE PRECISIONarray, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis aSINGLE PRECISIONarray, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis aSINGLE PRECISIONarray, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).
stillLDEin theLDFblurb, bestie ๐ซถ I promise I'm not playing games, that's genuinely what the original says.
SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis aSINGLE PRECISIONarray, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory.INFOโINFOisINTEGER.
On input:
== -1: Perform a workspace query ( not recommended in the C interface)<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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 saysLDEin theLDFblurb. 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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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< 0is "girl, one of your arguments is illegal" in both modes, and> 0is "the math gave up" โ one of the arising inner system got singular ๐ญ. read yourINFOfr 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 byTRANSA,TRANSB, andSGN1/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. IfINFO == 0then SCALE is1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds 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: ifINFO == -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: ifINFO == -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โTRANSAisCHARACTER(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โTRANSBisCHARACTER(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โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐SGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐MโMis INTEGER. The order of the matrices A and C.M >= 0.NโNis INTEGER. The order of the matrices B and D.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrix A must be (quasi-) upper triangular. ๐LDAโLDAis INTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBis 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โLDBis INTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrix C must be upper triangular. ๐LDCโLDCis INTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDis 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โLDDis INTEGER. The leading dimension of the array D.LDD >= max(1,N).EโEis 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 byTRANSA,TRANSB, andSGN1/SGN2. Right hand side E and the solution R are M-by-N matrices. โจLDEโLDEis INTEGER. The leading dimension of the array E.LDE >= max(1,M).FโFis 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 byTRANSA,TRANSB, andSGN1/SGN2. Right hand side F and the solution L are M-by-N matrices. โจLDFโLDFis INTEGER. The leading dimension of the array F.LDE >= max(1,M). (again with the LDE, quoting verbatim, not my typo I promise ๐)SCALEโSCALEis SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis SINGLE PRECISION array, dimension(MAX(1,LDWORK)). Workspace for the algorithm. The optimal workspace is given by\ref mepack_memory. ๐ฅINFOโINFOis 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: ifINFO == -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: ifINFO == -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โTRANSAis 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โTRANSBis 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โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐SGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐MโMis INTEGER. The order of the matrices A and C.M >= 0.NโNis INTEGER. The order of the matrices B and D.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrix A must be (quasi-) upper triangular. ๐LDATRANSBโ 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โSGN1is 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โSGN2is SINGLE PRECISION, allowed values: +/-1. It specifies the sign between in the second equation. Same energy, second equation. ๐MโMis INTEGER. The order of the matrices A and C.M >= 0. (Zero is allowed, she's inclusive like that.)NโNis INTEGER. The order of the matrices B and D.N >= 0. Periodt.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrix A must be (quasi-) upper triangular. No exceptions, the vibes demand it. ๐ฆLDAโLDAis INTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBis 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โLDBis INTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrix C must be upper triangular. Strictly. Iconic, no notes. โจLDCโLDCis INTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDis 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โLDDis INTEGER. The leading dimension of the array D.LDD >= max(1,N).EโEis 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โLDEis INTEGER. The leading dimension of the array E.LDE >= max(1,M).FโFis 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โLDFis INTEGER. The leading dimension of the array F.LDE >= max(1,M). (Yes bestie, it saysLDEhere โ 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โSCALEis SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. She's the bodyguard keeping your numbers from overflowing into the void. ๐ซถWORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on 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โINFOis 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โTRANSAis 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โTRANSBis 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โSGN1is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the first equation. ๐SGN2โSGN2is SINGLE PRECISION, allowed values: +/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matrices A and C.M >= 0.NโNis INTEGER. The order of the matrices B and D.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrix A must be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBis 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โLDBis INTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrix C must be upper triangular.LDCโLDCis INTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDis 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โLDDis INTEGER. The leading dimension of the array D.LDD >= max(1,N).EโEis 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โLDEis INTEGER. The leading dimension of the array E.LDE >= max(1,M).FโFis 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โLDFis 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โSCALEis SINGLE PRECISION. SCALE is a scaling factor to prevent the overflow in the result. IfINFO == 0then SCALE is1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned in INFO.INFOโINFOis 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 forBandD:== 'N':op2(B) = B,op2(D) = D(no transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(transposeBandD)
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 matricesAandC. So like,M >= 0, no negativity allowed bestie.NโINTEGER. The order of the matricesBandD. AlsoN >= 0.AโSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. And here's the lil plot twist: if the matrixDis already quasi-upper triangular, thenBmust be plain upper triangular.LDBโINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. No quasi business here, just upper.LDCโINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. And mirroring the earlier vibe: ifBis already quasi-upper triangular, thenDmust be upper triangular.LDDโINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโSINGLE PRECISION array, dimension(LDE,N). On input,Eis holding the right hand sideE. On output,Eis holding the solutionRof Equation (1), as selected byTRANSA,TRANSB, andSGN1/SGN2. Both the right hand sideEand the solutionRareM-by-Nmatrices.LDEโINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโSINGLE PRECISION array, dimension(LDF,N). On input,Fis holding the right hand sideF. On output,Fis holding the solutionLof Equation (1), as selected byTRANSA,TRANSB, andSGN1/SGN2. Both the right hand sideFand the solutionLareM-by-Nmatrices.LDFโINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yeah bestie, the page literally saysLDEthere โ we're not fixing it, we're reporting it ๐ )SCALEโSINGLE PRECISION. It's the scaling factor that stops the result from overflowing. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems couldn't be solved correctly,0 < SCALE <= 1holds true.WORKโSINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. Heads up: you gotta query the workspace before running the computation. You do that by calling the subroutine withINFO == -1on input, and the required workspace comes back to you inINFO. Iconic, honestly.INFOโINTEGER.
On input:
== -1: perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, thei-Th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -i, thei-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 toAandC:== 'N':op1(A) = A,op1(C) = C(no transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(transposeAandC)
TRANSBโ a string. It specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(no transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(transposeBandD)
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 matricesAandC.M >= 0.NโINTEGER. The order of the matricesBandD.N >= 0.AโSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRareM-by-Nmatrices.LDEโINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLareM-by-Nmatrices.LDFโINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (still saysLDE, still not our problem ๐ซถ)SCALEโSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโSINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, thei-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, thei-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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. It's giving "which way does the vibe go" โโSGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. Same energy, second equation ๐ซMโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. No exceptions bestie ๐LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. Read that twice, it's a whole conditional situation ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. Strictly upper triangular, no quasi-ness here, she said what she said โLDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. The other half of that conditional, love that for them ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis SINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. She comes in as one thing and leaves as another โ glow up ๐LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis SINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. Same transformation arc, different matrix ๐LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (Yes bestie, the original saysLDEhere โ not me fixing it, that's literally what it says ๐ญ)SCALEโSCALEis SINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. She's the safety net fr fr ๐WORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. Ask first, then run โ that's the rule ๐INFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. โโSGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐ซMโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. Yes, same conditional as before, she's consistent ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis SINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis SINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. ๐LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (And again, bestie โ the original still saysLDE. I'm just the messenger ๐ซ )SCALEโSCALEis SINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. Query first, bestie ๐INFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBisString. Specifies the form of the system of equations with respect toBandD:== '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โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐ซSGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐ซMโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. ๐LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. ๐LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (yes bestie, that's literally what the page says โLDE, notLDF๐ keeping it real)SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKisSINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐งINFOโINFOisINTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
โ ๏ธ bestie watch out โ a> 0INFOon 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โTRANSAisString. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBisString. Specifies the form of the system of equations with respect toBandD:== '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โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation. ๐ซSGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation. ๐ซMโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisSINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisSINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular. ๐LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisSINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisSINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices. ๐LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisSINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices. ๐LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M). (same energy as before bestie, the page really do be sayingLDE๐)SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. ๐WORKโWORKisSINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. ๐งINFOโINFOisINTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On input:
โฆ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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis SINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis SINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโLDFis INTEGER. The leading dimension of the arrayF.LDE >= max(1,M).SCALEโSCALEis SINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis 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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGN1โSGN1is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2is SINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEis SINGLE PRECISION array, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโLDEis INTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFis SINGLE PRECISION array, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโLDFis INTEGER. The leading dimension of the arrayF.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โWORKisSINGLE PRECISIONarray, dimensionLDWORK. 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 withINFO == -1on input. The required workspace then gets handed back to you inINFO. ๐ซถINFOโINFOisINTEGER.
On input:
== -1: perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisSINGLE PRECISIONarray, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisSINGLE PRECISIONarray, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisSINGLE PRECISIONarray, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisSINGLE PRECISIONarray, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโLDEisINTEGER. The leading dimension of the arrayE.LDE >= max(1,M).FโFisSINGLE PRECISIONarray, dimension(LDF,N). On input, the matrixFcontains the right hand sideF. On output, the matrixFcontains the solutionLof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideFand the solutionLare M-by-N matrices.LDFโLDFisINTEGER. The leading dimension of the arrayF.LDE >= max(1,M).SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true.WORKโWORKisSINGLE PRECISIONarray, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOisINTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String. Specifies the form of the system of equations with respect toBandD:== '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โSGN1isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the first equation.SGN2โSGN2isSINGLE PRECISION, allowed values:+/-1. Specifies the sign between in the second equation.MโMisINTEGER. The order of the matricesAandC.M >= 0.NโNisINTEGER. The order of the matricesBandD.N >= 0.AโAisSINGLE PRECISIONarray, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBisSINGLE PRECISIONarray, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCisSINGLE PRECISIONarray, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDisSINGLE PRECISIONarray, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).EโEisSINGLE PRECISIONarray, dimension(LDE,N). On input, the matrixEcontains the right hand sideE. On output, the matrixEcontains the solutionRof Equation (1) as selected byTRANSA,TRANSB, andSGN1/SGN2. Right hand sideEand the solutionRare M-by-N matrices.LDEโ
โฆand we are back in the parameter roll-call, bestie ๐
LDEโ it's anINTEGER, and it's the leading dimension of the arrayE. The rule isLDE >= max(1,M). ๐ฅFโ aSINGLE PRECISIONarray, dimension(LDF,N). On the way in, the matrixFis carrying the right hand sideF(yes, the arrayFholds the thing calledF, we love a self-titled moment ๐). On the way out, the matrixFis carrying the solutionLof Equation (1), as selected byTRANSA,TRANSB, andSGN1/SGN2. And just so we're clear: the right hand sideFand the solutionLare bothM-by-Nmatrices. periodt โจLDFโINTEGER, the leading dimension of the arrayF. And the doc saysLDE >= max(1,M)๐ that's literally what it says, i'm not editing the vibes.SCALEโ aSINGLE PRECISION.SCALEis the scaling factor that stops the result from overflowing, iconic behaviour honestly ๐ซถ. IfINFO == 0thenSCALEis1.0D0, otherwise โ if one of the inner systems could not be solved correctly โ0 < SCALE <= 1holds true.WORKโ aSINGLE PRECISIONarray, dimensionLDWORK. 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 withINFO == -1on input, and then the required workspace gets handed back to you inINFO. ๐INFOโINTEGER. the whole plot basically ๐- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ธ 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โTRANSAis 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โTRANSBis 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โSGNisSINGLE 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โMis INTEGER. The order of the matrices A and C.M >= 0.NโNis INTEGER. The order of the matrices B and D.N >= 0.AโAisSINGLE PRECISIONarray, dimension(LDA,M). The matrix A must be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBisSINGLE PRECISIONarray, 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โLDBis INTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCisSINGLE PRECISIONarray, dimension(LDC,M). The matrix C must be upper triangular.LDCโLDCis INTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDisSINGLE PRECISIONarray, 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โLDDis INTEGER. The leading dimension of the array D.LDD >= max(1,N).XโXisSINGLE PRECISIONarray, 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 byTRANSA,TRANSB, andSGN. Right hand side Y and the solution X are M-by-N matrices. ๐LDXโLDXis INTEGER. The leading dimension of the array X.LDX >= max(1,M).SCALEโSCALEisSINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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โWORKisSINGLE PRECISIONarray, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis INTEGER.- On input:
== -1: Perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit< 0: ifINFO == -i, the i-Th argument had an illegal value> 0: The equation is not solved correctly. One of the arising inner system got singular.
- On input:
๐ธ 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โTRANSAis 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โTRANSBis 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โSGNisSINGLE 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โMis INTEGER. The order of the matrices A and C.M >= 0.NโNis INTEGER. The order of the matrices B and D.N >= 0.AโAisSINGLE PRECISIONarray, dimension(LDA,M). The matrix A must be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the array A.LDA >= max(1,M).BโBisSINGLE PRECISIONarray, 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โLDBis INTEGER. The leading dimension of the array B.LDB >= max(1,N).CโCisSINGLE PRECISIONarray, dimension(LDC,M). The matrix C must be upper triangular.LDCโLDCis INTEGER. The leading dimension of the array C.LDC >= max(1,M).DโDisSINGLE PRECISIONarray, 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โLDDis INTEGER. The leading dimension of the array D.LDD >= max(1,N).XXโ 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. IfINFO == 0then SCALE is1.0D0; otherwise, if one of the inner systems couldn't be solved correctly,0 < SCALE <= 1holds true. And listen โ ifSCALE .NE. 1the 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 withINFO == -1on 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: ifINFO == -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: ifINFO == -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. IfINFO == 0then SCALE is1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the 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 withINFO == -1on 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: ifINFO == -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: ifINFO == -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).XXโXis SINGLE PRECISION array, dimension(LDX,N). On the way in, the matrixXis holding the right hand sideY. On the way out,Xis 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 sideYand the solutionXare bothM-by-Nmatrices. ๐LDXโLDXisINTEGER. It's the leading dimension of the arrayX, andLDX >= max(1,M)bestie, no exceptions. ๐SCALEโSCALEis SINGLE PRECISION. It's a scaling factor whose whole job is to stop the result from overflowing. IfINFO == 0thenSCALEis1.0D0, otherwise โ if one of the inner systems couldn't be solved correctly โ0 < SCALE <= 1holds true. And ifSCALE .NE. 1, the problem is not solved correctly, and in that case you have to go use a different solver. Periodt. ๐ญWORKโWORKis SINGLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input, and then the required workspace gets handed back to you inINFO. ๐INFOโINFOisINTEGER.
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โTRANSAis String. It specifies the form of the system of equations with respect toAandC:
== '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โTRANSBis String. It specifies the form of the system of equations with respect toBandD:
== '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โSGNis 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โMisINTEGER. The order of the matricesAandC.M >= 0. ๐NโNisINTEGER. The order of the matricesBandD.N >= 0. ๐AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular. No notes, bestie, that's just the vibe it has to have. ๐LDAโLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. And heads up: if the matrixDis already quasi-upper triangular, then the matrixBmust be upper triangular. iykyk. ๐ฆLDBโLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCisINTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. And same energy as before, flipped: if the matrixBis already quasi-upper triangular, then the matrixDmust be upper triangular. ๐LDDโLDDisINTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XXโX</p> is a SINGLE PRECISION array, dimension(LDX,N). On input,Xis holding your right hand sideYbestie. On output,Xis holding the solution to Equation (1) or (2) โ whichever oneTRANSA,TRANSBandSGNpicked for you ๐ . And fr fr: the right hand sideYand the solutionXare both M-by-N matrices, that's just the vibe.LDXโLDXis INTEGER. It's the leading dimension of the arrayX, and you needLDX >= max(1,M). no cap ๐SCALEโSCALEis SINGLE PRECISION. She's the scaling factor that keeps your result from overflowing, iconic behaviour honestly ๐ซถ. IfINFO == 0thenSCALEis1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. And lowkey this is important: ifSCALE .NE. 1the problem is no solved correctly, in this case one have to use an other solver. not me finding out the hard way ๐ญWORKโWORKis a SINGLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input, and then the required workspace is returned inINFO. it's giving "ask before you take" โจINFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis a SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis a SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis a SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis a SINGLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis SINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. again bestie, other solver, no exceptions ๐WORKโWORKis a SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis a SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis a SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis a SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XLDXโ INTEGER ๐ฆ the leading dimension of the arrayX. 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. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. And heads up bestie: ifSCALE .NE. 1the 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 PRECISIONarray, dimensionLDWORK๐ธ workspace for the algorithm. And the way you HAVE to query it before running the computation โ the query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. no cap, ask first, then compute โจINFOโ INTEGER ๐
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -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โTRANSAis String ๐ Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String ๐ธ Specifies the form of the system of equations with respect toBandD:== '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โSGNis 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โMis INTEGER ๐ฆ The order of the matricesAandC.M >= 0.NโNis INTEGER ๐ฆ The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M)๐ The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER ๐ The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N)๐ The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER ๐ธ The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M)โจ The matrixCmust be upper triangular.LDCโLDCis INTEGER ๐ฆ The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N)๐ The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. (it's giving "one of them has to stay simple" energy fr fr)LDDโLDDis INTEGER ๐ The leading dimension of the arrayD.LDD >= max(1,N).XโXis SINGLE PRECISION array, dimension(LDX,N)๐ On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXare M-by-N matrices.LDXโLDXis INTEGER ๐ฆ The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis SINGLE PRECISION ๐SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly in this case one have to use an other solver. ๐จWORKโWORKis SINGLE PRECISION array, dimensionLDWORK๐ธ Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO. โจINFOโINFOis INTEGER ๐
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -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โTRANSAis String ๐ Specifies the form of the system of equations with respect toAandC:== '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โTRANSBis String ๐ธ Specifies the form of the system of equations with respect toBandD:== '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โSGNis 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โMis INTEGER ๐ฆ The order of the matricesAandC.M >= 0.NโNis INTEGER ๐ฆ The order of the matricesBandD.N >= 0.AโAis SINGLE PRECISION array, dimension(LDA,M)๐ The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER ๐ The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N)๐ The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular. ๐LDBโLDBis INTEGER ๐ธ The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M)โจ The matrixCmust be upper triangular.LDCโLDCis INTEGER ๐ฆ The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N)๐ The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular. ๐LDDโLDDis INTEGER ๐ The leading dimension of the arrayD.LDD >= max(1,N).XโXโXis a SINGLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Both the right hand sideYand the solutionXare M-by-N matrices. โจLDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis SINGLE PRECISION. It's the scaling factor that keeps your result from overflowing. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. And bestie, listen: ifSCALE .NE. 1the problem is no solved correctly โ in this case one has to use another solver. ๐ฉWORKโWORKis a SINGLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input. The required workspace is then handed back to you inINFO. ๐INFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis a SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis a SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis a SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis a SINGLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Both the right hand sideYand the solutionXare M-by-N matrices. โจLDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis SINGLE PRECISION. It's the scaling factor that keeps your result from overflowing. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. And bestie, listen: ifSCALE .NE. 1the problem is no solved correctly โ in this case one has to use another solver. ๐ฉWORKโWORKis a SINGLE PRECISION array, dimensionLDWORK. 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 withINFO == -1on input. The required workspace is then handed back to you inINFO. ๐INFOโINFOis INTEGER.
On input:
== -1: Perform a workspace query<> -1: normal operation
On exit, workspace query:
< 0: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0.NโNis INTEGER. The order of the matricesBandD.N >= 0.AโAis a SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis a SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis a SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis a SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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 forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
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 forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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: ifINFO == -i, the i-Th argument had an illegal value>= 0: The value ofINFOis the required number of elements in the workspace.
On exit, normal operation:
== 0: successful exit< 0: ifINFO == -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 forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
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 forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
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 sideY. On the way out, it holds the solution to Equation (1) or (2), whichever oneTRANSA,TRANSB, andSGNpicked. Both the right-hand sideYand the solutionXareM-by-Nmatrices. ๐LDXโ INTEGER. The leading dimension of the arrayX. 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. IfINFO == 0thenSCALEis1.0D0; otherwise, if one of the inner systems couldn't be solved correctly, then0 < SCALE <= 1holds true. And ifSCALE .NE. 1, the problem is not solved correctly โ in that case you have to reach for another solver. No cap. ๐ญWORKโ SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. You have to query the workspace before running the computation, and you do that by calling the subroutine withINFO == -1on input. The required workspace then comes back to you inINFO. ๐ซถ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: ifINFO == -i, thei-Th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace
- On exit, normal operation:
== 0: successful exit ๐< 0: ifINFO == -i, thei-Th argument had an illegal value> 0: the equation is not solved correctly. One of the arising inner systems got singular. ๐
- On input:
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โTRANSAis String. It specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. It specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0. โจNโNis INTEGER. The order of the matricesBandD.N >= 0. โจAโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular, the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular, the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XโXis SINGLE PRECISION array, dimension(LDX,N). On input, the matrixXcontains the right hand sideY. On output, the matrixXcontains the solution of Equation (1) or (2) as selected byTRANSA,TRANSB, andSGN. Right hand sideYand the solutionXareM-by-Nmatrices. ๐LDXโLDXis INTEGER. The leading dimension of the arrayX.LDX >= max(1,M).SCALEโSCALEis SINGLE PRECISION.SCALEis a scaling factor to prevent the overflow in the result. IfINFO == 0thenSCALEis1.0D0, otherwise if one of the inner systems could not be solved correctly,0 < SCALE <= 1holds true. IfSCALE .NE. 1the problem is no solved correctly โ in this case one have to use an other solver. ๐ญWORKโWORKis SINGLE PRECISION array, dimensionLDWORK. Workspace for the algorithm. The workspace needs to queried before the running the computation. The query is performed by calling the subroutine withINFO == -1on input. The required workspace is then returned inINFO.INFOโINFOis INTEGER.- On input:
== -1: perform a workspace query<> -1: normal operation
- On exit, workspace query:
< 0: ifINFO == -i, thei-Th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace.
- On exit, normal operation:
== 0: successful exit ๐ธ< 0: ifINFO == -i, thei-Th argument had an illegal value> 0: the equation is not solved correctly. One of the arising inner system got singular. ๐
- On input:
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โTRANSAis String. Specifies the form of the system of equations with respect toAandC:== 'N':op1(A) = A,op1(C) = C(No transpose forAandC)== 'T':op1(A) = A**T,op1(C) = C **T(TransposeAandC)
TRANSBโTRANSBis String. Specifies the form of the system of equations with respect toBandD:== 'N':op2(B) = B,op2(D) = D(No transpose forBandD)== 'T':op2(B) = B**T,op2(D) = D **T(TransposeBandD)
SGNโSGNis 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โMis INTEGER. The order of the matricesAandC.M >= 0. ๐NโNis INTEGER. The order of the matricesBandD.N >= 0. ๐AโAis SINGLE PRECISION array, dimension(LDA,M). The matrixAmust be (quasi-) upper triangular.LDAโLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BโBis SINGLE PRECISION array, dimension(LDB,N). The matrixBmust be (quasi-) upper triangular. If the matrixDis already quasi-upper triangular the matrixBmust be upper triangular.LDBโLDBis INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).CโCis SINGLE PRECISION array, dimension(LDC,M). The matrixCmust be upper triangular.LDCโLDCis INTEGER. The leading dimension of the arrayC.LDC >= max(1,M).DโDis SINGLE PRECISION array, dimension(LDD,N). The matrixDmust be (quasi-) upper triangular. If the matrixBis already quasi-upper triangular the matrixDmust be upper triangular.LDDโLDDis INTEGER. The leading dimension of the arrayD.LDD >= max(1,N).XLDXโ 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 ๐ซถ
- It's the leading dimension of the array
SCALEโ SINGLE PRECISION and honestly kind of the emotional support number here ๐SCALEis a scaling factor whose whole job is preventing overflow in the result. protect the result at all costs โจ- If
INFO == 0, thenSCALEis1.0D0. Otherwise โ if one of the inner systems could not be solved correctly โ0 < SCALE <= 1holds 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, dimensionLDWORK. 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 == -1on 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: ifINFO == -i, the i-Th argument had an illegal value>= 0: the value ofINFOis the required number of elements in the workspace
On exit, normal operation:
== 0: successful exit, slay ๐< 0: ifINFO == -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 ๐ Version1.1.2, datedThu Oct 9 2025 00:00:00, and this wasctgsylv(3)โ go forth, query your workspace first, and may all yourINFOvalues be0๐๐ ๐ซถ
๐ฆ where this page comes from
- fedora 43: mepack-devel 1.1.2-1.fc43 ยท GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- fedora 43: mepack-devel 1.1.2-1.fc43 ยท GPL-3.0-or-later and LGPL-2.1-or-later and BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms