rocsparse_dense_to_sparse Interface Reference

rocsparse_dense_to_sparse Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::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.

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 for temp_buffer.
This function is non blocking and executed asynchronously with respect to the host. It may return before the actual computation has finished.
[in]handlehandle to the rocsparse library context queue.
[in]mat_Adense matrix descriptor.
[in]mat_Bsparse matrix descriptor.
[in]algalgorithm for the sparse to dense computation.
[out]buffer_sizenumber of bytes of the temporary storage buffer. buffer_size is set when temp_buffer is nullptr.
[in]temp_buffertemporary 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_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_pointermat_A, mat_B, or buffer_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: