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

This function computes the number of nonzero block columns per row and the total number of nonzero blocks in a sparse BSR matrix given a sparse CSR matrix as input. More...

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 computes the number of nonzero block columns per row and the total number of nonzero blocks in a sparse BSR matrix given a sparse CSR matrix as input.

The routine does support asynchronous execution if the pointer mode is set to device.

Parameters
[in]handlehandle to the rocsparse library context queue.
[in]dirdirection that specified whether to count nonzero elements by rocsparse_direction_row or by rocsparse_direction_row.
[in]mnumber of rows of the sparse CSR matrix.
[in]nnumber of columns of the sparse CSR matrix.
[in]csr_descrdescriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[in]csr_row_ptrinteger array containing m+1 elements that point to the start of each row of the CSR matrix
[in]csr_col_indinteger array of the column indices for each non-zero element in the CSR matrix
[in]block_dimthe block dimension of the BSR matrix. Between 1 and min(m, n)
[in]bsr_descrdescriptor of the sparse BSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[out]bsr_row_ptrinteger array containing mb+1 elements that point to the start of each block row of the BSR matrix
[out]bsr_nnztotal number of nonzero 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 or n or block_dim is invalid.
rocsparse_status_invalid_pointercsr_row_ptr or csr_col_ind or 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: