Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?sygs2/?hegs2

Reduces a symmetric/Hermitian positive-definite generalized eigenproblem to standard form, using the factorization results obtained from ?potrf (unblocked algorithm).

Syntax

call ssygs2( itype, uplo, n, a, lda, b, ldb, info )

call dsygs2( itype, uplo, n, a, lda, b, ldb, info )

call chegs2( itype, uplo, n, a, lda, b, ldb, info )

call zhegs2( itype, uplo, n, a, lda, b, ldb, info )

Include Files

  • mkl.fi

Description

The routine ?sygs2/?hegs2 reduces a real symmetric-definite or a complex Hermitian positive-definite generalized eigenproblem to standard form.

If itype = 1, the problem is

A*x = λ*B*x

and A is overwritten by inv(UH)*A*inv(U) or inv(L)*A*inv(LH) for complex flavors and by inv(UT)*A*inv(U) or inv(L)*A*inv(LT)for real flavors.

If itype = 2 or 3, the problem is

A*B*x = λ*x, or B*A*x = λ*x,

and A is overwritten by U*A*UH or LH*A*L for complex flavors and by U*A*UT or LT*A*L for real flavors. Here UT and LT are the transpose while UH and LH are conjugate transpose of U and L.

B must be previously factorized by ?potrf as follows:

  • UH*U or L*LH for complex flavors

  • UT*U or L*LT for real flavors

Input Parameters

itype

INTEGER.

For complex flavors:

= 1: compute inv(UH)*A*inv(U) or inv(L)*A*inv(LH);

= 2 or 3: compute U*A*UH orLH*A*L.

For real flavors:

= 1: compute inv(UT)*A*inv(U) or inv(L)*A*inv(LT);

= 2 or 3: compute U*A*UT orLT*A*L.

uplo

CHARACTER*1. Specifies whether the upper or lower triangular part of the symmetric/Hermitian matrix A is stored, and how B has been factorized.

= 'U': upper triangular

= 'L': lower triangular

n

INTEGER. The order of the matrices A and B. n 0.

a

REAL for ssygs2

DOUBLE PRECISION for dsygs2

COMPLEX for chegs2

DOUBLE COMPLEX for zhegs2.

Array, DIMENSION (lda, n).

On entry, the symmetric/Hermitian matrix A.

If uplo = 'U', the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix A, and the strictly lower triangular part of a is not referenced.

If uplo = 'L', the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix A, and the strictly upper triangular part of a is not referenced.

lda

INTEGER.

The leading dimension of the array a. lda max(1,n).

b

REAL for ssygs2

DOUBLE PRECISION for dsygs2

COMPLEX for chegs2

DOUBLE COMPLEX for zhegs2.

Array, DIMENSION (ldb, n).

The triangular factor from the Cholesky factorization of B as returned by ?potrf.

ldb

INTEGER. The leading dimension of the array b. ldb max(1,n).

Output Parameters

a

On exit, If info = 0, the transformed matrix, stored in the same format as A.

info

INTEGER.

= 0: successful exit.

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