TRSYL - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void trsyl(char *transa, char *transb, integer *isgn, integer *m, integer *n, T *a, integer *lda, T *b, integer *ldb, T *c, integer *ldc, T *scale, integer *info)#

Solving Sylvester matrix equation.

Purpose:

    Solution for real Sylvester matrix equation:
        op(A)*X + X*op(B) = scale*C or
        op(A)*X - X*op(B) = scale*C,

    where op(A) = A or A**T, and  a and b are both upper quasi- triangular.
    A is M-by-M and B is n-by-n; the right hand side C and the solution X are m-by-n;
    and scale is an output scale factor, set <= 1 to avoid overflow in X.

    a and b must be in Schur canonical form (as returned by SHSEQR), that is, block upper
    triangular with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block has its
    diagonal elements equal and its off-diagonal elements of opposite sign.
Parameters:
  • transa[in]

    transa is char*

    Specifies the option op(A):

    = ‘N’: op(A) = A (No transpose)

    = ‘T’: op(A) = A**T (Transpose)

    = ‘C’: op(A) = A**H (Conjugate transpose = Transpose)
  • transb[in]

    transb is char*

    Specifies the option op(B):

    = ‘N’: op(B) = B (No transpose)

    = ‘T’: op(B) = B**T (Transpose)

    = ‘C’: op(B) = B**H (Conjugate transpose = Transpose)
  • isgn[in]

    isgn is integer*

    Specifies the sign in the equation:

    = +1: solve op(A)*X + X*op(B) = scale*C

    = -1: solve op(A)*X - X*op(B) = scale*C

  • m[in]

    m is integer*

    The order of the matrix a, and the number of rows in the matrices X and C. m >= 0.

  • n[in]

    n is integer*

    The order of the matrix b, and the number of columns in the matrices X and C. n >= 0.

  • a[in]

    a is float/double array, dimension (lda,m)

    The upper quasi-triangular matrix a, in Schur canonical form.

  • lda[in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,m).

  • b[in]

    b is float/double array, dimension (ldb,n)

    The upper quasi-triangular matrix b, in Schur canonical form.

  • ldb[in]

    ldb is integer*

    The leading dimension of the array b. ldb >= fla_max(1,n).

  • c[inout]

    c is float/double array, dimension (ldc,n)

    On entry, the m-by-n right hand side matrix c.

    On exit, c is overwritten by the solution matrix X.
  • ldc[in]

    ldc is integer*

    The leading dimension of the array c. ldc >= fla_max(1,m)

  • scale[out]

    scale is float/double*

    The scale factor, scale, set <= 1 to avoid overflow in X

  • INFO[out]

    INFO is INTEGER

    = 0: successful exit

    < 0: if INFO = -i, the i-th argument had an illegal value

    = 1: A and B have common or very close eigenvalues; perturbed values were used to solve the equation (but the matrices A and B are unchanged).

template<typename T, typename Ta>
void trsyl(char *transa, char *transb, integer *isgn, integer *m, integer *n, T *a, integer *lda, T *b, integer *ldb, T *c, integer *ldc, Ta *scale, integer *info)#