nag_superlu_matrix_product (f11mkc) computes a matrix-matrix or transposed matrix-matrix product involving a real, square, sparse nonsymmetric matrix stored in compressed column (Harwell–Boeing) format.
nag_superlu_matrix_product (f11mkc) computes either the matrix-matrix product
, or the transposed matrix-matrix product
, according to the value of the argument
trans, where
is a real
by
sparse nonsymmetric matrix, of arbitrary sparsity pattern with
nonzero elements,
and
are
by
real dense matrices. The matrix
is stored in compressed column (Harwell–Boeing) storage format. The array
a stores all nonzero elements of
, while arrays
icolzp and
irowix store the compressed column indices and row indices of
respectively.
None.
- 1:
order – Nag_OrderTypeInput
-
On entry: the
order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by
. See
Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint:
or .
- 2:
trans – Nag_TransTypeInput
On entry: specifies whether or not the matrix
is transposed.
- is computed.
- is computed.
Constraint:
or .
- 3:
n – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
- 4:
m – IntegerInput
On entry: , the number of columns of matrices and .
Constraint:
.
- 5:
alpha – doubleInput
On entry: , the scalar factor in the matrix multiplication.
- 6:
icolzp[] – const IntegerInput
-
Note: the dimension,
dim, of the array
icolzp
must be at least
.
On entry:
contains the index in
of the start of a new column. See
Section 2.1.3 in the f11 Chapter Introduction.
- 7:
irowix[] – const IntegerInput
-
Note: the dimension,
dim, of the array
irowix
must be at least
, the number of nonzeros of the sparse matrix
.
On entry: the row index array of sparse matrix .
- 8:
a[] – const doubleInput
-
Note: the dimension,
dim, of the array
a
must be at least
, the number of nonzeros of the sparse matrix
.
On entry: the array of nonzero values in the sparse matrix .
- 9:
b[] – const doubleInput
-
Note: the dimension,
dim, of the array
b
must be at least
- when
;
- when
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the by matrix .
- 10:
pdb – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
b.
Constraints:
- if ,
;
- if , .
- 11:
beta – doubleInput
On entry: the scalar factor .
- 12:
c[] – doubleInput/Output
-
Note: the dimension,
dim, of the array
c
must be at least
- when
;
- when
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the by matrix .
On exit:
is overwritten by
or
depending on the value of
trans.
- 13:
pdc – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
c.
Constraints:
- if ,
;
- if , .
- 14:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
On entry, and .
Constraint: .
On entry, and .
Constraint: .
On entry, and .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
Not applicable.
nag_superlu_matrix_product (f11mkc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example reads in a sparse matrix
and a dense matrix
. It then calls nag_superlu_matrix_product (f11mkc) to compute the matrix-matrix product
and the transposed matrix-matrix product
, where