hipsparsexcsrgeam2nnz Interface Reference

hipsparsexcsrgeam2nnz Interface Reference#

HIPFORT API Reference: hipfort_hipsparse::hipsparsexcsrgeam2nnz Interface Reference
hipfort_hipsparse::hipsparsexcsrgeam2nnz Interface Reference

Public Member Functions

integer(kind(hipsparse_status_success)) function hipsparsexcsrgeam2nnz_ (handle, m, n, descra, nnza, csrsortedrowptra, csrsortedcolinda, descrb, nnzb, csrsortedrowptrb, csrsortedcolindb, descrc, csrsortedrowptrc, nnztotaldevhostptr, workspace)
 
integer(kind(hipsparse_status_success)) function hipsparsexcsrgeam2nnz_rank_0 (handle, m, n, descra, nnza, csrsortedrowptra, csrsortedcolinda, descrb, nnzb, csrsortedrowptrb, csrsortedcolindb, descrc, csrsortedrowptrc, nnztotaldevhostptr, workspace)
 
integer(kind(hipsparse_status_success)) function hipsparsexcsrgeam2nnz_rank_1 (handle, m, n, descra, nnza, csrsortedrowptra, csrsortedcolinda, descrb, nnzb, csrsortedrowptrb, csrsortedcolindb, descrc, csrsortedrowptrc, nnztotaldevhostptr, workspace)
 

Detailed Description

hipsparseXcsrgeam2Nnz computes the total CSR non-zero elements and the CSR row offsets that point to the start of every row of the sparse CSR matrix of the resulting matrix \(C\). It is assumed that csrRowPtrC has been allocated with size m+1. The required buffer size can be obtained by hipsparseScsrgeam2_bufferSizeExt "hipsparseXcsrgeam2_bufferSizeExt()". The desired index base in the output CSR matrix \(C\) is set in the hipsparseMatDescr_t descrC. See hipsparseSetMatIndexBase().

Note
As indicated, nnzTotalDevHostPtr can point to either host or device memory. This is controlled by setting the pointer mode. See hipsparseSetPointerMode().
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
Parameters
[in]handle- handle to the hipSPARSE library context queue.
[in]m- number of rows of the sparse CSR matrices \(A\), \(B\), and \(C\).
[in]n- number of columns of the sparse CSR matrices \(A\), \(B\), and \(C\).
[in]descrA- descriptor of the sparse CSR matrix \(A\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[in]nnzA- number of non-zero entries of the sparse CSR matrix \(A\).
[in]csrSortedRowPtrA- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(A\).
[in]csrSortedColIndA- array of nnzA elements containing the column indices of the sparse CSR matrix \(A\).
[in]descrB- descriptor of the sparse CSR matrix \(B\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[in]nnzB- number of non-zero entries of the sparse CSR matrix \(B\).
[in]csrSortedRowPtrB- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(B\).
[in]csrSortedColIndB- array of nnzB elements containing the column indices of the sparse CSR matrix \(B\).
[in]descrC- descriptor of the sparse CSR matrix \(C\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[in]csrSortedRowPtrC- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(C\).
[out]nnzTotalDevHostPtr- pointer to the number of non-zero entries of the sparse CSR matrix \(C\). nnzTotalDevHostPtr can be a host or device pointer.
[in]workspace- temporary storage buffer allocated by the user.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle, m, n, nnzA, nnzB, descrA, csrSortedRowPtrA, csrSortedColIndA, descrB, csrSortedRowPtrB, csrSortedColIndB, descrC, csrSortedRowPtrC, or nnzTotalDevHostPtr is invalid.
HIPSPARSE_STATUS_NOT_SUPPORTEDhipsparseMatrixType_t != HIPSPARSE_MATRIX_TYPE_GENERAL.

Member Function/Subroutine Documentation

◆ hipsparsexcsrgeam2nnz_()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsrgeam2nnz::hipsparsexcsrgeam2nnz_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  descra,
integer(c_int), value  nnza,
type(c_ptr), value  csrsortedrowptra,
type(c_ptr), value  csrsortedcolinda,
type(c_ptr), value  descrb,
integer(c_int), value  nnzb,
type(c_ptr), value  csrsortedrowptrb,
type(c_ptr), value  csrsortedcolindb,
type(c_ptr), value  descrc,
type(c_ptr), value  csrsortedrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr), value  workspace 
)

◆ hipsparsexcsrgeam2nnz_rank_0()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsrgeam2nnz::hipsparsexcsrgeam2nnz_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descra,
integer(c_int)  nnza,
integer(c_int), target  csrsortedrowptra,
integer(c_int), target  csrsortedcolinda,
type(c_ptr)  descrb,
integer(c_int)  nnzb,
integer(c_int), target  csrsortedrowptrb,
integer(c_int), target  csrsortedcolindb,
type(c_ptr)  descrc,
integer(c_int), target  csrsortedrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr)  workspace 
)

◆ hipsparsexcsrgeam2nnz_rank_1()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsrgeam2nnz::hipsparsexcsrgeam2nnz_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descra,
integer(c_int)  nnza,
integer(c_int), dimension(:), target  csrsortedrowptra,
integer(c_int), dimension(:), target  csrsortedcolinda,
type(c_ptr)  descrb,
integer(c_int)  nnzb,
integer(c_int), dimension(:), target  csrsortedrowptrb,
integer(c_int), dimension(:), target  csrsortedcolindb,
type(c_ptr)  descrc,
integer(c_int), dimension(:), target  csrsortedrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr)  workspace 
)

The documentation for this interface was generated from the following file: