﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>C++ Language Constructs for Parallel Programming</title>
</head>
<body>
<table>
<tr>
<th>Document Number:</th> <td>N3345=12-0035</td>
</tr>
<tr>
<th>Date:</th>            <td>2012-01-12 </td>
</tr>
<tr>
<th rowspan="4">Authors:</th>         <td>Pablo Halpern, Intel Corp. (pablo.g.halpern@intel.com)</td>
</tr>
<tr>
                 <td>Clark Nelson, Intel Corp. (clark.nelson@intel.com)</td>
</tr>
<tr>
                 <td>Stefanus Du Toit, Intel Corp. (stefanus.du.toit@intel.com)</td>
</tr>
<tr>
                 <td>Robert Geva, Intel Corp. (robert.geva@intel.com)</td>
</tr>
</table>
         
         <h1>C++ Language Constructs for Parallel Programming</h1>

   <h2>Abstract of a presentation intended for the EWG in Kona (February, 2012)</h2>

<p>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&reg;
Cilk&trade; Plus as a starting point for discussion.</p>

<p>We will present a set of desirable qualities of parallel language constructs,
including:</p>
<ul>
   <li>Minimal changes to the existing language</li>
   <li>The ability to efficiently exploit all forms of mainstream hardware
     parallelism</li>
   <li>Hardware independence, including scalability to future hardware</li>
   <li>Composability</li>
   <li>Ease of reasoning (to allow the prevention, detection, and correction of
     bugs)</li>
</ul>
<p>Recent approaches to parallelism in C++ and other languages have demonstrated
that <em>structure</em> 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.</p>

<p>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&reg; Cilk&trade; 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.</p>

<p><strong>Expected presentation time:</strong> about one hour, plus time for questions and
discussion.</p>

</body>
</html>
