Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 6/24/2024
Public

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

Document Table of Contents

p?trevc

Computes right and/or left eigenvectors of a complex upper triangular matrix in parallel.

Syntax

void pctrevc (const char* side, const char* howmny, const MKL_INT* select, const MKL_INT* n, MKL_Complex8* t, const MKL_INT* desct, MKL_Complex8* vl, const MKL_INT* descvl, MKL_Complex8* vr, const MKL_INT* descvr, const MKL_INT* mm, MKL_INT* m, MKL_Complex8* work, float* rwork, MKL_INT* info);

void pztrevc (const char* side, const char* howmny, const MKL_INT* select, const MKL_INT* n, MKL_Complex16* t, const MKL_INT* desct, MKL_Complex16* vl, const MKL_INT* descvl, MKL_Complex16* vr, const MKL_INT* descvr, const MKL_INT* mm, MKL_INT* m, MKL_Complex16* work, double* rwork, MKL_INT* info);

void pdtrevc (const char* side, const char* howmny, const MKL_INT* select, const MKL_INT* n, double* t, const MKL_INT* desct, double* vl, const MKL_INT* descvl, double* vr, const MKL_INT* descvr, const MKL_INT* mm, MKL_INT* m, double* work, MKL_INT* info);

void pstrevc (const char* side, const char* howmny, const MKL_INT* select, const MKL_INT* n, float* t, const MKL_INT* desct, float* vl, const MKL_INT* descvl, float* vr, const MKL_INT* descvr, const MKL_INT* mm, MKL_INT* m, float* work, MKL_INT* info);

Include Files

  • mkl_scalapack.h

Description

p?trevc computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T in parallel.

The right eigenvector x and the left eigenvector y of T corresponding to an eigenvalue w are defined by:

T*x = w*x,

y'*T = w*y'

where y' denotes the conjugate transpose of the vector y.

If all eigenvectors are requested, the routine may either return the matrices X and/or Y of right or left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input unitary matrix. If T was obtained from the Schur factorization of an original matrix A = Q*T*Q', then Q*X and Q*Y are the matrices of right or left eigenvectors of A.

Input Parameters

side

(global)

= 'R': compute right eigenvectors only;

= 'L': compute left eigenvectors only;

= 'B': compute both right and left eigenvectors.

howmny

(global)

= 'A': compute all right and/or left eigenvectors;

= 'B': compute all right and/or left eigenvectors, and backtransform them using the input matrices supplied in vr and/or vl;

= 'S': compute selected right and/or left eigenvectors, specified by the logical array select.

select

(global)

Array, size (n)

If howmny = 'S', select specifies the eigenvectors to be computed.

If howmny = 'A' or 'B', select is not referenced. To select the eigenvector corresponding to the j-th eigenvalue, select[j - 1] must be set to non-zero.

n

(global)

The order of the matrix T. n >= 0.

t

(local)

Array, size lld_t*LOCc(n).

The upper triangular matrix T. T is modified, but restored on exit.

desct

(global and local)

Array of size dlen_.

The array descriptor for the distributed matrix T.

vl

(local)

Array, size (descvl(lld_),mm)

On entry, if side = 'L' or 'B' and howmny = 'B', vl must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ?hseqr).

descvl

(global and local)

Array of size dlen_.

The array descriptor for the distributed matrix VL.

vr

(local)

Array, size descvr(lld_)*mm.

On entry, if side = 'R' or 'B' and howmny = 'B', vr must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ?hseqr).

descvr

(global and local)

Array of size dlen_.

The array descriptor for the distributed matrix VR.

mm

(global)

The number of columns in the arrays vl and/or vr. mm >= m.

work

(local)

Array, size ( 2*desct(lld_) )

Additional workspace may be required if p?lattrs is updated to use work.

rwork

Array, size ( desct(lld_) )

Output Parameters

t

The upper triangular matrix T. T is modified, but restored on exit.

vl

On exit, if side = 'L' or 'B', vl contains:

if howmny = 'A', the matrix Y of left eigenvectors of T;

if howmny = 'B', the matrix Q*Y;

if howmny = 'S', the left eigenvectors of T specified by select, stored consecutively in the columns of vl, in the same order as their eigenvalues. If side = 'R', vl is not referenced.

vr

On exit, if side = 'R' or 'B', vr contains:

if howmny = 'A', the matrix X of right eigenvectors of T;

if howmny = 'B', the matrix Q*X;

if howmny = 'S', the right eigenvectors of T specified by select, stored consecutively in the columns of vr, in the same order as their eigenvalues. If side = 'L', vr is not referenced.

m

(global)

The number of columns in the arrays vl and/or vr actually used to store the eigenvectors. If howmny = 'A' or 'B', m is set to n. Each selected eigenvector occupies one column.

info

(global)

= 0: successful exit

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

Application Notes

The algorithm used in this program is basically backward (forward) substitution. Scaling should be used to make the code robust against possible overflow. But scaling has not yet been implemented in p?lattrs which is called by this routine to solve the triangular systems. p?lattrs just calls p?trsv.

Each eigenvector is normalized so that the element of largest magnitude has magnitude 1; here the magnitude of a complex number (x,y) is taken to be |x| + |y|.