tgsy2#

Functions

void stgsy2(
    const char*          trans,
    const INT            ijob,
    const INT            m,
    const INT            n,
    const f32*  restrict A,
    const INT            lda,
    const f32*  restrict B,
    const INT            ldb,
          f32*  restrict C,
    const INT            ldc,
    const f32*  restrict D,
    const INT            ldd,
    const f32*  restrict E,
    const INT            lde,
          f32*  restrict F,
    const INT            ldf,
          f32*           scale,
          f32*           rdsum,
          f32*           rdscal,
          INT*  restrict iwork,
          INT*           pq,
          INT*           info
);
void stgsy2(const char *trans, const INT ijob, const INT m, const INT n, const f32 *restrict A, const INT lda, const f32 *restrict B, const INT ldb, f32 *restrict C, const INT ldc, const f32 *restrict D, const INT ldd, const f32 *restrict E, const INT lde, f32 *restrict F, const INT ldf, f32 *scale, f32 *rdsum, f32 *rdscal, INT *restrict iwork, INT *pq, INT *info)#

STGSY2 solves the generalized Sylvester equation:

        A * R - L * B = scale * C                (1)
        D * R - L * E = scale * F,
using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices, (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E) must be in generalized Schur canonical form, i.e. A, B are upper quasi triangular and D, E are upper triangular. The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor chosen to avoid overflow.

Parameters

in
trans

‘N’: solve the generalized Sylvester equation (1). ‘T’: solve the ‘transposed’ system.

in
ijob

Specifies what kind of functionality to be performed. = 0: solve (1) only. = 1: A contribution from this subsystem to a Frobenius norm-based estimate (look ahead strategy). = 2: A contribution using SGECON on sub-systems.

in
m

The order of A and D, and the row dimension of C, F, R and L.

in
n

The order of B and E, and the column dimension of C, F, R and L.

in
A

Array of dimension (lda, m). Upper quasi triangular matrix.

in
lda

The leading dimension of A. lda >= max(1, m).

in
B

Array of dimension (ldb, n). Upper quasi triangular matrix.

in
ldb

The leading dimension of B. ldb >= max(1, n).

inout
C

Array of dimension (ldc, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution R.

in
ldc

The leading dimension of C. ldc >= max(1, m).

in
D

Array of dimension (ldd, m). Upper triangular matrix.

in
ldd

The leading dimension of D. ldd >= max(1, m).

in
E

Array of dimension (lde, n). Upper triangular matrix.

in
lde

The leading dimension of E. lde >= max(1, n).

inout
F

Array of dimension (ldf, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution L.

in
ldf

The leading dimension of F. ldf >= max(1, m).

out
scale

On exit, 0 <= scale <= 1. Output scaling factor.

inout
rdsum

On entry/exit, sum of squares for Dif-estimate.

inout
rdscal

On entry/exit, scaling factor for rdsum.

out
iwork

Integer array of dimension (m+n+2).

out
pq

Number of subsystems solved.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

  • > 0: The matrix pairs (A, D) and (B, E) have common or very close eigenvalues.

Functions

void dtgsy2(
    const char*          trans,
    const INT            ijob,
    const INT            m,
    const INT            n,
    const f64*  restrict A,
    const INT            lda,
    const f64*  restrict B,
    const INT            ldb,
          f64*  restrict C,
    const INT            ldc,
    const f64*  restrict D,
    const INT            ldd,
    const f64*  restrict E,
    const INT            lde,
          f64*  restrict F,
    const INT            ldf,
          f64*           scale,
          f64*           rdsum,
          f64*           rdscal,
          INT*  restrict iwork,
          INT*           pq,
          INT*           info
);
void dtgsy2(const char *trans, const INT ijob, const INT m, const INT n, const f64 *restrict A, const INT lda, const f64 *restrict B, const INT ldb, f64 *restrict C, const INT ldc, const f64 *restrict D, const INT ldd, const f64 *restrict E, const INT lde, f64 *restrict F, const INT ldf, f64 *scale, f64 *rdsum, f64 *rdscal, INT *restrict iwork, INT *pq, INT *info)#

DTGSY2 solves the generalized Sylvester equation:

        A * R - L * B = scale * C                (1)
        D * R - L * E = scale * F,
using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices, (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E) must be in generalized Schur canonical form, i.e. A, B are upper quasi triangular and D, E are upper triangular. The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor chosen to avoid overflow.

Parameters

in
trans

‘N’: solve the generalized Sylvester equation (1). ‘T’: solve the ‘transposed’ system.

in
ijob

Specifies what kind of functionality to be performed. = 0: solve (1) only. = 1: A contribution from this subsystem to a Frobenius norm-based estimate (look ahead strategy). = 2: A contribution using DGECON on sub-systems.

in
m

The order of A and D, and the row dimension of C, F, R and L.

in
n

The order of B and E, and the column dimension of C, F, R and L.

in
A

Array of dimension (lda, m). Upper quasi triangular matrix.

in
lda

The leading dimension of A. lda >= max(1, m).

in
B

Array of dimension (ldb, n). Upper quasi triangular matrix.

in
ldb

The leading dimension of B. ldb >= max(1, n).

inout
C

Array of dimension (ldc, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution R.

in
ldc

The leading dimension of C. ldc >= max(1, m).

in
D

Array of dimension (ldd, m). Upper triangular matrix.

in
ldd

The leading dimension of D. ldd >= max(1, m).

in
E

Array of dimension (lde, n). Upper triangular matrix.

in
lde

The leading dimension of E. lde >= max(1, n).

inout
F

Array of dimension (ldf, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution L.

in
ldf

The leading dimension of F. ldf >= max(1, m).

out
scale

On exit, 0 <= scale <= 1. Output scaling factor.

inout
rdsum

On entry/exit, sum of squares for Dif-estimate.

inout
rdscal

On entry/exit, scaling factor for rdsum.

out
iwork

Integer array of dimension (m+n+2).

out
pq

Number of subsystems solved.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

  • > 0: The matrix pairs (A, D) and (B, E) have common or very close eigenvalues.

Functions

void ctgsy2(
    const char*          trans,
    const INT            ijob,
    const INT            m,
    const INT            n,
    const c64*  restrict A,
    const INT            lda,
    const c64*  restrict B,
    const INT            ldb,
          c64*  restrict C,
    const INT            ldc,
    const c64*  restrict D,
    const INT            ldd,
    const c64*  restrict E,
    const INT            lde,
          c64*  restrict F,
    const INT            ldf,
          f32*           scale,
          f32*           rdsum,
          f32*           rdscal,
          INT*           info
);
void ctgsy2(const char *trans, const INT ijob, const INT m, const INT n, const c64 *restrict A, const INT lda, const c64 *restrict B, const INT ldb, c64 *restrict C, const INT ldc, const c64 *restrict D, const INT ldd, const c64 *restrict E, const INT lde, c64 *restrict F, const INT ldf, f32 *scale, f32 *rdsum, f32 *rdscal, INT *info)#

CTGSY2 solves the generalized Sylvester equation.

        A * R - L * B = scale * C               (1)
        D * R - L * E = scale * F
using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices, (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, N-by-N and M-by-N, respectively. A, B, D and E are upper triangular (i.e., (A,D) and (B,E) in generalized Schur form).

The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor chosen to avoid overflow.

In matrix notation solving equation (1) corresponds to solve Zx = scale * b, where Z is defined as

   Z = [ kron(In, A)  -kron(B**H, Im) ]             (2)
       [ kron(In, D)  -kron(E**H, Im) ],
Ik is the identity matrix of size k and X**H is the conjugate transpose of X. kron(X, Y) is the Kronecker product between the matrices X and Y.

If TRANS = ‘C’, y in the conjugate transposed system Z**H*y = scale*b is solved for, which is equivalent to solve for R and L in

        A**H * R  + D**H * L   = scale * C           (3)
        R  * B**H + L  * E**H  = scale * -F
This case is used to compute an estimate of Dif[(A, D), (B, E)] = = sigma_min(Z) using reverse communication with CLACON.

CTGSY2 also (IJOB >= 1) contributes to the computation in CTGSYL of an upper bound on the separation between to matrix pairs. Then the input (A, D), (B, E) are sub-pencils of two matrix pairs in CTGSYL.

Parameters

in
trans

‘N’: solve the generalized Sylvester equation (1). ‘C’: solve the conjugate transposed system (3).

in
ijob

Specifies what kind of functionality to be performed. = 0: solve (1) only. = 1: A contribution from this subsystem to a Frobenius norm-based estimate (look ahead strategy). = 2: A contribution using SGECON on sub-systems. Not referenced if TRANS = ‘C’.

in
m

The order of A and D, and the row dimension of C, F, R and L.

in
n

The order of B and E, and the column dimension of C, F, R and L.

in
A

Array of dimension (lda, m). Upper triangular matrix.

in
lda

The leading dimension of A. lda >= max(1, m).

in
B

Array of dimension (ldb, n). Upper triangular matrix.

in
ldb

The leading dimension of B. ldb >= max(1, n).

inout
C

Array of dimension (ldc, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution R.

in
ldc

The leading dimension of C. ldc >= max(1, m).

in
D

Array of dimension (ldd, m). Upper triangular matrix.

in
ldd

The leading dimension of D. ldd >= max(1, m).

in
E

Array of dimension (lde, n). Upper triangular matrix.

in
lde

The leading dimension of E. lde >= max(1, n).

inout
F

Array of dimension (ldf, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution L.

in
ldf

The leading dimension of F. ldf >= max(1, m).

out
scale

On exit, 0 <= scale <= 1. Output scaling factor.

inout
rdsum

On entry/exit, sum of squares for Dif-estimate.

inout
rdscal

On entry/exit, scaling factor for rdsum.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

  • > 0: The matrix pairs (A, D) and (B, E) have common or very close eigenvalues.

Functions

void ztgsy2(
    const char*          trans,
    const INT            ijob,
    const INT            m,
    const INT            n,
    const c128* restrict A,
    const INT            lda,
    const c128* restrict B,
    const INT            ldb,
          c128* restrict C,
    const INT            ldc,
    const c128* restrict D,
    const INT            ldd,
    const c128* restrict E,
    const INT            lde,
          c128* restrict F,
    const INT            ldf,
          f64*           scale,
          f64*           rdsum,
          f64*           rdscal,
          INT*           info
);
void ztgsy2(const char *trans, const INT ijob, const INT m, const INT n, const c128 *restrict A, const INT lda, const c128 *restrict B, const INT ldb, c128 *restrict C, const INT ldc, const c128 *restrict D, const INT ldd, const c128 *restrict E, const INT lde, c128 *restrict F, const INT ldf, f64 *scale, f64 *rdsum, f64 *rdscal, INT *info)#

ZTGSY2 solves the generalized Sylvester equation.

        A * R - L * B = scale * C               (1)
        D * R - L * E = scale * F
using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices, (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, N-by-N and M-by-N, respectively. A, B, D and E are upper triangular (i.e., (A,D) and (B,E) in generalized Schur form).

The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor chosen to avoid overflow.

In matrix notation solving equation (1) corresponds to solve Zx = scale * b, where Z is defined as

   Z = [ kron(In, A)  -kron(B**H, Im) ]             (2)
       [ kron(In, D)  -kron(E**H, Im) ],
Ik is the identity matrix of size k and X**H is the conjugate transpose of X. kron(X, Y) is the Kronecker product between the matrices X and Y.

If TRANS = ‘C’, y in the conjugate transposed system Z**H*y = scale*b is solved for, which is equivalent to solve for R and L in

        A**H * R  + D**H * L   = scale * C           (3)
        R  * B**H + L  * E**H  = scale * -F
This case is used to compute an estimate of Dif[(A, D), (B, E)] = = sigma_min(Z) using reverse communication with ZLACON.

ZTGSY2 also (IJOB >= 1) contributes to the computation in ZTGSYL of an upper bound on the separation between to matrix pairs. Then the input (A, D), (B, E) are sub-pencils of two matrix pairs in ZTGSYL.

Parameters

in
trans

‘N’: solve the generalized Sylvester equation (1). ‘C’: solve the conjugate transposed system (3).

in
ijob

Specifies what kind of functionality to be performed. = 0: solve (1) only. = 1: A contribution from this subsystem to a Frobenius norm-based estimate (look ahead strategy). = 2: A contribution using DGECON on sub-systems. Not referenced if TRANS = ‘C’.

in
m

The order of A and D, and the row dimension of C, F, R and L.

in
n

The order of B and E, and the column dimension of C, F, R and L.

in
A

Array of dimension (lda, m). Upper triangular matrix.

in
lda

The leading dimension of A. lda >= max(1, m).

in
B

Array of dimension (ldb, n). Upper triangular matrix.

in
ldb

The leading dimension of B. ldb >= max(1, n).

inout
C

Array of dimension (ldc, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution R.

in
ldc

The leading dimension of C. ldc >= max(1, m).

in
D

Array of dimension (ldd, m). Upper triangular matrix.

in
ldd

The leading dimension of D. ldd >= max(1, m).

in
E

Array of dimension (lde, n). Upper triangular matrix.

in
lde

The leading dimension of E. lde >= max(1, n).

inout
F

Array of dimension (ldf, n). On entry, the right-hand-side. On exit, if ijob = 0, overwritten by the solution L.

in
ldf

The leading dimension of F. ldf >= max(1, m).

out
scale

On exit, 0 <= scale <= 1. Output scaling factor.

inout
rdsum

On entry/exit, sum of squares for Dif-estimate.

inout
rdscal

On entry/exit, scaling factor for rdsum.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

  • > 0: The matrix pairs (A, D) and (B, E) have common or very close eigenvalues.