__mult_dim [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:algorithms Component type:function
Prototype
template <class MatA, class MatB, class MatC>
void __mult_dim(const MatA& A, const MatB& B, MatC& C, twod_tag) ;
Description
The actual specialization of the algorithm used depends of the types of matrices used. If all the matrices are dense and rectangular the blocked algorithm is used (when --with-blais is specified in the configure). Otherwise the traversal depends on matrix A. Therefore if one is multiplying a sparse matrix by a dense, one would want the sparse matrix as the A argument. Typically, for performance reasons, one would not want to use a sparse matrix for C.

Note: ignore the twod_tag argument and the underscores in the name of this function.

Definition
mtl.h
Requirements on types
  • the value types for each of the matrices must be compatible
  • the multiplication operator must be defined for MatA::value_type
  • the addition operator must be defined for MatA::value_type
Preconditions
  • A.nrows() == C.nrows()
  • A.ncols() == B.nrows()
  • B.ncols() == C.ncols()
Complexity
Example
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.