File: namespaces.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 (287 lines) | stat: -rwxr-xr-x 9,622 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!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="Namespaces">
<meta name="DC.subject" content="Namespaces, tbb, tbb::interface, tbb::interfacex, tbb::internal, tbb::deprecated, tbb::strict_ppl, TBB_DEPRECATED">
<meta name="keywords" content="Namespaces, tbb, tbb::interface, tbb::interfacex, tbb::internal, tbb::deprecated, tbb::strict_ppl, TBB_DEPRECATED">
<meta name="DC.Relation" scheme="URI" content="../../reference/general_conventions.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="namespaces">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>Namespaces</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="namespaces">
 <!-- ==============(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="namespaces"><!-- --></a>

 
  <h1 class="topictitle1">Namespaces</h1>
 
   
  <div> 
	 <p>This section describes the library's namespace conventions. 
	 </p>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb</samp> Namespace</h2> 
		 
		<p>Namespace 
		  <samp class="codeph">tbb</samp> contains public identifiers defined by the library
		  that you can reference in your program. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb::flow</samp>
		  Namespace</h2> 
		 
		<p>Namespace 
		  <samp class="codeph">tbb::flow</samp> contains public identifiers defined by the
		  library that you can reference in your program. 
		</p>
 
		<p> related to the flow graph Community Preview Feature. See 
		  <a href="../flow_graph.htm#flow_graph">Flow Graph</a> for more information . 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb::interface<em>x</em></samp>
		  Namespace</h2> 
		 
		<p>Namespaces of the form 
		  <samp class="codeph">tbb::interface<em>x</em></samp> define public identifiers that
		  the library injects into namespace 
		  <samp class="codeph">tbb</samp>. The numeral 
		  <samp class="codeph"><em>x</em></samp> corresponds to an internal version number
		  that serves to prevent accidental linkage of incompatible definitions. Your
		  code should never directly reference namespaces prefixed with 
		  <samp class="codeph">tbb::interface<em>x</em></samp>. Instead, reference names via
		  namespace 
		  <samp class="codeph">tbb</samp>. 
		</p>
 
		<p>For example the header 
		  <samp class="codeph">tbb/concurrent_hash_map.h</samp> defines the template 
		  <samp class="codeph">concurrent_hashmap&lt;Key,T&gt;</samp> as 
		  <samp class="codeph">tbb::version4::concurrent_hashmap&lt;Key,T&gt;</samp> and
		  employs a 
		  <samp class="codeph">using</samp> directive to inject it into namespace 
		  <samp class="codeph">tbb</samp>. Your source code should reference it as 
		  <samp class="codeph">tbb::concurrent_hashmap&lt;Key,T&gt;</samp>. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb::internal</samp>
		  Namespace</h2> 
		 
		<p>Namespace 
		  <samp class="codeph">tbb::internal</samp> serves a role similar to 
		  <samp class="codeph">tbb::interface<em>x</em></samp>. It is retained for backwards
		  compatibility with older versions of the library. Your code should never
		  directly reference namespace 
		  <samp class="codeph">tbb::internal</samp>. Indirect reference via a public 
		  <samp class="codeph">typedef</samp> provided by the header files is permitted. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb::deprecated</samp>
		  Namespace</h2> 
		 
		<p>The library uses the namespace 
		  <samp class="codeph">tbb::deprecated</samp> for deprecated identifiers that have
		  different default meanings in namespace 
		  <samp class="codeph">tbb</samp>. Compiling with 
		  <samp class="codeph">TBB_DEPRECATED=1</samp> causes such identifiers to replace
		  their counterpart in namespace tbb. 
		</p>
 
		<p>For example, 
		  <samp class="codeph">tbb::concurrent_queue</samp> underwent changes in
          Intel&reg; Threading Building Blocks (Intel&reg; TBB) 2.2
		  that split its functionality into 
		  <samp class="codeph">tbb::concurrent_queue</samp> and 
		  <samp class="codeph">tbb::concurrent_bounded_queue</samp> and changed the name of
		  some methods. For sake of legacy code, the old Intel&reg; TBB 2.1
		  functionality is retained in 
		  <samp class="codeph">tbb::deprecated::concurrent_queue</samp>, which is injected
		  into namespace tbb when compiled with 
		  <samp class="codeph">TBB_DEPRECATED=1</samp>. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">tbb::strict_ppl</samp>
		  Namespace</h2> 
		 
		<p>The library uses the namespace 
		  <samp class="codeph">tbb::strict_ppl</samp> for identifiers that are put in
		  namespace 
		  <samp class="codeph">Concurrency</samp> when<samp class="codeph"> tbb/compat/ppl.h</samp> is
		  included. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle"><samp class="codeph">std</samp> Namespace</h2> 
		 
		<p>The library implements some C++11 features in
		  namespace 
		  <samp class="codeph">std</samp>. The library version can be used by including the
		  corresponding header in the following table.
		</p>
 
		
<div class="tablenoborder"><a name="tbl3"><!-- --></a><table cellpadding="4" summary="" id="tbl3" width="100%" frame="hsides" border="1" rules="all"><caption><span class="tablecap">C++11 Features Optonally Defined
		  by Intel&reg; TBB.</span></caption> 
		   
		   
		   
		  <thead align="left"> 
			 <tr> 
				<th class="cellrowborder" valign="top" width="NaN%" id="d89183e256"> 
				  <p><strong>Header</strong> 
				  </p>
 
				</th>
 
				<th class="cellrowborder" valign="top" width="NaN%" id="d89183e264"> 
				  <p><strong>Identifiers Added to 
						<samp class="codeph">std::</samp></strong> 
				  </p>
 
				</th>
 
				<th class="row-nocellborder" valign="top" width="NaN%" id="d89183e274"> 
				  <p><strong>Section</strong> 
				  </p>
 
				</th>
 
			 </tr>
 
		  </thead>

		  <tbody> 
			 <tr> 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d89183e256 "> 
				  <p>tbb/compat/condition_variable 
				  </p>
 
				</td>
 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d89183e264 "> 
				  <p><samp class="codeph">defer_lock_t</samp> 
				  </p>
 
				  <p><samp class="codeph">try_to_lock_t</samp> 
				  </p>
 
				  <p><samp class="codeph">adopt_lock_t</samp> 
				  </p>
 
				  <p><samp class="codeph">defer_lock</samp> 
				  </p>
 
				  <p><samp class="codeph">try_to_lock</samp> 
				  </p>
 
				  <p><samp class="codeph">adopt_lock</samp> 
				  </p>
 
				  <p><samp class="codeph">lock_guard</samp> 
				  </p>
 
				  <p><samp class="codeph">unique_lock</samp> 
				  </p>
 
				  <p><samp class="codeph">swap</samp> 
				  </p>
 
				  <p><samp class="codeph">condition_variable</samp> 
				  </p>
 
				  <p><samp class="codeph">cv_status</samp> 
				  </p>
 
				  <p><samp class="codeph">timeout</samp> 
				  </p>
 
				  <p><samp class="codeph">no_timeout</samp> 
				  </p>
 
				</td>
 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d89183e274 "> 
				  <p><a href="../synchronization/c_11_synchronization.htm">C++11
						Synchronization</a> 
				  </p>
 
				</td>
 
			 </tr>
 
			 <tr> 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d89183e256 "> 
				  <p>tbb/compat/thread 
				  </p>
 
				</td>
 
				<td class="cellrowborder" valign="top" width="NaN%" headers="d89183e264 "> 
				  <p><samp class="codeph">thread</samp> 
				  </p>
 
				  <p><samp class="codeph">this_thread</samp> 
				  </p>
 
				</td>
 
				<td class="row-nocellborder" valign="top" width="NaN%" headers="d89183e274 "> 
				  <p> 
					 <a href="../threads/thread_cls.htm"><samp class="codeph">thread</samp>
						Class</a> 
				  </p>
 
				</td>
 
			 </tr>
 
		  </tbody>
 
		</table>
</div>
 
		<p>To prevent accidental linkage with other
		  implementations of these C++ library features, the library defines the
		  identifiers in other namespaces and injects them into namespace 
		  <samp class="codeph">std::</samp>.&nbsp; This way the “mangled
		  name” seen by the linker will differ from the “mangled
		  name” generated by other implementations. 
		</p>
 
	 </div>
 
  </div>
 

<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../reference/general_conventions.htm">General Conventions</a></div>
</div>
<div></div>

</body>
</html>