|
|
◆ csr_dzusadd()
| void csr_dzusadd |
( |
int |
m, |
|
|
int |
n, |
|
|
doublecomplex |
alpha, |
|
|
const double |
val_a[], |
|
|
const int |
rowptr_a[], |
|
|
const int |
colind_a[], |
|
|
int |
base_a, |
|
|
double |
beta, |
|
|
const double |
val_b[], |
|
|
const int |
rowptr_b[], |
|
|
const int |
colind_b[], |
|
|
int |
base_b, |
|
|
doublecomplex |
val_c[], |
|
|
int |
rowptr_c[], |
|
|
int |
colind_c[], |
|
|
int |
base_c, |
|
|
int |
nnz_c, |
|
|
int * |
info |
|
) |
| |
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. where α and β are scalars, and A, B and C are m x n sparse matrices. α and C are complex numbers.
- 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] | alpha | Scalar alpha. |
| [in] | val_a[] | Array val_a[l_val_a] (l_val_a >= nnz_a) (nnz_a is the number of nonzero elements of A)
Values of nonzero elements of input matrix A. |
| [in] | rowptr_a[] | Array rowptr_a[l_rowptr_a] (l_rowptr_a >= n + 1)
Row pointers of input matrix A. |
| [in] | colind_a[] | Array colind_a[l_colind_a] (l_colind_a >= nnz_a) (nnz_a is the number of nonzero elements of A)
Column indices of input matrix A. |
| [in] | base_a | Indexing of rowptr_a[] and colind_a[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [in] | beta | Scalar beta. |
| [in] | val_b[] | Array val_b[l_val_b] (l_val_b >= nnz_b) (nnz_b is the number of nonzero elements of B)
Values of nonzero elements of input matrix B. |
| [in] | rowptr_b[] | Array rowptr_b[l_rowptr_b] (l_rowptr_b >= n + 1)
Row pointers of input matrix B. |
| [in] | colind_b[] | Array colind_b[l_colind_b] (l_colind_b >= nnz_b) (nnz_b is the number of nonzero elements of B)
Column indices of input matrix B. |
| [in] | base_b | Indexing of rowptr_b[] and colind_b[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [out] | val_c[] | Array val_c[l_val_c]
Values of nonzero elements of output matrix C. |
| [out] | rowptr_c[] | Array rowptr_c[l_rowptr_c] (l_rowptr_c >= n + 1)
Row pointers of output matrix C. |
| [out] | colind_c[] | Array colind_c[l_colind_c]
Column indices of output matrix C. |
| [in] | base_c | Indexing of rowptr_c[] and colind_c[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [in] | nnz_c | Enter min(l_val_c, l_colind_c). nnz_c must be not less than the number of nonzero elements of α*A + β*B. |
| [out] | info | = 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= j > 0: nnz_c is too small. Exceeded during computing j-th row. |
|