aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/doc/xml/manual/parallel_mode.xml
blob: 4236f63c8b17e5ce091abd40ca1c6f043d80effc (plain)
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
<?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" 
[ ]>

<chapter id="manual.ext.parallel_mode" xreflabel="Parallel Mode">
<?dbhtml filename="parallel_mode.html"?>
 
<chapterinfo>
  <keywordset>
    <keyword>
      C++
    </keyword>
    <keyword>
      library
    </keyword>
    <keyword>
      parallel
    </keyword>
  </keywordset>
</chapterinfo>

<title>Parallel Mode</title>

<para> The libstdc++ parallel mode is an experimental parallel
implementation of many algorithms the C++ Standard Library.
</para>

<para>
Several of the standard algorithms, for instance
<code>std::sort</code>, are made parallel using OpenMP
annotations. These parallel mode constructs and can be invoked by
explicit source declaration or by compiling existing sources with a
specific compiler flag.
</para>


<sect1 id="manual.ext.parallel_mode.intro" xreflabel="Intro">
  <title>Intro</title>

<para>The following library components in the include
<code>&lt;numeric&gt;</code> are included in the parallel mode:</para>
<itemizedlist>
  <listitem><para><code>std::accumulate</code></para></listitem>
  <listitem><para><code>std::adjacent_difference</code></para></listitem>
  <listitem><para><code>std::inner_product</code></para></listitem>
  <listitem><para><code>std::partial_sum</code></para></listitem>
</itemizedlist>

<para>The following library components in the include
<code>&lt;algorithm&gt;</code> are included in the parallel mode:</para>
<itemizedlist>
  <listitem><para><code>std::adjacent_find</code></para></listitem>
  <listitem><para><code>std::count</code></para></listitem>
  <listitem><para><code>std::count_if</code></para></listitem>
  <listitem><para><code>std::equal</code></para></listitem>
  <listitem><para><code>std::find</code></para></listitem>
  <listitem><para><code>std::find_if</code></para></listitem>
  <listitem><para><code>std::find_first_of</code></para></listitem>
  <listitem><para><code>std::for_each</code></para></listitem>
  <listitem><para><code>std::generate</code></para></listitem>
  <listitem><para><code>std::generate_n</code></para></listitem>
  <listitem><para><code>std::lexicographical_compare</code></para></listitem>
  <listitem><para><code>std::mismatch</code></para></listitem>
  <listitem><para><code>std::search</code></para></listitem>
  <listitem><para><code>std::search_n</code></para></listitem>
  <listitem><para><code>std::transform</code></para></listitem>
  <listitem><para><code>std::replace</code></para></listitem>
  <listitem><para><code>std::replace_if</code></para></listitem>
  <listitem><para><code>std::max_element</code></para></listitem>
  <listitem><para><code>std::merge</code></para></listitem>
  <listitem><para><code>std::min_element</code></para></listitem>
  <listitem><para><code>std::nth_element</code></para></listitem>
  <listitem><para><code>std::partial_sort</code></para></listitem>
  <listitem><para><code>std::partition</code></para></listitem>
  <listitem><para><code>std::random_shuffle</code></para></listitem>
  <listitem><para><code>std::set_union</code></para></listitem>
  <listitem><para><code>std::set_intersection</code></para></listitem>
  <listitem><para><code>std::set_symmetric_difference</code></para></listitem>
  <listitem><para><code>std::set_difference</code></para></listitem>
  <listitem><para><code>std::sort</code></para></listitem>
  <listitem><para><code>std::stable_sort</code></para></listitem>
  <listitem><para><code>std::unique_copy</code></para></listitem>
</itemizedlist>

<para>The following library components in the includes
<code>&lt;set&gt;</code> and <code>&lt;map&gt;</code> are included in the parallel mode:</para>
<itemizedlist>
  <listitem><para><code>std::(multi_)map/set&lt;T&gt;::(multi_)map/set(Iterator begin, Iterator end)</code> (bulk construction)</para></listitem>
  <listitem><para><code>std::(multi_)map/set&lt;T&gt;::insert(Iterator begin, Iterator end)</code> (bulk insertion)</para></listitem>
</itemizedlist>

</sect1>

<sect1 id="manual.ext.parallel_mode.semantics" xreflabel="Semantics">
  <title>Semantics</title>

<para> The parallel mode STL algorithms are currently not exception-safe,
i. e. user-defined functors must not throw exceptions.
</para>

<para> Since the current GCC OpenMP implementation does not support
OpenMP parallel regions in concurrent threads,
it is not possible to call parallel STL algorithm in
concurrent threads, either.
It might work with other compilers, though.</para>

</sect1>

<sect1 id="manual.ext.parallel_mode.using" xreflabel="Using">
  <title>Using</title>

<sect2 id="parallel_mode.using.parallel_mode" xreflabel="using.parallel_mode">
  <title>Using Parallel Mode</title>

<para>To use the libstdc++ parallel mode, compile your application with
  the compiler flag <code>-D_GLIBCXX_PARALLEL -fopenmp</code>. This
  will link in <code>libgomp</code>, the GNU OpenMP <ulink url="http://gcc.gnu.org/onlinedocs/libgomp">implementation</ulink>,
  whose presence is mandatory. In addition, hardware capable of atomic
  operations is mandatory. Actually activating these atomic
  operations may require explicit compiler flags on some targets
  (like sparc and x86), such as <code>-march=i686</code>,
  <code>-march=native</code> or <code>-mcpu=v9</code>.
</para>

<para>Note that the <code>_GLIBCXX_PARALLEL</code> define may change the
  sizes and behavior of standard class templates such as
  <code>std::search</code>, and therefore one can only link code
  compiled with parallel mode and code compiled without parallel mode
  if no instantiation of a container is passed between the two
  translation units. Parallel mode functionality has distinct linkage,
  and cannot be confused with normal mode symbols.</para>
</sect2>

<sect2 id="manual.ext.parallel_mode.usings" xreflabel="using.specific">
  <title>Using Specific Parallel Components</title>

<para>When it is not feasible to recompile your entire application, or
  only specific algorithms need to be parallel-aware, individual
  parallel algorithms can be made available explicitly. These
  parallel algorithms are functionally equivalent to the standard
  drop-in algorithms used in parallel mode, but they are available in
  a separate namespace as GNU extensions and may be used in programs
  compiled with either release mode or with parallel mode. The
  following table provides the names and headers of the parallel
  algorithms:
</para>

<table frame='all'>
<title>Parallel Algorithms</title>
<tgroup cols='4' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'></colspec>
<colspec colname='c2'></colspec>
<colspec colname='c3'></colspec>
<colspec colname='c4'></colspec>

<thead>
  <row>
    <entry>Algorithm</entry>
    <entry>Header</entry>
    <entry>Parallel algorithm</entry>
    <entry>Parallel header</entry>
  </row>
</thead>

<tbody>
  <row>
    <entry><function>std::accumulate</function></entry>
    <entry><filename class="headerfile">numeric</filename></entry>
    <entry><function>__gnu_parallel::accumulate</function></entry>
    <entry><filename class="headerfile">parallel/numeric</filename></entry>
  </row>
  <row>
    <entry><function>std::adjacent_difference</function></entry>
    <entry><filename class="headerfile">numeric</filename></entry>
    <entry><function>__gnu_parallel::adjacent_difference</function></entry>
    <entry><filename class="headerfile">parallel/numeric</filename></entry>
  </row>
  <row>
    <entry><function>std::inner_product</function></entry>
    <entry><filename class="headerfile">numeric</filename></entry>
    <entry><function>__gnu_parallel::inner_product</function></entry>
    <entry><filename class="headerfile">parallel/numeric</filename></entry>
  </row>
  <row>
    <entry><function>std::partial_sum</function></entry>
    <entry><filename class="headerfile">numeric</filename></entry>
    <entry><function>__gnu_parallel::partial_sum</function></entry>
    <entry><filename class="headerfile">parallel/numeric</filename></entry>
  </row>
  <row>
    <entry><function>std::adjacent_find</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::adjacent_find</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::count</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::count</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::count_if</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::count_if</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::equal</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::equal</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::find</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::find</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::find_if</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::find_if</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::find_first_of</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::find_first_of</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::for_each</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::for_each</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::generate</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::generate</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::generate_n</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::generate_n</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::lexicographical_compare</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::lexicographical_compare</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::mismatch</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::mismatch</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::search</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::search</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::search_n</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::search_n</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::transform</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::transform</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::replace</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::replace</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::replace_if</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::replace_if</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::max_element</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::max_element</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::merge</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::merge</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::min_element</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::min_element</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::nth_element</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::nth_element</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::partial_sort</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::partial_sort</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::partition</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::partition</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::random_shuffle</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::random_shuffle</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::set_union</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::set_union</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::set_intersection</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::set_intersection</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::set_symmetric_difference</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::set_symmetric_difference</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::set_difference</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::set_difference</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::sort</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::sort</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::stable_sort</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::stable_sort</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>

  <row>
    <entry><function>std::unique_copy</function></entry>
    <entry><filename class="headerfile">algorithm</filename></entry>
    <entry><function>__gnu_parallel::unique_copy</function></entry>
    <entry><filename class="headerfile">parallel/algorithm</filename></entry>
  </row>
