rocsparse_shybmv Interface Reference#
hipfort_rocsparse::rocsparse_shybmv Interface Reference
Sparse matrix vector multiplication using the HYB storage format. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_shybmv_ (handle, trans, alpha, descr, hyb, x, beta, y) |
| integer(kind(rocsparse_status_success)) function | rocsparse_shybmv_rank_0 (handle, trans, alpha, descr, hyb, x, beta, y) |
| integer(kind(rocsparse_status_success)) function | rocsparse_shybmv_rank_1 (handle, trans, alpha, descr, hyb, x, beta, y) |
Detailed Description
Sparse matrix vector multiplication using the HYB storage format.
rocsparse_hybmv multiplies the scalar \(\alpha\) with a sparse \(m \times n\) matrix, defined in HYB storage format, and the dense 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 trans == rocsparse_operation_none} \end{array} \right. \]
- Note
- This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
- This routine supports execution in a hipGraph context.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] trans - matrix operation type. [in] alpha - scalar \(\alpha\). [in] descr - descriptor of the sparse HYB matrix. Currently, only rocsparse_matrix_type_generalis supported.[in] hyb - matrix in HYB storage format. [in] x - array of nelements ( \(op(A) == A\)) ormelements ( \(op(A) == A^T\) or \(op(A) == A^H\)).[in] beta - scalar \(\beta\). [in,out] y - array of melements ( \(op(A) == A\)) ornelements ( \(op(A) == A^T\) or \(op(A) == A^H\)).
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size hybstructure was not initialized with valid matrix sizes.rocsparse_status_invalid_pointer descr,alpha,hyb,x,beta, orypointer is invalid.rocsparse_status_invalid_value hybstructure was not initialized with a valid partitioning type.rocsparse_status_arch_mismatch the device is not supported. rocsparse_status_memory_error the buffer could not be allocated. rocsparse_status_internal_error an internal error occurred. rocsparse_status_not_implemented trans!=rocsparse_operation_noneorrocsparse_matrix_type!=rocsparse_matrix_type_general.
- Example
- This example performs a sparse matrix vector multiplication in HYB format and demonstrates a conversion from the CSR to HYB format.
Member Function/Subroutine Documentation
◆ rocsparse_shybmv_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shybmv::rocsparse_shybmv_ | ( | type(c_ptr), value | handle, |
| integer(kind(rocsparse_operation_none)), value | trans, | ||
| real(c_float) | alpha, | ||
| type(c_ptr), value | descr, | ||
| type(c_ptr), value | hyb, | ||
| type(c_ptr), value | x, | ||
| real(c_float) | beta, | ||
| type(c_ptr), value | y | ||
| ) |
◆ rocsparse_shybmv_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shybmv::rocsparse_shybmv_rank_0 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_operation_none)) | trans, | ||
| real(c_float) | alpha, | ||
| type(c_ptr) | descr, | ||
| type(c_ptr) | hyb, | ||
| real(c_float), target | x, | ||
| real(c_float) | beta, | ||
| real(c_float), target | y | ||
| ) |
◆ rocsparse_shybmv_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shybmv::rocsparse_shybmv_rank_1 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_operation_none)) | trans, | ||
| real(c_float) | alpha, | ||
| type(c_ptr) | descr, | ||
| type(c_ptr) | hyb, | ||
| real(c_float), dimension(:), target | x, | ||
| real(c_float) | beta, | ||
| real(c_float), dimension(:), target | y | ||
| ) |
The documentation for this interface was generated from the following file: