rocsparse_csrgemm_nnz Interface Reference

rocsparse_csrgemm_nnz Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_csrgemm_nnz Interface Reference
hipfort_rocsparse::rocsparse_csrgemm_nnz Interface Reference

Sparse matrix sparse matrix multiplication using CSR storage format. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_csrgemm_nnz_ (handle, trans_A, trans_B, m, n, k, descr_A, nnz_A, csr_row_ptr_A, csr_col_ind_A, descr_B, nnz_B, csr_row_ptr_B, csr_col_ind_B, descr_D, nnz_D, csr_row_ptr_D, csr_col_ind_D, descr_C, csr_row_ptr_C, nnz_C, info_C, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_csrgemm_nnz_rank_0 (handle, trans_A, trans_B, m, n, k, descr_A, nnz_A, csr_row_ptr_A, csr_col_ind_A, descr_B, nnz_B, csr_row_ptr_B, csr_col_ind_B, descr_D, nnz_D, csr_row_ptr_D, csr_col_ind_D, descr_C, csr_row_ptr_C, nnz_C, info_C, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_csrgemm_nnz_rank_1 (handle, trans_A, trans_B, m, n, k, descr_A, nnz_A, csr_row_ptr_A, csr_col_ind_A, descr_B, nnz_B, csr_row_ptr_B, csr_col_ind_B, descr_D, nnz_D, csr_row_ptr_D, csr_col_ind_D, descr_C, csr_row_ptr_C, nnz_C, info_C, temp_buffer)
 

Detailed Description

Sparse matrix sparse matrix multiplication using CSR storage format.

rocsparse_csrgemm_nnz 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 multiplied matrix C. It is assumed that csr_row_ptr_C has been allocated with size m + 1. The required buffer size can be obtained by rocsparse_scsrgemm_buffer_size(), rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size() and rocsparse_zcsrgemm_buffer_size(), respectively.

Note
This function is non blocking and executed asynchronously with respect to the host. It may return before the actual computation has finished.
Please note, that for matrix products with more than 8192 intermediate products per row, additional temporary storage buffer is allocated by the algorithm.
Currently, only trans_A == trans_B == rocsparse_operation_none is supported.
Currently, only rocsparse_matrix_type_general is supported.
Parameters
[in]handlehandle to the rocsparse library context queue.
[in]trans_Amatrix \(A\) operation type.
[in]trans_Bmatrix \(B\) operation type.
[in]mnumber of rows of the sparse CSR matrix \(op(A)\) and \(C\).
[in]nnumber of columns of the sparse CSR matrix \(op(B)\) and \(C\).
[in]knumber of columns of the sparse CSR matrix \(op(A)\) and number of rows of the sparse CSR matrix \(op(B)\).
[in]descr_Adescriptor of the sparse CSR matrix \(A\). Currenty, only rocsparse_matrix_type_general is supported.
[in]nnz_Anumber of non-zero entries of the sparse CSR matrix \(A\).
[in]csr_row_ptr_Aarray of m+1 elements ( \(op(A) == A\), k+1 otherwise) that point to the start of every row of the sparse CSR matrix \(op(A)\).
[in]csr_col_ind_Aarray of nnz_A elements containing the column indices of the sparse CSR matrix \(A\).
[in]descr_Bdescriptor of the sparse CSR matrix \(B\). Currenty, only rocsparse_matrix_type_general is supported.
[in]nnz_Bnumber of non-zero entries of the sparse CSR matrix \(B\).
[in]csr_row_ptr_Barray of k+1 elements ( \(op(B) == B\), m+1 otherwise) that point to the start of every row of the sparse CSR matrix \(op(B)\).
[in]csr_col_ind_Barray of nnz_B elements containing the column indices of the sparse CSR matrix \(B\).
[in]descr_Ddescriptor of the sparse CSR matrix \(D\). Currenty, only rocsparse_matrix_type_general is supported.
[in]nnz_Dnumber of non-zero entries of the sparse CSR matrix \(D\).
[in]csr_row_ptr_Darray of m+1 elements that point to the start of every row of the sparse CSR matrix \(D\).
[in]csr_col_ind_Darray of nnz_D elements containing the column indices of the sparse CSR matrix \(D\).
[in]descr_Cdescriptor of the sparse CSR matrix \(C\). Currenty, only rocsparse_matrix_type_general is supported.
[out]csr_row_ptr_Carray of m+1 elements that point to the start of every row of the sparse CSR matrix \(C\).
[out]nnz_Cpointer to the number of non-zero entries of the sparse CSR matrix \(C\).
[in]info_Cstructure that holds meta data for the sparse CSR matrix \(C\).
[in]temp_buffertemporary storage buffer allocated by the user, size is returned by rocsparse_scsrgemm_buffer_size(), rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size() or rocsparse_zcsrgemm_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, k, nnz_A, nnz_B or nnz_D is invalid.
rocsparse_status_invalid_pointerdescr_A, csr_row_ptr_A, csr_col_ind_A, descr_B, csr_row_ptr_B, csr_col_ind_B, descr_D, csr_row_ptr_D, csr_col_ind_D, descr_C, csr_row_ptr_C, nnz_C, info_C or temp_buffer is invalid.
rocsparse_status_memory_erroradditional buffer for long rows could not be allocated.
rocsparse_status_not_implementedtrans_A != rocsparse_operation_none, trans_B != rocsparse_operation_none, or rocsparse_matrix_type != rocsparse_matrix_type_general.

Member Function/Subroutine Documentation

◆ rocsparse_csrgemm_nnz_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csrgemm_nnz::rocsparse_csrgemm_nnz_ ( type(c_ptr), value  handle,
integer(kind(rocsparse_operation_none)), value  trans_A,
integer(kind(rocsparse_operation_none)), value  trans_B,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  k,
type(c_ptr), value  descr_A,
integer(c_int), value  nnz_A,
type(c_ptr), value  csr_row_ptr_A,
type(c_ptr), value  csr_col_ind_A,
type(c_ptr), value  descr_B,
integer(c_int), value  nnz_B,
type(c_ptr), value  csr_row_ptr_B,
type(c_ptr), value  csr_col_ind_B,
type(c_ptr), value  descr_D,
integer(c_int), value  nnz_D,
type(c_ptr), value  csr_row_ptr_D,
type(c_ptr), value  csr_col_ind_D,
type(c_ptr), value  descr_C,
type(c_ptr), value  csr_row_ptr_C,
type(c_ptr), value  nnz_C,
type(c_ptr), value  info_C,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_csrgemm_nnz_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csrgemm_nnz::rocsparse_csrgemm_nnz_rank_0 ( type(c_ptr)  handle,
integer(kind(rocsparse_operation_none))  trans_A,
integer(kind(rocsparse_operation_none))  trans_B,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  k,
type(c_ptr)  descr_A,
integer(c_int)  nnz_A,
integer(c_int), target  csr_row_ptr_A,
integer(c_int), target  csr_col_ind_A,
type(c_ptr)  descr_B,
integer(c_int)  nnz_B,
integer(c_int), target  csr_row_ptr_B,
integer(c_int), target  csr_col_ind_B,
type(c_ptr)  descr_D,
integer(c_int)  nnz_D,
integer(c_int), target  csr_row_ptr_D,
integer(c_int), target  csr_col_ind_D,
type(c_ptr)  descr_C,
integer(c_int), target  csr_row_ptr_C,
integer(c_int), target  nnz_C,
type(c_ptr)  info_C,
type(c_ptr)  temp_buffer 
)

◆ rocsparse_csrgemm_nnz_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csrgemm_nnz::rocsparse_csrgemm_nnz_rank_1 ( type(c_ptr)  handle,
integer(kind(rocsparse_operation_none))  trans_A,
integer(kind(rocsparse_operation_none))  trans_B,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  k,
type(c_ptr)  descr_A,
integer(c_int)  nnz_A,
integer(c_int), dimension(:), target  csr_row_ptr_A,
integer(c_int), dimension(:), target  csr_col_ind_A,
type(c_ptr)  descr_B,
integer(c_int)  nnz_B,
integer(c_int), dimension(:), target  csr_row_ptr_B,
integer(c_int), dimension(:), target  csr_col_ind_B,
type(c_ptr)  descr_D,
integer(c_int)  nnz_D,
integer(c_int), dimension(:), target  csr_row_ptr_D,
integer(c_int), dimension(:), target  csr_col_ind_D,
type(c_ptr)  descr_C,
integer(c_int), dimension(:), target  csr_row_ptr_C,
integer(c_int), dimension(:), target  nnz_C,
type(c_ptr)  info_C,
type(c_ptr)  temp_buffer 
)

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