hipblassgelsstridedbatched Interface Reference

hipblassgelsstridedbatched Interface Reference#

HIPFORT API Reference: hipfort_hipblas::hipblassgelsstridedbatched Interface Reference
hipfort_hipblas::hipblassgelsstridedbatched Interface Reference

SOLVER API. More...

Public Member Functions

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

Detailed Description

SOLVER API.

The gelsStridedBatched 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_STRIDED_BATCHED (or the LQ factorizations computed by GELQF_STRIDED_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 : No support.
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- pointer to type. Array on the GPU (the size depends on the value of strideA).
  • On entry, the matrices A_j.
  • On exit, the QR (or LQ) factorizations of A_j as returned by "GEQRF_STRIDED_BATCHED" (or "GELQF_STRIDED_BATCHED").
[in]lda- int. lda >= m. Specifies the leading dimension of matrices A_j.
[in]strideA- hipblasStride. Stride from the start of one matrix A_j to the next one A_(j+1). There is no restriction for the value of strideA. Normal use case is strideA >= lda*n.
[in,out]B- pointer to type. Array on the GPU (the size depends on the value of strideB).
  • On entry, the matrices B_j.
  • On exit, when info[j] = 0, each 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.
[in]strideB- hipblasStride. Stride from the start of one matrix B_j to the next one B_(j+1). There is no restriction for the value of strideB. Normal use case is strideB >= ldb*nrhs.
[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

◆ hipblassgelsstridedbatched_()

integer(kind(hipblas_status_success)) function hipfort_hipblas::hipblassgelsstridedbatched::hipblassgelsstridedbatched_ ( 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,
integer(c_int64_t), value  stridea,
type(c_ptr), value  b,
integer(c_int), value  ldb,
integer(c_int64_t), value  strideb,
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: