![]() |
MAGMA
1.7.0
Matrix Algebra for GPU and Multicore Architectures
|
Functions | |
subroutine | ztrevc3 (SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, MM, M, WORK, LWORK, RWORK, INFO) |
ZTREVC3 More... | |
magma_int_t | magma_zgehrd (magma_int_t n, magma_int_t ilo, magma_int_t ihi, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex *work, magma_int_t lwork, magmaDoubleComplex_ptr dT, magma_int_t *info) |
ZGEHRD reduces a COMPLEX_16 general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . More... | |
magma_int_t | magma_zgehrd2 (magma_int_t n, magma_int_t ilo, magma_int_t ihi, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex *work, magma_int_t lwork, magma_int_t *info) |
ZGEHRD2 reduces a COMPLEX_16 general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . More... | |
magma_int_t | magma_zgehrd_m (magma_int_t n, magma_int_t ilo, magma_int_t ihi, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex *work, magma_int_t lwork, magmaDoubleComplex *T, magma_int_t *info) |
ZGEHRD reduces a COMPLEX_16 general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H . 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... | |
magma_int_t | magma_zunghr (magma_int_t n, magma_int_t ilo, magma_int_t ihi, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex_ptr dT, magma_int_t nb, magma_int_t *info) |
ZUNGHR generates a COMPLEX_16 unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD: More... | |
magma_int_t | magma_zunghr_m (magma_int_t n, magma_int_t ilo, magma_int_t ihi, magmaDoubleComplex *A, magma_int_t lda, magmaDoubleComplex *tau, magmaDoubleComplex *T, magma_int_t nb, magma_int_t *info) |
ZUNGHR generates a COMPLEX_16 unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD: More... | |
magma_int_t magma_zgehrd | ( | magma_int_t | n, |
magma_int_t | ilo, | ||
magma_int_t | ihi, | ||
magmaDoubleComplex * | A, | ||
magma_int_t | lda, | ||
magmaDoubleComplex * | tau, | ||
magmaDoubleComplex * | work, | ||
magma_int_t | lwork, | ||
magmaDoubleComplex_ptr | dT, | ||
magma_int_t * | info | ||
) |
ZGEHRD reduces a COMPLEX_16 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.
[in] | n | INTEGER The order of the matrix A. N >= 0. |
[in] | ilo | INTEGER |
[in] | ihi | INTEGER 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 ZGEBAL; 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] | A | COMPLEX_16 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] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,N). |
[out] | tau | COMPLEX_16 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) COMPLEX_16 array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. |
[in] | lwork | INTEGER 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] | dT | COMPLEX_16 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] | info | INTEGER
|
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 complex scalar, and v is a complex 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_zunghr.
magma_int_t magma_zgehrd2 | ( | magma_int_t | n, |
magma_int_t | ilo, | ||
magma_int_t | ihi, | ||
magmaDoubleComplex * | A, | ||
magma_int_t | lda, | ||
magmaDoubleComplex * | tau, | ||
magmaDoubleComplex * | work, | ||
magma_int_t | lwork, | ||
magma_int_t * | info | ||
) |
ZGEHRD2 reduces a COMPLEX_16 general matrix A to upper Hessenberg form H by an orthogonal similarity transformation: Q' * A * Q = H .
[in] | n | INTEGER The order of the matrix A. N >= 0. |
[in] | ilo | INTEGER |
[in] | ihi | INTEGER 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 ZGEBAL; 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] | A | COMPLEX_16 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] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,N). |
[out] | tau | COMPLEX_16 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) COMPLEX_16 array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. |
[in] | lwork | INTEGER 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] | info | INTEGER
|
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 complex scalar, and v is a complex 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_zgehrd_m | ( | magma_int_t | n, |
magma_int_t | ilo, | ||
magma_int_t | ihi, | ||
magmaDoubleComplex * | A, | ||
magma_int_t | lda, | ||
magmaDoubleComplex * | tau, | ||
magmaDoubleComplex * | work, | ||
magma_int_t | lwork, | ||
magmaDoubleComplex * | T, | ||
magma_int_t * | info | ||
) |
ZGEHRD reduces a COMPLEX_16 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.
[in] | n | INTEGER The order of the matrix A. N >= 0. |
[in] | ilo | INTEGER |
[in] | ihi | INTEGER 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 ZGEBAL; 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] | A | COMPLEX_16 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] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,N). |
[out] | tau | COMPLEX_16 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) COMPLEX_16 array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK. |
[in] | lwork | INTEGER 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] | T | COMPLEX_16 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] | info | INTEGER
|
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 complex scalar, and v is a complex 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_zunghr.
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.
[in] | side | magma_side_t
|
[in] | howmany | magma_vec_t
|
[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
|
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.
[in] | side | magma_side_t
|
[in] | howmany | magma_vec_t
|
[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
|
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_zunghr | ( | magma_int_t | n, |
magma_int_t | ilo, | ||
magma_int_t | ihi, | ||
magmaDoubleComplex * | A, | ||
magma_int_t | lda, | ||
magmaDoubleComplex * | tau, | ||
magmaDoubleComplex_ptr | dT, | ||
magma_int_t | nb, | ||
magma_int_t * | info | ||
) |
ZUNGHR generates a COMPLEX_16 unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
[in] | n | INTEGER The order of the matrix Q. N >= 0. |
[in] | ilo | INTEGER |
[in] | ihi | INTEGER ILO and IHI must have the same values as in the previous call of ZGEHRD. 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] | A | COMPLEX_16 array, dimension (LDA,N) On entry, the vectors which define the elementary reflectors, as returned by ZGEHRD. On exit, the N-by-N unitary matrix Q. |
[in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,N). |
[in] | tau | COMPLEX_16 array, dimension (N-1) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEHRD. |
[in] | dT | COMPLEX_16 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_zgehrd. |
[in] | nb | INTEGER This is the block size used in ZGEHRD, and correspondingly the size of the T matrices, used in the factorization, and stored in DT. |
[out] | info | INTEGER
|
magma_int_t magma_zunghr_m | ( | magma_int_t | n, |
magma_int_t | ilo, | ||
magma_int_t | ihi, | ||
magmaDoubleComplex * | A, | ||
magma_int_t | lda, | ||
magmaDoubleComplex * | tau, | ||
magmaDoubleComplex * | T, | ||
magma_int_t | nb, | ||
magma_int_t * | info | ||
) |
ZUNGHR generates a COMPLEX_16 unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
[in] | n | INTEGER The order of the matrix Q. N >= 0. |
[in] | ilo | INTEGER |
[in] | ihi | INTEGER ILO and IHI must have the same values as in the previous call of ZGEHRD. 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] | A | COMPLEX_16 array, dimension (LDA,N) On entry, the vectors which define the elementary reflectors, as returned by ZGEHRD. On exit, the N-by-N unitary matrix Q. |
[in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,N). |
[in] | tau | COMPLEX_16 array, dimension (N-1) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEHRD. |
[in] | T | COMPLEX_16 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_zgehrd. |
[in] | nb | INTEGER This is the block size used in ZGEHRD, and correspondingly the size of the T matrices, used in the factorization, and stored in T. |
[out] | info | INTEGER
|
subroutine ztrevc3 | ( | character | SIDE, |
character | HOWMNY, | ||
logical, dimension( * ) | SELECT, | ||
integer | N, | ||
complex*16, dimension( ldt, * ) | T, | ||
integer | LDT, | ||
complex*16, dimension( ldvl, * ) | VL, | ||
integer | LDVL, | ||
complex*16, dimension( ldvr, * ) | VR, | ||
integer | LDVR, | ||
integer | MM, | ||
integer | M, | ||
complex*16, dimension( * ) | WORK, | ||
integer | LWORK, | ||
double precision, dimension( * ) | RWORK, | ||
integer | INFO | ||
) |
ZTREVC3
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.
[in] | SIDE | SIDE is CHARACTER*1 = 'R': compute right eigenvectors only; = 'L': compute left eigenvectors only; = 'B': compute both right and left eigenvectors. |
[in] | HOWMNY | HOWMNY is CHARACTER*1 = 'A': compute all right and/or left eigenvectors; = 'B': compute all right and/or left eigenvectors, backtransformed by the matrices in VR and/or VL; = 'S': compute selected right and/or left eigenvectors, as indicated by the logical array SELECT. |
[in] | SELECT | SELECT is LOGICAL array, dimension (N) If HOWMNY = 'S', SELECT specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if SELECT(j) = .TRUE.. Not referenced if HOWMNY = 'A' or 'B'. |
[in] | N | N is INTEGER The order of the matrix T. N >= 0. |
[in,out] | T | T is COMPLEX*16 array, dimension (LDT,N) The upper triangular matrix T. T is modified, but restored on exit. |
[in] | LDT | LDT is INTEGER The leading dimension of the array T. LDT >= max(1,N). |
[in,out] | VL | VL is COMPLEX*16 array, dimension (LDVL,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 ZHSEQR). 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. Not referenced if SIDE = 'R'. |
[in] | LDVL | LDVL is INTEGER The leading dimension of the array VL. LDVL >= 1, and if SIDE = 'L' or 'B', LDVL >= N. |
[in,out] | VR | VR is COMPLEX*16 array, dimension (LDVR,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 ZHSEQR). 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. Not referenced if SIDE = 'L'. |
[in] | LDVR | LDVR is INTEGER The leading dimension of the array VR. LDVR >= 1, and if SIDE = 'R' or 'B', LDVR >= N. |
[in] | MM | MM is INTEGER The number of columns in the arrays VL and/or VR. MM >= M. |
[out] | M | M is INTEGER 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. |
[out] | WORK | WORK is COMPLEX*16 array, dimension (MAX(1,LWORK)) |
[in] | LWORK | LWORK is INTEGER The dimension of array WORK. LWORK >= max(1,2*N). For optimum performance, LWORK >= N + 2*N*NB, where NB is the optimal blocksize. |
[out] | RWORK | RWORK is DOUBLE PRECISION array, dimension (N) |
[out] | INFO | INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value |
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|.