ISAAC '88 Proceedings of the International Symposium ISSAC'88 on Symbolic and Algebraic Computation
STAPL: an adaptive, generic parallel C++ library
LCPC'01 Proceedings of the 14th international conference on Languages and compilers for parallel computing
Hi-index | 0.00 |
This paper describes a new approach for parallelizing generic software libraries. Generic algorithms are expressed in terms of type properties, which allows them to work with entire families of types rather than specific types. Despite this generality, generic algorithms can be made as efficient as their hand-coded variants through the use of specialization, which provides algorithm variants tuned for types with certain properties. Our approach leverages the specialization mechanism of generic programming to effect parallelism. We illustrate the process of specializing generic algorithms for parallelism using common algorithms in the C++ Standard Template Library. When the resulting algorithms are invoked with types that have the required properties for parallelization, the parallel variants of these algorithms are executed. We illustrate that our parallelization strategy is simple, practical, and efficient, using tools and techniques available in most commercial compilers.