|
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2gebsr_buffer_size_ (handle, dir, m, n, csr_descr, csr_val, csr_row_ptr, csr_col_ind, row_block_dim, col_block_dim, buffer_size) |
| |
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2gebsr_buffer_size_rank_0 (handle, dir, m, n, csr_descr, csr_val, csr_row_ptr, csr_col_ind, row_block_dim, col_block_dim, buffer_size) |
| |
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2gebsr_buffer_size_rank_1 (handle, dir, m, n, csr_descr, csr_val, csr_row_ptr, csr_col_ind, row_block_dim, col_block_dim, buffer_size) |
| |
rocsparse_csr2gebsr_buffer_size returns the size of the temporary buffer that is required by rocsparse_csr2gebsr_nnz and rocsparse_Xcsr2gebsr(). The temporary storage buffer must be allocated by the user.
- Note
- This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
-
This routine supports 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_val | - array of nnz elements containing the values of the sparse CSR matrix. |
| [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] | row_block_dim | - the row block dimension of the general BSR matrix. Between 1 and m. |
| [in] | col_block_dim | - the col block dimension of the general BSR matrix. Between 1 and n. |
| [out] | buffer_size | - number of bytes of the temporary storage buffer required by rocsparse_csr2gebsr_nnz and rocsparse_Xcsr2gebsr(). |
- Return values
-
| rocsparse_status_success | the operation completed successfully. |
| rocsparse_status_invalid_handle | the library context was not initialized. |
| rocsparse_status_invalid_size | m, n, row_block_dim, or col_block_dim is invalid. |
| rocsparse_status_invalid_pointer | csr_val, csr_row_ptr, csr_col_ind, or buffer_size pointer is invalid. |