|
|
◆ CscZusadd()
| Sub CscZusadd |
( |
M As |
Long, |
|
|
N As |
Long, |
|
|
Alpha As |
Complex, |
|
|
ValA() As |
Complex, |
|
|
ColptrA() As |
Long, |
|
|
RowindA() As |
Long, |
|
|
Beta As |
Complex, |
|
|
ValB() As |
Complex, |
|
|
ColptrB() As |
Long, |
|
|
RowindB() As |
Long, |
|
|
ValC() As |
Complex, |
|
|
ColptrC() As |
Long, |
|
|
RowindC() As |
Long, |
|
|
Optional Info As |
Long, |
|
|
Optional BaseA As |
Long = -1, |
|
|
Optional BaseB As |
Long = -1, |
|
|
Optional BaseC As |
Long = 0 |
|
) |
| |
C <- αA + βB (Complex matrices) (CSC)
- Purpose
- This routine performs the following matrix-matrix operation for sparse matrices A, B and C in CSC format. where α and β are scalars (complex numbers), and A, B and C are m x n complex sparse matrices.
- Parameters
-
| [in] | M | Number of rows of matrices. (M >= 0) (If M = 0, returns without computation) |
| [in] | N | Number of columns of matrices. (N >= 0) (If N = 0, returns without computation) |
| [in] | Alpha | Scalar α |
| [in] | ValA() | Array ValA(LValA - 1) (LValA >= NnzA) (NnzA is the number of nonzero elements of A)
Values of nonzero elements of matrix A. |
| [in] | ColptrA() | Array ColptrA(LColptrA - 1) (LColptrA >= N + 1)
Column pointers of matrix A. |
| [in] | RowindA() | Array RowindA(LRowindA - 1) (LRowindA >= NnzA) (NnzA is the number of nonzero elements of A)
Row indices of matrix A. |
| [in] | Beta | Scalar β. |
| [in] | ValB() | Array ValB(LValB - 1) (LValB >= NnzB) (NnzB is the number of nonzero elements of B)
Values of nonzero elements of matrix B. |
| [in] | ColptrB() | Array ColptrB(LColptrB - 1) (LColptrB >= N + 1)
Column pointers of matrix B. |
| [in] | RowindB() | Array RowindB(LRowindB - 1) (LRowindB >= NnzB) (NnzB is the number of nonzero elements of B)
Row indices of matrix B. |
| [out] | ValC() | Array ValC(LValC - 1) (LValC >= NnzC) (NnzC is the number of nonzero elements of C. NnzC must be not less than the number of nonzero elements of α*A + β*B.)
Values of nonzero elements of matrix C. |
| [out] | ColptrC() | Array ColptrC(LColptrC - 1) (LColptrC >= N + 1)
Column pointers of matrix C. |
| [out] | RowindC() | Array RowindC(LRowindC - 1) (LRowindC >= NnzC)
Row indices of matrix C. |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid or has an illegal value.
= j > 0: NnzC is too small. Exceeded during computing j-th column. |
| [in] | BaseA | (Optional)
Indexing of ColptrA() and RowindA().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if ColptrA(0) = 1, 0 otherwise) |
| [in] | BaseB | (Optional)
Indexing of ColptrB() and RowindB().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if ColptrB(0) = 1, 0 otherwise) |
| [in] | BaseC | (Optional)
Indexing of ColptrC() and RowindC().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 0) |
|