hipsparsesgemvi Interface Reference#
Dense matrix sparse vector multiplication. More...
Public Member Functions | |
| integer(kind(hipsparse_status_success)) function | hipsparsesgemvi_ (handle, transa, m, n, alpha, a, lda, nnz, x, xind, beta, y, idxbase, pbuffer) |
| integer(kind(hipsparse_status_success)) function | hipsparsesgemvi_rank_0 (handle, transa, m, n, alpha, a, lda, nnz, x, xind, beta, y, idxbase, pbuffer) |
| integer(kind(hipsparse_status_success)) function | hipsparsesgemvi_rank_1 (handle, transa, m, n, alpha, a, lda, nnz, x, xind, beta, y, idxbase, pbuffer) |
| integer(kind(hipsparse_status_success)) function | hipsparsesgemvi_full_rank (handle, transa, m, n, alpha, a, lda, nnz, x, xind, beta, y, idxbase, pbuffer) |
Detailed Description
Dense matrix sparse vector multiplication.
hipsparseXgemvi multiplies the scalar \(\alpha\) with a dense \(m \times n\) matrix \(A\) and the sparse vector \(x\) and adds the result to the dense vector \(y\) that is multiplied by the scalar \(\beta\), such that
\[ y := \alpha \cdot op(A) \cdot x + \beta \cdot y, \]
with
\[ op(A) = \left\{ \begin{array}{ll} A, & \text{if transA == HIPSPARSE_OPERATION_NON_TRANSPOSE} \end{array} \right. \]
Performing the above operation involves two steps. First, the user calls hipsparseSgemvi_bufferSize "hipsparseXgemvi_bufferSize()" to determine the size of the temporary storage buffer. Next, the user allocates this temporary buffer and passes it to hipsparseXgemvi to complete the computation. After all calls to hipsparseXgemvi are complete, the temporary storage buffer can be freed.
- 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] transA - matrix operation type. [in] m - number of rows of the dense matrix. [in] n - number of columns of the dense matrix. [in] alpha - scalar \(\alpha\). [in] A - pointer to the dense matrix. [in] lda - leading dimension of the dense matrix. [in] nnz - number of non-zero entries in the sparse vector. [in] x - array of nnzelements containing the values of the sparse vector.[in] xInd - array of nnzelements containing the indices of the sparse vector.[in] beta - scalar \(\beta\). [in,out] y - array of melements ( \(op(A) == A\)) ornelements ( \(op(A) == A^T\) or \(op(A) == A^H\)).[in] idxBase - HIPSPARSE_INDEX_BASE_ZEROorHIPSPARSE_INDEX_BASE_ONE.[in] pBuffer - temporary storage buffer.
- Return values
-
HIPSPARSE_STATUS_SUCCESS the operation completed successfully. HIPSPARSE_STATUS_INVALID_VALUE handle,m,n,lda,nnz,alpha,A,x,xInd,beta,y, orpBufferis invalid.HIPSPARSE_STATUS_NOT_SUPPORTED transA!=HIPSPARSE_OPERATION_NON_TRANSPOSEorhipsparseMatrixType_t!=HIPSPARSE_MATRIX_TYPE_GENERAL.
Member Function/Subroutine Documentation
◆ hipsparsesgemvi_()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesgemvi::hipsparsesgemvi_ | ( | type(c_ptr), value | handle, |
| integer(kind(hipsparse_operation_non_transpose)), value | transa, | ||
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| real(c_float) | alpha, | ||
| type(c_ptr), value | a, | ||
| integer(c_int), value | lda, | ||
| integer(c_int), value | nnz, | ||
| type(c_ptr), value | x, | ||
| type(c_ptr), value | xind, | ||
| real(c_float) | beta, | ||
| type(c_ptr), value | y, | ||
| integer(kind(hipsparse_index_base_zero)), value | idxbase, | ||
| type(c_ptr), value | pbuffer | ||
| ) |
◆ hipsparsesgemvi_full_rank()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesgemvi::hipsparsesgemvi_full_rank | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| real(c_float) | alpha, | ||
| real(c_float), dimension(:,:), target | a, | ||
| integer(c_int) | lda, | ||
| integer(c_int) | nnz, | ||
| real(c_float), dimension(:), target | x, | ||
| integer(c_int), dimension(:), target | xind, | ||
| real(c_float) | beta, | ||
| real(c_float), dimension(:), target | y, | ||
| integer(kind(hipsparse_index_base_zero)) | idxbase, | ||
| type(c_ptr) | pbuffer | ||
| ) |
◆ hipsparsesgemvi_rank_0()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesgemvi::hipsparsesgemvi_rank_0 | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| real(c_float) | alpha, | ||
| real(c_float), target | a, | ||
| integer(c_int) | lda, | ||
| integer(c_int) | nnz, | ||
| real(c_float), target | x, | ||
| integer(c_int), target | xind, | ||
| real(c_float) | beta, | ||
| real(c_float), target | y, | ||
| integer(kind(hipsparse_index_base_zero)) | idxbase, | ||
| type(c_ptr) | pbuffer | ||
| ) |
◆ hipsparsesgemvi_rank_1()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesgemvi::hipsparsesgemvi_rank_1 | ( | type(c_ptr) | handle, |
| integer(kind(hipsparse_operation_non_transpose)) | transa, | ||
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| real(c_float) | alpha, | ||
| real(c_float), dimension(:), target | a, | ||
| integer(c_int) | lda, | ||
| integer(c_int) | nnz, | ||
| real(c_float), dimension(:), target | x, | ||
| integer(c_int), dimension(:), target | xind, | ||
| real(c_float) | beta, | ||
| real(c_float), dimension(:), target | y, | ||
| integer(kind(hipsparse_index_base_zero)) | idxbase, | ||
| type(c_ptr) | pbuffer | ||
| ) |
The documentation for this interface was generated from the following file: