hipblassgelsbatched Interface Reference

hipblassgelsbatched Interface Reference#

HIPFORT API Reference: hipfort_hipblas::hipblassgelsbatched Interface Reference
hipfort_hipblas::hipblassgelsbatched Interface Reference

SOLVER API. More...

Public Member Functions

integer(kind(hipblas_status_success)) function hipblassgelsbatched_ (handle, trans, m, n, nrhs, a, lda, b, ldb, myinfo, deviceinfo, batchcount)
 

Detailed Description

SOLVER API.

The gelsBatched functions solve a batch of overdetermined (or underdetermined) linear systems defined by a set of m -by-n matrices \(A_j\) and corresponding matrices \(B_j\), 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_j X_j = B_j & \: \text{not transposed, or}\\% A_j' X_j = B_j & \: \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_j is found by minimizing:

\[ || B_j - A_j X_j || \quad \text{(or} \: || B_j - A_j' X_j ||\text{)} \]

If m < n (or m >= n in the case of transpose/conjugate transpose), the system is underdetermined and a unique solution for X_j is chosen such that \(|| X_j ||\) is minimal.

  • Supported precisions in rocSOLVER : s, d, c, and z.
  • Supported precisions in cuBLAS : s, d, c, and z.

Note that the cuBLAS backend supports only the non-transpose operation and only solves over-determined systems (m >= n).

Parameters
[in]handle- hipblasHandle_t.
[in]trans- hipblasOperation_t. Specifies the form of the system of equations.
[in]m- int. m >= 0. The number of rows of all matrices A_j in the batch.
[in]n- int. n >= 0. The number of columns of all matrices A_j in the batch.
[in]nrhs- int. nrhs >= 0. The number of columns of all matrices B_j and X_j 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_j.
  • On exit, the QR (or LQ) factorizations of A_j as returned by "GEQRF_BATCHED" (or "GELQF_BATCHED").
[in]lda- int. lda >= m. Specifies the leading dimension of matrices A_j.
[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_j.
  • On exit, when info[j] = 0, B_j is overwritten by the solution vectors (and the residuals in the overdetermined cases) stored as columns.
[in]ldb- int. ldb >= max(m,n). Specifies the leading dimension of matrices B_j.
[out]myInfo- pointer to an int on the host. If info = 0, successful exit. If info = j < 0, the argument at position -j is invalid.
[out]deviceInfo- pointer to int. Array of batchCount integers on the GPU.
  • If deviceInfo[j] = 0, successful exit for solution of A_j.
  • If deviceInfo[j] = i > 0, the solution of A_j could not be computed because input matrix A_j is rank deficient; the i-th diagonal element of its triangular factor is zero.
[in]batchCount- int. batchCount >= 0. Number of matrices in the batch.

Member Function/Subroutine Documentation

◆ hipblassgelsbatched_()

integer(kind(hipblas_status_success)) function hipfort_hipblas::hipblassgelsbatched::hipblassgelsbatched_ ( type(c_ptr), value  handle,
integer(kind(hipblas_op_n)), 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,
type(c_ptr), value  deviceinfo,
integer(c_int), value  batchcount 
)

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