Developer Reference for Intel® oneAPI Math Kernel Library for C
?gghrd
Reduces a pair of matrices to generalized upper Hessenberg form using orthogonal/unitary transformations.
Syntax
lapack_intLAPACKE_sgghrd ( intmatrix_layout , charcompq , charcompz , lapack_intn , lapack_intilo , lapack_intihi , float*a , lapack_intlda , float*b , lapack_intldb , float*q , lapack_intldq , float*z , lapack_intldz );
lapack_intLAPACKE_dgghrd ( intmatrix_layout , charcompq , charcompz , lapack_intn , lapack_intilo , lapack_intihi , double*a , lapack_intlda , double*b , lapack_intldb , double*q , lapack_intldq , double*z , lapack_intldz );
lapack_intLAPACKE_cgghrd ( intmatrix_layout , charcompq , charcompz , lapack_intn , lapack_intilo , lapack_intihi , 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_intLAPACKE_zgghrd ( intmatrix_layout , charcompq , charcompz , lapack_intn , lapack_intilo , lapack_intihi , lapack_complex_double*a , lapack_intlda , lapack_complex_double*b , lapack_intldb , lapack_complex_double*q , lapack_intldq , lapack_complex_double*z , lapack_intldz );
Include Files
mkl.h
Description
sgghrd dgghrd cgghrd zgghrd gghrd
The routine reduces a pair of real/complex matrices ( A , B ) to generalized upper Hessenberg form using orthogonal/unitary transformations, where A is a general matrix and B is upper triangular. The form of the generalized eigenvalue problem is A*x = λ*B*x , and B is typically made upper triangular by computing its QR factorization and moving the orthogonal matrix Q to the left side of the equation.
This routine simultaneously reduces A to a Hessenberg matrix H :
Q^{H}*A*Z = H
and transforms B to another upper triangular matrix T :
Q^{H}*B*Z = T
in order to reduce the problem to its standard form H*y = λ*T*y , where y = Z^{H}*x .
The orthogonal/unitary matrices Q and Z are determined as products of Givens rotations. They may either be formed explicitly, or they may be postmultiplied into input matrices Q1 and Z1 , so that
Q_{1}*A*Z_{1}^{H} = (Q_{1}*Q)*H*(Z_{1}*Z)^{H}
Q_{1}*B*Z_{1}^{H} = (Q_{1}*Q)*T*(Z_{1}*Z)^{H}
If Q1 is the orthogonal/unitary matrix from the QR factorization of B in the original equation A*x = λ*B*x , then the routine ?gghrd reduces the original problem to generalized Hessenberg form.
Input Parameters
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
compq
Must be ‘N’ , ‘I’ , or ‘V’ .
If compq = 'N' , matrix Q is not computed. If compq = 'I' , Q is initialized to the unit matrix, and the orthogonal/unitary matrix Q is returned; If compq = 'V' , Q must contain an orthogonal/unitary matrix Q1 on entry, and the product Q1 * Q is returned.
compz
Must be ‘N’ , ‘I’ , or ‘V’ .
If compz = 'N' , matrix Z is not computed. If compz = 'I' , Z is initialized to the unit matrix, and the orthogonal/unitary matrix Z is returned; If compz = 'V' , Z must contain an orthogonal/unitary matrix Z1 on entry, and the product Z1 * Z is returned.
n
The order of the matrices A and B ( n ≥ 0).
ilo , ihi
ilo and ihi mark the rows and columns of A which are to be reduced. It is assumed that A is already upper triangular in rows and columns 1: ilo -1 and ihi +1: n . Values of ilo and ihi are normally set by a previous call to ggbal ; otherwise they should be set to 1 and n respectively.
Constraint: If n > 0 , then 1 ≤ ilo ≤ ihi ≤ n ; if n = 0 , then ilo = 1 and ihi = 0 .
- a , b , q , z
-
REAL for sgghrd DOUBLE PRECISION for dgghrd COMPLEX for cgghrd DOUBLE COMPLEX for zgghrd . Arrays:
a (size max(1, lda * n )) contains the n -by- n general matrix A .
The second dimension of a must be at least max(1, n ).
b (size max(1, ldb * n )) contains the n -by- n upper triangular matrix B .
The second dimension of b must be at least max(1, n ).
q (size max(1, ldq * n ))
If compq = 'N' , then q is not referenced. If compq = 'V' , then q must contain the orthogonal/unitary matrix Q1 , typically from the QR factorization of B . The second dimension of q must be at least max(1, n ).
z (size max(1, ldz * n ))
If compz = 'N' , then z is not referenced. If compz = 'V' , then z must contain the orthogonal/unitary matrix Z1 . 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 compq = 'N' , then ldq ≥ 1. If compq = 'I' or ‘V’ , then ldq ≥ max(1, n ).
ldz
The leading dimension of z ;
If compz = 'N' , then ldz ≥ 1. If compz = 'I' or ‘V’ , then ldz ≥ max(1, n ).
Output Parameters
- a
-
On exit, the upper triangle and the first subdiagonal of A are overwritten with the upper Hessenberg matrix H , and the rest is set to zero.
- b
-
On exit, overwritten by the upper triangular matrix T = Q:code:`H` * B*Z . The elements below the diagonal are set to zero.
- q
-
If compq = 'I' , then q contains the orthogonal/unitary matrix Q , ; If compq = 'V' , then q is overwritten by the product Q1 * Q .
- z
-
If compz = 'I' , then z contains the orthogonal/unitary matrix Z ; If compz = 'V' , then z is overwritten by the product Z1 * Z .
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.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.