hipsparsesbsrmv Interface Reference

hipsparsesbsrmv Interface Reference#

HIPFORT API Reference: hipfort_hipsparse::hipsparsesbsrmv Interface Reference
hipfort_hipsparse::hipsparsesbsrmv Interface Reference

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

Public Member Functions

integer(kind(hipsparse_status_success)) function hipsparsesbsrmv_ (handle, dira, transa, mb, nb, nnzb, alpha, descra, bsrsortedvala, bsrsortedrowptra, bsrsortedcolinda, blockdim, x, beta, y)
 
integer(kind(hipsparse_status_success)) function hipsparsesbsrmv_rank_0 (handle, dira, transa, mb, nb, nnzb, alpha, descra, bsrsortedvala, bsrsortedrowptra, bsrsortedcolinda, blockdim, x, beta, y)
 
integer(kind(hipsparse_status_success)) function hipsparsesbsrmv_rank_1 (handle, dira, transa, mb, nb, nnzb, alpha, descra, bsrsortedvala, bsrsortedrowptra, bsrsortedcolinda, blockdim, x, beta, y)
 

Detailed Description

Sparse matrix vector multiplication using the BSR storage format.

hipsparseXbsrmv multiplies the scalar \(\alpha\) with a sparse \(m \times n\) matrix, defined in BSR 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 == HIPSPARSE_OPERATION_NON_TRANSPOSE} \end{array} \right. \]

and where \(m = mb \times blockDim\) and \(n= nb \times blockDim\).

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_TRANSPOSE is supported.
Parameters
[in]handle- handle to the hipSPARSE library context queue.
[in]dirA- matrix storage of BSR blocks.
[in]transA- matrix operation type.
[in]mb- number of block rows of the sparse BSR matrix. Must be non-negative.
[in]nb- number of block columns of the sparse BSR matrix. Must be non-negative.
[in]nnzb- number of non-zero blocks of the sparse BSR matrix. Must be non-negative.
[in]alpha- scalar \(\alpha\).
[in]descrA- descriptor of the sparse BSR matrix. Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[in]bsrSortedValA- array of nnzb blocks of the sparse BSR matrix.
[in]bsrSortedRowPtrA- array of mb+1 elements that point to the start of every block row of the sparse BSR matrix.
[in]bsrSortedColIndA- array of nnzb elements containing the block column indices of the sparse BSR matrix.
[in]blockDim- block dimension of the sparse BSR matrix. Must be positive.
[in]x- array of nb*blockDim elements ( \(op(A) = A\)) or mb*blockDim elements ( \(op(A) = A^T\) or \(op(A) = A^H\)).
[in]beta- scalar \(\beta\).
[in,out]y- array of mb*blockDim elements ( \(op(A) = A\)) or nb*blockDim elements ( \(op(A) = A^T\) or \(op(A) = A^H\)).
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_NOT_INITIALIZEDhandle is not initialized.
HIPSPARSE_STATUS_INVALID_VALUEhandle, descrA, alpha, or beta is nullptr, mb, nb, or nnzb is negative, blockDim is less than or equal to zero, or bsrSortedValA, bsrSortedRowPtrA, bsrSortedColIndA, x, or y is nullptr.
HIPSPARSE_STATUS_ARCH_MISMATCHthe device is not supported.
HIPSPARSE_STATUS_NOT_SUPPORTEDtransA is not HIPSPARSE_OPERATION_NON_TRANSPOSE or hipsparseMatrixType_t is not HIPSPARSE_MATRIX_TYPE_GENERAL.

Member Function/Subroutine Documentation

◆ hipsparsesbsrmv_()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmv::hipsparsesbsrmv_ ( type(c_ptr), value  handle,
integer(kind(hipsparse_direction_row)), value  dira,
integer(kind(hipsparse_operation_non_transpose)), value  transa,
integer(c_int), value  mb,
integer(c_int), value  nb,
integer(c_int), value  nnzb,
real(c_float)  alpha,
type(c_ptr), value  descra,
type(c_ptr), value  bsrsortedvala,
type(c_ptr), value  bsrsortedrowptra,
type(c_ptr), value  bsrsortedcolinda,
integer(c_int), value  blockdim,
type(c_ptr), value  x,
real(c_float)  beta,
type(c_ptr), value  y 
)

◆ hipsparsesbsrmv_rank_0()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmv::hipsparsesbsrmv_rank_0 ( type(c_ptr)  handle,
integer(kind(hipsparse_direction_row))  dira,
integer(kind(hipsparse_operation_non_transpose))  transa,
integer(c_int)  mb,
integer(c_int)  nb,
integer(c_int)  nnzb,
real(c_float)  alpha,
type(c_ptr)  descra,
real(c_float), target  bsrsortedvala,
integer(c_int), target  bsrsortedrowptra,
integer(c_int), target  bsrsortedcolinda,
integer(c_int)  blockdim,
real(c_float), target  x,
real(c_float)  beta,
real(c_float), target  y 
)

◆ hipsparsesbsrmv_rank_1()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesbsrmv::hipsparsesbsrmv_rank_1 ( type(c_ptr)  handle,
integer(kind(hipsparse_direction_row))  dira,
integer(kind(hipsparse_operation_non_transpose))  transa,
integer(c_int)  mb,
integer(c_int)  nb,
integer(c_int)  nnzb,
real(c_float)  alpha,
type(c_ptr)  descra,
real(c_float), dimension(:), target  bsrsortedvala,
integer(c_int), dimension(:), target  bsrsortedrowptra,
integer(c_int), dimension(:), target  bsrsortedcolinda,
integer(c_int)  blockdim,
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: