Developer Reference for Intel® oneAPI Math Kernel Library for C
?tgexc
Reorders the generalized Schur decomposition of a pair of matrices (A,B) so that one diagonal block of (A,B) moves to another row index.
Syntax
lapack_intLAPACKE_stgexc ( intmatrix_layout , lapack_logicalwantq , lapack_logicalwantz , lapack_intn , float*a , lapack_intlda , float*b , lapack_intldb , float*q , lapack_intldq , float*z , lapack_intldz , lapack_int*ifst , lapack_int*ilst );
lapack_intLAPACKE_dtgexc ( intmatrix_layout , lapack_logicalwantq , lapack_logicalwantz , lapack_intn , double*a , lapack_intlda , double*b , lapack_intldb , double*q , lapack_intldq , double*z , lapack_intldz , lapack_int*ifst , lapack_int*ilst );
lapack_intLAPACKE_ctgexc ( intmatrix_layout , lapack_logicalwantq , lapack_logicalwantz , lapack_intn , lapack_complex_float*a , lapack_intlda , lapack_complex_float*b , lapack_intldb , lapack_complex_float*q , lapack_intldq , lapack_complex_float*z , lapack_intldz , lapack_intifst , lapack_intilst );
lapack_intLAPACKE_ztgexc ( intmatrix_layout , lapack_logicalwantq , lapack_logicalwantz , lapack_intn , lapack_complex_double*a , lapack_intlda , lapack_complex_double*b , lapack_intldb , lapack_complex_double*q , lapack_intldq , lapack_complex_double*z , lapack_intldz , lapack_intifst , lapack_intilst );
Include Files
mkl.h
Description
stgexc dtgexc ctgexc ztgexc tgexc
The routine reorders the generalized real-Schur/Schur decomposition of a real/complex matrix pair ( A , B ) using an orthogonal/unitary equivalence transformation
(A,B) = Q*(A,B)*Z^{H} ,
so that the diagonal block of ( A , B ) with row index ifst is moved to row ilst . Matrix pair ( A , B ) must be in a generalized real-Schur/Schur canonical form (as returned by gges ), that is, A is block upper triangular with 1-by-1 and 2-by-2 diagonal blocks and B is upper triangular. Optionally, the matrices Q and Z of generalized Schur vectors are updated.
Q_{in}*A_{in}*Z_{in}^{T} = Q_{out}*A_{out}*Z_{out}^{T}
Q_{in}*B_{in}*Z_{in}^{T} = Q_{out}*B_{out}*Z_{out}^{T} .
Input Parameters
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
wantq , wantz
If wantq = 1 , update the left transformation matrix Q ; If wantq = 0 , do not update Q ; If wantz = 1 , update the right transformation matrix Z ; If wantz = 0 , do not update Z .
n
The order of the matrices A and B ( n ≥ 0).
- a , b , q , z
-
REAL for stgexc DOUBLE PRECISION for dtgexc COMPLEX for ctgexc DOUBLE COMPLEX for ztgexc . Arrays:
a (size max(1, lda * n )) contains the matrix A .
The second dimension of a must be at least max(1, n ).
b (size max(1, ldb * n )) contains the matrix B .
q (size at least 1 if wantq = 0 and at least max(1, ldq * n ) if wantq = 1)
If wantq = 0 , then q is not referenced. If wantq = 1 , then q must contain the orthogonal/unitary matrix Q . The second dimension of q must be at least max(1, n ).
z (size at least 1 if wantz = 0 and at least max(1, ldz * n ) if wantz = 1)
If wantz = 0 , then z is not referenced. If wantz = 1 , then z must contain the orthogonal/unitary matrix Z . The second dimension of z must be at least max(1, n ).
lda
The leading dimension of a ; at least max(1, n ).
ldb
The leading dimension of b ; at least max(1, n ).
ldq
The leading dimension of q ;
If wantq = 0 , then ldq ≥ 1. If wantq = 1 , then ldq ≥ max(1, n ).
ldz
The leading dimension of z ;
If wantz = 0 , then ldz ≥ 1. If wantz = 1 , then ldz ≥ max(1, n ).
ifst , ilst
Specify the reordering of the diagonal blocks of ( A , B ). The block with row index ifst is moved to row ilst , by a sequence of swapping between adjacent blocks. Constraint: 1 ≤ifst, ilst≤n .
- work
-
REAL for stgexc ; DOUBLE PRECISION for dtgexc .
Workspace array, size lwork . Used in real flavors only.
lwork
The dimension of work ; must be at least 4n +16 .
If lwork = -1 , then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla . See Application Notes for details.
Output Parameters
- a , b , q , z
-
Overwritten by the updated matrices A , B , Q , and Z respectively.
- ifst , ilst
-
Overwritten for real flavors only. If ifst pointed to the second row of a 2 by 2 block on entry, it is changed to point to the first row; ilst always points to the first row of the block in its final position (which may differ from its input value by ± 1).
Return Values
This function returns a value info .
If info=0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.
If info = 1 , the transformed matrix pair ( A , B ) would be too far from generalized Schur form; the problem is ill-conditioned. ( A , B ) may have been partially reordered, and ilst points to the first row of the current position of the block being moved.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.
Application Notes
If it is not clear how much workspace to supply, use a generous value of lwork for the first run, or set lwork = -1 .
In first case the routine completes the task, though probably not so fast as with a recommended workspace, and provides the recommended workspace in the first element of the corresponding array work on exit. Use this value ( work(1) ) for subsequent runs.
If lwork = -1 , then the routine returns immediately and provides the recommended workspace in the first element of the corresponding array ( work ). This operation is called a workspace query.
Note that if lwork is less than the minimal required value and is not equal to -1, then the routine returns immediately with an error exit and does not provide any information on the recommended workspace.