rocsparse_scsrmv_analysis Interface Reference

rocsparse_scsrmv_analysis Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_scsrmv_analysis Interface Reference
hipfort_rocsparse::rocsparse_scsrmv_analysis Interface Reference

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_scsrmv_analysis_ (handle, trans, m, n, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, myinfo)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsrmv_analysis_rank_0 (handle, trans, m, n, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, myinfo)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsrmv_analysis_rank_1 (handle, trans, m, n, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, myinfo)
 

Detailed Description

rocsparse_csrmv_analysis performs the analysis step for rocsparse_Xcsrmv(). It is expected that this function will be executed only once for a given sparsity pattern and particular operation type. The gathered analysis metadata is stored in the rocsparse_mat_info object and can be cleared by rocsparse_csrmv_clear().

If the matrix sparsity pattern changes, the gathered information will become invalid. To perform another sparse matrix multiplication with a matrix having a different sparsity pattern, either destroy the old info object and create a new one or clear the existing info object using rocsparse_csrmv_clear(). In both cases, the analysis will need to be called again.

Note
This function is blocking with respect to the host.
This routine does not support execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]trans- matrix operation type.
[in]m- number of rows of the sparse CSR matrix.
[in]n- number of columns of the sparse CSR matrix.
[in]nnz- number of non-zero entries of the sparse CSR matrix.
[in]descr- descriptor of the sparse CSR matrix.
[in]csr_val- array of nnz elements of the sparse CSR matrix.
[in]csr_row_ptr- array of m+1 elements that point to the start of every row of the sparse CSR matrix.
[in]csr_col_ind- array of nnz elements containing the column indices of the sparse CSR matrix.
[out]myInfo- structure that holds the information collected during the analysis step.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or nnz is invalid.
rocsparse_status_invalid_pointerdescr, csr_val, csr_row_ptr, csr_col_ind, or info pointer is invalid.
rocsparse_status_memory_errorthe buffer for the gathered information could not be allocated.
rocsparse_status_internal_erroran internal error occurred.
rocsparse_status_not_implementedif rocsparse_matrix_type is not one of rocsparse_matrix_type_general, rocsparse_matrix_type_symmetric, or rocsparse_matrix_type_triangular.

Member Function/Subroutine Documentation

◆ rocsparse_scsrmv_analysis_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrmv_analysis::rocsparse_scsrmv_analysis_ ( type(c_ptr), value  handle,
integer(kind(rocsparse_operation_none)), value  trans,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  nnz,
type(c_ptr), value  descr,
type(c_ptr), value  csr_val,
type(c_ptr), value  csr_row_ptr,
type(c_ptr), value  csr_col_ind,
type(c_ptr), value  myinfo 
)

◆ rocsparse_scsrmv_analysis_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrmv_analysis::rocsparse_scsrmv_analysis_rank_0 ( type(c_ptr)  handle,
integer(kind(rocsparse_operation_none))  trans,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz,
type(c_ptr)  descr,
real(c_float), target  csr_val,
integer(c_int), target  csr_row_ptr,
integer(c_int), target  csr_col_ind,
type(c_ptr)  myinfo 
)

◆ rocsparse_scsrmv_analysis_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsrmv_analysis::rocsparse_scsrmv_analysis_rank_1 ( type(c_ptr)  handle,
integer(kind(rocsparse_operation_none))  trans,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz,
type(c_ptr)  descr,
real(c_float), dimension(:), target  csr_val,
integer(c_int), dimension(:), target  csr_row_ptr,
integer(c_int), dimension(:), target  csr_col_ind,
type(c_ptr)  myinfo 
)

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