# ctgsylv - Man Page

## Name

ctgsylv — C-Interface

— C-Interface for triangular generalized Sylvester equations.

## Synopsis

### Functions

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.

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.

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.

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.

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.

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.

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.

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)

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)

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)

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)

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)

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)

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)

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.

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 (Unoptimized variant)

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 (Reordered variant)

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)

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

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)

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)

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)

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)

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.

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)

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)

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)

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 variant, 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)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, 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)

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

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 ( Local Copies )

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 )

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 )

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 )

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 )

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)

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, unaligned)

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 (Classical level 2 variant)

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)

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)

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.

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)

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)

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 2variant)

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)

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.

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.

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

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.

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.

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.

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.

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.

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.

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)

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

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.

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

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.

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.

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.

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.

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.

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.

## Detailed Description

C-Interface for triangular generalized Sylvester equations.

The Fortran routines to solve the generalized Sylvester equation with triangular coefficients are wrapped in C to provide an easier access to them. All wrapper routines are direct wrappers to the corresponding Fortran subroutines without sanity checks. These are performed by the Fortran routines. Since the routines are using **int** values to pass sizes the work_space query will fail for large scale problems. For this reason the function **mepack_memory** should be used to query the required work_space from a C code. This function is aware of 64 bit integers if MEPACK is compiled with it.

## Function Documentation

### void mepack_double_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 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_dag****See also****dla_tgcsylv_dag****Parameters***TRANSA*TRANSA is String Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*TRANSB is String Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

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

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

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

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

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

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

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

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

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

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

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

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

*E*E is DOUBLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

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

*F*F is DOUBLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

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

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

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

*INFO*INFO is INTEGER On input: == -1 : Perform a workspace query <> -1 : normal operation On exit, 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 2023

Definition at line **214** of file **tgcsylv.c**.

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

**Purpose:**

mepack_double_tgcsylv_dual_dag 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 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_dag.See also dla_tgcsylv_dual_dag ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

TRANSB is CHARACTER(1) Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDB*

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

*C*

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

*LDC*

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

*D*

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

*LDD*

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

*E*

E is DOUBLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

*LDE*

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

*F*

F is DOUBLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

*LDF*

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

*SCALE*

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

*WORK*

WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

INFO is INTEGER On input: == -1 : Perform a workspace query ( not recommended in the C interface) <> -1 : normal operation On exit, workspace query: < 0 : if INFO == -i, the i-Th argument had an illegal value >= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation: == 0: successful exit < 0: if INFO == -i, the i-Th argument had an illegal value > 0: The equation is not solved correctly. One of the arising inner system got singular.

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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

mepack_double_tgcsylv_dual_level2 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 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2.See also dla_tgcsylv_dual_l2 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

TRANSB is CHARACTER(1) Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDB*

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

*C*

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

*LDC*

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

*D*

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

*LDD*

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

*E*

E is DOUBLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

*LDE*

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

*F*

F is DOUBLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

*LDF*

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

*SCALE*

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

*WORK*

WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

INFO is INTEGER On input: == -1 : Perform a workspace query ( not recommended in the C interface) <> -1 : normal operation On exit, workspace query: < 0 : if INFO == -i, the i-Th argument had an illegal value >= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation: == 0: successful exit < 0: if INFO == -i, the i-Th argument had an illegal value > 0: The equation is not solved correctly. One of the arising inner system got singular.

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2_local_copy.See also dla_tgcsylv_dual_l2_local_copy ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

TRANSB is CHARACTER(1) Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

WORK is DOUBLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

INFO is INTEGER On input: == -1 : Perform a workspace query ( not recommended in the C interface) <> -1 : normal operation On exit, workspace query: < 0 : if INFO == -i, the i-Th argument had an illegal value >= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation: == 0: successful exit < 0: if INFO == -i, the i-Th argument had an illegal value > 0: The equation is not solved correctly. One of the arising inner system got singular.

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **460** of file **tgcsylv_dual.c**.

