XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ CsrDzusadd()

Sub CsrDzusadd ( M As  Long,
N As  Long,
Alpha As  Complex,
ValA() As  Double,
RowPtrA() As  Long,
ColindA() As  Long,
Beta As  Double,
ValB() As  Double,
RowPtrB() As  Long,
ColindB() As  Long,
ValC() As  Complex,
RowPtrC() As  Long,
ColindC() As  Long,
Optional Info As  Long,
Optional BaseA As  Long = -1,
Optional BaseB As  Long = -1,
Optional BaseC As  Long = 0 
)

C <- αA + βB (α and C are complex numbers) (CSR)

Purpose
This routine performs the following matrix-matrix operation for sparse matrices A, B and C in CSR format.
C <- α*A + β*B
where α and β are scalars, and A, B and C are m x n sparse matrices. α and C are complex numbers.
Parameters
[in]MNumber of rows of matrices. (M >= 0) (If M = 0, returns without computation)
[in]NNumber of columns of matrices. (N >= 0) (If N = 0, returns without computation)
[in]AlphaScalar α
[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]RowPtrA()Array RowPtrA(LRowPtrA - 1) (LRowPtrA >= N + 1)
Row pointers of matrix A.
[in]ColindA()Array ColindA(LColindA - 1) (LColindA >= NnzA) (NnzA is the number of nonzero elements of A)
Column indices of matrix A.
[in]BetaScalar β.
[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]RowPtrB()Array RowPtrB(LRowPtrB - 1) (LRowPtrB >= N + 1)
Row pointers of matrix B.
[in]ColindB()Array ColindB(LColindB - 1) (LColindB >= NnzB) (NnzB is the number of nonzero elements of B)
Column 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]RowPtrC()Array RowPtrC(LRowPtrC - 1) (LRowPtrC >= N + 1)
Row pointers of matrix C.
[out]ColindC()Array ColindC(LColindC - 1) (LColindC >= NnzC)
Column 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 row.
[in]BaseA(Optional)
Indexing of RowPtrA() and ColindA().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if RowPtrA(0) = 1, 0 otherwise)
[in]BaseB(Optional)
Indexing of RowPtrB() and ColindB().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if RowPtrB(0) = 1, 0 otherwise)
[in]BaseC(Optional)
Indexing of RowPtrC() and ColindC().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 0)