Third USENIX Conference on Object-Oriented Technologies (COOTS), 1997
Extending the Standard Template Library for Parallelism in Coir<Futures>
Neelakantan Sundaresan
Applications Development Technology Institute
IBM Software Solutions Division
555 Bailey Avenue
San Jose, CA 95141
Abstract
The Standard Template Library (STL) is a C++ implementation
of the generic programming paradigm. Unlike
in typical container class libraries, algorithms in this
paradigm do not work directly on collection container objects. They
work on iterators (access and traversal objects) exported by
containers. Given N
data types, M containers, and K algorithms as
components of a software system, STL
provides a mechanism - using C++ templates and the generic programming
paradigm - to reduce the possibly N*M*K implementations to
N+M+K implementations.
Over the last decade significant research
has been done in the area of object-oriented parallelism and a number
of models, libraries, and language extensions have been proposed and implemented.
C++ has been an important language for writing parallel libraries and
for extending for parallelism.
In this paper we discuss how the generic programming paradigm in STL
can be used and extended to support
parallel programming in a manner that allows good expressibility, code reuse,
and extensibility of the library. We look at control and data-parallel
abstractions. We also discuss how different strategies for work
distribution in parallel algorithms can be supported in the spirit of
generic programming. We describe the relevant
abstractions in Coir<Futures>, our STL-based
parallel C++ library for shared memory parallelism.
|