rocsolver_ssyevj Interface Reference

rocsolver_ssyevj Interface Reference#

HIPFORT API Reference: hipfort_rocsolver::rocsolver_ssyevj Interface Reference
hipfort_rocsolver::rocsolver_ssyevj Interface Reference

The SYEVJ functions compute the eigenvalues and optionally the eigenvectors of a real symmetric matrix A. More...

Public Member Functions

integer(kind(rocblas_status_success)) function rocsolver_ssyevj_ (handle, esort, evect, uplo, n, a, lda, abstol, residual, max_sweeps, n_sweeps, w, myinfo)
 

Detailed Description

The SYEVJ functions compute the eigenvalues and optionally the eigenvectors of a real symmetric matrix A.

The eigenvalues are found using the iterative Jacobi algorithm and returned in an order that depends on the value of esort. The eigenvectors are computed depending on the value of evect. The computed eigenvectors are orthonormal.

At the \(k\)-th iteration (or "sweep"), \(A\) is transformed by a product of Jacobi rotations \(V\) as

\[ A^{(k)} = V^H A^{(k-1)} V \]

such that \(off(A^{(k)}) < off(A^{(k-1)})\), where \(A^{(0)} = A\) and \(off(A^{(k)})\) is the Frobenius norm of the off-diagonal elements of \(A^{(k)}\). As \(off(A^{(k)}) \rightarrow 0\), the diagonal elements of \(A^{(k)}\) increasingly resemble the eigenvalues of \(A\).

Note
In order to carry out calculations, this method could potentially synchronize the stream contained within the rocblas_handle.
Parameters
[in]handle- rocblas_handle.
[in]esort- rocblas_esort. Specifies the order of the returned eigenvalues. If esort is rocblas_esort_ascending, then the eigenvalues are sorted and returned in ascending order. If esort is rocblas_esort_none, then the order of the returned eigenvalues is unspecified.
[in]evect- rocblas_evect. Specifies whether the eigenvectors are to be computed. If evect is rocblas_evect_original, then the eigenvectors are computed. rocblas_evect_tridiagonal is not supported.
[in]uplo- rocblas_fill. Specifies whether the upper or lower part of the symmetric matrix A is stored. If uplo indicates lower (or upper), then the upper (or lower) part of A is not used.
[in]n- rocblas_int. n >= 0. Number of rows and columns of matrix A.
[in,out]A- pointer to type. Array on the GPU of dimension lda*n. On entry, the matrix A. On exit, the eigenvectors of A if they were computed and the algorithm converged. Otherwise, the contents of A are unchanged.
[in]lda- rocblas_int. lda >= n. Specifies the leading dimension of matrix A.
[in]abstol- type. The absolute tolerance. The algorithm is considered to have converged once off(A) is <= abstol. If abstol <= 0, then the tolerance will be set to machine precision.
[out]residual- pointer to type on the GPU. The Frobenius norm of the off-diagonal elements of A (that is, off(A)) at the final iteration.
[in]max_sweeps- rocblas_int. max_sweeps > 0. Maximum number of sweeps (iterations) to be used by the algorithm.
[out]n_sweeps- pointer to a rocblas_int on the GPU. The actual number of sweeps (iterations) used by the algorithm.
[out]W- pointer to type. Array on the GPU of dimension n. The eigenvalues of A in increasing order.
[out]myInfo- pointer to a rocblas_int on the GPU. If info = 0, successful exit. If info = 1, the algorithm did not converge.

Member Function/Subroutine Documentation

◆ rocsolver_ssyevj_()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_ssyevj::rocsolver_ssyevj_ ( type(c_ptr), value  handle,
integer(kind(rocblas_esort_none)), value  esort,
integer(kind(rocblas_evect_original)), value  evect,
integer(kind(rocblas_fill_upper)), value  uplo,
integer(c_int), value  n,
type(c_ptr), value  a,
integer(c_int), value  lda,
real(c_float), value  abstol,
type(c_ptr), value  residual,
integer(c_int), value  max_sweeps,
type(c_ptr), value  n_sweeps,
type(c_ptr), value  w,
type(c_ptr), value  myinfo 
)

The documentation for this interface was generated from the following file: