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:
– 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:
– Nag_TransTypeInput
-
On entry: specifies whether or not the matrix
is transposed.
- is computed.
- is computed.
Constraint:
or .
- 3:
– IntegerInput
-
On entry: , the order of the matrix .
Constraint:
.
- 4:
– IntegerInput
-
On entry: , the number of columns of matrices and .
Constraint:
.
- 5:
– doubleInput
-
On entry: , the scalar factor in the matrix multiplication.
- 6:
– 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:
– 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:
– 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:
– 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:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
b.
Constraints:
- if ,
;
- if , .
- 11:
– doubleInput
-
On entry: the scalar factor .
- 12:
– 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:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
c.
Constraints:
- if ,
;
- if , .
- 14:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.2.1.2 in the Essential Introduction for further information.
- 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.
An unexpected error has been triggered by this function. Please contact
NAG.
See
Section 3.6.6 in the Essential Introduction for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 3.6.5 in the Essential Introduction for further information.
Not applicable.
nag_superlu_matrix_product (f11mkc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also 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