Document Number: N3345=12-0035
Date: 2012-01-12
Authors: Pablo Halpern, Intel Corp. (
Clark Nelson, Intel Corp. (
Stefanus Du Toit, Intel Corp. (
Robert Geva, Intel Corp. (

C++ Language Constructs for Parallel Programming

Abstract of a presentation intended for the EWG in Kona (February, 2012)

Software-controlled parallelism is now present in all shipping server, desktop, and mobile processors in the form of vector instructions, multiple cores, hyper-threading and latency-hiding hardware threading on both CPUs and GPUs. Fully exploiting the available hardware requires a mixture of task parallelism (which takes advantage of multiple cores and threads) and data parallelism (which takes advantage of vector units and latency-hiding hardware threading). C++, currently popular among performance-sensitive engineers, should provide support for both types of parallelism if it is to remain on the leading edge. We will present in detail why parallelism constructs are needed and what kinds of constraints should apply to a good solution in C++. We are not proposing specific constructs, but will describe (briefly) Intel® Cilk™ Plus as a starting point for discussion.

We will present a set of desirable qualities of parallel language constructs, including:

Recent approaches to parallelism in C++ and other languages have demonstrated that structure is an important quality for parallelism constructs because it supports the development of robust tools and correct programs that behave as expected. Unlike library-only approaches, language extensions provide an opportunity to support such structured approaches in a more consistent and simpler manner, and these will be the focus of the presentation.

We will review several current approaches to parallelism, and key takeaways for adding constructs provided by such systems to C++ in a standardized manner. We will will include a description of Intel® Cilk™ Plus, a set of parallelism constructs implemented in the Intel compiler and a branch of the GNU compiler. Cilk Plus provides simple fork-join task parallelism and constructs for "hyper-objects" that eliminate data races in common situations, as well as a host of data parallelism functionality. It is derived from Cilk, an extention of C from MIT with over 15 years of research history. The benefits, challenges, and implementation experience involved with Cilk Plus and other technologies will round out the presentation.

Expected presentation time: about one hour, plus time for questions and discussion.