Skip to main content

Parallel array class implementation using C++ STL adaptors

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

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

Abstract

STL Adaptors can combine operations and are used in elimination of temporaries in a C++ array class; this technique is known as Expression Templates or Template Closures. Since the technique is dependent on a simple expansion of element references, some difficulties exist in applying the technique to a parallel array class, where distribution with ghost-cells and notation of array sections complicate the expansion of element references. The technique is extended so that it separates element references in two cases to keep the expansion simple in each case. This achieves good performance even with the existence of ghost-cells, whereas the implementation of an existing technique does not support it well because of the required amount of coding. In addition, currying facility of Adaptors is used for supporting nested data structures, where operations are required to nest so that they can be applied to sub-structures. An example shows a mapping of reductions is concisely expressed in a matrix-vector multiplication.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The HPC++ working group. HPC++ Whitepapers and Draft Working Documents. 1995. http://extreme.indiana.edu/hpc++/whitepaper.html

    Google Scholar 

  2. M. A. Ellis, and B. Stroustrup. The Annotated C++ Reference Manual. (pp.299–303, §12.1c: Temporary Elimination). Addison-Wesley, April 1994.

    Google Scholar 

  3. A. D. Robinson. C++ Gets Faster for Scientific Computing. Computers in Physics, Vol.10, No.5, 1996.

    Google Scholar 

  4. A. Stepanov, and M. Lee. The Standard Template Library. HP Technical Report HPL-94-34, February 1995. http://www.cs.rpi.edu/musser/stl.html

    Google Scholar 

  5. T. Velhuizen. Expression Templates. C++ Report, Vol.7, No.26, 1995.

    Google Scholar 

  6. S. W. Haney. Beating The Abstraction Penalty in C++ Using Expression Templates. Computers in Physics, Vol.10, No.6, 1996.

    Google Scholar 

  7. D. Vandevoorde. Valarray<Troy>, 1995. ftp://ftp.cs.rpi.edu/pub/vandevod/Valarry/Documents/valarray.ps

    Google Scholar 

  8. M. Matsuda, M. Sato, and Y. Ishikawa. Efficient Implementation of Portable C*-like Data-Parallel Library in C++. Proc. of the 1997 Advances in Parallel and Distributed Computing, March 1997.

    Google Scholar 

  9. G. E. Blelloch. Programming Parallel Algorithms.Communications of the ACM, 39(3), March 1996.

    Google Scholar 

  10. G. E.Blelloch, S. Chatterjee, J. C. Hardwick, J. Sipelstein, and M. Zagha. Implementation of a Portable Nested Data-Parallel Language. Proc. 4th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, May 1993.

    Google Scholar 

  11. T. J. Sheffier. A Portable MPI-based Parallel Vector Template Library. RIACS TR-95.04,1995. ftp://riacs.edu/pub/Excalibur/avtl.html

    Google Scholar 

  12. R. Parsons, and D. Quinlan. A++/P++ Array Classes for Architecture Independent Finite Difference Computations. Proc. of the 2nd Annual Object-Oriented Numerics Conference, April 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Yutaka Ishikawa Rodney R. Oldehoeft John V. W. Reynders Marydell Tholburn

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag

About this paper

Cite this paper

Matsuda, M., Sato, M., Ishikawa, Y. (1997). Parallel array class implementation using C++ STL adaptors. In: Ishikawa, Y., Oldehoeft, R.R., Reynders, J.V.W., Tholburn, M. (eds) Scientific Computing in Object-Oriented Parallel Environments. ISCOPE 1997. Lecture Notes in Computer Science, vol 1343. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63827-X_51

Download citation

  • DOI: https://doi.org/10.1007/3-540-63827-X_51

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63827-8

  • Online ISBN: 978-3-540-69656-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics