sygvd (USM Version)#
Computes all eigenvalues and, optionally, eigenvectors of a real
generalized symmetric definite eigenproblem using a divide and conquer
method. This routine belongs to the oneapi::mkl::lapack namespace.
Description#
The routine computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form
A*x = λ*B*x, A*B*x = λ*x, or B*A*x = λ*x .
Here A and B are assumed to be symmetric and B is also
positive definite.
It uses a divide and conquer algorithm.
API#
Syntax#
namespace oneapi::mkl::lapack {
sycl::event sygvd(sycl::queue &queue,
int64_t itype,
mkl::job jobz,
mkl::uplo uplo,
int64_t n,
T *a,
int64_t lda,
T *b,
int64_t ldb,
T *w,
T *scratchpad,
int64_t scratchpad_size,
const std::vector<sycl::event> &events = {})
}
hegvd (USM version) supports the following precision and
devices.
T |
Devices Supported |
|---|---|
|
CPU, GPU* |
|
CPU, 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.
- itype
Must be 1 or 2 or 3. Specifies the problem type to be solved:
if itype
= 1, the problem type isA*x = lambda*B*x;if itype
= 2, the problem type isA*B*x = lambda*x;if itype
= 3, the problem type isB*A*x = lambda*x.- 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 matrices
AandB(0 ≤ n).- a
Pointer to the array containing the upper or lower triangle of the symmetric matrix
A, as specified by uplo. The size ofamust be at leastlda*n.- lda
The leading dimension of a; at least
max(1,n).- b
Pointer to the array containing the upper or lower triangle of the symmetric matrix
B, as specified by uplo. The size ofbmust be at leastldb*n.- ldb
The leading dimension of b; 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 sygvd_scratchpad_size function.- events
List of events to wait for before starting computation. Defaults to empty list.
Output Parameters#
- a
On exit, if
jobz = job::vec, then ifinfo = 0, a contains the matrixZof eigenvectors. The eigenvectors are normalized as follows:if itype
= 1or2,ZT*B*Z = I;if itype
= 3,ZT*inv(B)*Z = I;If
jobz = job::novec, then on exit the upper triangle (ifuplo = uplo::upper) or the lower triangle (ifuplo = uplo::lower) ofA, including the diagonal, is destroyed.- b
On exit, if
info ≤ n, the part of b containing the matrix is overwritten by the triangular factorUorLfrom the Cholesky factorizationB = UT*UorB=L*LT.- w
Pointer to the array of size at least n. If
info = 0, contains the eigenvalues of the matrixAin ascending order. See also info.
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 |
Return Values#
Output event to wait on to ensure computation is complete.