|
|
◆ CsrDusmm()
| Sub CsrDusmm |
( |
Trans As |
String, |
|
|
M As |
Long, |
|
|
N As |
Long, |
|
|
Nrhs As |
Long, |
|
|
Alpha As |
Double, |
|
|
Val() As |
Double, |
|
|
Rowptr() As |
Long, |
|
|
Colind() As |
Long, |
|
|
B() As |
Double, |
|
|
Beta As |
Double, |
|
|
C() As |
Double, |
|
|
Optional Info As |
Long, |
|
|
Optional Base As |
Long = -1 |
|
) |
| |
C <- αAB + βC or C <- αATB + βC (CSR)
- Purpose
- This function performs one of the following matrix-vector operations for a sparse matrix in CSR format.
C <- αAB + βC or C <- αA^TB + βC
where α and β are scalars, A is an M x N sparse matrix, B is an N x Nrhs dense matrix, and C is an M x Nrhs dense matrix.
- Parameters
-
| [in] | Trans | Specifies the operation to be performed.
= "N": C <- αAB + βC.
= "T" or "C": C <- αA^TB + βC. |
| [in] | M | Number of rows of matrix A or A^T. (M >= 0) (If M = 0, returns without computation) |
| [in] | N | Number of columns of matrix A or A^T. (N >= 0) (If N = 0, returns without computation) |
| [in] | Nrhs | Number of columns of matrices B and C. (Nrhs >= 0) (If Nrhs = 0, returns without computation) |
| [in] | Alpha | Scalar α |
| [in] | Val() | Array Val(LVal - 1) (LVal >= Nnz) (Nnz is the number of nonzero elements of matrix A)
Values of nonzero elements of matrix A. |
| [in] | Rowptr() | Array Rowptr(LRowptr - 1) (LRowptr >= N + 1)
Row pointers of matrix A. |
| [in] | Colind() | Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of matrix A. |
| [in] | B() | Array B(LB1 - 1, LB2 - 1) (LB1 >= N, LB2 >= Nrhs)
Matrix B. |
| [in] | Beta | Scalar β. |
| [in,out] | C() | Array C(LC1 - 1, LC2 - 1) (LC1 >= M, LC2 >= Nrhs)
[in] Input matrix C (If Beta is supplied as zero, C() needs not be set on input).
[out] Output matrix (= αAB + βC). |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid. |
| [in] | Base | (Optional)
Indexing of Rowptr() and Colind().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if Rowptr(0) = 1, 0 otherwise) |
|