heevd (USM Version)#
Computes all eigenvalues and, optionally, all eigenvectors of a complex
Hermitian matrix using divide and conquer algorithm. This routine
belongs to the oneapi::mkl::lapack namespace.
Description#
The routine computes all the eigenvalues, and optionally all the
eigenvectors, of a complex Hermitian matrix A. In other words, it
can compute the spectral factorization of A as: A = Z*Λ*ZH.
Here \(\Lambda\) is a real diagonal matrix whose diagonal elements are the
eigenvalues \(\lambda\)i, and Z is the orthogonal matrix whose columns are the eigenvectors zi. Thus,
A*zi = λi*zi for i = 1, 2, ..., n.
If the eigenvectors are requested, then this routine uses a divide
and conquer algorithm to compute eigenvalues and eigenvectors.
However, if only eigenvalues are required, then it uses the
Pal-Walker-Kahan variant of the QL or QR algorithm.
API#
Syntax#
namespace oneapi::mkl::lapack {
sycl::event heevd(sycl::queue &queue,
mkl::job jobz,
mkl::uplo uplo,
int64_t n,
T *a,
int64_t lda,
RT *w,
T *scratchpad,
int64_t scratchpad_size,
const std::vector<sycl::event> &events = {})
}
heevd (USM version) supports the following precision and
devices.
T |
RT |
Devices Supported |
|---|---|---|
|
|
CPU and GPU* |
|
|
CPU and GPU^ |
*Interface support only; all computations are performed on the CPU.
^Hybrid support; some computations are performed on the CPU.
Input Parameters#
- queue
Device queue where calculations will be performed.
- jobz
Must be
job::novecorjob::vec.If
jobz = job::novec, then only eigenvalues are computed.If
jobz = job::vec, then eigenvalues and eigenvectors are computed.- uplo
Must be
uplo::upperoruplo::lower.If
uplo = uplo::upper, a stores the upper triangular part ofA.If
uplo = uplo::lower, a stores the lower triangular part ofA.- n
The order of the matrix
A(0 ≤ n).- a
The pointer to the array containing
A. The size of the array must be at leastlda*n.- lda
The leading dimension of a. Must be at least
max(1,n).- scratchpad
Pointer to scratchpad memory to be used by the routine for storing intermediate results.
- scratchpad_size
Size of scratchpad memory as a number of floating point elements of type
T. Size should not be less than the value returned by the heevd_scratchpad_size function.- events
List of events to wait for before starting computation. Defaults to empty list.
Output Parameters#
- a
If
jobz = job::vec, then on exit this is overwritten by the orthogonal matrixZwhich contains the eigenvectors ofA.- w
Pointer to array of size at least n. Contains the eigenvalues of the matrix
Ain ascending order.
Exceptions#
Exception |
Description |
|---|---|
|
This exception is thrown when problems occur during calculations. You can obtain the info code of the problem using the info() method of the exception object: If If If If |
Return Values#
Output event to wait on to ensure computation is complete.