NAG CPP Interface
nagcpp::sparse::direct_real_gen_matmul (f11mk)

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 CαAB+βC, or the transposed matrix-matrix product CαATB + βC, according to the value of the argument trans, where A is a real n by n sparse nonsymmetric matrix, of arbitrary sparsity pattern with nnz nonzero elements, B and C are n by m real dense matrices. The matrix A is stored in compressed column (Harwell–Boeing) storage format. The array a stores all nonzero elements of A, while arrays icolzp and irowix store the compressed column indices and row indices of A respectively.

4 References

None.

5 Arguments

1: trans string Input
On entry: specifies whether or not the matrix A is transposed.
trans='N'
αAB+βC is computed.
trans='T'
αATB+βC is computed.
Constraint: trans='N' or 'T'.
2: alpha double Input
On entry: α, the scalar factor in the matrix multiplication.
3: icolzp(n+1) types::f77_integer array Input
On entry: the new column index array of sparse matrix A. See Section 2.1.3 in the F11 Chapter Introduction.
4: irowix(vl_asize) types::f77_integer array Input
On entry: the row index array of sparse matrix A. See Section 2.1.3 in the F11 Chapter Introduction.
5: a(vl_asize) double array Input
On entry: the array of nonzero values in the sparse matrix A.
6: b(n,m) double array Input
On entry: the n by m matrix B.
7: beta double Input
On entry: the scalar factor β.
8: c(n,m) double array Input/Output
On entry: the n by m matrix C.
On exit: C is overwritten by αAB+βC or αATB +βC depending on the value of trans.
9: opt OptionalF11MK Input/Output
Optional parameter container, derived from Optional.

5.1Additional Quantities

1: n
n, the order of the matrix A
2: m
m, the number of columns of matrices B and C

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
errorid=1
On entry, m = value.
Constraint: m 0.
errorid=1
On entry, n = value.
Constraint: n 0.
errorid=1
On entry, trans = value.
Constraint: trans = "N"​ or ​"T".
errorid=10601
On entry, argument value must be a vector of size value array.
Supplied argument has value dimensions.
errorid=10601
On entry, argument value must be a vector of size value array.
Supplied argument was a vector of size value.
errorid=10601
On entry, argument value must be a vector of size value array.
The size for the supplied array could not be ascertained.
errorid=10601
On entry, argument value must be a value x value array.
Supplied argument has value dimensions.
errorid=10601
On entry, argument value must be a value x value array.
Supplied argument was a value x value array.
errorid=10601
On entry, argument value must be a value x value array.
Not all of the sizes for the supplied array could be ascertained.
errorid=10602
On entry, the raw data component of value is null.
errorid=10603
On entry, unable to ascertain a value for value.
errorid=10604
On entry, the data in value is stored in value Major Order.
The data was expected to be in value Major Order.
errorid=-99
An unexpected error has been triggered by this routine.
errorid=-399
Your licence key may have expired or may not have been installed correctly.
errorid=-999
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.

9 Further Comments

None.

10 Example

Examples for the NAG CPP Interface are not currently available.