rocsparse_dense_to_sparse Interface Reference#
hipfort_rocsparse::rocsparse_dense_to_sparse Interface Reference
Dense matrix to sparse matrix conversion. More...
Public Member Functions | |
integer(kind(rocsparse_status_success)) function | rocsparse_dense_to_sparse_ (handle, mat_A, mat_B, alg, buffer_size, temp_buffer) |
Detailed Description
Dense matrix to sparse matrix conversion.
rocsparse_dense_to_sparse
rocsparse_dense_to_sparse
performs the conversion of a dense matrix to a sparse matrix in CSR, CSC, or COO format.
- Note
- This function writes the required allocation size (in bytes) to
buffer_size
and returns without performing the dense to sparse operation, when a nullptr is passed fortemp_buffer
. - This function is non blocking and executed asynchronously with respect to the host. It may return before the actual computation has finished.
- Parameters
-
[in] handle handle to the rocsparse library context queue. [in] mat_A dense matrix descriptor. [in] mat_B sparse matrix descriptor. [in] alg algorithm for the sparse to dense computation. [out] buffer_size number of bytes of the temporary storage buffer. buffer_size is set when temp_buffer
is nullptr.[in] temp_buffer temporary storage buffer allocated by the user. When a nullptr is passed, the required allocation size (in bytes) is written to buffer_size
and function returns without performing the dense to sparse operation.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_pointer mat_A
,mat_B
, orbuffer_size
pointer is invalid.
Member Function/Subroutine Documentation
◆ rocsparse_dense_to_sparse_()
integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_dense_to_sparse::rocsparse_dense_to_sparse_ | ( | type(c_ptr), value | handle, |
type(c_ptr), value | mat_A, | ||
type(c_ptr), value | mat_B, | ||
integer(kind(rocsparse_dense_to_sparse_alg_default)), value | alg, | ||
integer(c_size_t) | buffer_size, | ||
type(c_ptr), value | temp_buffer | ||
) |
The documentation for this interface was generated from the following file: