Skip to main content

cusparseSparseToDense

Function cusparseSparseToDense 

Source
pub unsafe extern "C" fn cusparseSparseToDense(
    handle: cusparseHandle_t,
    matA: cusparseConstSpMatDescr_t,
    matB: cusparseDnMatDescr_t,
    alg: cusparseSparseToDenseAlg_t,
    externalBuffer: *mut c_void,
) -> cusparseStatus_t
Expand description

The function converts the sparse matrix matA in CSR, CSC, or COO format into its dense representation matB. Blocked-ELL is not currently supported.

The function cusparseSparseToDense_bufferSize returns the size of the workspace needed by cusparseSparseToDense.

cusparseSparseToDense supports the following index type for representing the sparse matrix matA:

cusparseSparseToDense supports the following data types:

A/B
cudaDataType_t::CUDA_R_8I
cudaDataType_t::CUDA_R_16F
cudaDataType_t::CUDA_R_16BF
cudaDataType_t::CUDA_R_32F
cudaDataType_t::CUDA_R_64F
cudaDataType_t::CUDA_C_16F [DEPRECATED]
cudaDataType_t::CUDA_C_16BF [DEPRECATED]
cudaDataType_t::CUDA_C_32F
cudaDataType_t::CUDA_C_64F

cusparseSparse2Dense() supports the following algorithm:

cusparseSparseToDense has the following properties:

  • The routine requires no extra storage
  • The routine supports asynchronous execution
  • Provides deterministic (bit-wise) results for each run
  • The routine allows the indices of matA to be unsorted

cusparseSparseToDense supports the following optimizations:

  • CUDA graph capture
  • Hardware Memory Compression

Please visit cuSPARSE Library Samples - cusparseSparseToDense for a code example.

ยงParameters

  • handle: Handle to the cuSPARSE library context.
  • matA: Sparse matrix A.
  • matB: Dense matrix B.
  • alg: Algorithm for the computation.