hipsparsesbsrmm Interface Reference#
Sparse matrix dense matrix multiplication using the BSR storage format. More...
Public Member Functions | |
| integer(kind(hipsparse_status_success)) function | hipsparsesbsrmm_ (handle, dira, transa, transb, mb, n, kb, nnzb, alpha, descra, bsrvala, bsrrowptra, bsrcolinda, blockdim, b, ldb, beta, c, ldc) |
| integer(kind(hipsparse_status_success)) function | hipsparsesbsrmm_rank_0 (handle, dira, transa, transb, mb, n, kb, nnzb, alpha, descra, bsrvala, bsrrowptra, bsrcolinda, blockdim, b, ldb, beta, c, ldc) |
| integer(kind(hipsparse_status_success)) function | hipsparsesbsrmm_rank_1 (handle, dira, transa, transb, mb, n, kb, nnzb, alpha, descra, bsrvala, bsrrowptra, bsrcolinda, blockdim, b, ldb, beta, c, ldc) |
| integer(kind(hipsparse_status_success)) function | hipsparsesbsrmm_full_rank (handle, dira, transa, transb, mb, n, kb, nnzb, alpha, descra, bsrvala, bsrrowptra, bsrcolinda, blockdim, b, ldb, beta, c, ldc) |
Detailed Description
Sparse matrix dense matrix multiplication using the BSR storage format.
hipsparseXbsrmm multiplies the scalar \(\alpha\) with a sparse \(m \times k\) matrix \(A\), defined in BSR storage format, and the column-oriented dense \(k \times n\) matrix \(B\) and adds the result to the column-oriented dense \(m \times n\) matrix \(C\) that is multiplied by the scalar \(\beta\), such that
\[ C := \alpha \cdot op(A) \cdot op(B) + \beta \cdot C, \]
with
\[ op(A) = \left\{ \begin{array}{ll} A, & \text{if transA == HIPSPARSE_OPERATION_NON_TRANSPOSE} \\% \end{array} \right. \]
and
\[ op(B) = \left\{ \begin{array}{ll} B, & \text{if transB == HIPSPARSE_OPERATION_NON_TRANSPOSE} \\% B^T, & \text{if transB == HIPSPARSE_OPERATION_TRANSPOSE} \\% \end{array} \right. \]
and where \(k = blockDim \times kb\) and \(m = blockDim \times mb\).
- Note
- This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
-
Currently, only
transA==HIPSPARSE_OPERATION_NON_TRANSPOSEis supported.
- Parameters
-
[in] handle - handle to the hipSPARSE library context queue. [in] dirA - the storage format of the blocks. Can be HIPSPARSE_DIRECTION_ROWorHIPSPARSE_DIRECTION_COLUMN.[in] transA - matrix \(A\) operation type. Currently, only HIPSPARSE_OPERATION_NON_TRANSPOSEis supported.[in] transB - matrix \(B\) operation type. Currently, only HIPSPARSE_OPERATION_NON_TRANSPOSEandHIPSPARSE_OPERATION_TRANSPOSEare supported.[in] mb - number of block rows of the sparse BSR matrix \(A\). Must be non-negative. [in] n - number of columns of the dense matrix \(op(B)\) and \(C\). Must be non-negative. [in] kb - number of block columns of the sparse BSR matrix \(A\). Must be non-negative. [in] nnzb - number of non-zero blocks of the sparse BSR matrix \(A\). Must be non-negative. [in] alpha - scalar \(\alpha\). [in] descrA - descriptor of the sparse BSR matrix \(A\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERALis supported.[in] bsrValA - array of nnzb*blockDim*blockDimelements of the sparse BSR matrix \(A\).[in] bsrRowPtrA - array of mb+1elements that point to the start of every block row of the sparse BSR matrix \(A\).[in] bsrColIndA - array of nnzbelements containing the block column indices of the sparse BSR matrix \(A\).[in] blockDim - size of the blocks in the sparse BSR matrix. Must be positive. [in] B - array of dimension ldb*n( \(op(B) == B\)),ldb*kotherwise.[in] ldb - leading dimension of \(B\), must be at least \(\max{(1, k)}\) ( \( op(B) == B\)) where k=blockDim*kb, \(\max{(1, n)}\) otherwise.[in] beta - scalar \(\beta\). [in,out] C - array of dimension ldc*n.[in] ldc - leading dimension of \(C\), must be at least \(\max{(1, m)}\) ( \( op(A) == A\)) where m=blockDim*mb, \(\max{(1, k)}\) wherek=blockDim*kbotherwise.
- Return values
-
HIPSPARSE_STATUS_SUCCESS the operation completed successfully. HIPSPARSE_STATUS_NOT_INITIALIZED handleis not initialized.HIPSPARSE_STATUS_INVALID_VALUE handle,descrA,alpha, orbetais nullptr,mb,n,kb, ornnzbis negative,ldborldcis invalid,blockDimis less than or equal to zero, orbsrValA,bsrRowPtrA,bsrColIndA,B, orCis nullptr.HIPSPARSE_STATUS_ARCH_MISMATCH the device is not supported. HIPSPARSE_STATUS_NOT_SUPPORTED transAis notHIPSPARSE_OPERATION_NON_TRANSPOSE,transBisHIPSPARSE_OPERATION_CONJUGATE_TRANSPOSE, orhipsparseMatrixType_tis notHIPSPARSE_MATRIX_TYPE_GENERAL.
Member Function/Subroutine Documentation
◆ hipsparsesbsrmm_()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmm::hipsparsesbsrmm_ | ( | type(c_ptr), value | handle, |
| integer(kind(hipsparse_direction_row)), value | dira, | ||
| integer(kind(hipsparse_operation_non_transpose)), value | transa, | ||
| integer(kind(hipsparse_operation_non_transpose)), value | transb, | ||
| integer(c_int), value | mb, | ||
| integer(c_int), value | n, | ||
| integer(c_int), value | kb, | ||
| integer(c_int), value | nnzb, | ||
| real(c_float) | alpha, | ||
| type(c_ptr), value | descra, | ||
| type(c_ptr), value | bsrvala, | ||
| type(c_ptr), value | bsrrowptra, | ||
| type(c_ptr), value | bsrcolinda, | ||
| integer(c_int), value | blockdim, | ||
| type(c_ptr), value | b, | ||
| integer(c_int), value | ldb, | ||
| real(c_float) | beta, | ||
| type(c_ptr), value | c, | ||
| integer(c_int), value | ldc | ||
| ) |
◆ hipsparsesbsrmm_full_rank()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmm::hipsparsesbsrmm_full_rank | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_direction_row)) | dira, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transb, | ||
| integer(c_int) | mb, | ||
| integer(c_int) | n, | ||
| integer(c_int) | kb, | ||
| integer(c_int) | nnzb, | ||
| real(c_float) | alpha, | ||
| type(c_ptr) | descra, | ||
| real(c_float), dimension(:), target | bsrvala, | ||
| integer(c_int), dimension(:), target | bsrrowptra, | ||
| integer(c_int), dimension(:), target | bsrcolinda, | ||
| integer(c_int) | blockdim, | ||
| real(c_float), dimension(:,:), target | b, | ||
| integer(c_int) | ldb, | ||
| real(c_float) | beta, | ||
| real(c_float), dimension(:,:), target | c, | ||
| integer(c_int) | ldc | ||
| ) |
◆ hipsparsesbsrmm_rank_0()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmm::hipsparsesbsrmm_rank_0 | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_direction_row)) | dira, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transb, | ||
| integer(c_int) | mb, | ||
| integer(c_int) | n, | ||
| integer(c_int) | kb, | ||
| integer(c_int) | nnzb, | ||
| real(c_float) | alpha, | ||
| type(c_ptr) | descra, | ||
| real(c_float), target | bsrvala, | ||
| integer(c_int), target | bsrrowptra, | ||
| integer(c_int), target | bsrcolinda, | ||
| integer(c_int) | blockdim, | ||
| real(c_float), target | b, | ||
| integer(c_int) | ldb, | ||
| real(c_float) | beta, | ||
| real(c_float), target | c, | ||
| integer(c_int) | ldc | ||
| ) |
◆ hipsparsesbsrmm_rank_1()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmm::hipsparsesbsrmm_rank_1 | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_direction_row)) | dira, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(kind(hipsparse_operation_non_transpose)) | transb, | ||
| integer(c_int) | mb, | ||
| integer(c_int) | n, | ||
| integer(c_int) | kb, | ||
| integer(c_int) | nnzb, | ||
| real(c_float) | alpha, | ||
| type(c_ptr) | descra, | ||
| real(c_float), dimension(:), target | bsrvala, | ||
| integer(c_int), dimension(:), target | bsrrowptra, | ||
| integer(c_int), dimension(:), target | bsrcolinda, | ||
| integer(c_int) | blockdim, | ||
| real(c_float), dimension(:), target | b, | ||
| integer(c_int) | ldb, | ||
| real(c_float) | beta, | ||
| real(c_float), dimension(:), target | c, | ||
| integer(c_int) | ldc | ||
| ) |
The documentation for this interface was generated from the following file: