Eigenvalue Solver for Symmetric or Hermitian Matrix#
HEEV (symmetric or HErmitian EigenValue Solver) computes the eigenvalues, and optionally the eigenvectors, of batched symmetric or Hermitian matrices using the QR algorithm.
where:
\(A\) is an \(M \times M\) symmetric or Hermitian 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 heev device functions are as follows (see Execution Methods):
// Compute eigenvalues, and optionally the eigenvectors
__device__ void execute(data_type* A, precision_of_data_type* lambda, data_type* workspace, status_type* info);
// Compute eigenvalues, and optionally the eigenvectors with runtime lda
__device__ void execute(data_type* A, const unsigned int lda, precision_of_data_type* lambda, data_type* workspace, status_type* info);
Note that eigenvalues of a symmetric or Hermitian matrix are always real values, which is the reason why in the heev functions lambda is of precision_of_data_type* instead of data_type*.
For lower fill mode, only the lower triangular part of A is processed, and for upper fill mode, only the upper triangular part of A is processed. When the function returns, lambda, of size \(M\) per batch, contains the eigenvalues in ascending order.
If only computing eigenvalues, the lower triangular part of A (if in lower fill mode) or the upper triangular part of A (if in upper fill mode), including the diagonal, is destroyed on exit, and the other part of A is unchanged.
If eigenvectors are requested, i.e., the job operator is job::overwrite_vectors, on exit the function overwrites A with the eigenvectors of the matrix.
The array workspace is a temporary buffer space, required to be preallocated by the user. The size of the buffer can be obtained by workspace_size.
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 of the eigenvalues, and i off-diagonal elements of the intermediate tridiagonal matrix have not converged to zero.
The function supports:
Abeing column- or row-major layouts, see Arrangement operator, andAbeing inlowerorupperfill mode, see FillMode operator, andjobbeing eitherjob::no_vectors, orjob::overwrite_vectors, see Job operator.job::all_vectors,job::some_vectors, andjob::multiply_vectorsare not allowed for theheevfunction; doing that will result in a compile-time error.