rocsolver_sgels Interface Reference#
GELS solves an overdetermined (or underdetermined) linear system defined by an m-by-n matrix A, and a corresponding matrix B, using the QR factorization computed by GEQRF (or the LQ factorization computed by GELQF). More...
Public Member Functions | |
integer(kind(rocblas_status_success)) function | rocsolver_sgels_ (handle, trans, m, n, nrhs, A, lda, B, ldb, myInfo) |
integer(kind(rocblas_status_success)) function | rocsolver_sgels_full_rank (handle, trans, m, n, nrhs, A, lda, B, ldb, myInfo) |
integer(kind(rocblas_status_success)) function | rocsolver_sgels_rank_0 (handle, trans, m, n, nrhs, A, lda, B, ldb, myInfo) |
integer(kind(rocblas_status_success)) function | rocsolver_sgels_rank_1 (handle, trans, m, n, nrhs, A, lda, B, ldb, myInfo) |
Detailed Description
GELS solves an overdetermined (or underdetermined) linear system defined by an m-by-n matrix A, and a corresponding matrix B, using the QR factorization computed by GEQRF (or the LQ factorization computed by GELQF).
Depending on the value of trans, the problem solved by this function is either of the form
\[ \begin{array}{cl} A X = B & \: \text{not transposed, or}\newline A' X = B & \: \text{transposed if real, or conjugate transposed if complex} \end{array} \]
If m >= n (or m < n in the case of transpose/conjugate transpose), the system is overdetermined and a least-squares solution approximating X is found by minimizing
\[ || B - A X || \quad \text{(or} \: || B - A' X ||\text{)} \]
If m < n (or m >= n in the case of transpose/conjugate transpose), the system is underdetermined and a unique solution for X is chosen such that \(|| X ||\) is minimal.
- Parameters
-
[in] handle rocblas_handle. [in] trans rocblas_operation.
Specifies the form of the system of equations.[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] nrhs rocblas_int. nrhs >= 0.
The number of columns of matrices B and X; i.e., the columns on the right hand side.[in,out] A pointer to type. Array on the GPU of dimension lda*n.
On entry, the matrix A. On exit, the QR (or LQ) factorization of A as returned by GEQRF (or GELQF).[in] lda rocblas_int. lda >= m.
Specifies the leading dimension of matrix A.[in,out] B pointer to type. Array on the GPU of dimension ldb*nrhs.
On entry, the matrix B. On exit, when info = 0, B is overwritten by the solution vectors (and the residuals in the overdetermined cases) stored as columns.[in] ldb rocblas_int. ldb >= max(m,n).
Specifies the leading dimension of matrix B.[out] info pointer to rocblas_int on the GPU.
If info = 0, successful exit. If info = j > 0, the solution could not be computed because input matrix A is rank deficient; the j-th diagonal element of its triangular factor is zero.
Member Function/Subroutine Documentation
◆ rocsolver_sgels_()
integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgels::rocsolver_sgels_ | ( | type(c_ptr), value | handle, |
integer(kind(rocblas_operation_none)), value | trans, | ||
integer(c_int), value | m, | ||
integer(c_int), value | n, | ||
integer(c_int), value | nrhs, | ||
type(c_ptr), value | A, | ||
integer(c_int), value | lda, | ||
type(c_ptr), value | B, | ||
integer(c_int), value | ldb, | ||
integer(c_int) | myInfo | ||
) |
◆ rocsolver_sgels_full_rank()
integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgels::rocsolver_sgels_full_rank | ( | type(c_ptr) | handle, |
integer(kind(rocblas_operation_none)) | trans, | ||
integer(c_int) | m, | ||
integer(c_int) | n, | ||
integer(c_int) | nrhs, | ||
real(c_float), dimension(:,:), target | A, | ||
integer(c_int) | lda, | ||
real(c_float), dimension(:,:), target | B, | ||
integer(c_int) | ldb, | ||
integer(c_int) | myInfo | ||
) |
◆ rocsolver_sgels_rank_0()
integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgels::rocsolver_sgels_rank_0 | ( | type(c_ptr) | handle, |
integer(kind(rocblas_operation_none)) | trans, | ||
integer(c_int) | m, | ||
integer(c_int) | n, | ||
integer(c_int) | nrhs, | ||
real(c_float), target | A, | ||
integer(c_int) | lda, | ||
real(c_float), target | B, | ||
integer(c_int) | ldb, | ||
integer(c_int) | myInfo | ||
) |
◆ rocsolver_sgels_rank_1()
integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgels::rocsolver_sgels_rank_1 | ( | type(c_ptr) | handle, |
integer(kind(rocblas_operation_none)) | trans, | ||
integer(c_int) | m, | ||
integer(c_int) | n, | ||
integer(c_int) | nrhs, | ||
real(c_float), dimension(:), target | A, | ||
integer(c_int) | lda, | ||
real(c_float), dimension(:), target | B, | ||
integer(c_int) | ldb, | ||
integer(c_int) | myInfo | ||
) |
The documentation for this interface was generated from the following file: