MAGMA  2.0.0
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages

Functions

magma_int_t magma_sgehrd (magma_int_t n, magma_int_t ilo, magma_int_t ihi, float *A, magma_int_t lda, float *tau, float *work, magma_int_t lwork, magmaFloat_ptr dT, magma_int_t *info)
 SGEHRD reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . More...
 
magma_int_t magma_sgehrd2 (magma_int_t n, magma_int_t ilo, magma_int_t ihi, float *A, magma_int_t lda, float *tau, float *work, magma_int_t lwork, magma_int_t *info)
 SGEHRD2 reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . More...
 
magma_int_t magma_sgehrd_m (magma_int_t n, magma_int_t ilo, magma_int_t ihi, float *A, magma_int_t lda, float *tau, float *work, magma_int_t lwork, float *T, magma_int_t *info)
 SGEHRD reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . More...
 
magma_int_t magma_sorghr (magma_int_t n, magma_int_t ilo, magma_int_t ihi, float *A, magma_int_t lda, float *tau, magmaFloat_ptr dT, magma_int_t nb, magma_int_t *info)
 SORGHR generates a REAL unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD: More...
 
magma_int_t magma_sorghr_m (magma_int_t n, magma_int_t ilo, magma_int_t ihi, float *A, magma_int_t lda, float *tau, float *T, magma_int_t nb, magma_int_t *info)
 SORGHR generates a REAL unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD: 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...
 

Detailed Description

Function Documentation

magma_int_t magma_sgehrd ( magma_int_t  n,
magma_int_t  ilo,
magma_int_t  ihi,
float *  A,
magma_int_t  lda,
float *  tau,
float *  work,
magma_int_t  lwork,
magmaFloat_ptr  dT,
magma_int_t *  info 
)

SGEHRD reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H .

This version stores the triangular matrices used in the factorization so that they can be applied directly (i.e., without being recomputed) later. As a result, the application of Q is much faster.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]iloINTEGER
[in]ihiINTEGER It is assumed that A is already upper triangular in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally set by a previous call to SGEBAL; otherwise they should be set to 1 and N respectively. See Further Details. 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in,out]AREAL array, dimension (LDA,N) On entry, the N-by-N general matrix to be reduced. On exit, the upper triangle and the first subdiagonal of A are overwritten with the upper Hessenberg matrix H, and the elements below the first subdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]tauREAL array, dimension (N-1) The scalar factors of the elementary reflectors (see Further Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to zero.
[out]work(workspace) REAL array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK.
[in]lworkINTEGER The length of the array WORK. LWORK >= N*NB, where NB is the optimal blocksize.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
[out]dTREAL array on the GPU, dimension NB*N, where NB is the optimal blocksize. It stores the NB*NB blocks of the triangular T matrices used in the reduction.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value.

Further Details

The matrix Q is represented as a product of (ihi-ilo) elementary reflectors

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Each H(i) has the form

H(i) = I - tau * v * v'

where tau is a real scalar, and v is a real vector with v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on exit in A(i+2:ihi,i), and tau in TAU(i).

The contents of A are illustrated by the following example, with n = 7, ilo = 2 and ihi = 6:

on entry,                        on exit,

( a   a   a   a   a   a   a )    (  a   a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      h   h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  v4  h   h   h )
(                         a )    (                          a )

where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).

This implementation follows the hybrid algorithm and notations described in

S. Tomov and J. Dongarra, "Accelerating the reduction to upper Hessenberg form through hybrid GPU-based computing," University of Tennessee Computer Science Technical Report, UT-CS-09-642 (also LAPACK Working Note 219), May 24, 2009.

This version stores the T matrices in dT, for later use in magma_sorghr.

magma_int_t magma_sgehrd2 ( magma_int_t  n,
magma_int_t  ilo,
magma_int_t  ihi,
float *  A,
magma_int_t  lda,
float *  tau,
float *  work,
magma_int_t  lwork,
magma_int_t *  info 
)

SGEHRD2 reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H .

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]iloINTEGER
[in]ihiINTEGER It is assumed that A is already upper triangular in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally set by a previous call to SGEBAL; otherwise they should be set to 1 and N respectively. See Further Details. 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in,out]AREAL array, dimension (LDA,N) On entry, the N-by-N general matrix to be reduced. On exit, the upper triangle and the first subdiagonal of A are overwritten with the upper Hessenberg matrix H, and the elements below the first subdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]tauREAL array, dimension (N-1) The scalar factors of the elementary reflectors (see Further Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to zero.
[out]work(workspace) REAL array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK.
[in]lworkINTEGER The length of the array WORK. LWORK >= max(1,N). For optimum performance LWORK >= N*NB, where NB is the optimal blocksize.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value.

Further Details

The matrix Q is represented as a product of (ihi-ilo) elementary reflectors

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Each H(i) has the form

H(i) = I - tau * v * v'

where tau is a real scalar, and v is a real vector with v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on exit in A(i+2:ihi,i), and tau in TAU(i).

The contents of A are illustrated by the following example, with n = 7, ilo = 2 and ihi = 6:

on entry,                        on exit,

( a   a   a   a   a   a   a )    (  a   a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      h   h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  v4  h   h   h )
(                         a )    (                          a )

where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).

This implementation follows the hybrid algorithm and notations described in

S. Tomov and J. Dongarra, "Accelerating the reduction to upper Hessenberg form through hybrid GPU-based computing," University of Tennessee Computer Science Technical Report, UT-CS-09-642 (also LAPACK Working Note 219), May 24, 2009.

magma_int_t magma_sgehrd_m ( magma_int_t  n,
magma_int_t  ilo,
magma_int_t  ihi,
float *  A,
magma_int_t  lda,
float *  tau,
float *  work,
magma_int_t  lwork,
float *  T,
magma_int_t *  info 
)

SGEHRD reduces a REAL general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H .

This version stores the triangular matrices used in the factorization so that they can be applied directly (i.e., without being recomputed) later. As a result, the application of Q is much faster.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]iloINTEGER
[in]ihiINTEGER It is assumed that A is already upper triangular in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally set by a previous call to SGEBAL; otherwise they should be set to 1 and N respectively. See Further Details. 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in,out]AREAL array, dimension (LDA,N) On entry, the N-by-N general matrix to be reduced. On exit, the upper triangle and the first subdiagonal of A are overwritten with the upper Hessenberg matrix H, and the elements below the first subdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]tauREAL array, dimension (N-1) The scalar factors of the elementary reflectors (see Further Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to zero.
[out]work(workspace) REAL array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK.
[in]lworkINTEGER The length of the array WORK. LWORK >= N*NB. where NB is the optimal blocksize.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
[out]TREAL array, dimension NB*N, where NB is the optimal blocksize. It stores the NB*NB blocks of the triangular T matrices used in the reduction.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value.

Further Details

The matrix Q is represented as a product of (ihi-ilo) elementary reflectors

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Each H(i) has the form

H(i) = I - tau * v * v'

where tau is a real scalar, and v is a real vector with v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on exit in A(i+2:ihi,i), and tau in TAU(i).

The contents of A are illustrated by the following example, with n = 7, ilo = 2 and ihi = 6:

on entry,                        on exit,

( a   a   a   a   a   a   a )    (  a   a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      a   h   h   h   h   a )
(     a   a   a   a   a   a )    (      h   h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  h   h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  h   h   h   h )
(     a   a   a   a   a   a )    (      v2  v3  v4  h   h   h )
(                         a )    (                          a )

where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).

This implementation follows the hybrid algorithm and notations described in

S. Tomov and J. Dongarra, "Accelerating the reduction to upper Hessenberg form through hybrid GPU-based computing," University of Tennessee Computer Science Technical Report, UT-CS-09-642 (also LAPACK Working Note 219), May 24, 2009.

