Skip to main content

The Matrix Template Library: A Generic Programming Approach to High Performance Numerical Linear Algebra

  • Conference paper
  • First Online:
Computing in Object-Oriented Parallel Environments (ISCOPE 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1505))

Abstract

We present a unified approach for building high-performance numerical linear algebra routines for large classes of dense and sparse matrices. As with the Standard Template Library [1], we separate algorithms from data structures using generic programming techniques. Such an approach does not hinder high performance; rather, writing portable high-performance codes is enabled because the performance-critical code can be isolated from the algorithms and data structures. We address the performance portability problem for architecture-dependent algorithms such as matrix-matrix multiply. Recently, code generation systems, such as PHiPAC [2] and ATLAS [3], have allowed algorithms to be tuned to particular architectures. Our approach is to use template metaprograms [4] to directly express performance-critical, architecture-dependent, sections of code.

This work was supported by NSF grants ASC94-22380 and CCR95-02710.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Meng Lee and Alexander Stepanov. The standard template library. Technical report, HP Laboratories, February 1995.

    Google Scholar 

  2. J. Bilmes, K. Asanovic, J. Demmel, D. Lam, and C.-W. Chin. Optimizing matrix multiply using PHiPAC: A portable, high-performance, ANSI C coding methodology. Technical Report CS-96-326, University of Tennessee, May 1996.

    Google Scholar 

  3. Jack J. Dongarra R. Clint Whaley. Automatically tuned linear algebra software (ATLAS). Technical report, U. Tennessee and ORNL, 1997.

    Google Scholar 

  4. Todd Veldhuizen. Using C++ template metaprograms. C++ Report, May 1995.

    Google Scholar 

  5. Basic Linear Algebra Subprograms Technical Forum. BLAS standard draft chapter 3: Sparse BLAS. Technical report, University of Tennessee, December 1997.

    Google Scholar 

  6. Karen A. Remington and Roldan Pozo. NIST Sparse BLAS User’s Guide. National Institute of Standards and Technology.

    Google Scholar 

  7. Brian C. McCandless and Andrew Lumsdaine. The role of abstraction in high-performance computing. In Scientific Computing in Object-Oriented Parallel Environments. ISCOPE, December 1997.

    Google Scholar 

  8. C. Lawson, R. Hanson, D. Kincaid, and F. Krogh. Basic linear algebra subprograms for fortran usage. ACM Trans. Mathematical Software, 5(3):308–323, 1979.

    Article  MATH  Google Scholar 

  9. J. Dongarra, J. Du Croz, I. Duff, and S. Hammarling. A set of level 3 basic linear algebra subprograms. ACM Trans. Mathematical Software, 16(1):1–17, 1990.

    Article  MATH  Google Scholar 

  10. J. Dongarra, J. Du Croz, S. Hammarling, and R. Hanson. Algorithm 656: An extended set of basic linear algebra subprograms: Model implementations and test programs. ACM Trans. Mathematical Software, 14(1):18–32, 1988.

    Article  MATH  Google Scholar 

  11. Roldan Pozo. Template Numerical Toolkit (TNT) for Linear Algebra. National Insitute of Standards and Technology.

    Google Scholar 

  12. Kuck and Associates. Kuck and Associates C++ User§ Guide.

    Google Scholar 

  13. Steven Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997.

    Google Scholar 

  14. Todd Veldhuizen and M. Ed Jernigan. Will C++ be faster than Fortran. In Scientific Computing in Object-Oriented Parallel Environments. ISCOPE, December 1997.

    Google Scholar 

  15. Monica S. Lam, Edward E. Rothberg, and Michael E. Wolf. The cache performance and optimizations of blocked algorithms. In ASPLOS IV, April 1991.

    Google Scholar 

  16. NIST. MatrixMarket. http://gams.nist.gov/MatrixMarket/.

  17. Youcef Saad. SPARSKIT: a basic tool kit for sparse matrix computations. Technical report, NASA Ames Research Center, 1990.

    Google Scholar 

  18. Roldan Pozo Jack Dongarra, Andrew Lumsdaine and Karin A. Remington. Iterative Methods Library Reference Guide, v. 1.2 edition, April 1997.

    Google Scholar 

  19. E. Anderson, Z. Bai, C. Bischoff, J. Demmel, J. Dongarra, J. DuCroz, A. Greenbaum, S. Hammarling, A. McKenney, and D. Sorensen. LAPACK: A portable linear algebra package for high-performance computers. In Proceedings of Supercomputing’ 90, pages 1–10. IEEE Press, 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Siek, J.G., Lumsdaine, A. (1998). The Matrix Template Library: A Generic Programming Approach to High Performance Numerical Linear Algebra. In: Caromel, D., Oldehoeft, R.R., Tholburn, M. (eds) Computing in Object-Oriented Parallel Environments. ISCOPE 1998. Lecture Notes in Computer Science, vol 1505. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49372-7_6

Download citation

  • DOI: https://doi.org/10.1007/3-540-49372-7_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65387-5

  • Online ISBN: 978-3-540-49372-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics