File: Design_Patterns.htm

package info (click to toggle)
tbb 4.2~20140122-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,492 kB
  • ctags: 21,278
  • sloc: cpp: 92,813; ansic: 9,775; asm: 1,070; makefile: 1,057; sh: 351; java: 226; objc: 98; pascal: 71; xml: 41
file content (149 lines) | stat: -rwxr-xr-x 6,770 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Design Patterns">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/title.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Agglomeration.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Elementwise.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Odd-Even_Communication.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Wavefront.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Reduction.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Divide_and_Conquer.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/GUI_Thread.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Non-Preemptive_Priorities.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Local_Serializer.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Fenced_Data_Transfer.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Lazy_Initialization.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Reference_Counting.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/Compare_and_Swap_Loop.htm">
<meta name="DC.Relation" scheme="URI" content="../../tbb_userguide/Design_Patterns/General_References.htm">
<meta name="DC.Relation" scheme="URI" content="../Lambda_Expressions.htm#tutorial_Lambda_Expressions">
<meta name="DC.Relation" scheme="URI" content="General_References.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="Introduction">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>Design Patterns</title>
<xml>
<MSHelp:Attr Name="DocSet" Value="Intel"></MSHelp:Attr>
<MSHelp:Attr Name="Locale" Value="kbEnglish"></MSHelp:Attr>
<MSHelp:Attr Name="TopicType" Value="kbReference"></MSHelp:Attr>
</xml>
</head>
<body id="Introduction">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(2);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="Introduction"><!-- --></a>

 
  <h1 class="topictitle1">Design Patterns</h1>
 
   
  <div> 
	 <p>This section provides some common parallel programming patterns and how
		to implement them in Intel&reg; Threading Building Blocks (Intel&reg; TBB). 
	 </p>
 
	 <p>The description of each pattern has the following format: 
	 </p>
 
	 <ul type="disc"> 
		<li> 
		  <p><strong>Problem</strong> – describes the problem to be solved. 
		  </p>
 
		</li>
 
		<li> 
		  <p><strong>Context</strong> – describes contexts in which the problem arises. 
		  </p>
 
		</li>
 
		<li> 
		  <p><strong>Forces</strong> . considerations that drive use of the pattern. 
		  </p>
 
		</li>
 
		<li> 
		  <p><strong>Solution</strong> . describes how to implement the pattern. 
		  </p>
 
		</li>
 
		<li> 
		  <p><strong>Example</strong> – presents an example implementation. 
		  </p>
 
		</li>
 
	 </ul>
 
	 <p>Variations and examples are sometimes discussed. The code examples are
		intended to emphasize key points and are not full-fledged code. Examples may
		omit obvious const overloads of non-const methods. 
	 </p>
 
	 <p>Much of the nomenclature and examples are adapted from Web pages created
		by Eun-Gyu and Marc Snir, and the Berkeley parallel patterns wiki. See links in
		the General References section. 
	 </p>
 
	 <p>For brevity, some of the code examples use C++11 lambda expressions. It
		is straightforward, albeit sometimes tedious, to translate such lambda
		expressions into equivalent C++98 code. 
	 </p>
 
  </div>
 
  
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../tbb_userguide/title.htm">Intel&reg; Threading Building Blocks (Intel&reg; TBB) User Guide</a></div>
</div>
<div class="See Also">
<ul class="ullinks">
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Agglomeration.htm">Agglomeration</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Elementwise.htm">Elementwise</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Odd-Even_Communication.htm">Odd-Even Communication</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Wavefront.htm">Wavefront</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Reduction.htm">Reduction</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Divide_and_Conquer.htm">Divide and Conquer</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/GUI_Thread.htm">GUI Thread</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Non-Preemptive_Priorities.htm">Non-Preemptive Priorities</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Local_Serializer.htm">Local Serializer</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Fenced_Data_Transfer.htm">Fenced Data Transfer</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Lazy_Initialization.htm">Lazy Initialization</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Reference_Counting.htm">Reference Counting</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/Compare_and_Swap_Loop.htm">Compare and Swap Loop</a><br>
</li>
<li class="ulchildlink"><a href="../../tbb_userguide/Design_Patterns/General_References.htm">General References</a><br>
</li>
</ul>

<h2>See Also</h2>
<div class="linklist">
<div><a href="../Lambda_Expressions.htm#tutorial_Lambda_Expressions">Lambda Expressions 
		  </a></div>
<div><a href="General_References.htm">General References 
		  </a></div></div>
</div> 

</body>
</html>