rocsolver_sgels_batched Interface Reference#
The GELS_BATCHED functions solve a batch of overdetermined (or underdetermined) linear systems defined by a set of m -by-n matrices \(A_l\) and corresponding matrices \(B_l\), using the QR factorizations computed by GEQRF_BATCHED (or the LQ factorizations computed by GELQF_BATCHED).
More...
Public Member Functions | |
| integer(kind(rocblas_status_success)) function | rocsolver_sgels_batched_ (handle, trans, m, n, nrhs, a, lda, b, ldb, myinfo, batch_count) |
Detailed Description
The GELS_BATCHED functions solve a batch of overdetermined (or underdetermined) linear systems defined by a set of m -by-n matrices \(A_l\) and corresponding matrices \(B_l\), using the QR factorizations computed by GEQRF_BATCHED (or the LQ factorizations computed by GELQF_BATCHED).
For each instance in the batch, depending on the value of trans, the problem solved by this function is either of the form
\[ \begin{array}{cl} A_l X_l = B_l & \: \text{not transposed, or}\\% A_l^H X_l^{} = B_l^{} & \: \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_l is found by minimizing
\[ || B_l - A_l X_l || \quad \text{(or} \: || B_l^{} - A_l^H X_l^{} ||\text{)} \]
If m < n (or m >= n in the case of transpose/conjugate transpose), the system is underdetermined and a unique solution for X_l is chosen such that \(|| X_l ||\) 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 all matrices A_l in the batch. [in] n - rocblas_int. n >= 0. The number of columns of all matrices A_l in the batch. [in] nrhs - rocblas_int. nrhs >= 0. The number of columns of all matrices B_l and X_l in the batch, that is, the columns on the right hand side. [in,out] A - array of pointer to type. Each pointer points to an array on the GPU of dimension lda*n. On entry, the matrices A_l. On exit, the QR (or LQ) factorizations of A_l as returned by GEQRF_BATCHED (or GELQF_BATCHED). [in] lda - rocblas_int. lda >= m. Specifies the leading dimension of matrices A_l. [in,out] B - array of pointer to type. Each pointer points to an array on the GPU of dimension ldb*nrhs. On entry, the matrices B_l. On exit, when info[l] = 0, B_l 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 matrices B_l. [out] myInfo - pointer to rocblas_int. Array of batch_count integers on the GPU. If info[l] = 0, successful exit for solution of A_l. If info[l] = i > 0, the solution of A_l could not be computed because input matrix A_l is rank deficient. The i-th diagonal element of its triangular factor is zero. [in] batch_count - rocblas_int. batch_count >= 0. Number of matrices in the batch.
Member Function/Subroutine Documentation
◆ rocsolver_sgels_batched_()
| integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_sgels_batched::rocsolver_sgels_batched_ | ( | 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, | ||
| type(c_ptr), value | myinfo, | ||
| integer(c_int), value | batch_count | ||
| ) |
The documentation for this interface was generated from the following file: