Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 10/31/2024
Public
Document Table of Contents

?trsyl3

Solves Sylvester equation for real quasi-triangular or complex triangular matrices.

Syntax

call strsyl3(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, iwork, liwork, swork, ldsworks, info)
call dtrsyl3(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, iwork, liwork, swork, ldsworks, info)
call ctrsyl3(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, swork, ldsworks, info)
call ztrsyl3(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, swork, ldsworks, info)

Description

The routine solves the Sylvester matrix equation op(A)*X±X*op(B) = α*C, where op(A) = A or AH, and the matrices A and B are upper triangular (or, for real flavors, upper quasi-triangular in canonical Schur form); α 1 is a scale factor determined by the routine to avoid overflow in X; A is m-by-m, B is n-by-n, and C and X are both m-by-n. The matrix X is obtained by a straightforward process of back substitution.

The equation has a unique solution if and only if αi±βi 0, where {αi} and {βi} are the eigenvalues of A and B, respectively, and the sign (+ or -) is the same as that used in the equation to be solved.

This is the block version of ?trsyl.

Input Parameters

trana

CHARACTER*1. Must be 'N' or 'T' or 'C'.

If trana = 'N', then op(A) = A.

If trana = 'T', then op(A) = AT (real flavors only).

If trana = 'C' then op(A) = AH.

tranb

CHARACTER*1. Must be 'N' or 'T' or 'C'.

If tranb = 'N', then op(B) = B.

If tranb = 'T', then op(B) = BT (real flavors only).

If tranb = 'C', then op(B) = BH.

isgn

INTEGER. Indicates the form of the Sylvester equation.

If isgn = +1, op(A)*X + X*op(B) = alpha*C.

If isgn = -1, op(A)*X - X*op(B) = alpha*C.

m

INTEGER. The order of A, and the number of rows in X and C (m 0).

n

INTEGER. The order of B, and the number of columns in X and C (n 0).

a, b, c

REAL for strsyl

DOUBLE PRECISION for dtrsyl

COMPLEX for ctrsyl

DOUBLE COMPLEX for ztrsyl.

Arrays:

a(lda,*) contains the matrix A.

The second dimension of a must be at least max(1, m).

b(ldb,*) contains the matrix B.

The second dimension of b must be at least max(1, n).

c(ldc,*) contains the matrix C.

The second dimension of c must be at least max(1, n).

lda

INTEGER. The leading dimension of a; at least max(1, m).

ldb

INTEGER. The leading dimension of b; at least max(1, n).

ldc

INTEGER. The leading dimension of c; at least max(1, m).

iwork

INTEGER. Workspace array; dimension liwork.

liwork

INTEGER. The size of the iwork array; liwork ≥ 1.

If liwork = -1, then a workspace query is assumed. The routine calculates only the optimal dimension of the iwork array and returns this value as the first entry of the iwork array. No error message related to liwork is issued by xerbla.

ldswork

INTEGER.

If ldswork = -1, then a workspace query is assumed. The routine calculates only the optimal dimensions of the swork matrix and returns these values as the first and second entry of the swork matrix. No error message related ldswork is issued by xerbla.

Otherwise, ldswork >= max(2, rows).

Output Parameters

c

Overwritten by the solution matrix X.

scale

REAL for single-precision flavors

DOUBLE PRECISION for double-precision flavors.

The value of the scale factor α.

info

INTEGER.

If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

If info = 1, A and B have common or close eigenvalues; perturbed values were used to solve the equation.

swork

REAL for single-precision flavors.

DOUBLE PRECISION for double-precision flavors.

Dimension (max(2, rows), max(1,cols)).

On exit, if ldswork = -1, swork(1) (1) returns the optimal value rows and swork(2) returns the optimal cols.