rocsolver_sgesvdx Interface Reference#
The GESVDX functions compute a set of singular values and optionally the corresponding singular vectors of a general m-by-n matrix A (partial Singular Value Decomposition).
More...
Public Member Functions | |
| integer(kind(rocblas_status_success)) function | rocsolver_sgesvdx_ (handle, left_svect, right_svect, srange, m, n, a, lda, vl, vu, il, iu, nsv, s, u, ldu, v, ldv, ifail, myinfo) |
Detailed Description
The GESVDX functions compute a set of singular values and optionally the corresponding singular vectors of a general m-by-n matrix A (partial Singular Value Decomposition).
This function computes all the singular values of A, all the singular values in the half-open interval \([vl, vu)\), or the il -th through iu -th singular values, depending on the value of srange.
The full SVD of matrix A is given by:
\[ A = U S V^H \]
where the m-by-n matrix S is zero except, possibly, for its min(m,n) diagonal elements, which are the singular values of A. U and V are orthogonal (unitary) matrices. The first min(m,n) columns of U and V are the left and right singular vectors of A, respectively.
The computation of the singular vectors is optional and is controlled by the function arguments left_svect and right_svect, as described below. When computed, this function returns the transpose (or transpose conjugate) of the right singular vectors, that is, the rows of \(V^H\).
left_svect and right_svect are rocblas_svect enums that, for this function, can take the following values:
rocblas_svect_singular: the singular vectors (first min(m,n) columns ofUor rows of \(V^H\)) corresponding to the computed singular values are computed,rocblas_svect_none: no columns (or rows) ofU(or \(V^H\)) are computed, that is, no singular vectors.
- Parameters
-
[in] handle - rocblas_handle. [in] left_svect - rocblas_svect. Specifies if the left singular vectors are computed.[in] right_svect - rocblas_svect. Specifies if the right singular vectors are computed.[in] srange - rocblas_srange. Specifies the type of range or interval of the singular values to be computed.[in] m - rocblas_int. m >= 0. The number of rows of matrix A. [in] n - rocblas_int. n >= 0. The number of 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 contents of A are destroyed. [in] lda - rocblas_int. lda >= m. The leading dimension of A. [in] vl - real type. 0 <= vl < vu. The lower bound of the search interval [vl, vu). Ignored if srange indicates to look for all the singular values of A or the singular values within a set of indices. [in] vu - real type. 0 <= vl < vu. The upper bound of the search interval [vl, vu). Ignored if srange indicates to look for all the singular values of A or the singular values within a set of indices. [in] il - rocblas_int. il = 1 if n = 0, and 1 <= il <= iu otherwise. The index of the largest singular value to be computed. Ignored if srange indicates to look for all the singular values of A or the singular values in a half-open interval. [in] iu - rocblas_int. iu = 0 if n = 0, and 1 <= il <= iu otherwise. The index of the smallest singular value to be computed. Ignored if srange indicates to look for all the singular values of A or the singular values in a half-open interval. [out] nsv - pointer to a rocblas_int on the GPU. The total number of singular values found. If srange is rocblas_srange_all, nsv = min(m,n). If srange is rocblas_srange_index, nsv = iu - il + 1. Otherwise, 0 <= nsv <= min(m,n). [out] S - pointer to real type. Array on the GPU of dimension nsv. The first nsv elements contain the computed singular values in descending order. - Note: If srange is rocblas_srange_value, then the value of nsv is not known in advance. In this case, the user should ensure that S is large enough to hold min(m,n) values.
[out] U - pointer to type. Array on the GPU of dimension ldu*nsv. The matrix of left singular vectors stored as columns. Not referenced if left_svect is set to none. - Note: If srange is rocblas_srange_value, then the value of nsv is not known in advance. In this case, the user should ensure that U is large enough to hold min(m,n) columns.
[in] ldu - rocblas_int. ldu >= m if left_svect singular, and ldu >= 1 otherwise. The leading dimension of U. [out] V - pointer to type. Array on the GPU of dimension ldv*n. The matrix of right singular vectors stored as rows (transposed / conjugate-transposed). Not referenced if right_svect is set to none. [in] ldv - rocblas_int. ldv >= nsv if right_svect is set to singular, or ldv >= 1 otherwise. The leading dimension of V. Note: If srange is rocblas_srange_value, then the value of nsv is not known in advance. In this case, the user should ensure that V is large enough to hold min(m,n) rows. [out] ifail - pointer to rocblas_int. Array on the GPU of dimension min(m,n). If info = 0, the first nsv elements of ifail are zero. Otherwise, contains the indices of those eigenvectors that failed to converge, as returned by BDSVDX. [out] myInfo - pointer to a rocblas_int on the GPU. If info = 0, successful exit. If info = i > 0, i eigenvectors did not converge in BDSVDX. Their indices are stored in ifail.
Member Function/Subroutine Documentation
◆ rocsolver_sgesvdx_()
| integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgesvdx::rocsolver_sgesvdx_ | ( | type(c_ptr), value | handle, |
| integer(kind(rocblas_svect_all)), value | left_svect, | ||
| integer(kind(rocblas_svect_all)), value | right_svect, | ||
| integer(kind(rocblas_srange_all)), value | srange, | ||
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| type(c_ptr), value | a, | ||
| integer(c_int), value | lda, | ||
| real(c_float), value | vl, | ||
| real(c_float), value | vu, | ||
| integer(c_int), value | il, | ||
| integer(c_int), value | iu, | ||
| type(c_ptr), value | nsv, | ||
| type(c_ptr), value | s, | ||
| type(c_ptr), value | u, | ||
| integer(c_int), value | ldu, | ||
| type(c_ptr), value | v, | ||
| integer(c_int), value | ldv, | ||
| type(c_ptr), value | ifail, | ||
| type(c_ptr), value | myinfo | ||
| ) |
The documentation for this interface was generated from the following file: