gghd3#

Functions

void sgghd3(
    const char*          compq,
    const char*          compz,
    const INT            n,
    const INT            ilo,
    const INT            ihi,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict B,
    const INT            ldb,
          f32*  restrict Q,
    const INT            ldq,
          f32*  restrict Z,
    const INT            ldz,
          f32*  restrict work,
    const INT            lwork,
          INT*           info
);
void sgghd3(const char *compq, const char *compz, const INT n, const INT ilo, const INT ihi, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict Q, const INT ldq, f32 *restrict Z, const INT ldz, f32 *restrict work, const INT lwork, INT *info)#

SGGHD3 reduces a pair of real matrices (A,B) to generalized upper Hessenberg form using orthogonal transformations, where A is a general matrix and B is upper triangular.

The form of the generalized eigenvalue problem is A*x = lambda*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 subroutine simultaneously reduces A to a Hessenberg matrix H: Q**T*A*Z = H and transforms B to another upper triangular matrix T: Q**T*B*Z = T in order to reduce the problem to its standard form H*y = lambda*T*y where y = Z**T*x.

The orthogonal 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

 Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T

 Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
If Q1 is the orthogonal matrix from the QR factorization of B in the original equation A*x = lambda*B*x, then SGGHD3 reduces the original problem to generalized Hessenberg form.

This is a blocked variant of SGGHRD, using matrix-matrix multiplications for parts of the computation to enhance performance.

Parameters

in
compq

= ‘N’: do not compute Q; = ‘I’: Q is initialized to the unit matrix; = ‘V’: Q must contain an orthogonal matrix Q1 on entry.

in
compz

= ‘N’: do not compute Z; = ‘I’: Z is initialized to the unit matrix; = ‘V’: Z must contain an orthogonal matrix Z1 on entry.

in
n

The order of the matrices A and B. n >= 0.

in
ilo

See ihi.

in
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 0:ilo-1 and ihi+1:n-1. ILO and IHI are normally set by a previous call to SGGBAL; otherwise they should be set to 0 and n-1 respectively. 0 <= ilo <= ihi <= n-1, if n > 0; ilo=0 and ihi=-1, if n=0.

inout
A

Array of dimension (lda, n). On entry, the N-by-N general matrix. 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.

in
lda

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

inout
B

Array of dimension (ldb, n). On entry, the upper triangular matrix B. On exit, the upper triangular matrix T.

in
ldb

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

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q.

in
ldq

The leading dimension of Q. ldq >= N if COMPQ=’V’ or ‘I’.

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z.

in
ldz

The leading dimension of Z. ldz >= N if COMPZ=’V’ or ‘I’.

out
work

Array of dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of the array work. lwork >= 1. For optimum performance lwork >= 6*n*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed.

out
info

  • = 0: successful exit

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

Functions

void dgghd3(
    const char*          compq,
    const char*          compz,
    const INT            n,
    const INT            ilo,
    const INT            ihi,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict B,
    const INT            ldb,
          f64*  restrict Q,
    const INT            ldq,
          f64*  restrict Z,
    const INT            ldz,
          f64*  restrict work,
    const INT            lwork,
          INT*           info
);
void dgghd3(const char *compq, const char *compz, const INT n, const INT ilo, const INT ihi, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict Q, const INT ldq, f64 *restrict Z, const INT ldz, f64 *restrict work, const INT lwork, INT *info)#

DGGHD3 reduces a pair of real matrices (A,B) to generalized upper Hessenberg form using orthogonal transformations, where A is a general matrix and B is upper triangular.

The form of the generalized eigenvalue problem is A*x = lambda*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 subroutine simultaneously reduces A to a Hessenberg matrix H: Q**T*A*Z = H and transforms B to another upper triangular matrix T: Q**T*B*Z = T in order to reduce the problem to its standard form H*y = lambda*T*y where y = Z**T*x.

The orthogonal 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

 Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T

 Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
If Q1 is the orthogonal matrix from the QR factorization of B in the original equation A*x = lambda*B*x, then DGGHD3 reduces the original problem to generalized Hessenberg form.

This is a blocked variant of DGGHRD, using matrix-matrix multiplications for parts of the computation to enhance performance.

Parameters

in
compq

= ‘N’: do not compute Q; = ‘I’: Q is initialized to the unit matrix; = ‘V’: Q must contain an orthogonal matrix Q1 on entry.

in
compz

= ‘N’: do not compute Z; = ‘I’: Z is initialized to the unit matrix; = ‘V’: Z must contain an orthogonal matrix Z1 on entry.

in
n

The order of the matrices A and B. n >= 0.

in
ilo

See ihi.

in
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 0:ilo-1 and ihi+1:n-1. ILO and IHI are normally set by a previous call to DGGBAL; otherwise they should be set to 0 and n-1 respectively. 0 <= ilo <= ihi <= n-1, if n > 0; ilo=0 and ihi=-1, if n=0.

inout
A

Array of dimension (lda, n). On entry, the N-by-N general matrix. 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.

in
lda

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

inout
B

Array of dimension (ldb, n). On entry, the upper triangular matrix B. On exit, the upper triangular matrix T.

in
ldb

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

inout
Q

Array of dimension (ldq, n). The orthogonal matrix Q.

in
ldq

The leading dimension of Q. ldq >= N if COMPQ=’V’ or ‘I’.

inout
Z

Array of dimension (ldz, n). The orthogonal matrix Z.

in
ldz

The leading dimension of Z. ldz >= N if COMPZ=’V’ or ‘I’.

out
work

Array of dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of the array work. lwork >= 1. For optimum performance lwork >= 6*n*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed.

out
info

  • = 0: successful exit

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

Functions

