4
* -- SuperLU routine (version 2.0) --
5
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
6
* and Lawrence Berkeley National Lab.
11
* File name: sp_blas3.c
12
* Purpose: Sparse BLAS3, using some dense BLAS3 operations.
19
sp_cgemm(char *transa, char *transb, int m, int n, int k,
20
complex alpha, SuperMatrix *A, complex *b, int ldb,
21
complex beta, complex *c, int ldc)
26
sp_c performs one of the matrix-matrix operations
28
C := alpha*op( A )*op( B ) + beta*C,
30
where op( X ) is one of
32
op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
34
alpha and beta are scalars, and A, B and C are matrices, with op( A )
35
an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
41
TRANSA - (input) char*
42
On entry, TRANSA specifies the form of op( A ) to be used in
43
the matrix multiplication as follows:
44
TRANSA = 'N' or 'n', op( A ) = A.
45
TRANSA = 'T' or 't', op( A ) = A'.
46
TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
49
TRANSB - (input) char*
50
On entry, TRANSB specifies the form of op( B ) to be used in
51
the matrix multiplication as follows:
52
TRANSB = 'N' or 'n', op( B ) = B.
53
TRANSB = 'T' or 't', op( B ) = B'.
54
TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
58
On entry, M specifies the number of rows of the matrix
59
op( A ) and of the matrix C. M must be at least zero.
63
On entry, N specifies the number of columns of the matrix
64
op( B ) and the number of columns of the matrix C. N must be
69
On entry, K specifies the number of columns of the matrix
70
op( A ) and the number of rows of the matrix op( B ). K must
74
ALPHA - (input) complex
75
On entry, ALPHA specifies the scalar alpha.
77
A - (input) SuperMatrix*
78
Matrix A with a sparse format, of dimension (A->nrow, A->ncol).
79
Currently, the type of A can be:
80
Stype = NC or NCP; Dtype = SLU_C; Mtype = GE.
81
In the future, more general A can be handled.
83
B - COMPLEX PRECISION array of DIMENSION ( LDB, kb ), where kb is
84
n when TRANSB = 'N' or 'n', and is k otherwise.
85
Before entry with TRANSB = 'N' or 'n', the leading k by n
86
part of the array B must contain the matrix B, otherwise
87
the leading n by k part of the array B must contain the
92
On entry, LDB specifies the first dimension of B as declared
93
in the calling (sub) program. LDB must be at least max( 1, n ).
96
BETA - (input) complex
97
On entry, BETA specifies the scalar beta. When BETA is
98
supplied as zero then C need not be set on input.
100
C - COMPLEX PRECISION array of DIMENSION ( LDC, n ).
101
Before entry, the leading m by n part of the array C must
102
contain the matrix C, except when beta is zero, in which
103
case C need not be set on entry.
104
On exit, the array C is overwritten by the m by n matrix
105
( alpha*op( A )*B + beta*C ).
108
On entry, LDC specifies the first dimension of C as declared
109
in the calling (sub)program. LDC must be at least max(1,m).
112
==== Sparse Level 3 Blas routine.
114
int incx = 1, incy = 1;
117
for (j = 0; j < n; ++j) {
118
sp_cgemv(transa, alpha, A, &b[ldb*j], incx, beta, &c[ldc*j], incy);