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.

\[A * V = V * \Lambda\]

where:

  • A is a (M x M) symmetric or Hermitian matrix,

  • \(\Lambda\) is a (M x M) diagonal matrix containing the eigenvalues, and

  • V is a (M x 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, lamba, 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 converge, i off-diagonal elements of the intermediate tridiagonal matrix have not converged to zero.

The function supports:

  1. A being column- or row-major layouts, see Arrangement operator, and

  2. A being in lower or upper fill mode, see FillMode operator, and

  3. job being either job::no_vectors, or job::overwrite_vectors, see Job operator. job::all_vectors and job::multiply_vectors are not allowed for the heev function; doing that will result in a compile-time error.