### 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2_local_copy_128.See also dla_tgcsylv_dual_l2_local_copy_128 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1376** of file **tgcsylv_dual.c**.

### 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 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2_local_copy_32.See also dla_tgcsylv_dual_l2_local_copy_32 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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)

Level-2 Kagstroem-Westin/Bartels-Stewart Algorithm for the dual generalized coupled Sylvester equation (Local copy variant, 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2_local_copy_64.See also dla_tgcsylv_dual_l2_local_copy_64 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **917** of file **tgcsylv_dual.c**.

### 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 variant, M,N <= 96)

**Purpose:**

mepack_double_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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l2_local_copy_96.See also dla_tgcsylv_dual_l2_local_copy_96 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1147** 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)

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 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l3.See also dla_tgcsylv_dual_l3 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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.

**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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_l3_2s.See also dla_tgcsylv_dual_l3_2s ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **687** of file **tgcsylv_dual.c**.

### 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:**

mepack_double_tgcsylv_dual_recursive 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 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)..fiRemarksThis function is a wrapper fordla_tgcsylv_dual_recursive.See also dla_tgcsylv_dual_recursive ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

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

*SGN2*

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

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **231** of file **tgcsylv_dual.c**.

### 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 M-by-N matrices. Typically the matrix pencils (A,C) and (B,D) ( or (D,B) ) are created by DGGES from LAPACK.

**Remarks**The function is a wrapper for

**dla_tgcsylv_l2****See also****dla_tgcsylv_l2****Parameters***TRANSA*TRANSA is String Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*TRANSB is String Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

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

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*INFO*INFO is INTEGER On input: == -1 : Perform a workspace query <> -1 : normal operation On exit, workspace query: < 0 : if INFO == -i, the i-Th argument had an illegal value >= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation: == 0: successful exit < 0: if INFO == -i, the i-Th argument had an illegal value > 0: The equation is not solved correctly. One of the arising inner system got singular.

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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****See also****dla_tgcsylv_l2_local_copy****Parameters***TRANSA*TRANSA is String Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*TRANSB is String Specifies the form of the system of equations with respect to B and D: == 'N': op2(B) = B, op2(D) = D (No transpose for B and D) == 'T': op2(B) = B**T, op2(D) = D **T (Transpose B and D)

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

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*INFO*INFO is INTEGER On input: == -1 : Perform a workspace query <> -1 : normal operation On exit, workspace query: < 0 : if INFO == -i, the i-Th argument had an illegal value >= 0: The value of INFO is the required number of elements in the workspace. On exit, normal operation: == 0: successful exit < 0: if INFO == -i, the i-Th argument had an illegal value > 0: The equation is not solved correctly. One of the arising inner system got singular.

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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****See also****dla_tgcsylv_l2_local_copy_128****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1688** of file **tgcsylv.c**.

### 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 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_32****See also****dla_tgcsylv_l2_local_copy_32****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1058** of file **tgcsylv.c**.

### 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 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_64****See also****dla_tgcsylv_l2_local_copy_64****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1268** of file **tgcsylv.c**.

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

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

**Remarks**The function is a wrapper for

**dla_tgcsylv_l2_local_copy_96****See also****dla_tgcsylv_l2_local_copy_96****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1478** of file **tgcsylv.c**.

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

**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**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **636** of file **tgcsylv.c**.

### 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**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **425** of file **tgcsylv.c**.

### 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 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_l3****See also****dla_tgcsylv_l3****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **214** of file **tgcsylv.c**.

### 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 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_l3_2s****See also****dla_tgcsylv_l3_2s****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 (Unoptimized variant)

**Purpose:**

mepack_double_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 DGGES from LAPACK.

**Remarks**The function is a wrapper for

**dla_tgcsylv_l3_unopt****See also****dla_tgcsylv_l3_unopt****Parameters***TRANSA**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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.

**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**TRANSB**SGN1*SGN1 is DOUBLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

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

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **214** of file **tgcsylv.c**.

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

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

**Remarks**This function is a wrapper for

**dla_tgsylv_dag**.**See also****dla_tgsylv_dag****Parameters***TRANSA**TRANSB**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**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**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**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **195** of file **tgsylv.c**.

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

**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**TRANSB**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**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**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**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1941** of file **tgsylv.c**.

### 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**TRANSB**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**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**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**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1359** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1747** of file **tgsylv.c**.

### 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, unaligned)

**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 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**.**See also****dla_tgsylv_l2_local_copy****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **971** of file **tgsylv.c**.

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

**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 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_128**.**See also****dla_tgsylv_l2_local_copy_128****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **777** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **195** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **389** of file **tgsylv.c**.

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

**Purpose:**

mepack_double_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 DGGES from LAPACK.

**Remarks**This function is a wrapper for

**dla_tgsylv_l2_local_copy_96**.**See also****dla_tgsylv_l2_local_copy_96****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **583** 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**.**See also****dla_tgsylv_l2_reorder****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1165** of file **tgsylv.c**.

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

**Purpose:**

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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1553** of file **tgsylv.c**.

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

**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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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)

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 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_2s**.**See also****dla_tgsylv_l3_2s****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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)

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

**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 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**.**See also****dla_tgsylv_l3_colwise****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **583** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **389** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **195** of file **tgsylv.c**.

### 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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

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

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

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

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

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

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

*E*E is SINGLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

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

*F*F is SINGLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

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

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

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

*INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **425** of file **tgcsylv.c**.

### 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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_dag.See also sla_tgcsylv_dual_dag ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDB*

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

*C*

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

*LDC*

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

*D*

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

*LDD*

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

*E*

E is SINGLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

*LDE*

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

*F*

F is SINGLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

*LDF*

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

*SCALE*

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

*WORK*

WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **459** of file **tgcsylv_dual.c**.

### 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 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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2.See also sla_tgcsylv_dual_l2 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDB*

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

*C*

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

*LDC*

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

*D*

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

*LDD*

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

*E*

E is SINGLE PRECISION array, dimension (LDE,N) On input, the matrix E contains the right hand side E. On output, the matrix E contains the solution R of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side E and the solution R are M-by-N matrices.

*LDE*

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

*F*

F is SINGLE PRECISION array, dimension (LDF,N) On input, the matrix F contains the right hand side F. On output, the matrix F contains the solution L of Equation (1) as selected by TRANSA, TRANSB, and SGN1/SGN2. Right hand side F and the solution L are M-by-N matrices.

*LDF*

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

*SCALE*

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

*WORK*

WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1603** of file **tgcsylv_dual.c**.

### 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 ( Local Copies )

**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 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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2_local_copy.See also sla_tgcsylv_dual_l2_local_copy ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

WORK is SINGLE PRECISION array, dimension (MAX(1,LDWORK)) Workspace for the algorithm. The optimal workspace is given by \ref mepack_memory.

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2_local_copy_128.See also sla_tgcsylv_dual_l2_local_copy_128 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2752** of file **tgcsylv_dual.c**.

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

**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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2_local_copy_32.See also sla_tgcsylv_dual_l2_local_copy_32 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2062** of file **tgcsylv_dual.c**.

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

**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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2_local_copy_64.See also sla_tgcsylv_dual_l2_local_copy_64 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2291** of file **tgcsylv_dual.c**.

### 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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l2_local_copy_96.See also sla_tgcsylv_dual_l2_local_copy_96 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2521** of file **tgcsylv_dual.c**.

### 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 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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l3.See also sla_tgcsylv_dual_l3 ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **459** of file **tgcsylv_dual.c**.

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

**Purpose:**

mepack_single_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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_l3_2s.See also sla_tgcsylv_dual_l3_2s ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **915** of file **tgcsylv_dual.c**.

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

