Sparse matrix routines to convert from one sparse format into another.
More...
|
CLSPARSE_EXPORT clsparseStatus | clsparseScsr2coo (const clsparseCsrMatrix *csr, clsparseCooMatrix *coo, const clsparseControl control) |
| Convert a single precision CSR encoded sparse matrix into a COO encoded sparse matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseDcsr2coo (const clsparseCsrMatrix *csr, clsparseCooMatrix *coo, const clsparseControl control) |
| Convert a double precision CSR encoded sparse matrix into a COO encoded sparse matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseScoo2csr (const clsparseCooMatrix *coo, clsparseCsrMatrix *csr, const clsparseControl control) |
| Convert a single precision COO encoded sparse matrix into a CSR encoded sparse matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseDcoo2csr (const clsparseCooMatrix *coo, clsparseCsrMatrix *csr, const clsparseControl control) |
| Convert a double precision COO encoded sparse matrix into a CSR encoded sparse matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseScsr2dense (const clsparseCsrMatrix *csr, cldenseMatrix *A, const clsparseControl control) |
| Convert a single precision CSR encoded sparse matrix into a dense matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseDcsr2dense (const clsparseCsrMatrix *csr, cldenseMatrix *A, clsparseControl control) |
| Convert a double precision CSR encoded sparse matrix into a dense matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseSdense2csr (const cldenseMatrix *A, clsparseCsrMatrix *csr, const clsparseControl control) |
| Convert a single precision dense matrix into a CSR encoded sparse matrix. More...
|
|
CLSPARSE_EXPORT clsparseStatus | clsparseDdense2csr (const cldenseMatrix *A, clsparseCsrMatrix *csr, const clsparseControl control) |
| Convert a double precision dense matrix into a CSR encoded sparse matrix. More...
|
|
Sparse matrix routines to convert from one sparse format into another.
- Note
- Input sparse matrices have to be sorted by row and then by column. The sparse conversion routines provided by clSPARSE require this as a pre-condition. The clsparse matrix file reading routines
clsparse_C__MatrixfromFile
guarantee this property as a post-condition.
Convert a double precision COO encoded sparse matrix into a CSR encoded sparse matrix.
- Parameters
-
[in] | coo | Input COO encoded sparse matrix |
[out] | csr | Output CSR encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a double precision CSR encoded sparse matrix into a COO encoded sparse matrix.
- Parameters
-
[in] | csr | Input CSR encoded sparse matrix |
[out] | coo | Output COO encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a double precision CSR encoded sparse matrix into a dense matrix.
- Parameters
-
[in] | csr | Input CSR encoded sparse matrix |
[out] | A | Output dense matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a double precision dense matrix into a CSR encoded sparse matrix.
- Parameters
-
[in] | A | Input dense matrix |
[out] | csr | Output CSR encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a single precision COO encoded sparse matrix into a CSR encoded sparse matrix.
- Parameters
-
[in] | coo | Input COO encoded sparse matrix |
[out] | csr | Output CSR encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a single precision CSR encoded sparse matrix into a COO encoded sparse matrix.
- Parameters
-
[in] | csr | Input CSR encoded sparse matrix |
[out] | coo | Output COO encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a single precision CSR encoded sparse matrix into a dense matrix.
- Parameters
-
[in] | csr | Input CSR encoded sparse matrix |
[out] | A | Output dense matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns
Convert a single precision dense matrix into a CSR encoded sparse matrix.
- Parameters
-
[in] | A | Input dense matrix |
[out] | csr | Output CSR encoded sparse matrix |
[in] | control | A valid clsparseControl created with clsparseCreateControl |
- Precondition
- The sparse matrix data must first be sorted by rows, then by columns