This version stores the T matrices, for later use in magma_sorghr.

magma_int_t magma_sorghr ( magma_int_t  n,
magma_int_t  ilo,
magma_int_t  ihi,
float *  A,
magma_int_t  lda,
float *  tau,
magmaFloat_ptr  dT,
magma_int_t  nb,
magma_int_t *  info 
)

SORGHR generates a REAL unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Parameters
[in]nINTEGER The order of the matrix Q. N >= 0.
[in]iloINTEGER
[in]ihiINTEGER ILO and IHI must have the same values as in the previous call of SGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in,out]AREAL array, dimension (LDA,N) On entry, the vectors which define the elementary reflectors, as returned by SGEHRD. On exit, the N-by-N unitary matrix Q.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[in]tauREAL array, dimension (N-1) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEHRD.
[in]dTREAL array on the GPU device. DT contains the T matrices used in blocking the elementary reflectors H(i), e.g., this can be the 9th argument of magma_sgehrd.
[in]nbINTEGER This is the block size used in SGEHRD, and correspondingly the size of the T matrices, used in the factorization, and stored in DT.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sorghr_m ( magma_int_t  n,
magma_int_t  ilo,
magma_int_t  ihi,
float *  A,
magma_int_t  lda,
float *  tau,
float *  T,
magma_int_t  nb,
magma_int_t *  info 
)

SORGHR generates a REAL unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

Parameters
[in]nINTEGER The order of the matrix Q. N >= 0.
[in]iloINTEGER
[in]ihiINTEGER ILO and IHI must have the same values as in the previous call of SGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in,out]AREAL array, dimension (LDA,N) On entry, the vectors which define the elementary reflectors, as returned by SGEHRD. On exit, the N-by-N unitary matrix Q.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[in]tauREAL array, dimension (N-1) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEHRD.
[in]TREAL array on the GPU device. T contains the T matrices used in blocking the elementary reflectors H(i), e.g., this can be the 9th argument of magma_sgehrd.
[in]nbINTEGER This is the block size used in SGEHRD, and correspondingly the size of the T matrices, used in the factorization, and stored in T.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
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]sidemagma_side_t
  • = MagmaRight: compute right eigenvectors only;
  • = MagmaLeft: compute left eigenvectors only;
  • = MagmaBothSides: compute both right and left eigenvectors.
[in]howmanymagma_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]selectLOGICAL 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]nINTEGER The order of the matrix T. n >= 0.
[in]TREAL array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form.
[in]ldtINTEGER The leading dimension of the array T. ldt >= max(1,n).
[in,out]VLREAL 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]ldvlINTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n.
[in,out]VRREAL 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]ldvrINTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n.
[in]mmINTEGER The number of columns in the arrays VL and/or VR. mm >= mout.
[out]moutINTEGER 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]lworkINTEGER 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]infoINTEGER
  • = 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]sidemagma_side_t
  • = MagmaRight: compute right eigenvectors only;
  • = MagmaLeft: compute left eigenvectors only;
  • = MagmaBothSides: compute both right and left eigenvectors.
[in]howmanymagma_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]selectLOGICAL 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]nINTEGER The order of the matrix T. n >= 0.
[in]TREAL array, dimension (ldt,n) The upper quasi-triangular matrix T in Schur canonical form.
[in]ldtINTEGER The leading dimension of the array T. ldt >= max(1,n).
[in,out]VLREAL 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]ldvlINTEGER The leading dimension of the array VL. ldvl >= 1, and if side = MagmaLeft or MagmaBothSides, ldvl >= n.
[in,out]VRREAL 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]ldvrINTEGER The leading dimension of the array VR. ldvr >= 1, and if side = MagmaRight or MagmaBothSides, ldvr >= n.
[in]mmINTEGER The number of columns in the arrays VL and/or VR. mm >= mout.
[out]moutINTEGER 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]lworkINTEGER 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]infoINTEGER
  • = 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|.