Eigenvalue Solver for Symmetric or Hermitian Tridiagonal Matrix#
HTEV (symmetric or Hermitian Tridiagonal EigenValues solver) computes the eigenvalues, and optionally the eigenvectors, of batched symmetric or Hermitian tridiagonal matrices using the QR algorithm.
where
\(A\) is an \(M \times M\) symmetric tridiagonal matrix,
\(\Lambda\) is an \(M \times M\) diagonal matrix containing the eigenvalues, and
\(V\) is an \(M \times M\) unitary matrix containing the eigenvectors.
cuSolverDx htev device functions are as follows (see Execution Methods):
// Compute eigenvalues only
__device__ void execute(data_type* d, data_type* e, status_type* info);
// Compute eigenvalues and the eigenvectors
__device__ void execute(data_type* d, data_type* e, data_type* V, status_type* info);
// Compute eigenvalues and the eigenvectors with runtime leading dimension of the matrix `V`
__device__ void execute(data_type* d, data_type* e, data_type* V, int ldv, status_type* info);
The symmetric tridiagonal matrix \(A\) is stored as two 1D arrays d and e, where d contains the diagonal elements, of size \(M\) per batch, and e contains the subdiagonal elements, of size \(M-1\) per batch. On exit, the function overwrites d with the eigenvalues in ascending order, and overwrites e with zeros.
If eigenvectors are requested, the full storage of matrix V, of size \(M \times M\), is required as input, with leading dimension \(\mathrm{ldv} \geq M\).
if
job::all_vectorsare selected for the Job operator, on exit the function fillsVwith the eigenvectors of the tridiagonal matrix.if
job::multiply_vectorsare selected for the Job operator, on exit the function multiplies the inputVby the computed eigenvectors of the tridiagonal matrix on the right, i.e.,input_V * eigen_V, and overwritesVwith the result.
The function returns status info for each batch, info = 0 if the function succeeds. If info = i > 0, then the algorithm failed to find all the eigenvalues in a total of \(30 M\) iterations, and i elements of e have not converged to zeros.
Note
cuSolverDx’s htev functions only support real data type of matrix A, its eigenvalues, and eigenvectors.
The function supports:
if eigenvectors are requested, matrix
Vbeing column- or row-major layouts, see Arrangement operator, andjobbeing eitherjob::no_vectors,job::all_vectorsorjob::multiply_vectors, see Job operator.job::overwrite_vectorsis not allowed for thehtevfunction; doing that will result in a compile-time error.
Note
If eigenvectors are not requested, i.e., job::no_vectors is selected for the Job operator, then V is not used. As matrix A is implicitly defined with two vectors, d and e, the leading dimension, or arrangement of A or V, if defined, is ignored.