</tbody>
</tgroup>
</table>

</sect2>

</sect1>

<sect1 id="manual.ext.parallel_mode.design" xreflabel="Design">
  <title>Design</title>
  <para>
  </para>
<sect2 id="manual.ext.parallel_mode.design.intro" xreflabel="Intro">
  <title>Interface Basics</title>


<para>All parallel algorithms are intended to have signatures that are
equivalent to the ISO C++ algorithms replaced. For instance, the
<code>std::adjacent_find</code> function is declared as:
</para>
<programlisting>
namespace std
{
  template&lt;typename _FIter&gt;
    _FIter
    adjacent_find(_FIter, _FIter);
}
</programlisting>

<para>
Which means that there should be something equivalent for the parallel
version. Indeed, this is the case:
</para>

<programlisting>
namespace std
{
  namespace __parallel
  {
    template&lt;typename _FIter&gt;
      _FIter
      adjacent_find(_FIter, _FIter);

    ...
  }
}
</programlisting>

<para>But.... why the elipses?
</para>

<para> The elipses in the example above represent additional overloads
required for the parallel version of the function. These additional
overloads are used to dispatch calls from the ISO C++ function
signature to the appropriate parallel function (or sequential
function, if no parallel functions are deemed worthy), based on either
compile-time or run-time conditions.
</para>

<para> Compile-time conditions are referred to as "embarrassingly
parallel," and are denoted with the appropriate dispatch object, ie
one of <code>__gnu_parallel::sequential_tag</code>,
<code>__gnu_parallel::parallel_tag</code>,
<code>__gnu_parallel::balanced_tag</code>,
<code>__gnu_parallel::unbalanced_tag</code>,
<code>__gnu_parallel::omp_loop_tag</code>, or
<code>__gnu_parallel::omp_loop_static_tag</code>.
</para>

<para> Run-time conditions depend on the hardware being used, the number
of threads available, etc., and are denoted by the use of the enum
<code>__gnu_parallel::parallelism</code>. Values of this enum include
<code>__gnu_parallel::sequential</code>,
<code>__gnu_parallel::parallel_unbalanced</code>,
<code>__gnu_parallel::parallel_balanced</code>,
<code>__gnu_parallel::parallel_omp_loop</code>,
<code>__gnu_parallel::parallel_omp_loop_static</code>, or
<code>__gnu_parallel::parallel_taskqueue</code>.
</para>

<para> Putting all this together, the general view of overloads for the
parallel algorithms look like this:
</para>
<itemizedlist>
   <listitem><para>ISO C++ signature</para></listitem>
   <listitem><para>ISO C++ signature + sequential_tag argument</para></listitem>
   <listitem><para>ISO C++ signature + parallelism argument</para></listitem>
</itemizedlist>

<para> Please note that the implementation may use additional functions
(designated with the <code>_switch</code> suffix) to dispatch from the
ISO C++ signature to the correct parallel version. Also, some of the
algorithms do not have support for run-time conditions, so the last
overload is therefore missing.
</para>


</sect2>

<sect2 id="manual.ext.parallel_mode.design.tuning" xreflabel="Tuning">
  <title>Configuration and Tuning</title>

<para> Some algorithm variants can be enabled/disabled/selected at compile-time.
See <ulink url="latest-doxygen/compiletime__settings_8h.html">
<code>&lt;compiletime_settings.h&gt;</code></ulink> and
See <ulink url="latest-doxygen/compiletime__settings_8h.html">
<code>&lt;features.h&gt;</code></ulink> for details.
</para>

<para>
To specify the number of threads to be used for an algorithm,
use <code>omp_set_num_threads</code>.
To force a function to execute sequentially,
even though parallelism is switched on in general,
add <code>__gnu_parallel::sequential_tag()</code>
to the end of the argument list.
</para>

<para>
Parallelism always incurs some overhead. Thus, it is not
helpful to parallelize operations on very small sets of data.
There are measures to avoid parallelizing stuff that is not worth it.
For each algorithm, a minimum problem size can be stated,
usually using the variable
<code>__gnu_parallel::Settings::[algorithm]_minimal_n</code>.
Please see <ulink url="latest-doxygen/settings_8h.html">
<code>&lt;settings.h&gt;</code></ulink> for details.</para>


</sect2>

<sect2 id="manual.ext.parallel_mode.design.impl" xreflabel="Impl">
  <title>Implementation Namespaces</title>

<para> One namespace contain versions of code that are explicitly sequential:
<code>__gnu_serial</code>.
</para>

<para> Two namespaces contain the parallel mode:
<code>std::__parallel</code> and <code>__gnu_parallel</code>. 
</para>

<para> Parallel implementations of standard components, including
template helpers to select parallelism, are defined in <code>namespace
std::__parallel</code>. For instance, <code>std::transform</code> from
&lt;algorithm&gt; has a parallel counterpart in
<code>std::__parallel::transform</code> from
&lt;parallel/algorithm&gt;. In addition, these parallel
implementations are injected into <code>namespace
__gnu_parallel</code> with using declarations.
</para>

<para> Support and general infrastructure is in <code>namespace
__gnu_parallel</code>.
</para>

<para> More information, and an organized index of types and functions
related to the parallel mode on a per-namespace basis, can be found in
the generated source documentation.
</para>

</sect2>

</sect1>

<sect1 id="manual.ext.parallel_mode.test" xreflabel="Testing">
  <title>Testing</title>

  <para> 
    Both the normal conformance and regression tests and the
    supplemental performance tests work.
  </para>

  <para> 
    To run the conformance and regression tests with the parallel mode
    active,
  </para>

  <screen>
  <userinput>make check-parallel</userinput>
  </screen>
  
  <para>
    The log and summary files for conformance testing are in the
    <code>testsuite/parallel</code> directory.
  </para>

  <para> 
    To run the performance tests with the parallel mode active,
  </para>

  <screen>
  <userinput>check-performance-parallel</userinput>
  </screen>

  <para>
    The result file for performance testing are in the
    <code>testsuite</code> directory, in the file
    <code>libstdc++_performance.sum</code>. In addition, the
    policy-based containers have their own visualizations, which have
    additional software dependencies than the usual bare-boned text
    file, and can be generated by using the <code>make
    doc-performance</code> rule in the testsuite's Makefile.
</para>
</sect1>

<bibliography id="parallel_mode.biblio" xreflabel="parallel_mode.biblio">
<title>Bibliography</title>

  <biblioentry>
    <title>
      Parallelization of Bulk Operations for STL Dictionaries
    </title>

    <author>
      <firstname>Johannes</firstname>
      <surname>Singler</surname>
    </author>
    <author>
      <firstname>Leonor</firstname>
      <surname>Frias</surname>
    </author>

    <copyright>
      <year>2007</year>
      <holder></holder>
    </copyright>

    <publisher>
      <publishername>
	Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
      </publishername>
    </publisher>
  </biblioentry> 

  <biblioentry>
    <title>
      The Multi-Core Standard Template Library
    </title>

    <author>
      <firstname>Johannes</firstname>
      <surname>Singler</surname>
    </author>
    <author>
      <firstname>Peter</firstname>
      <surname>Sanders</surname>
    </author>
    <author>
      <firstname>Felix</firstname>
      <surname>Putze</surname>
    </author>

    <copyright>
      <year>2007</year>
      <holder></holder>
    </copyright>

    <publisher>
      <publishername>
	 Euro-Par 2007: Parallel Processing. (LNCS 4641)
      </publishername>
    </publisher>
  </biblioentry> 

</bibliography>

</chapter>