**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)..fiRemarksThis function is a wrapper forsla_tgcsylv_dual_recursive.See also sla_tgcsylv_dual_recursive ParametersTRANSATRANSA is CHARACTER(1) Specifies the form of the system of equations with respect to A and C: == 'N': op1(A) = A, op1(C) = C (No transpose for A and C) == 'T': op1(A) = A**T, op1(C) = C **T (Transpose A and C)

*TRANSB*

*SGN1*

SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*

SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

*M*

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

*N*

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

*A*

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

*LDA*

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

*B*

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

*LDD*

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

*E*

*LDE*

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

*F*

*LDF*

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

*SCALE*

*WORK*

*INFO*

**Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **459** of file **tgcsylv_dual.c**.

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

**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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1900** of file **tgcsylv.c**.

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

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

**Purpose:**

mepack_single_tgcsylv_level2_local_copy 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****See also****sla_tgcsylv_l2_local_copy****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **3374** of file **tgcsylv.c**.

### 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. 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_32****See also****sla_tgcsylv_l2_local_copy_32****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2744** of file **tgcsylv.c**.

### 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. 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_64****See also****sla_tgcsylv_l2_local_copy_64****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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_96****See also****sla_tgcsylv_l2_local_copy_96****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **3164** of file **tgcsylv.c**.

### 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 (Reordered variant)

**Purpose:**

mepack_single_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 SGGES from LAPACK.

**Remarks**The function is a wrapper for

**sla_tgcsylv_l2_reorder****See also****sla_tgcsylv_l2_reorder****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2322** of file **tgcsylv.c**.

### 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 (Unoptimized variant)

**Purpose:**

mepack_single_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 SGGES from LAPACK.

**Remarks**The function is a wrapper for

**sla_tgcsylv_l2_unopt****See also****sla_tgcsylv_l2_unopt****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2111** of file **tgcsylv.c**.

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

**Purpose:**

mepack_single_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 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****See also****sla_tgcsylv_l3****Parameters***TRANSA**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **847** of file **tgcsylv.c**.

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

**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 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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1269** of file **tgcsylv.c**.

### 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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1058** of file **tgcsylv.c**.

### 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**TRANSB**SGN1*SGN1 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the first equation.

*SGN2*SGN2 is SINGLE PRECISION, allowed values: +/-1 Specifies the sign between in the second equation.

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

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

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

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

*B**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **423** of file **tgcsylv.c**.

### 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**TRANSB**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **389** of file **tgsylv.c**.

### 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**TRANSB**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **3894** of file **tgsylv.c**.

### 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 2variant)

**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 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**.**See also****sla_tgsylv_l2****Parameters***TRANSA**TRANSB**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

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

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

*WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **3311** of file **tgsylv.c**.

### 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 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **3699** of file **tgsylv.c**.

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

**Purpose:**

mepack_single_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 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**.**See also****sla_tgsylv_l2_local_copy****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2921** of file **tgsylv.c**.

### 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 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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_32**.**See also****sla_tgsylv_l2_local_copy_32****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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_64**.**See also****sla_tgsylv_l2_local_copy_64****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2333** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **2529** of file **tgsylv.c**.

### 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

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 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **971** of file **tgsylv.c**.

### 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. 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_l3_2s**.**See also****sla_tgsylv_l3_2s****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1557** of file **tgsylv.c**.

### 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 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**.**See also****sla_tgsylv_l3_colwise****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1362** of file **tgsylv.c**.

### 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 (Row-by-row variant)

**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. 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_l3_rowwise**.**See also****sla_tgsylv_l3_rowwise****Parameters***TRANSA**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **1166** of file **tgsylv.c**.

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

**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 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**TRANSB**SGN**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**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**LDD*LDD is INTEGER The leading dimension of the array D. LDD >= max(1,N).

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

*SCALE**WORK**INFO***Author**Martin Koehler, MPI Magdeburg

**Date**October 2023

Definition at line **389** of file **tgsylv.c**.

## Author

Generated automatically by Doxygen for MEPACK from the source code.