void cgghd3(
    const char*          compq,
    const char*          compz,
    const INT            n,
    const INT            ilo,
    const INT            ihi,
          c64*  restrict A,
    const INT            lda,
          c64*  restrict B,
    const INT            ldb,
          c64*  restrict Q,
    const INT            ldq,
          c64*  restrict Z,
    const INT            ldz,
          c64*  restrict work,
    const INT            lwork,
          INT*           info
);
void cgghd3(const char *compq, const char *compz, const INT n, const INT ilo, const INT ihi, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, c64 *restrict Q, const INT ldq, c64 *restrict Z, const INT ldz, c64 *restrict work, const INT lwork, INT *info)#

CGGHD3 reduces a pair of complex matrices (A,B) to generalized upper Hessenberg form using unitary transformations, where A is a general matrix and B is upper triangular.

The form of the generalized eigenvalue problem is A*x = lambda*B*x, and B is typically made upper triangular by computing its QR factorization and moving the unitary matrix Q to the left side of the equation.

This subroutine 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 = lambda*T*y where y = Z**H*x.

The 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

 Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H

 Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
If Q1 is the unitary matrix from the QR factorization of B in the original equation A*x = lambda*B*x, then CGGHD3 reduces the original problem to generalized Hessenberg form.

This is a blocked variant of CGGHRD, using matrix-matrix multiplications for parts of the computation to enhance performance.

Parameters

in
compq

= ‘N’: do not compute Q; = ‘I’: Q is initialized to the unit matrix; = ‘V’: Q must contain a unitary matrix Q1 on entry.

in
compz

= ‘N’: do not compute Z; = ‘I’: Z is initialized to the unit matrix; = ‘V’: Z must contain a unitary matrix Z1 on entry.

in
n

The order of the matrices A and B. n >= 0.

in
ilo

See ihi.

in
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 0:ilo-1 and ihi+1:n-1. ILO and IHI are normally set by a previous call to CGGBAL; otherwise they should be set to 0 and n-1 respectively. 0 <= ilo <= ihi <= n-1, if n > 0; ilo=0 and ihi=-1, if n=0.

inout
A

Complex array of dimension (lda, n). On entry, the N-by-N general matrix. 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.

in
lda

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

inout
B

Complex array of dimension (ldb, n). On entry, the upper triangular matrix B. On exit, the upper triangular matrix T.

in
ldb

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

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q.

in
ldq

The leading dimension of Q. ldq >= N if COMPQ=’V’ or ‘I’.

inout
Z

Complex array of dimension (ldz, n). The unitary matrix Z.

in
ldz

The leading dimension of Z. ldz >= N if COMPZ=’V’ or ‘I’.

out
work

Complex array of dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of the array work. lwork >= 1. For optimum performance lwork >= 6*n*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed.

out
info

  • = 0: successful exit

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

Functions

void zgghd3(
    const char*          compq,
    const char*          compz,
    const INT            n,
    const INT            ilo,
    const INT            ihi,
          c128* restrict A,
    const INT            lda,
          c128* restrict B,
    const INT            ldb,
          c128* restrict Q,
    const INT            ldq,
          c128* restrict Z,
    const INT            ldz,
          c128* restrict work,
    const INT            lwork,
          INT*           info
);
void zgghd3(const char *compq, const char *compz, const INT n, const INT ilo, const INT ihi, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, c128 *restrict Q, const INT ldq, c128 *restrict Z, const INT ldz, c128 *restrict work, const INT lwork, INT *info)#

ZGGHD3 reduces a pair of complex matrices (A,B) to generalized upper Hessenberg form using unitary transformations, where A is a general matrix and B is upper triangular.

The form of the generalized eigenvalue problem is A*x = lambda*B*x, and B is typically made upper triangular by computing its QR factorization and moving the unitary matrix Q to the left side of the equation.

This subroutine 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 = lambda*T*y where y = Z**H*x.

The 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

 Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H

 Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
If Q1 is the unitary matrix from the QR factorization of B in the original equation A*x = lambda*B*x, then ZGGHD3 reduces the original problem to generalized Hessenberg form.

This is a blocked variant of ZGGHRD, using matrix-matrix multiplications for parts of the computation to enhance performance.

Parameters

in
compq

= ‘N’: do not compute Q; = ‘I’: Q is initialized to the unit matrix; = ‘V’: Q must contain a unitary matrix Q1 on entry.

in
compz

= ‘N’: do not compute Z; = ‘I’: Z is initialized to the unit matrix; = ‘V’: Z must contain a unitary matrix Z1 on entry.

in
n

The order of the matrices A and B. n >= 0.

in
ilo

See ihi.

in
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 0:ilo-1 and ihi+1:n-1. ILO and IHI are normally set by a previous call to ZGGBAL; otherwise they should be set to 0 and n-1 respectively. 0 <= ilo <= ihi <= n-1, if n > 0; ilo=0 and ihi=-1, if n=0.

inout
A

Complex array of dimension (lda, n). On entry, the N-by-N general matrix. 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.

in
lda

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

inout
B

Complex array of dimension (ldb, n). On entry, the upper triangular matrix B. On exit, the upper triangular matrix T.

in
ldb

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

inout
Q

Complex array of dimension (ldq, n). The unitary matrix Q.

in
ldq

The leading dimension of Q. ldq >= N if COMPQ=’V’ or ‘I’.

inout
Z

Complex array of dimension (ldz, n). The unitary matrix Z.

in
ldz

The leading dimension of Z. ldz >= N if COMPZ=’V’ or ‘I’.

out
work

Complex array of dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of the array work. lwork >= 1. For optimum performance lwork >= 6*n*nb, where nb is the optimal blocksize. If lwork = -1, then a workspace query is assumed.

out
info

  • = 0: successful exit

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