rocsparse_scsrgemm_buffer_size Interface Reference

rocsparse_scsrgemm_buffer_size Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_scsrgemm_buffer_size Interface Reference
hipfort_rocsparse::rocsparse_scsrgemm_buffer_size Interface Reference

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_scsrgemm_buffer_size_ (handle, trans_a, trans_b, m, n, k, alpha, descr_a, nnz_a, csr_row_ptr_a, csr_col_ind_a, descr_b, nnz_b, csr_row_ptr_b, csr_col_ind_b, beta, descr_d, nnz_d, csr_row_ptr_d, csr_col_ind_d, info_c, buffer_size)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsrgemm_buffer_size_rank_0 (handle, trans_a, trans_b, m, n, k, alpha, descr_a, nnz_a, csr_row_ptr_a, csr_col_ind_a, descr_b, nnz_b, csr_row_ptr_b, csr_col_ind_b, beta, descr_d, nnz_d, csr_row_ptr_d, csr_col_ind_d, info_c, buffer_size)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsrgemm_buffer_size_rank_1 (handle, trans_a, trans_b, m, n, k, alpha, descr_a, nnz_a, csr_row_ptr_a, csr_col_ind_a, descr_b, nnz_b, csr_row_ptr_b, csr_col_ind_b, beta, descr_d, nnz_d, csr_row_ptr_d, csr_col_ind_d, info_c, buffer_size)
 

Detailed Description

rocsparse_csrgemm_buffer_size returns the size of the temporary storage buffer that is required by rocsparse_csrgemm_nnz () and rocsparse_Xcsrgemm(). The temporary storage buffer must be allocated by the user.

Note
Note that for matrix products with more than 4096 non-zero entries per row, an additional temporary storage buffer is allocated by the algorithm.
Note that for matrix products with more than 8192 intermediate products per row, an 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.
This routine does not support execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]trans_A- matrix \(A\) operation type.
[in]trans_B- matrix \(B\) operation type.
[in]m- number of rows of the sparse CSR matrix \(op(A)\) and \(C\).
[in]n- number of columns of the sparse CSR matrix \(op(B)\) and \(C\).
[in]k- number of columns of the sparse CSR matrix \(op(A)\) and number of rows of the sparse CSR matrix \(op(B)\).
[in]alpha- scalar \(\alpha\).
[in]descr_A- descriptor of the sparse CSR matrix \(A\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnz_A- number of non-zero entries of the sparse CSR matrix \(A\).
[in]csr_row_ptr_A- array 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_A- array of nnz_A elements containing the column indices of the sparse CSR matrix \(A\).
[in]descr_B- descriptor of the sparse CSR matrix \(B\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnz_B- number of non-zero entries of the sparse CSR matrix \(B\).
[in]csr_row_ptr_B- array 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_B- array of nnz_B elements containing the column indices of the sparse CSR matrix \(B\).
[in]beta- scalar \(\beta\).
[in]descr_D- descriptor of the sparse CSR matrix \(D\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnz_D- number of non-zero entries of the sparse CSR matrix \(D\).
[in]csr_row_ptr_D- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(D\).
[in]csr_col_ind_D- array of nnz_D elements containing the column indices of the sparse CSR matrix \(D\).
[in,out]info_C- structure that holds metadata for the sparse CSR matrix \(C\).
[out]buffer_size- number of bytes of the temporary storage buffer required by rocsparse_csrgemm_nnz() and rocsparse_Xcsrgemm().
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_pointeralpha and beta are invalid, descr_A, csr_row_ptr_A, csr_col_ind_A, descr_B, csr_row_ptr_B or csr_col_ind_B are invalid if alpha is valid, descr_D, csr_row_ptr_D, or csr_col_ind_D is invalid if beta is valid, info_C or buffer_size is invalid.
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_scsrgemm_buffer_size_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrgemm_buffer_size::rocsparse_scsrgemm_buffer_size_ ( 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,
real(c_float)  alpha,
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,
real(c_float)  beta,
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  info_c,
integer(c_size_t)  buffer_size 
)

◆ rocsparse_scsrgemm_buffer_size_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrgemm_buffer_size::rocsparse_scsrgemm_buffer_size_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,
real(c_float)  alpha,
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,
real(c_float)  beta,
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)  info_c,
integer(c_size_t)  buffer_size 
)

◆ rocsparse_scsrgemm_buffer_size_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrgemm_buffer_size::rocsparse_scsrgemm_buffer_size_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,
real(c_float)  alpha,
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,
real(c_float)  beta,
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)  info_c,
integer(c_size_t)  buffer_size 
)

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