rocsparse_sgebsrmv Interface Reference

rocsparse_sgebsrmv Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_sgebsrmv Interface Reference
hipfort_rocsparse::rocsparse_sgebsrmv Interface Reference

Sparse matrix vector multiplication using the GEBSR storage format. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_sgebsrmv_ (handle, dir, trans, mb, nb, nnzb, alpha, descr, bsr_val, bsr_row_ptr, bsr_col_ind, row_block_dim, col_block_dim, x, beta, y)
 
integer(kind(rocsparse_status_success)) function rocsparse_sgebsrmv_rank_0 (handle, dir, trans, mb, nb, nnzb, alpha, descr, bsr_val, bsr_row_ptr, bsr_col_ind, row_block_dim, col_block_dim, x, beta, y)
 
integer(kind(rocsparse_status_success)) function rocsparse_sgebsrmv_rank_1 (handle, dir, trans, mb, nb, nnzb, alpha, descr, bsr_val, bsr_row_ptr, bsr_col_ind, row_block_dim, col_block_dim, x, beta, y)
 

Detailed Description

Sparse matrix vector multiplication using the GEBSR storage format.

rocsparse_gebsrmv multiplies the scalar \(\alpha\) with a sparse \(m \times n\) matrix, defined in GEBSR 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. \]

and where \(m = mb \times row\_block\_dim\) and \(n = nb \times col\_block\_dim\).

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 trans == rocsparse_operation_none is supported.
This routine supports execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]dir- matrix storage of GEBSR blocks.
[in]trans- matrix operation type.
[in]mb- number of block rows of the sparse GEBSR matrix.
[in]nb- number of block columns of the sparse GEBSR matrix.
[in]nnzb- number of non-zero blocks of the sparse GEBSR matrix.
[in]alpha- scalar \(\alpha\).
[in]descr- descriptor of the sparse GEBSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[in]bsr_val- array of nnzb blocks of the sparse GEBSR matrix.
[in]bsr_row_ptr- array of mb+1 elements that point to the start of every block row of the sparse GEBSR matrix.
[in]bsr_col_ind- array of nnz containing the block column indices of the sparse GEBSR matrix.
[in]row_block_dim- row block dimension of the sparse GEBSR matrix.
[in]col_block_dim- column block dimension of the sparse GEBSR matrix.
[in]x- array of nb*col_block_dim elements ( \(op(A) = A\)) or mb*row_block_dim elements ( \(op(A) = A^T\) or \(op(A) = A^H\)).
[in]beta- scalar \(\beta\).
[in,out]y- array of mb*row_block_dim elements ( \(op(A) = A\)) or nb*col_block_dim elements ( \(op(A) = A^T\) or \(op(A) = A^H\)).
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizemb, nb, nnzb, row_block_dim, or col_block_dim is invalid.
rocsparse_status_invalid_pointerdescr, alpha, bsr_val, bsr_row_ind, bsr_col_ind, x, beta, or y pointer is invalid.
rocsparse_status_arch_mismatchthe device is not supported.
rocsparse_status_not_implementedtrans != rocsparse_operation_none or rocsparse_matrix_type != rocsparse_matrix_type_general.
Example
This example performs a sparse matrix vector multiplication in GEBSR format.

Member Function/Subroutine Documentation

◆ rocsparse_sgebsrmv_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgebsrmv::rocsparse_sgebsrmv_ ( type(c_ptr), value  handle,
integer(kind(rocsparse_direction_row)), value  dir,
integer(kind(rocsparse_operation_none)), value  trans,
integer(c_int), value  mb,
integer(c_int), value  nb,
integer(c_int), value  nnzb,
real(c_float)  alpha,
type(c_ptr), value  descr,
type(c_ptr), value  bsr_val,
type(c_ptr), value  bsr_row_ptr,
type(c_ptr), value  bsr_col_ind,
integer(c_int), value  row_block_dim,
integer(c_int), value  col_block_dim,
type(c_ptr), value  x,
real(c_float)  beta,
type(c_ptr), value  y 
)

◆ rocsparse_sgebsrmv_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgebsrmv::rocsparse_sgebsrmv_rank_0 ( type(c_ptr)  handle,
integer(kind(rocsparse_direction_row))  dir,
integer(kind(rocsparse_operation_none))  trans,
integer(c_int)  mb,
integer(c_int)  nb,
integer(c_int)  nnzb,
real(c_float)  alpha,
type(c_ptr)  descr,
real(c_float), target  bsr_val,
integer(c_int), target  bsr_row_ptr,
integer(c_int), target  bsr_col_ind,
integer(c_int)  row_block_dim,
integer(c_int)  col_block_dim,
real(c_float), target  x,
real(c_float)  beta,
real(c_float), target  y 
)

◆ rocsparse_sgebsrmv_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sgebsrmv::rocsparse_sgebsrmv_rank_1 ( type(c_ptr)  handle,
integer(kind(rocsparse_direction_row))  dir,
integer(kind(rocsparse_operation_none))  trans,
integer(c_int)  mb,
integer(c_int)  nb,
integer(c_int)  nnzb,
real(c_float)  alpha,
type(c_ptr)  descr,
real(c_float), dimension(:), target  bsr_val,
integer(c_int), dimension(:), target  bsr_row_ptr,
integer(c_int), dimension(:), target  bsr_col_ind,
integer(c_int)  row_block_dim,
integer(c_int)  col_block_dim,
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: