MAGMA  2.3.0 Matrix Algebra for GPU and Multicore Architectures
trevc: Compute eigenvectors; used by geev

## Functions

magma_int_t magma_ctrevc3 (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, magmaFloatComplex *T, magma_int_t ldt, magmaFloatComplex *VL, magma_int_t ldvl, magmaFloatComplex *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, magmaFloatComplex *work, magma_int_t lwork, float *rwork, magma_int_t *info)
CTREVC3 computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T. More...

magma_int_t magma_ctrevc3_mt (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, magmaFloatComplex *T, magma_int_t ldt, magmaFloatComplex *VL, magma_int_t ldvl, magmaFloatComplex *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, magmaFloatComplex *work, magma_int_t lwork, float *rwork, magma_int_t *info)
CTREVC3_MT computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T. More...

magma_int_t magma_dtrevc3 (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, double *T, magma_int_t ldt, double *VL, magma_int_t ldvl, double *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, double *work, magma_int_t lwork, magma_int_t *info)
DTREVC3 computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T. More...

magma_int_t magma_dtrevc3_mt (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, double *T, magma_int_t ldt, double *VL, magma_int_t ldvl, double *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, double *work, magma_int_t lwork, magma_int_t *info)
DTREVC3_MT computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T. More...

magma_int_t magma_strevc3 (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, float *T, magma_int_t ldt, float *VL, magma_int_t ldvl, float *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, float *work, magma_int_t lwork, magma_int_t *info)
STREVC3 computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T. More...

magma_int_t magma_strevc3_mt (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, float *T, magma_int_t ldt, float *VL, magma_int_t ldvl, float *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, float *work, magma_int_t lwork, magma_int_t *info)
STREVC3_MT computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T. More...

magma_int_t magma_ztrevc3 (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, magmaDoubleComplex *T, magma_int_t ldt, magmaDoubleComplex *VL, magma_int_t ldvl, magmaDoubleComplex *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, magmaDoubleComplex *work, magma_int_t lwork, double *rwork, magma_int_t *info)
ZTREVC3 computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T. More...

magma_int_t magma_ztrevc3_mt (magma_side_t side, magma_vec_t howmany, magma_int_t *select, magma_int_t n, magmaDoubleComplex *T, magma_int_t ldt, magmaDoubleComplex *VL, magma_int_t ldvl, magmaDoubleComplex *VR, magma_int_t ldvr, magma_int_t mm, magma_int_t *mout, magmaDoubleComplex *work, magma_int_t lwork, double *rwork, magma_int_t *info)
ZTREVC3_MT computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T. More...

## Function Documentation

 magma_int_t magma_ctrevc3 ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, magmaFloatComplex * T, magma_int_t ldt, magmaFloatComplex * VL, magma_int_t ldvl, magmaFloatComplex * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, magmaFloatComplex * work, magma_int_t lwork, float * rwork, magma_int_t * info )

CTREVC3 computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T.

Matrices of this type are produced by the Schur factorization of a complex general matrix: A = Q*T*Q**H, as computed by CHSEQR.

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

         T*x = w*x,     (y**H)*T = w*(y**H)


where y**H denotes the conjugate transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if select[j] = true. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in,out] T COMPLEX array, dimension (ldt,n) The upper triangular matrix T. modified, but restored on exit. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL COMPLEX array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by CHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR COMPLEX array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by CHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected eigenvector occupies one column. [out] work COMPLEX array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,2*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] rwork float array, dimension (n) [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_ctrevc3_mt ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, magmaFloatComplex * T, magma_int_t ldt, magmaFloatComplex * VL, magma_int_t ldvl, magmaFloatComplex * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, magmaFloatComplex * work, magma_int_t lwork, float * rwork, magma_int_t * info )

CTREVC3_MT computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T.

Matrices of this type are produced by the Schur factorization of a complex general matrix: A = Q*T*Q**H, as computed by CHSEQR.

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

         T*x = w*x,     (y**H)*T = w*(y**H)


where y**H denotes the conjugate transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation. This uses a multi-threaded (mt) implementation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if select[j] = true. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in,out] T COMPLEX array, dimension (ldt,n) The upper triangular matrix T. Unlike LAPACK's ctrevc, T is not modified, not even temporarily. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL COMPLEX array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by CHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR COMPLEX array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by CHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected eigenvector occupies one column. [out] work COMPLEX array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,2*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] rwork float array, dimension (n) [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_dtrevc3 ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, double * T, magma_int_t ldt, double * VL, magma_int_t ldvl, double * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, double * work, magma_int_t lwork, magma_int_t * info )

DTREVC3 computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T.

Matrices of this type are produced by the Schur factorization of a real general matrix: A = Q*T*Q**T, as computed by DHSEQR.

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)*T = w*(y**T)

where y**T denotes the transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal blocks of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the orthogonal factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in,out] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. If w(j) is a real eigenvalue, the corresponding real eigenvector is computed if select(j) is true. If w(j) and w(j+1) are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if either select(j) or select(j+1) is true, and on exit select(j) is set to true and select(j+1) is set to false. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in] T DOUBLE PRECISION array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL DOUBLE PRECISION array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by DHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR DOUBLE PRECISION array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by DHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part and the second the imaginary part. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns. work (workspace) DOUBLE PRECISION array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,3*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_dtrevc3_mt ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, double * T, magma_int_t ldt, double * VL, magma_int_t ldvl, double * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, double * work, magma_int_t lwork, magma_int_t * info )

DTREVC3_MT computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T.

Matrices of this type are produced by the Schur factorization of a real general matrix: A = Q*T*Q**T, as computed by DHSEQR.

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)*T = w*(y**T)

where y**T denotes the transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal blocks of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the orthogonal factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation. This uses a multi-threaded (mt) implementation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in,out] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. If w(j) is a real eigenvalue, the corresponding real eigenvector is computed if select(j) is true. If w(j) and w(j+1) are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if either select(j) or select(j+1) is true, and on exit select(j) is set to true and select(j+1) is set to false. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in] T DOUBLE PRECISION array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL DOUBLE PRECISION array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by DHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR DOUBLE PRECISION array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by DHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part and the second the imaginary part. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns. work (workspace) DOUBLE PRECISION array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,3*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_strevc3 ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, float * T, magma_int_t ldt, float * VL, magma_int_t ldvl, float * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, float * work, magma_int_t lwork, magma_int_t * info )

STREVC3 computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T.

Matrices of this type are produced by the Schur factorization of a real general matrix: A = Q*T*Q**T, as computed by SHSEQR.

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)*T = w*(y**T)

where y**T denotes the transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal blocks of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the orthogonal factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in,out] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. If w(j) is a real eigenvalue, the corresponding real eigenvector is computed if select(j) is true. If w(j) and w(j+1) are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if either select(j) or select(j+1) is true, and on exit select(j) is set to true and select(j+1) is set to false. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in] T REAL array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL REAL array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by SHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR REAL array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by SHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part and the second the imaginary part. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns. work (workspace) REAL array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,3*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_strevc3_mt ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, float * T, magma_int_t ldt, float * VL, magma_int_t ldvl, float * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, float * work, magma_int_t lwork, magma_int_t * info )

STREVC3_MT computes some or all of the right and/or left eigenvectors of a real upper quasi-triangular matrix T.

Matrices of this type are produced by the Schur factorization of a real general matrix: A = Q*T*Q**T, as computed by SHSEQR.

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)*T = w*(y**T)

where y**T denotes the transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal blocks of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the orthogonal factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation. This uses a multi-threaded (mt) implementation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in,out] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. If w(j) is a real eigenvalue, the corresponding real eigenvector is computed if select(j) is true. If w(j) and w(j+1) are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if either select(j) or select(j+1) is true, and on exit select(j) is set to true and select(j+1) is set to false. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in] T REAL array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL REAL array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by SHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR REAL array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the orthogonal matrix Q of Schur vectors returned by SHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part and the second the imaginary part. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns. work (workspace) REAL array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,3*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_ztrevc3 ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, magmaDoubleComplex * T, magma_int_t ldt, magmaDoubleComplex * VL, magma_int_t ldvl, magmaDoubleComplex * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, magmaDoubleComplex * work, magma_int_t lwork, double * rwork, magma_int_t * info )

