|
|
◆ csr_dusmm()
| def csr_dusmm |
( |
trans |
, |
|
|
order |
, |
|
|
m |
, |
|
|
n |
, |
|
|
l |
, |
|
|
alpha |
, |
|
|
val |
, |
|
|
rowptr |
, |
|
|
colind |
, |
|
|
base |
, |
|
|
b |
, |
|
|
beta |
, |
|
|
c |
|
|
) |
| |
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 or A^T is an m x n sparse matrix, B is an n x l dense matrix, and C is an m x l dense matrix.
- Returns
- info (int)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
- Parameters
-
| [in] | trans | Specifies the operation to be performed.
= 'N': C <- αAB + βC.
= 'T' or 'C': C <- αA^TB + βC. |
| [in] | order | Storage order of b and c.
= 'C': Column major.
= 'R': Row major. |
| [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] | l | Number of columns of matrices B and C. (l >= 0) (if l = 0, returns without computation) |
| [in] | alpha | Scalar α |
| [in] | val | Numpy ndarray (1-dimensional, float, nnz)
Values of nonzero elements of matrix A (where nnz is the number of nonzero elements). |
| [in] | rowptr | Numpy ndarray (1-dimensional, int32, m + 1)
Row pointers of matrix A. |
| [in] | colind | Numpy ndarray (1-dimensional, int32, nnz)
Column indices of matrix A (where nnz is the number of nonzero elements). |
| [in] | base | 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. |
| [in] | b | Numpy ndarray (2-dimensional, float, n x l)
Matrix B. |
| [in] | beta | Scalar β. |
| [in,out] | c | Numpy ndarray (2-dimensional, float, m x l)
[in] Input matrix C (If beta is supplied as zero, c needs not be set on input).
[out] Output matrix (= αAB + βC). |
|