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.
Preview
Unable to display preview. Download preview PDF.
References
The HPC++ working group. HPC++ Whitepapers and Draft Working Documents. 1995. http://extreme.indiana.edu/hpc++/whitepaper.html
M. A. Ellis, and B. Stroustrup. The Annotated C++ Reference Manual. (pp.299–303, §12.1c: Temporary Elimination). Addison-Wesley, April 1994.
A. D. Robinson. C++ Gets Faster for Scientific Computing. Computers in Physics, Vol.10, No.5, 1996.
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
T. Velhuizen. Expression Templates. C++ Report, Vol.7, No.26, 1995.
S. W. Haney. Beating The Abstraction Penalty in C++ Using Expression Templates. Computers in Physics, Vol.10, No.6, 1996.
D. Vandevoorde. Valarray<Troy>, 1995. ftp://ftp.cs.rpi.edu/pub/vandevod/Valarry/Documents/valarray.ps
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.
G. E. Blelloch. Programming Parallel Algorithms.Communications of the ACM, 39(3), March 1996.
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.
T. J. Sheffier. A Portable MPI-based Parallel Vector Template Library. RIACS TR-95.04,1995. ftp://riacs.edu/pub/Excalibur/avtl.html
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.
Author information
Authors and Affiliations
Editor information
Rights 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