|
|
◆ CscDusmv()
| Sub CscDusmv |
( |
Trans As |
String, |
|
|
M As |
Long, |
|
|
N As |
Long, |
|
|
Alpha As |
Double, |
|
|
Val() As |
Double, |
|
|
Colptr() As |
Long, |
|
|
Rowind() As |
Long, |
|
|
X() As |
Double, |
|
|
Beta As |
Double, |
|
|
Y() As |
Double, |
|
|
Optional Info As |
Long, |
|
|
Optional Base As |
Long = -1, |
|
|
Optional IncX As |
Long = 1, |
|
|
Optional IncY As |
Long = 1 |
|
) |
| |
y <- αAx + βy or y <- αATx + βy (CSC)
- Purpose
- This function performs one of the following matrix-vector operations for a sparse matrix in CSC format.
y <- αAx + βy or y <- αA^Tx + βy
where α and β are scalars, x and y are vectors and A is an M x N sparse matrix.
- Parameters
-
| [in] | Trans | Specifies the operation to be performed.
= "N": y <- y <- αAx + βy.
= "T" or "C": y <- αA^Tx + βy. |
| [in] | M | Number of rows of matrix A. (M >= 0) (If M = 0, returns without computation) |
| [in] | N | Number of columns of matrix A. (N >= 0) (If N = 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] | Colptr() | Array Colptr(LColptr - 1) (LColptr >= N + 1)
Column pointers of matrix A. |
| [in] | Rowind() | Array Rowind(LRowind - 1) (LRowind >= Nnz)
Row indices of matrix A. |
| [in] | X() | Array X(LX - 1) (LX >= 1 + (N - 1)*|IncX| (Trans = "N"), LX >= 1 + (M - 1)*|IncX| (Trans = "T" or "C"))
Vector x. |
| [in] | Beta | Scalar β. |
| [in,out] | Y() | Array Y(LY - 1) (LY >= 1 + (M - 1)*|IncY| (Trans = "N"), LY >= 1 + (N - 1)*|IncY| (Trans = "T" or "C"))
[in] Input vector y (If Beta is supplied as zero, Y() needs not be set on input).
[out] Output vector. (= αAx + βy) |
| [out] | Info | (Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid. |
| [in] | Base | (Optional)
Indexing of Colptr() and Rowind().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if Colptr(0) = 1, 0 otherwise) |
| [in] | IncX | (Optional)
Storage spacing between elements of X(). (IncX <> 0) (default = 1) |
| [in] | IncY | (Optional)
Storage spacing between elements of Y(). (IncY <> 0) (default = 1) |
|