rocsparse_sdense2coo Interface Reference

rocsparse_sdense2coo Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_sdense2coo Interface Reference
hipfort_rocsparse::rocsparse_sdense2coo Interface Reference

This function converts the matrix \(A\) in column-oriented dense format into a sparse matrix in COO format. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_sdense2coo_ (handle, m, n, descr, a, ld, nnz_per_rows, coo_val, coo_row_ind, coo_col_ind)
 
integer(kind(rocsparse_status_success)) function rocsparse_sdense2coo_rank_0 (handle, m, n, descr, a, ld, nnz_per_rows, coo_val, coo_row_ind, coo_col_ind)
 
integer(kind(rocsparse_status_success)) function rocsparse_sdense2coo_rank_1 (handle, m, n, descr, a, ld, nnz_per_rows, coo_val, coo_row_ind, coo_col_ind)
 
integer(kind(rocsparse_status_success)) function rocsparse_sdense2coo_full_rank (handle, m, n, descr, a, ld, nnz_per_rows, coo_val, coo_row_ind, coo_col_ind)
 

Detailed Description

This function converts the matrix \(A\) in column-oriented dense format into a sparse matrix in COO format.

All the parameters are assumed to have been preallocated by the user, and the arrays are filled in based on nnz_per_rows, which can be pre-computed with rocsparse_Xnnz().

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]m- number of rows of the column-oriented dense matrix A.
[in]n- number of columns of the column-oriented dense matrix A.
[in]descr- the descriptor of the column-oriented dense matrix A. The supported matrix type is rocsparse_matrix_type_general and also any valid value of the rocsparse_index_base.
[in]A- column-oriented dense matrix of dimensions (ld, n).
[in]ld- leading dimension of column-oriented dense matrix A.
[in]nnz_per_rows- array of size n containing the number of non-zero elements per row.
[out]coo_valarray of nnz nonzero elements of matrix A.
[out]coo_row_ind- integer array of nnz row indices of the non-zero elements of matrix A.
[out]coo_col_ind- integer array of nnz column indices of the non-zero elements of matrix A.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or ld is invalid.
rocsparse_status_invalid_pointerA, nnz_per_rows, coo_val, coo_col_ind, or coo_row_ind pointer is invalid.
Example

Member Function/Subroutine Documentation

◆ rocsparse_sdense2coo_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2coo::rocsparse_sdense2coo_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  descr,
type(c_ptr), value  a,
integer(c_int), value  ld,
type(c_ptr), value  nnz_per_rows,
type(c_ptr), value  coo_val,
type(c_ptr), value  coo_row_ind,
type(c_ptr), value  coo_col_ind 
)

◆ rocsparse_sdense2coo_full_rank()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2coo::rocsparse_sdense2coo_full_rank ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descr,
real(c_float), dimension(:,:), target  a,
integer(c_int)  ld,
integer(c_int), dimension(:), target  nnz_per_rows,
real(c_float), dimension(:), target  coo_val,
integer(c_int), dimension(:), target  coo_row_ind,
integer(c_int), dimension(:), target  coo_col_ind 
)

◆ rocsparse_sdense2coo_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2coo::rocsparse_sdense2coo_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descr,
real(c_float), target  a,
integer(c_int)  ld,
integer(c_int), target  nnz_per_rows,
real(c_float), target  coo_val,
integer(c_int), target  coo_row_ind,
integer(c_int), target  coo_col_ind 
)

◆ rocsparse_sdense2coo_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2coo::rocsparse_sdense2coo_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descr,
real(c_float), dimension(:), target  a,
integer(c_int)  ld,
integer(c_int), dimension(:), target  nnz_per_rows,
real(c_float), dimension(:), target  coo_val,
integer(c_int), dimension(:), target  coo_row_ind,
integer(c_int), dimension(:), target  coo_col_ind 
)

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