⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node51.html

📁 Design and building parallel program
💻 HTML
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>5 Compositional C++
 </TITLE>
</HEAD>
<BODY>
<meta name="description" value="5 Compositional C++
 ">
<meta name="keywords" value="book">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
 <BR> <HR><a href="msgs0.htm#2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#2"><img ALIGN=MIDDLE src="asm_color_tiny.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/asm_color_tiny.gif" alt="[DBPP]"></a>    <A NAME=tex2html2532 HREF="node50.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node50.html"><IMG ALIGN=MIDDLE ALT="previous" SRC="previous_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/previous_motif.gif"></A> <A NAME=tex2html2540 HREF="node52.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node52.html"><IMG ALIGN=MIDDLE ALT="next" SRC="next_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/next_motif.gif"></A> <A NAME=tex2html2538 HREF="node49.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node49.html"><IMG ALIGN=MIDDLE ALT="up" SRC="up_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/up_motif.gif"></A> <A NAME=tex2html2542 HREF="node1.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node1.html"><IMG ALIGN=MIDDLE ALT="contents" SRC="contents_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/contents_motif.gif"></A> <A NAME=tex2html2543 HREF="node133.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node133.html"><IMG ALIGN=MIDDLE ALT="index" SRC="index_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/index_motif.gif"></A> <a href="msgs0.htm#3" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#3"><img ALIGN=MIDDLE src="search_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/search_motif.gif" alt="[Search]"></a>   <BR>
<B> Next:</B> <A NAME=tex2html2541 HREF="node52.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node52.html">5.1 C++
  Review</A>
<B>Up:</B> <A NAME=tex2html2539 HREF="node49.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node49.html">Part II: Tools</A>
<B> Previous:</B> <A NAME=tex2html2533 HREF="node50.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node50.html"> Part II: Tools</A>
<BR><HR><P>
<H1><A NAME=SECTION03200000000000000000>5 Compositional C++
 </A></H1>
<P>
<A NAME=chapccpp>&#160;</A>
<P>
In this chapter, we describe Compositional C++
  (CC++
 ), a small set
<A NAME=7919>&#160;</A>
of extensions to C++
  for parallel programming.  CC++
  provides
constructs for specifying concurrent execution, for managing locality,
and for communication. It allows parallel programs to be developed
from simpler components using sequential, parallel, and concurrent
composition.  Hence, algorithms designed using the techniques
described in Part I can be translated into CC++
  programs in a
straightforward manner.
<P>
Since the CC++
  extensions are simple, we are able in this chapter to
provide both a complete language description and a tutorial
introduction to important programming techniques.  We also provide a
brief review of those C++
  constructs used in this chapter, so as to
make the presentation intelligible to readers familiar with C but not
C++
 . In the process, we show how the language is used to implement
various algorithms developed in Part I.
<P>
After studying this chapter, you should be able to write simple
CC++
  programs.  You should know how to create tasks; how to implement
structured, unstructured, and asynchronous communication patterns; and
how to control the mapping of tasks to processors.  You should also
know both how to write deterministic programs and when it is useful to
introduce nondeterministic constructs.  Finally, you should understand
how CC++
  supports the development of modular programs, and you
should know how to specify both sequential and parallel composition.
<P>

<HR>
<UL> 
<LI> <A NAME=tex2html2544 HREF="node52.html#SECTION03210000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node52.html#SECTION03210000000000000000">5.1 C++
  Review</A>
<LI> <A NAME=tex2html2545 HREF="node53.html#SECTION03220000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node53.html#SECTION03220000000000000000">5.2 CC++
  Introduction</A>
<LI> <A NAME=tex2html2546 HREF="node54.html#SECTION03230000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node54.html#SECTION03230000000000000000">5.3 Concurrency</A>
<LI> <A NAME=tex2html2547 HREF="node55.html#SECTION03240000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node55.html#SECTION03240000000000000000">5.4 Locality</A>
<LI> <A NAME=tex2html2548 HREF="node56.html#SECTION03250000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node56.html#SECTION03250000000000000000">5.5 Communication</A>
<LI> <A NAME=tex2html2549 HREF="node57.html#SECTION03260000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node57.html#SECTION03260000000000000000">5.6 Asynchronous Communication</A>
<LI> <A NAME=tex2html2550 HREF="node58.html#SECTION03270000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node58.html#SECTION03270000000000000000">5.7 Determinism</A>
<LI> <A NAME=tex2html2551 HREF="node59.html#SECTION03280000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node59.html#SECTION03280000000000000000">5.8 Mapping</A>
<LI> <A NAME=tex2html2552 HREF="node60.html#SECTION03290000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node60.html#SECTION03290000000000000000">5.9 Modularity</A>
<LI> <A NAME=tex2html2553 HREF="node61.html#SECTION032100000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node61.html#SECTION032100000000000000000">5.10 Performance Issues</A>
<LI> <A NAME=tex2html2554 HREF="node62.html#SECTION032110000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node62.html#SECTION032110000000000000000">5.11 Case Study: Channel Library</A>
<LI> <A NAME=tex2html2555 HREF="node63.html#SECTION032120000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node63.html#SECTION032120000000000000000">5.12 Case Study: Fock Matrix Construction</A>
<LI> <A NAME=tex2html2556 HREF="node64.html#SECTION032130000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node64.html#SECTION032130000000000000000">5.13 Summary</A>
<LI> <A NAME=tex2html2557 HREF="node65.html#SECTION032140000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node65.html#SECTION032140000000000000000"> Exercises</A>
<LI> <A NAME=tex2html2558 HREF="node66.html#SECTION032150000000000000000" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node66.html#SECTION032150000000000000000"> Chapter Notes</A>
</UL>
<BR> <HR><a href="msgs0.htm#2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#2"><img ALIGN=MIDDLE src="asm_color_tiny.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/asm_color_tiny.gif" alt="[DBPP]"></a>    <A NAME=tex2html2532 HREF="node50.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node50.html"><IMG ALIGN=MIDDLE ALT="previous" SRC="previous_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/previous_motif.gif"></A> <A NAME=tex2html2540 HREF="node52.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node52.html"><IMG ALIGN=MIDDLE ALT="next" SRC="next_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/next_motif.gif"></A> <A NAME=tex2html2538 HREF="node49.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node49.html"><IMG ALIGN=MIDDLE ALT="up" SRC="up_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/up_motif.gif"></A> <A NAME=tex2html2542 HREF="node1.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node1.html"><IMG ALIGN=MIDDLE ALT="contents" SRC="contents_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/contents_motif.gif"></A> <A NAME=tex2html2543 HREF="node133.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node133.html"><IMG ALIGN=MIDDLE ALT="index" SRC="index_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/index_motif.gif"></A> <a href="msgs0.htm#3" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#3"><img ALIGN=MIDDLE src="search_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/search_motif.gif" alt="[Search]"></a>   <BR>
<B> Next:</B> <A NAME=tex2html2541 HREF="node52.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node52.html">5.1 C++
  Review</A>
<B>Up:</B> <A NAME=tex2html2539 HREF="node49.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node49.html">Part II: Tools</A>
<B> Previous:</B> <A NAME=tex2html2533 HREF="node50.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node50.html"> Part II: Tools</A>
<BR><HR><P>
<P><ADDRESS>
<I>&#169 Copyright 1995 by <A href="msgs0.htm#6" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#6">Ian Foster</a></I>
</ADDRESS>
</BODY>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -