hipblastrsmex Interface Reference

hipblastrsmex Interface Reference#

HIPFORT API Reference: hipfort_hipblas::hipblastrsmex Interface Reference
hipfort_hipblas::hipblastrsmex Interface Reference

BLAS EX API. More...

Public Member Functions

integer(kind(hipblas_status_success)) function hipblastrsmex_ (handle, side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, inva, invasize, computetype)
 

Detailed Description

BLAS EX API.

The trsmEx functions solve:

op(A)*X = alpha*B or X*op(A) = alpha*B,

where alpha is a scalar, X and B are m by n matrices, A is a triangular matrix, and op(A) is one of

op( A ) = A   or   op( A ) = A^T   or   op( A ) = A^H.

The matrix X is overwritten on B.

This function gives the user the ability to reuse the invA matrix between runs. If invA == NULL, hipblasTrsmEx will automatically calculate invA on every run.

Setting up invA: The accepted invA matrix consists of the packed 128x128 inverses of the diagonal blocks of matrix A, followed by any smaller diagonal block that remains. To set up invA, it is recommended that hipblasTrtriBatched be used with matrix A as the input.

Device memory of size 128 x k should be allocated for invA ahead of time, where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. The actual number of elements in invA should be passed as invAsize.

To begin, hipblasTrtriBatched must be called on the full 128x128 sized diagonal blocks of matrix A. Here are the restricted parameters:

  • n = 128
  • ldinvA = 128
  • stride_invA = 128x128
  • batchCount = k / 128,

Then any remaining block can be added:

  • n = k % 128
  • invA = invA + stride_invA * previousBatchCount
  • ldinvA = 128
  • batchCount = 1
Parameters
[in]handle- [hipblasHandle_t] handle to the hipBLAS library context queue.
[in]side- [hipblasSideMode_t]
  • HIPBLAS_SIDE_LEFT: op(A)*X = alpha*B.
  • HIPBLAS_SIDE_RIGHT: X*op(A) = alpha*B.
[in]uplo- [hipblasFillMode_t]
  • HIPBLAS_FILL_MODE_UPPER: A is an upper triangular matrix.
  • HIPBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
[in]transA- [hipblasOperation_t]
  • HIPBLAS_OP_N: op(A) = A.
  • HIPBLAS_OP_T: op(A) = A^T.
  • HIPBLAS_ON_C: op(A) = A^H.
[in]diag- [hipblasDiagType_t]
  • HIPBLAS_DIAG_UNIT: A is assumed to be unit triangular.
  • HIPBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
[in]m- [int] m specifies the number of rows of B. m >= 0.
[in]n- [int] n specifies the number of columns of B. n >= 0.
[in]alpha- [void *] device pointer or host pointer specifying the scalar alpha. When alpha is &zero, then A is not referenced, and B does not need to be set before entry.
[in]A- [void *] device pointer storing matrix A. Of dimension ( lda, k ), where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. Only the upper/lower triangular part is accessed.
[in]lda- [int] lda specifies the first dimension of A.
  • If side = HIPBLAS_SIDE_LEFT, lda >= max( 1, m ).
  • If side = HIPBLAS_SIDE_RIGHT, lda >= max( 1, n ).
[in,out]B- [void *] device pointer storing matrix B. B is of dimension ( ldb, n ). Before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X.
[in]ldb- [int] ldb specifies the first dimension of B. ldb >= max( 1, m ).
[in]invA- [void *] device pointer storing the inverse diagonal blocks of A. invA is of dimension ( ld_invA, k ), where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. ld_invA must be equal to 128.
[in]invAsize- [int] invAsize specifies the number of elements of device memory in invA.
[in]computeType[hipDataType] specifies the datatype of computation.

Member Function/Subroutine Documentation

◆ hipblastrsmex_()

integer(kind(hipblas_status_success)) function hipfort_hipblas::hipblastrsmex::hipblastrsmex_ ( type(c_ptr), value  handle,
integer(kind(hipblas_side_left)), value  side,
integer(kind(hipblas_fill_mode_upper)), value  uplo,
integer(kind(hipblas_op_n)), value  transa,
integer(kind(hipblas_diag_non_unit)), value  diag,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  alpha,
type(c_ptr), value  a,
integer(c_int), value  lda,
type(c_ptr), value  b,
integer(c_int), value  ldb,
type(c_ptr), value  inva,
integer(c_int), value  invasize,
integer(kind(hip_r_32f)), value  computetype 
)

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