sygvx_scratchpad_size#

Computes size of scratchpad memory required for sygvx (USM Version) function. This routine belongs to the oneapi::mkl::lapack namespace.

Description#

Computes the number of elements of type T the scratchpad memory to be passed to the sygvx (buffer or USM version) function must be able to hold.

API#

Syntax#

namespace oneapi::mkl::lapack {
  template<typename T>
  int64_t sygvx_scratchpad_size(sycl::queue &queue,
  int64_t itype,
  mkl::job jobz,
  mkl::rangev range,
  mkl::uplo uplo,
  int64_t n,
  int64_t lda,
  int64_t ldb,
  T vl,
  T vu,
  int64_t il,
  int64_t iu,
  T abstol,
  int64_t ldz)
}

Input Parameters#

queue

Device queue where calculations by the sygvx (buffer or USM version) function will be performed.

itype

Must be 1 or 2 or 3. Specifies the problem type to be solved:

if itype= 1, the problem type is A*x = lambda*B*x;

if itype= 2, the problem type is A*B*x = lambda*x;

if itype= 3, the problem type is B*A*x = lambda*x.

jobz

Must be job::novec or job::vec.

If jobz = job::novec, then only eigenvalues are computed.

If jobz = job::vec, then eigenvalues and eigenvectors are computed.

range

Must be rangev::all, rangev::values or rangev::indices.

If range = rangev::all, then all the eigenvalues and eigenvectors (if requested by jobz parameters) are computed.

If range = rangev::values, then eigenvalues in the interval (vl, vu] and corresponding eigenvectors (if requested by jobz parameters) are computed.

If range = rangev::indices, then the il-th through iu-th eigenvalues and corresponding eigenvectors (if requested by jobz parameters) are computed.

uplo

Must be uplo::upper or uplo::lower.

If uplo = uplo::upper, a and b store the upper triangular part of A and B.

If uplo = uplo::lower, a and b stores the lower triangular part of A and B.

n

The order of the matrices A and B (0 n).

lda

The leading dimension of a. Must be at least max(1,n).

ldb

The leading dimension of b; at least max(1,n).

vl

If range = rangev::values, the lower bound of the interval to be searched for eigenvalues. vl must be less than vu. Not referenced if range = rangev::all or range = rangev::indices.

vu

If range = rangev::values, the upper bound of the interval to be searched for eigenvalues. vl must be less than vu. Not referenced if range = rangev::all or range = rangev::indices.

il

If range = rangev::indices, the one-based index of the smallest eigenvalue to be returned. Must be 1 il iu n if n > 0 and il = 1 and iu = 0 if n = 0. Not referenced if range = rangev::all or range = rangev::values.

iu

If range = rangev::indices, the one-based index of the largest eigenvalue to be returned. Must be 1 il iu n if n > 0 and il = 1 and iu = 0 if n = 0. Not referenced if range = rangev::all or range = rangev::values.

abstol

The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to abstol + eps *   max( |a|,|b| ), where eps is the machine precision. If abstol is less than or equal to zero, then eps*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

ldz

The leading dimension of z. Must be at least max(1,n).

Exceptions#

Exception

Description

mkl::lapack::exception

This exception is thrown when an incorrect argument value is supplied. You can determine the position of the incorrect argument by the info() method of the exception object.

Return Values#

The number of elements of type T the scratchpad memory to be passed to the sygvx (buffer or USM version) function must be able to hold.