|
|
◆ DenseCsr()
| Sub DenseCsr |
( |
M As |
Long, |
|
|
N As |
Long, |
|
|
A() As |
Double, |
|
|
Val() As |
Double, |
|
|
Rowptr() As |
Long, |
|
|
Colind() As |
Long, |
|
|
Optional Info As |
Long, |
|
|
Optional Base As |
Long = 0 |
|
) |
| |
Dense matrix -> CSR
- Purpose
- This routine converts the dense matrix to the sparse matrix in CSR format.
- Parameters
-
| [in] | M | Number of rows of the matrix. (M >= 0) (if M = 0, returns without computation) |
| [in] | N | Number of columns of the matrix. (N >= 0) (if N = 0, returns without computation) |
| [in] | A() | Array A(LA1 - 1, LA2 - 1) (LA1 >= M, LA2 >= N)
Input matrix. |
| [out] | Val() | Array Val(LVal - 1) (LVal >= Nnz) (Nnz >= the number of nonzero elements of input matrix)
Values of nonzero elements of output matrix in CSR format. |
| [out] | Rowptr() | Array Rowptr(LRowptr - 1) (LRowptr >= M + 1)
Row pointers of output matrix in CSR format. |
| [out] | Colind() | Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of output matrix in CSR format. |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid. |
| [in] | Base | (Optional)
Indexing of Rowptr() and Colind(). (default = 0)
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
|