ZTREVC3 computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T.

Matrices of this type are produced by the Schur factorization of a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR.

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

         T*x = w*x,     (y**H)*T = w*(y**H)


where y**H denotes the conjugate transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if select[j] = true. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in,out] T COMPLEX_16 array, dimension (ldt,n) The upper triangular matrix T. modified, but restored on exit. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL COMPLEX_16 array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR COMPLEX_16 array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected eigenvector occupies one column. [out] work COMPLEX_16 array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,2*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] rwork double array, dimension (n) [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.

 magma_int_t magma_ztrevc3_mt ( magma_side_t side, magma_vec_t howmany, magma_int_t * select, magma_int_t n, magmaDoubleComplex * T, magma_int_t ldt, magmaDoubleComplex * VL, magma_int_t ldvl, magmaDoubleComplex * VR, magma_int_t ldvr, magma_int_t mm, magma_int_t * mout, magmaDoubleComplex * work, magma_int_t lwork, double * rwork, magma_int_t * info )

ZTREVC3_MT computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T.

Matrices of this type are produced by the Schur factorization of a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR.

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

         T*x = w*x,     (y**H)*T = w*(y**H)


where y**H denotes the conjugate transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal of T.

This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.

This uses a Level 3 BLAS version of the back transformation. This uses a multi-threaded (mt) implementation.

Parameters
 [in] side magma_side_t = MagmaRight: compute right eigenvectors only; = MagmaLeft: compute left eigenvectors only; = MagmaBothSides: compute both right and left eigenvectors. [in] howmany magma_vec_t = MagmaAllVec: compute all right and/or left eigenvectors; = MagmaBacktransVec: compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = MagmaSomeVec: compute selected right and/or left eigenvectors, as indicated by the logical array select. [in] select LOGICAL array, dimension (n) If howmany = MagmaSomeVec, select specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if select[j] = true. Not referenced if howmany = MagmaAllVec or MagmaBacktransVec. [in] n INTEGER The order of the matrix T. n >= 0. [in,out] T COMPLEX_16 array, dimension (ldt,n) The upper triangular matrix T. Unlike LAPACK's ztrevc, T is not modified, not even temporarily. [in] ldt INTEGER The leading dimension of the array T. ldt >= max(1,n). [in,out] VL COMPLEX_16 array, dimension (ldvl,mm) On entry, if side = MagmaLeft or MagmaBothSides and howmany = MagmaBacktransVec, VL must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR). On exit, if side = MagmaLeft or MagmaBothSides, VL contains: if howmany = MagmaAllVec, the matrix Y of left eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*Y; if howmany = MagmaSomeVec, the left eigenvectors of T specified by select, stored consecutively in the columns of VL, in the same order as their eigenvalues. Not referenced if side = MagmaRight. [in] ldvl INTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n. [in,out] VR COMPLEX_16 array, dimension (ldvr,mm) On entry, if side = MagmaRight or MagmaBothSides and howmany = MagmaBacktransVec, VR must contain an n-by-n matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR). On exit, if side = MagmaRight or MagmaBothSides, VR contains: if howmany = MagmaAllVec, the matrix X of right eigenvectors of T; if howmany = MagmaBacktransVec, the matrix Q*X; if howmany = MagmaSomeVec, the right eigenvectors of T specified by select, stored consecutively in the columns of VR, in the same order as their eigenvalues. Not referenced if side = MagmaLeft. [in] ldvr INTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n. [in] mm INTEGER The number of columns in the arrays VL and/or VR. mm >= mout. [out] mout INTEGER The number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If howmany = MagmaAllVec or MagmaBacktransVec, mout is set to n. Each selected eigenvector occupies one column. [out] work COMPLEX_16 array, dimension (max(1,lwork)) [in] lwork INTEGER The dimension of array work. lwork >= max(1,2*n). For optimum performance, lwork >= (1 + 2*nb)*n, where nb is the optimal blocksize. [out] rwork double array, dimension (n) [out] info INTEGER = 0: successful exit < 0: if info = -i, the i-th argument had an illegal value

## Further Details

The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.

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|.