rocsparse_csr2bsr_nnz Interface Reference

rocsparse_csr2bsr_nnz Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_csr2bsr_nnz Interface Reference
hipfort_rocsparse::rocsparse_csr2bsr_nnz Interface Reference

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_csr2bsr_nnz_ (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz)
 
integer(kind(rocsparse_status_success)) function rocsparse_csr2bsr_nnz_rank_0 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz)
 
integer(kind(rocsparse_status_success)) function rocsparse_csr2bsr_nnz_rank_1 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz)
 

Detailed Description

This function takes a sparse CSR matrix as input and computes the block row offset array, bsr_row_ptr, and the total number of non-zero blocks, bsr_nnz, that will result from converting the CSR format input matrix to a BSR format output matrix. This function is the first step in the conversion and is used in conjunction with rocsparse_Xcsr2bsr().

Note
The routine supports asynchronous execution if the pointer mode is set to device.
This routine does not support execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]dir- direction that specifies whether to count non-zero elements by rocsparse_direction_row or by rocsparse_direction_column.
[in]m- number of rows of the sparse CSR matrix.
[in]n- number of columns of the sparse CSR matrix.
[in]csr_descr- descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[in]csr_row_ptr- integer array containing m+1 elements that point to the start of each row of the CSR matrix.
[in]csr_col_ind- integer array of the column indices for each non-zero element in the CSR matrix.
[in]block_dim- the block dimension of the BSR matrix. Between 1 and min(m, n).
[in]bsr_descr- descriptor of the sparse BSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[out]bsr_row_ptr- integer array containing mb+1 elements that point to the start of each block row of the BSR matrix.
[out]bsr_nnz- total number of non-zero elements in device or host memory.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or block_dim is invalid.
rocsparse_status_invalid_pointercsr_row_ptr, csr_col_ind, bsr_row_ptr, or bsr_nnz pointer is invalid.

Member Function/Subroutine Documentation

◆ rocsparse_csr2bsr_nnz_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_nnz_ ( type(c_ptr), value  handle,
integer(kind(rocsparse_direction_row)), value  dir,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  csr_descr,
type(c_ptr), value  csr_row_ptr,
type(c_ptr), value  csr_col_ind,
integer(c_int), value  block_dim,
type(c_ptr), value  bsr_descr,
type(c_ptr), value  bsr_row_ptr,
type(c_ptr), value  bsr_nnz 
)

◆ rocsparse_csr2bsr_nnz_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_nnz_rank_0 ( type(c_ptr)  handle,
integer(kind(rocsparse_direction_row))  dir,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  csr_descr,
integer(c_int), target  csr_row_ptr,
integer(c_int), target  csr_col_ind,
integer(c_int)  block_dim,
type(c_ptr)  bsr_descr,
integer(c_int), target  bsr_row_ptr,
integer(c_int), target  bsr_nnz 
)

◆ rocsparse_csr2bsr_nnz_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_nnz_rank_1 ( type(c_ptr)  handle,
integer(kind(rocsparse_direction_row))  dir,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  csr_descr,
integer(c_int), dimension(:), target  csr_row_ptr,
integer(c_int), dimension(:), target  csr_col_ind,
integer(c_int)  block_dim,
type(c_ptr)  bsr_descr,
integer(c_int), dimension(:), target  bsr_row_ptr,
integer(c_int), dimension(:), target  bsr_nnz 
)

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