Function: direct_real_gen_matmul
NAG CPP Interface
nagcpp::sparse::direct_real_gen_matmul (f11mk)
Function: direct_real_gen_matmul
1
Purpose
direct_real_gen_matmul computes a matrix-matrix or transposed matrix-matrix product involving a real, square, sparse nonsymmetric matrix stored in compressed column (Harwell–Boeing) format.
2
Specification
#include "f11/nagcpp_f11mk.hpp"
template <typename ICOLZP, typename IROWIX, typename A, typename B, typename C>
void function direct_real_gen_matmul(const string trans, const double alpha, const ICOLZP &icolzp, const IROWIX &irowix, const A &a, const B &b, const double beta, C &&c, OptionalF11MK opt)
template <typename ICOLZP, typename IROWIX, typename A, typename B, typename C>
void function direct_real_gen_matmul(const string trans, const double alpha, const ICOLZP &icolzp, const IROWIX &irowix, const A &a, const B &b, const double beta, C &&c)
3
Description
direct_real_gen_matmul computes either the matrix-matrix product
, or the transposed matrix-matrix product
, according to the value of the argument
trans, where
is a real
sparse nonsymmetric matrix, of arbitrary sparsity pattern with
nonzero elements,
and
are
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.
4
References
None.
5
Arguments
-
1:
– string
Input
-
On entry: specifies whether or not the matrix
is transposed.
- is computed.
- is computed.
Constraint:
or .
-
2:
– double
Input
-
On entry: , the scalar factor in the matrix multiplication.
-
3:
– types::f77_integer array
Input
-
On entry: the new column index array of sparse matrix
. See
Section 2.1.3 in the
F11 Chapter Introduction.
-
4:
– types::f77_integer array
Input
-
On entry: the row index array of sparse matrix
. See
Section 2.1.3 in the
F11 Chapter Introduction.
-
5:
– double array
Input
-
On entry: the array of nonzero values in the sparse matrix .
-
6:
– double array
Input
-
On entry: the matrix .
-
7:
– double
Input
-
On entry: the scalar factor .
-
8:
– double array
Input/Output
-
On entry: the matrix .
On exit:
is overwritten by
or
depending on the value of
trans.
-
9:
– OptionalF11MK
Input/Output
-
Optional parameter container, derived from
Optional.
5.1Additional Quantities
- 1:
- , the order of the matrix
- 2:
- , the number of columns of matrices and
6
Exceptions and Warnings
Errors or warnings detected by the function:
All errors and warnings have an associated numeric error code field,
errorid, stored either as a member of the thrown exception object (see
errorid), or as a member of
opt.
ifail, depending on how errors
and warnings are being handled (see
Error Handling for more details).
- Raises: ErrorException
-
- On entry, .
Constraint: .
- On entry, .
Constraint: .
- On entry, .
Constraint: .
- On entry, argument must be a vector of size array.
Supplied argument has dimensions.
- On entry, argument must be a vector of size array.
Supplied argument was a vector of size .
- On entry, argument must be a vector of size array.
The size for the supplied array could not be ascertained.
- On entry, argument must be a x array.
Supplied argument has dimensions.
- On entry, argument must be a x array.
Supplied argument was a x array.
- On entry, argument must be a x array.
Not all of the sizes for the supplied array could be ascertained.
- On entry, the raw data component of is null.
- On entry, unable to ascertain a value for .
- On entry, the data in is stored in Major Order.
The data was expected to be in Major Order.
- An unexpected error has been triggered by this routine.
- Your licence key may have expired or may not have been installed correctly.
- Dynamic memory allocation failed.
7
Accuracy
Not applicable.
8
Parallelism and Performance
Please see the description for the underlying computational routine in this section of the
FL Interface documentation.
None.
10
Example
Examples for the NAG CPP Interface are not currently available.
Function: direct_real_gen_matmul