rocsolver_sbdsqr Interface Reference

rocsolver_sbdsqr Interface Reference#

HIPFORT API Reference: hipfort_rocsolver::rocsolver_sbdsqr Interface Reference
hipfort_rocsolver::rocsolver_sbdsqr Interface Reference

The BDSQR functions compute the singular value decomposition (SVD) of an n-by-n bidiagonal matrix B, using the implicit QR algorithm. More...

Public Member Functions

integer(kind(rocblas_status_success)) function rocsolver_sbdsqr_ (handle, uplo, n, nv, nu, nc, d, e, v, ldv, u, ldu, c, ldc, myinfo)
 
integer(kind(rocblas_status_success)) function rocsolver_sbdsqr_rank_0 (handle, uplo, n, nv, nu, nc, d, e, v, ldv, u, ldu, c, ldc, myinfo)
 
integer(kind(rocblas_status_success)) function rocsolver_sbdsqr_rank_1 (handle, uplo, n, nv, nu, nc, d, e, v, ldv, u, ldu, c, ldc, myinfo)
 
integer(kind(rocblas_status_success)) function rocsolver_sbdsqr_full_rank (handle, uplo, n, nv, nu, nc, d, e, v, ldv, u, ldu, c, ldc, myinfo)
 

Detailed Description

The BDSQR functions compute the singular value decomposition (SVD) of an n-by-n bidiagonal matrix B, using the implicit QR algorithm.

The SVD of B has the form:

\[ B = QSP^H \]

where S is the n -by-n diagonal matrix of singular values of B, the columns of Q are the left singular vectors of B, and the columns of P are its right singular vectors.

The computation of the singular vectors is optional. This function accepts input matrices U (of size nu -by-n) and V (of size n -by-nv) that are overwritten with \(UQ\) and \(P^H V\). If nu = 0, no left vectors are computed. If nv = 0, no right vectors are computed.

Optionally, this function can also compute \(Q^H C\) for a given n -by-nc input matrix C.

Note
In order to carry out calculations, this method could potentially synchronize the stream contained within the rocblas_handle.
A hybrid (CPU+GPU) approach is available for BDSQR, primarily intended for homogeneous architectures. Use rocsolver_set_alg_mode to enable it.
Parameters
[in]handle- rocblas_handle.
[in]uplo- rocblas_fill. Specifies whether B is upper or lower bidiagonal.
[in]n- rocblas_int. n >= 0. The number of rows and columns of matrix B.
[in]nv- rocblas_int. nv >= 0. The number of columns of matrix V.
[in]nu- rocblas_int. nu >= 0. The number of rows of matrix U.
[in]nc- rocblas_int. nc >= 0. The number of columns of matrix C.
[in,out]D- pointer to real type. Array on the GPU of dimension n. On entry, the diagonal elements of B. On exit, if info = 0, the singular values of B in decreasing order, and if info > 0, the diagonal elements of a bidiagonal matrix orthogonally equivalent to B.
[in,out]E- pointer to real type. Array on the GPU of dimension n-1. On entry, the off-diagonal elements of B. On exit, if info > 0, the off-diagonal elements of a bidiagonal matrix orthogonally equivalent to B (if info = 0 this matrix converges to zero).
[in,out]V- pointer to type. Array on the GPU of dimension ldv*nv. On entry, the matrix V. On exit, it is overwritten with \(P^H V\). (Not referenced if nv = 0.)
[in]ldv- rocblas_int. ldv >= n if nv > 0, or ldv >=1 if nv = 0. The leading dimension of V.
[in,out]U- pointer to type. Array on the GPU of dimension ldu*n. On entry, the matrix U. On exit, it is overwritten with \(UQ\). (Not referenced if nu = 0.)
[in]ldu- rocblas_int. ldu >= nu. The leading dimension of U.
[in,out]C- pointer to type. Array on the GPU of dimension ldc*nc. On entry, the matrix C. On exit, it is overwritten with \(Q^H C\). (Not referenced if nc = 0.)
[in]ldc- rocblas_int. ldc >= n if nc > 0, or ldc >=1 if nc = 0. The leading dimension of C.
[out]myInfo- pointer to a rocblas_int on the GPU. If info = 0, successful exit. If info = i > 0, i elements of E have not converged to zero.

Member Function/Subroutine Documentation

◆ rocsolver_sbdsqr_()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sbdsqr::rocsolver_sbdsqr_ ( type(c_ptr), value  handle,
integer(kind(rocblas_fill_upper)), value  uplo,
integer(c_int), value  n,
integer(c_int), value  nv,
integer(c_int), value  nu,
integer(c_int), value  nc,
type(c_ptr), value  d,
type(c_ptr), value  e,
type(c_ptr), value  v,
integer(c_int), value  ldv,
type(c_ptr), value  u,
integer(c_int), value  ldu,
type(c_ptr), value  c,
integer(c_int), value  ldc,
type(c_ptr), value  myinfo 
)

◆ rocsolver_sbdsqr_full_rank()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sbdsqr::rocsolver_sbdsqr_full_rank ( type(c_ptr)  handle,
integer(kind(rocblas_fill_upper))  uplo,
integer(c_int)  n,
integer(c_int)  nv,
integer(c_int)  nu,
integer(c_int)  nc,
real(c_float), dimension(:), target  d,
real(c_float), dimension(:), target  e,
real(c_float), dimension(:,:), target  v,
integer(c_int)  ldv,
real(c_float), dimension(:,:), target  u,
integer(c_int)  ldu,
real(c_float), dimension(:,:), target  c,
integer(c_int)  ldc,
type(c_ptr)  myinfo 
)

◆ rocsolver_sbdsqr_rank_0()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sbdsqr::rocsolver_sbdsqr_rank_0 ( type(c_ptr)  handle,
integer(kind(rocblas_fill_upper))  uplo,
integer(c_int)  n,
integer(c_int)  nv,
integer(c_int)  nu,
integer(c_int)  nc,
real(c_float), target  d,
real(c_float), target  e,
real(c_float), target  v,
integer(c_int)  ldv,
real(c_float), target  u,
integer(c_int)  ldu,
real(c_float), target  c,
integer(c_int)  ldc,
type(c_ptr)  myinfo 
)

◆ rocsolver_sbdsqr_rank_1()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sbdsqr::rocsolver_sbdsqr_rank_1 ( type(c_ptr)  handle,
integer(kind(rocblas_fill_upper))  uplo,
integer(c_int)  n,
integer(c_int)  nv,
integer(c_int)  nu,
integer(c_int)  nc,
real(c_float), dimension(:), target  d,
real(c_float), dimension(:), target  e,
real(c_float), dimension(:), target  v,
integer(c_int)  ldv,
real(c_float), dimension(:), target  u,
integer(c_int)  ldu,
real(c_float), dimension(:), target  c,
integer(c_int)  ldc,
type(c_ptr)  myinfo 
)

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