[tbb] 17/64: Imported Upstream version 2.2+r009

Graham Inggs ginggs at moszumanska.debian.org
Mon Jul 3 12:27:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

ginggs pushed a commit to branch master
in repository tbb.

commit f890d13c9e810aa8801d07cede0428677f1ef1f9
Author: Graham Inggs <ginggs at debian.org>
Date:   Mon Jul 3 14:13:34 2017 +0200

    Imported Upstream version 2.2+r009
---
 CHANGES                                            |   48 +
 build/FreeBSD.gcc.inc                              |    1 -
 build/Makefile.rml                                 |    9 +-
 build/Makefile.tbb                                 |   12 +-
 build/Makefile.tbbmalloc                           |   59 +-
 build/Makefile.test                                |  293 +++--
 build/codecov.txt                                  |    3 +
 build/common.inc                                   |    3 +-
 build/common_rules.inc                             |   22 +-
 build/linux.gcc.inc                                |    5 +
 build/linux.icc.inc                                |    2 +-
 build/macos.gcc.inc                                |    6 +
 build/macos.icc.inc                                |    2 +-
 build/vsproject/tbb.vcproj                         | 1060 ++++-----------
 build/vsproject/tbbmalloc.vcproj                   |  968 ++++----------
 build/vsproject/tbbmalloc_proxy.vcproj             |  513 ++------
 build/windows.icl.inc                              |    2 +-
 build/windows.inc                                  |    2 +-
 doc/Release_Notes.txt                              |   22 +-
 doc/html/a00012.html                               |    6 +-
 doc/html/a00013.html                               |    3 +-
 doc/html/{a00098.html => a00031.html}              |    9 +-
 doc/html/a00032.html                               |   38 +
 doc/html/{a00047.html => a00033.html}              |   12 +-
 doc/html/a00034.html                               |   40 +
 doc/html/a00035.html                               |    6 +-
 doc/html/a00036.html                               |    4 +-
 doc/html/a00038.html                               |   12 +-
 doc/html/a00039.html                               |   10 +-
 doc/html/a00045.html                               |   16 +-
 doc/html/a00046.html                               |   24 +-
 doc/html/a00047.html                               |   14 +-
 doc/html/a00048.html                               |   14 +-
 doc/html/a00049.html                               |   16 +-
 doc/html/a00050.html                               |   18 +-
 doc/html/a00051.html                               |   20 +-
 doc/html/a00052.html                               |   16 +-
 doc/html/a00053.html                               |   36 +-
 doc/html/a00055.html                               |    8 +-
 doc/html/a00057.html                               |   20 +-
 doc/html/a00058.html                               |   16 +-
 doc/html/a00059.html                               |   22 +-
 doc/html/a00060.html                               |   18 +-
 doc/html/a00061.html                               |   36 +-
 doc/html/a00063.html                               |  114 +-
 doc/html/a00064.html                               |  108 +-
 doc/html/a00065.html                               |   16 +-
 doc/html/a00073.html                               |   20 +-
 doc/html/a00075.html                               |   44 +-
 doc/html/a00077.html                               |    8 +-
 doc/html/a00079.html                               |   26 +-
 doc/html/a00081.html                               |   10 +-
 doc/html/a00084.html                               |   13 +-
 doc/html/a00085.html                               |    7 +-
 doc/html/a00086.html                               |    1 +
 doc/html/a00087.html                               |   12 +-
 doc/html/a00095.html                               |    4 +-
 doc/html/a00098.html                               |    8 +-
 doc/html/a00099.html                               |   20 +-
 doc/html/a00115.html                               |    6 +-
 doc/html/a00116.html                               |    8 +-
 doc/html/a00117.html                               |    8 +-
 doc/html/a00118.html                               |    6 +-
 doc/html/a00119.html                               |    6 +-
 doc/html/a00120.html                               |    8 +-
 doc/html/a00121.html                               |    6 +-
 doc/html/a00122.html                               |   12 +-
 doc/html/a00123.html                               |   10 +-
 doc/html/a00124.html                               |   10 +-
 doc/html/a00125.html                               |    8 +-
 doc/html/a00126.html                               |    8 +-
 doc/html/a00127.html                               |   40 +-
 doc/html/a00128.html                               |    8 +-
 doc/html/a00129.html                               |    8 +-
 doc/html/a00130.html                               |   43 +-
 doc/html/a00131.html                               |    6 +-
 doc/html/a00132.html                               |    8 +-
 doc/html/a00133.html                               |    6 +-
 doc/html/a00134.html                               |    8 +-
 doc/html/a00135.html                               |    8 +-
 doc/html/a00136.html                               |    8 +-
 doc/html/a00137.html                               |   10 +-
 doc/html/a00138.html                               |    6 +-
 doc/html/a00139.html                               |   10 +-
 doc/html/a00140.html                               |    8 +-
 doc/html/a00141.html                               |   16 +-
 doc/html/a00142.html                               |    8 +-
 doc/html/a00143.html                               |    6 +-
 doc/html/a00144.html                               |   46 +-
 doc/html/a00145.html                               |  111 +-
 doc/html/a00146.html                               |   83 +-
 doc/html/a00147.html                               |   40 +-
 doc/html/a00148.html                               |   54 +-
 doc/html/a00149.html                               |  107 +-
 doc/html/a00150.html                               |   87 +-
 doc/html/a00151.html                               |  128 +-
 doc/html/a00152.html                               |   72 +-
 doc/html/a00153.html                               |   88 +-
 doc/html/a00154.html                               |   91 +-
 doc/html/a00155.html                               |  130 +-
 doc/html/a00156.html                               |   79 +-
 doc/html/a00157.html                               |  110 +-
 doc/html/a00158.html                               |  111 +-
 doc/html/a00159.html                               |  106 +-
 doc/html/a00160.html                               |  129 +-
 doc/html/a00161.html                               |  100 +-
 doc/html/a00162.html                               |  666 +---------
 doc/html/a00163.html                               |  200 +--
 doc/html/a00164.html                               |  137 +-
 doc/html/a00165.html                               |  133 +-
 doc/html/a00166.html                               |  604 ++++++++-
 doc/html/a00167.html                               |  208 ++-
 doc/html/a00168.html                               |  129 +-
 doc/html/a00169.html                               |  124 +-
 doc/html/a00170.html                               |  100 +-
 doc/html/a00171.html                               |   93 +-
 doc/html/a00172.html                               |  144 +-
 doc/html/a00173.html                               |   82 +-
 doc/html/a00174.html                               |   29 +-
 doc/html/a00175.html                               |  111 +-
 doc/html/a00176.html                               |   46 +-
 doc/html/{a00173.html => a00177.html}              |   24 +-
 doc/html/{a00174.html => a00178.html}              |    6 +-
 doc/html/{a00175.html => a00179.html}              |   12 +-
 doc/html/{a00176.html => a00180.html}              |    8 +-
 doc/html/{a00206.html => a00210.html}              |   30 +-
 doc/html/a00224.html                               |  682 ----------
 doc/html/a00228.html                               |  344 -----
 doc/html/a00229.html                               |  673 +++++++++-
 doc/html/a00232.html                               |   41 +-
 doc/html/a00233.html                               |  324 ++++-
 doc/html/a00234.html                               |  900 +------------
 doc/html/{a00230.html => a00235.html}              |   62 +-
 doc/html/{a00231.html => a00236.html}              |   26 +-
 doc/html/{a00232.html => a00237.html}              |    4 +-
 doc/html/{a00233.html => a00238.html}              |   16 +-
 doc/html/{a00234.html => a00239.html}              |  568 ++++----
 doc/html/{a00250.html => a00255.html}              |    0
 doc/html/{a00252.html => a00257.html}              |    2 +-
 doc/html/{a00253.html => a00258.html}              |   36 +-
 doc/html/a00261.html                               |  127 --
 doc/html/a00262.html                               |  113 --
 doc/html/a00266.html                               |  119 +-
 doc/html/a00267.html                               | 1114 +---------------
 doc/html/{a00263.html => a00268.html}              |    2 +-
 doc/html/{a00264.html => a00269.html}              |  153 ++-
 doc/html/{a00266.html => a00271.html}              |    0
 doc/html/a00272.html                               | 1143 ++++++++++++++++
 doc/html/a00277.html                               |  875 ------------
 doc/html/{a00276.html => a00282.html}              |    0
 doc/html/a00283.html                               |  914 +++++++++++++
 doc/html/{a00286.html => a00292.html}              |  771 +++++------
 doc/html/{a00294.html => a00300.html}              |    0
 doc/html/{a00296.html => a00302.html}              |   51 +-
 doc/html/{a00299.html => a00303.html}              |   55 +-
 doc/html/{a00301.html => a00304.html}              |   22 +-
 doc/html/{a00310.html => a00313.html}              |   63 +-
 doc/html/{a00314.html => a00317.html}              |   20 +-
 doc/html/{a00316.html => a00319.html}              |   38 +-
 doc/html/{a00322.html => a00325.html}              |  315 ++---
 doc/html/{a00326.html => a00329.html}              |   22 +-
 doc/html/{a00331.html => a00334.html}              |   16 +-
 doc/html/{a00335.html => a00338.html}              |   36 +-
 doc/html/{a00339.html => a00342.html}              |   22 +-
 doc/html/a00344.html                               |  237 ----
 doc/html/a00345.html                               |  124 --
 doc/html/a00346.html                               |  156 ---
 doc/html/a00347.html                               |  368 +++---
 doc/html/a00348.html                               |  219 +--
 doc/html/a00349.html                               |  232 ++--
 doc/html/a00350.html                               |  349 ++---
 doc/html/a00351.html                               |  743 ++---------
 doc/html/{a00349.html => a00352.html}              |   54 +-
 doc/html/{a00350.html => a00353.html}              |   46 +-
 doc/html/a00354.html                               |  611 +++++++++
 doc/html/a00360.html                               |  242 ----
 doc/html/a00363.html                               |  250 ++++
 doc/html/a00368.html                               |   99 --
 doc/html/a00371.html                               |   89 +-
 doc/html/a00372.html                               |  187 +--
 doc/html/{a00371.html => a00374.html}              |    0
 doc/html/{a00372.html => a00375.html}              |   42 +-
 doc/html/a00377.html                               |  254 ----
 doc/html/a00378.html                               |  604 ---------
 doc/html/{a00376.html => a00379.html}              |  122 +-
 doc/html/{a00369.html => a00380.html}              |   56 +-
 doc/html/a00381.html                               |  283 +++-
 doc/html/a00382.html                               |  722 +++++++---
 doc/html/{a00381.html => a00385.html}              |    0
 doc/html/{a00382.html => a00386.html}              |  111 +-
 doc/html/{a00387.html => a00391.html}              |    0
 doc/html/{a00395.html => a00399.html}              |    0
 doc/html/{a00397.html => a00401.html}              |   52 +-
 doc/html/annotated.html                            |   70 +-
 doc/html/files.html                                |   93 +-
 doc/html/functions.html                            |  224 ++--
 doc/html/functions_enum.html                       |    4 +-
 doc/html/functions_eval.html                       |   12 +-
 doc/html/functions_func.html                       |  195 ++-
 doc/html/functions_rela.html                       |    4 +-
 doc/html/functions_type.html                       |    9 +-
 doc/html/functions_vars.html                       |    4 +-
 doc/html/globals.html                              |   17 +-
 doc/html/globals_func.html                         |   17 +-
 doc/html/hierarchy.html                            |   70 +-
 doc/html/modules.html                              |   12 +-
 doc/html/namespacemembers.html                     |   38 +-
 doc/html/namespacemembers_enum.html                |    4 +-
 doc/html/namespacemembers_eval.html                |    6 +-
 doc/html/namespacemembers_func.html                |   24 +-
 doc/html/namespacemembers_type.html                |    2 +-
 doc/html/namespacemembers_vars.html                |    2 +-
 doc/html/namespaces.html                           |    3 +-
 examples/common/gui/winvideo.h                     |    2 +-
 .../count_strings/count_strings.cpp                |   29 +-
 .../concurrent_hash_map/count_strings/index.html   |    8 +-
 .../parallel_preorder/parallel_preorder.cpp        |    6 +-
 .../parallel_for/game_of_life.NET/Makefile.windows |    2 +-
 examples/parallel_for/game_of_life.NET/src/Board.h |   11 +-
 .../game_of_life.NET/src/Evolution.cpp             |    7 +-
 .../parallel_for/game_of_life.NET/src/Evolution.h  |    3 +
 .../game_of_life.NET/src/Game_of_life.cpp          |   27 +-
 .../game_of_life.NET/vc8/Game_of_life.sln          |   12 +
 .../game_of_life.NET/vc8/Game_of_life.vcproj       |  359 ++++-
 .../game_of_life.NET/vc9/Game_of_life.sln          |   30 +-
 .../game_of_life.NET/vc9/Game_of_life.vcproj       |  407 +++++-
 .../parallel_for/polygon_overlay/Makefile.windows  |    2 +-
 examples/parallel_for/polygon_overlay/polymain.cpp |    2 +-
 .../parallel_for/polygon_overlay/pover_video.cpp   |    2 +-
 examples/parallel_for/seismic/Makefile.windows     |    2 +-
 .../parallel_for/seismic/SeismicSimulation.cpp     |    4 +-
 examples/parallel_for/tachyon/Makefile.windows     |    2 +-
 examples/parallel_reduce/convex_hull/convex_hull.h |    2 +-
 .../convex_hull/convex_hull_bench.cpp              |    8 +
 .../convex_hull/convex_hull_sample.cpp             |   45 +-
 examples/pipeline/square/gen_input.cpp             |    1 +
 examples/pipeline/square/square.cpp                |    6 +-
 examples/pipeline/text_filter/text_filter.cpp      |    2 +-
 include/tbb/_concurrent_queue_internal.h           |   11 +-
 include/tbb/cache_aligned_allocator.h              |    6 -
 include/tbb/compat/ppl.h                           |    1 +
 include/tbb/concurrent_hash_map.h                  |  145 +-
 include/tbb/concurrent_vector.h                    |   65 +-
 include/tbb/enumerable_thread_specific.h           |   63 +-
 include/tbb/machine/linux_intel64.h                |    2 +
 include/tbb/null_mutex.h                           |    4 +
 include/tbb/null_rw_mutex.h                        |    4 +
 include/tbb/parallel_for.h                         |   22 +-
 include/tbb/parallel_for_each.h                    |   24 +-
 include/tbb/parallel_reduce.h                      |    3 +-
 include/tbb/pipeline.h                             |    8 +-
 include/tbb/scalable_allocator.h                   |    6 +
 include/tbb/spin_rw_mutex.h                        |    2 +-
 include/tbb/task.h                                 |   55 +-
 include/tbb/task_group.h                           |   22 +-
 include/tbb/tbb_config.h                           |   32 +-
 include/tbb/tbb_exception.h                        |   42 +-
 include/tbb/tbb_stddef.h                           |    8 +-
 src/Makefile                                       |   55 +-
 src/perf/fibonacci_cutoff.cpp                      |    4 +-
 src/perf/time_framework.h                          |   16 +-
 src/perf/time_hash_map_fill.cpp                    |  155 +++
 .../{omp_dynamic_link.h => library_assert.h}       |   22 +-
 src/rml/client/omp_dynamic_link.cpp                |    2 +-
 src/rml/client/omp_dynamic_link.h                  |    2 +-
 src/rml/client/rml_factory.h                       |    8 +-
 src/rml/include/rml_base.h                         |    2 +-
 src/rml/include/rml_omp.h                          |    6 +-
 src/rml/include/rml_tbb.h                          |    2 +-
 src/rml/server/hunk.h                              |  114 --
 src/rml/server/job_automaton.h                     |   13 +-
 src/rml/server/ring.h                              |  140 --
 src/rml/server/rml_server.cpp                      |  344 ++---
 src/rml/server/thread_monitor.h                    |   22 +-
 src/rml/test/test_hunk.cpp                         |  104 --
 src/rml/test/test_ring.cpp                         |  139 --
 src/tbb/concurrent_queue.cpp                       |   10 +-
 src/tbb/concurrent_vector.cpp                      |  340 +++--
 src/tbb/dynamic_link.cpp                           |    4 +-
 src/tbb/dynamic_link.h                             |    2 -
 src/tbb/gate.h                                     |  221 ----
 src/tbb/itt_notify.h                               |    1 -
 src/tbb/pipeline.cpp                               |  133 +-
 src/tbb/private_server.cpp                         |   21 +-
 src/tbb/task.cpp                                   | 1388 ++++----------------
 src/tbb/tbb_resource.rc                            |    4 +-
 src/tbb/win32-tbb-export.def                       |    4 +
 src/tbb/win64-tbb-export.def                       |    4 +
 src/tbbmalloc/Customize.h                          |   21 +-
 src/tbbmalloc/MapMemory.h                          |   19 +-
 src/tbbmalloc/MemoryAllocator.cpp                  |  764 +++++++----
 src/tbbmalloc/TypeDefinitions.h                    |   23 +-
 src/tbbmalloc/lin-tbbmalloc-export.def             |    1 +
 src/tbbmalloc/mac32-tbbmalloc-export.def           |    1 +
 src/tbbmalloc/mac64-tbbmalloc-export.def           |    1 +
 src/tbbmalloc/proxy.cpp                            |  158 ++-
 src/tbbmalloc/proxy.h                              |   15 +
 src/tbbmalloc/tbb_function_replacement.cpp         |  146 +-
 src/tbbmalloc/tbb_function_replacement.h           |   24 +-
 src/tbbmalloc/tbbmalloc.cpp                        |   67 +-
 src/tbbmalloc/tbbmalloc.rc                         |    4 +-
 src/tbbmalloc/win-gcc-tbbmalloc-export.def         |    3 +
 src/tbbmalloc/win32-tbbmalloc-export.def           |    2 +
 src/tbbmalloc/win64-tbbmalloc-export.def           |    2 +
 src/test/harness.h                                 |   43 +-
 src/test/harness_allocator.h                       |   51 +
 src/test/harness_bad_expr.h                        |    6 +-
 src/test/harness_cpu.h                             |    6 +-
 src/test/harness_eh.h                              |   51 +-
 src/test/harness_iterator.h                        |   36 +-
 src/test/harness_lrb.h                             |  102 ++
 src/test/harness_lrb_host.cpp                      |  136 ++
 src/test/harness_memory.h                          |    2 +-
 src/test/{harness_trace.h => harness_report.h}     |  105 +-
 src/test/test_ScalableAllocator.cpp                |    6 +-
 src/test/test_ScalableAllocator_STL.cpp            |    3 +-
 src/test/test_aligned_space.cpp                    |   29 +-
 src/test/test_assembly.cpp                         |  141 +-
 src/test/test_atomic.cpp                           |   36 +-
 src/test/test_blocked_range.cpp                    |    3 +-
 src/test/test_blocked_range2d.cpp                  |    9 +-
 src/test/test_blocked_range3d.cpp                  |    9 +-
 src/test/test_cache_aligned_allocator.cpp          |    6 +-
 src/test/test_cache_aligned_allocator_STL.cpp      |    3 +-
 src/test/test_combinable.cpp                       |  371 +++---
 src/test/test_compiler.cpp                         |   10 +-
 src/test/test_concurrent_hash_map.cpp              |   83 +-
 src/test/test_concurrent_queue.cpp                 |   27 +-
 src/test/test_concurrent_vector.cpp                |  217 +--
 src/test/test_eh_algorithms.cpp                    |  190 +--
 src/test/test_eh_tasks.cpp                         |   47 +-
 src/test/test_enumerable_thread_specific.cpp       |   72 +-
 src/test/test_halt.cpp                             |   16 +-
 src/test/test_handle_perror.cpp                    |    8 +-
 src/test/test_inits_loop.cpp                       |   33 +-
 src/test/test_ittnotify.cpp                        |    6 +-
 src/test/test_lambda.cpp                           |  235 ++++
 src/test/test_malloc_compliance.cpp                |  225 ++--
 src/test/test_malloc_overload.cpp                  |   42 +-
 src/test/test_malloc_pure_c.c                      |    3 +-
 src/test/test_malloc_regression.cpp                |    7 +-
 ..._functionality.cpp => test_malloc_whitebox.cpp} |  132 +-
 src/test/test_model_plugin.cpp                     |   26 +-
 src/test/test_mutex.cpp                            |   36 +-
 src/test/test_mutex_native_threads.cpp             |   26 +-
 src/test/test_openmp.cpp                           |   11 +-
 src/test/test_parallel_do.cpp                      |    5 +-
 src/test/test_parallel_for.cpp                     |  101 +-
 src/test/test_parallel_for_each.cpp                |    7 +-
 src/test/test_parallel_invoke.cpp                  |    6 +-
 src/test/test_parallel_reduce.cpp                  |   60 +-
 src/test/test_parallel_scan.cpp                    |   26 +-
 src/test/test_parallel_sort.cpp                    |   28 +-
 src/test/test_parallel_while.cpp                   |    8 +-
 src/test/test_pipeline.cpp                         |   21 +-
 src/test/test_pipeline_with_tbf.cpp                |  196 +--
 src/test/test_rwm_upgrade_downgrade.cpp            |    3 +-
 src/test/test_task.cpp                             |  176 ++-
 src/test/test_task_assertions.cpp                  |   39 +-
 src/test/test_task_auto_init.cpp                   |  160 ++-
 src/test/test_task_group.cpp                       |   69 +-
 src/test/test_task_leaks.cpp                       |   29 +-
 src/test/test_task_scheduler_init.cpp              |   39 +-
 src/test/test_task_scheduler_observer.cpp          |    3 +-
 src/test/test_tbb_header.cpp                       |   23 +-
 src/test/test_tbb_thread.cpp                       |   13 +-
 src/test/test_tbb_version.cpp                      |   40 +-
 src/test/test_tick_count.cpp                       |   31 +-
 src/test/test_user_events.cpp                      |    6 +-
 src/test/test_yield.cpp                            |    7 +-
 370 files changed, 16432 insertions(+), 18778 deletions(-)

diff --git a/CHANGES b/CHANGES
index df28a48..e6c71a9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,49 @@
+TBB 2.2 Update 1 commercial-aligned release
+
+Changes (w.r.t. TBB 2.2 commercial-aligned release):
+
+- Incorporates all changes from open-source releases below.
+- Documentation was updated.
+- TBB scheduler auto-initialization now covers all possible use cases.
+- concurrent_queue: made argument types of sizeof used in paddings
+  consistent with those actually used.
+- Memory allocator was improved: supported corner case of user's malloc 
+    calling scalable_malloc (non-Windows), corrected processing of 
+    memory allocation requests during tbb memory allocator startup 
+    (Linux).
+- Windows malloc replacement has got better support for static objects.
+- In pipeline setups that do not allow actual parallelism, execution 
+    by a single thread is guaranteed, idle spinning eliminated, and 
+    performance improved.
+- RML refactoring and clean-up.
+- New constructor for concurrent_hash_map allows reserving space for 
+    a number of items.
+- Operator delete() added to the TBB exception classes.
+- Lambda support was improved in parallel_reduce.
+- gcc 4.3 warnings were fixed for concurrent_queue.
+- Fixed possible initialization deadlock in modules using TBB entities
+    during construction of global static objects.
+- Copy constructor in concurrent_hash_map was fixed.
+- Fixed a couple of rare crashes in the scheduler possible before 
+    in very specific use cases.
+- Fixed a rare crash in the TBB allocator running out of memory.
+- New tests were implemented, including test_lambda.cpp that checks 
+    support for lambda expressions.
+- A few other small changes in code, tests, and documentation.
+
+------------------------------------------------------------------------
+20090809 open-source release
+
+Changes (w.r.t. TBB 2.2 commercial-aligned release):
+
+- Fixed known exception safety issues in concurrent_vector.
+- Better concurrency of simultaneous grow requests in concurrent_vector.
+- TBB allocator further improves performance of large object allocation.
+- Problem with source of text relocations was fixed on Linux
+- Fixed bugs related to malloc replacement under Windows
+- A few other small changes in code and documentation.
+
+------------------------------------------------------------------------
 TBB 2.2 commercial-aligned release
 
 Changes (w.r.t. TBB 2.1 U4 commercial-aligned release):
@@ -7,6 +53,8 @@ Changes (w.r.t. TBB 2.1 U4 commercial-aligned release):
     to ia64.
 - Major Interface version changed from 3 to 4. Deprecated interfaces 
     might be removed in future releases.
+- Parallel algorithms that use partitioners have switched to use 
+    the auto_partitioner by default.
 - Improved memory allocator performance for allocations bigger than 8K.
 - Added new thread-bound filters functionality for pipeline.
 - New implementation of concurrent_hash_map that improves performance 
diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
index 2e2fb4c..3004535 100644
--- a/build/FreeBSD.gcc.inc
+++ b/build/FreeBSD.gcc.inc
@@ -34,7 +34,6 @@ PIC_KEY = -fPIC
 WARNING_AS_ERROR_KEY = -Werror
 WARNING_KEY = -Wall
 DYLIB_KEY = -shared
-#LIBDL = -ldl
 
 TBB_NOSTRICT = 1
 
diff --git a/build/Makefile.rml b/build/Makefile.rml
index af3b536..1ef95c4 100644
--- a/build/Makefile.rml
+++ b/build/Makefile.rml
@@ -71,6 +71,7 @@ LIBS += $(LIBDL)
 
 INCLUDES += $(INCLUDE_KEY)$(RML_ROOT)/include $(INCLUDE_KEY).
 T_INCLUDES = $(INCLUDES) $(INCLUDE_KEY)$(tbb_root)/src/test $(INCLUDE_KEY)$(RML_SERVER_ROOT)
+WARNING_SUPPRESS += $(RML_WARNING_SUPPRESS) 
 
 # Suppress superfluous warnings for RML compilation
 R_CPLUS_FLAGS =  $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS) \
@@ -81,7 +82,7 @@ R_CPLUS_FLAGS =  $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS_NOSTRICT))
 
 tbb_misc_rml.$(OBJ): version_string.tmp
 
-RML_TEST.OBJ = test_hunk.$(OBJ) test_job_automaton.$(OBJ) test_ring.$(OBJ) test_thread_monitor.$(OBJ) test_rml_tbb.$(OBJ) test_rml_omp.$(OBJ) test_rml_mixed.$(OBJ)
+RML_TEST.OBJ = test_job_automaton.$(OBJ) test_thread_monitor.$(OBJ) test_rml_tbb.$(OBJ) test_rml_omp.$(OBJ) test_rml_mixed.$(OBJ)
 
 $(RML_TBB_DEP): %_rml.$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $< 
@@ -98,7 +99,7 @@ $(RML.DLL): rml.def
 endif
 
 $(RML.DLL): BUILDING_LIBRARY = $(RML.DLL)
-$(RML.DLL): $(RML_SERVER.OBJ) $(RML.RES) $(RML_NO_VERSION.DLL) $(RML_TBB_DEP) $(RML_ASM.OBJ)
+$(RML.DLL): $(RML_TBB_DEP) $(RML_SERVER.OBJ) $(RML.RES) $(RML_NO_VERSION.DLL) $(RML_ASM.OBJ)
 	$(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(RML.DLL) $(RML_SERVER.OBJ) $(RML_TBB_DEP) $(RML_ASM.OBJ) $(RML.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
 
 ifneq (,$(RML_NO_VERSION.DLL))
@@ -119,7 +120,7 @@ rml: $(RML.DLL) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ)
 add_debug=$(basename $(1))_debug$(suffix $(1))
 cross_suffix=$(if $(crosstest),$(if $(DEBUG_SUFFIX),$(subst _debug,,$(1)),$(call add_debug,$(1))),$(1))
 
-RML_TESTS = test_hunk.exe test_job_automaton.exe test_ring.exe test_thread_monitor.exe test_rml_tbb.exe test_rml_omp.exe test_rml_mixed.exe test_rml_omp_c_linkage.exe
+RML_TESTS = test_job_automaton.exe test_thread_monitor.exe test_rml_tbb.exe test_rml_omp.exe test_rml_mixed.exe test_rml_omp_c_linkage.exe
 
 test_rml_tbb.exe: test_rml_tbb.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(TBB_DEP_RML_TEST)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_tbb.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS)
@@ -141,9 +142,7 @@ test_%.exe: test_%.$(OBJ) $(TBB_DEP_NON_RML_TEST)
 
 ### run_cmd is usually empty
 rml_test: $(call cross_suffix,$(RML.DLL)) $(RML_TESTS)
-	$(run_cmd) ./test_hunk.exe
 	$(run_cmd) ./test_job_automaton.exe
-	$(run_cmd) ./test_ring.exe
 	$(run_cmd) ./test_thread_monitor.exe
 	$(run_cmd) ./test_rml_tbb.exe
 	$(run_cmd) ./test_rml_omp.exe
diff --git a/build/Makefile.tbb b/build/Makefile.tbb
index 338752e..9f74840 100644
--- a/build/Makefile.tbb
+++ b/build/Makefile.tbb
@@ -42,7 +42,7 @@ default_tbb: $(TBB.DLL)
 .PHONY: default_tbb tbbvars clean
 .PRECIOUS: %.$(OBJ)
 
-VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old
+VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old $(tbb_root)/src/rml/client
 
 CPLUS_FLAGS += $(PIC_KEY) $(DEFINE_KEY)__TBB_BUILD=1
 
@@ -75,7 +75,9 @@ TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
 		mutex.$(OBJ) \
 		recursive_mutex.$(OBJ) \
 		tbb_thread.$(OBJ) \
-		itt_notify_proxy.$(OBJ)
+		itt_notify_proxy.$(OBJ) \
+		private_server.$(OBJ) \
+		rml_tbb.$(OBJ)
 
 # OLD/Legacy object files for backward binary compatibility
 ifeq (,$(findstring $(DEFINE_KEY)TBB_NO_LEGACY,$(CPLUS_FLAGS)))
@@ -91,11 +93,7 @@ TBB.OBJ = $(TBB_CPLUS.OBJ) $(TBB_CPLUS_OLD.OBJ) $(TBB_ASM.OBJ)
 # Suppress superfluous warnings for TBB compilation
 WARNING_KEY += $(WARNING_SUPPRESS)
 
-ifneq (,$(RML))
-VPATH += $(tbb_root)/src/rml/client
-TBB.OBJ += rml_tbb.$(OBJ) private_server.$(OBJ)
-CPLUS_FLAGS += $(DEFINE_KEY)__TBB_RML=1 $(INCLUDE_KEY)$(tbb_root)/src/rml/include
-endif 
+CXX_WARN_SUPPRESS = $(RML_WARNING_SUPPRESS)
 
 include $(tbb_root)/build/common_rules.inc
 
diff --git a/build/Makefile.tbbmalloc b/build/Makefile.tbbmalloc
index e96651f..a6470f8 100644
--- a/build/Makefile.tbbmalloc
+++ b/build/Makefile.tbbmalloc
@@ -24,14 +24,15 @@
 # invalidate any other reasons why the executable file might be covered by
 # the GNU General Public License.
 
+# default target
+default_malloc: malloc malloc_test
+
 tbb_root ?= $(TBB22_INSTALL_DIR)
 BUILDING_PHASE=1
+TEST_RESOURCE = $(TBB.RES)
 include $(tbb_root)/build/common.inc
 DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
 
-# default target
-default_malloc: malloc malloc_test
-
 MALLOC_ROOT ?= $(tbb_root)/src/tbbmalloc
 MALLOC_SOURCE_ROOT ?= $(MALLOC_ROOT)
 
@@ -134,34 +135,46 @@ malloc_proxy_dll: $(MALLOCPROXY.DLL)
 add_debug=$(basename $(1))_debug$(suffix $(1))
 cross_suffix=$(if $(crosstest),$(if $(DEBUG_SUFFIX),$(subst _debug,,$(1)),$(call add_debug,$(1))),$(1))
 
-MALLOC_MAIN_TESTS = test_ScalableAllocator.exe test_ScalableAllocator_STL.exe test_malloc_compliance.exe test_malloc_regression.exe test_malloc_functionality.exe
-MALLOC_C_TESTS = test_malloc_pure_c.exe
-MALLOC_OVERLOAD_TESTS =  test_malloc_overload.exe test_malloc_overload_proxy.exe
+MALLOC_MAIN_TESTS = test_ScalableAllocator.$(TEST_EXT) test_ScalableAllocator_STL.$(TEST_EXT) test_malloc_compliance.$(TEST_EXT) test_malloc_regression.$(TEST_EXT)
+MALLOC_OVERLOAD_TESTS =  test_malloc_overload.$(TEST_EXT) test_malloc_overload_proxy.$(TEST_EXT)
+
+MALLOC_LIB = $(call cross_suffix,$(MALLOC.LIB))
+MALLOC_PROXY_LIB = $(call cross_suffix,$(MALLOCPROXY.LIB))
 
 ifeq (windows.gcc,$(tbb_os).$(compiler))
-test_malloc_overload.exe: LIBS += $(call cross_suffix,$(MALLOCPROXY.LIB))
+test_malloc_overload.$(TEST_EXT): LIBS += $(MALLOC_PROXY_LIB)
 endif
 
-test_malloc_overload.exe: test_malloc_overload.$(OBJ) 
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
-test_malloc_overload_proxy.exe: test_malloc_overload.$(OBJ) $(call cross_suffix,$(MALLOCPROXY.LIB))
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
+test_malloc_overload.$(TEST_EXT): test_malloc_overload.$(OBJ)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
+test_malloc_overload_proxy.$(TEST_EXT): test_malloc_overload.$(OBJ) $(MALLOC_PROXY_LIB)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBDL) $(MALLOC_PROXY_LIB) $(LIBS) $(LINK_FLAGS)
 
-$(MALLOC_MAIN_TESTS): %.exe: %.$(OBJ) $(call cross_suffix,$(MALLOC.LIB))
-	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(LINK_FLAGS)
-$(MALLOC_C_TESTS): %.exe: %.$(OBJ) $(call cross_suffix,$(MALLOC.LIB))
+test_malloc_whitebox.$(TEST_EXT): test_malloc_whitebox.cpp $(MALLOC_ASM.OBJ) tbb_misc_malloc.$(OBJ)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(M_CPLUS_FLAGS) $(M_INCLUDES) $^ $(LIBS) $(LINK_FLAGS)
+
+$(MALLOC_MAIN_TESTS): %.$(TEST_EXT): %.$(OBJ) $(MALLOC_LIB)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(MALLOC_LIB) $(LIBS) $(LINK_FLAGS)
+
+ifeq (,$(NO_C_TESTS))
+MALLOC_C_TESTS = test_malloc_pure_c.$(TEST_EXT)
+
+$(MALLOC_C_TESTS): %.$(TEST_EXT): %.$(OBJ) $(MALLOC_LIB)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(LINK_FLAGS)
+endif
 
 # run_cmd is usually empty
-malloc_test: $(call cross_suffix,$(MALLOC.DLL)) $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS) $(MALLOC_OVERLOAD_TESTS)
-	$(run_cmd) ./test_malloc_functionality.exe 1:4
-	$(run_cmd) $(TEST_LAUNCHER) -l $(call cross_suffix,$(MALLOCPROXY.DLL)) test_malloc_overload.exe
-	$(run_cmd) $(TEST_LAUNCHER) test_malloc_overload_proxy.exe
-	$(run_cmd) $(TEST_LAUNCHER) test_malloc_compliance.exe 1:4
-	$(run_cmd) ./test_ScalableAllocator.exe
-	$(run_cmd) ./test_ScalableAllocator_STL.exe
-	$(run_cmd) ./test_malloc_regression.exe
-	$(run_cmd) ./test_malloc_pure_c.exe
+malloc_test: $(call cross_suffix,$(MALLOC.DLL)) $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS) $(MALLOC_OVERLOAD_TESTS) test_malloc_whitebox.$(TEST_EXT) $(AUX_TEST_DEPENDENCIES)
+	$(run_cmd) ./test_malloc_whitebox.$(TEST_EXT) 1:4
+	$(run_cmd) $(TEST_LAUNCHER) -l $(call cross_suffix,$(MALLOCPROXY.DLL)) test_malloc_overload.$(TEST_EXT)
+	$(run_cmd) $(TEST_LAUNCHER) test_malloc_overload_proxy.$(TEST_EXT)
+	$(run_cmd) $(TEST_LAUNCHER) test_malloc_compliance.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_ScalableAllocator.$(TEST_EXT)
+	$(run_cmd) ./test_ScalableAllocator_STL.$(TEST_EXT)
+	$(run_cmd) ./test_malloc_regression.$(TEST_EXT)
+ifeq (,$(NO_C_TESTS))
+	$(run_cmd) ./test_malloc_pure_c.$(TEST_EXT)
+endif
 
 #------------------------------------------------------
 # End of rules for making the TBBMalloc unit tests
diff --git a/build/Makefile.test b/build/Makefile.test
index f52d00b..8b9c339 100644
--- a/build/Makefile.test
+++ b/build/Makefile.test
@@ -29,22 +29,19 @@
 #------------------------------------------------------------------------------
 .PHONY: default test_tbb_plain test_tbb_old clean
 
+default: test_tbb_plain test_tbb_old
+
 tbb_root ?= $(TBB22_INSTALL_DIR)
 BUILDING_PHASE=1
+TEST_RESOURCE = $(TBB.RES)
 include $(tbb_root)/build/common.inc
 DEBUG_SUFFIX=$(findstring _debug,$(call cross_cfg,_$(cfg)))
 
-default: test_tbb_plain test_tbb_old
-ifneq (,$(codecov))
-	profmerge
-	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
-endif
-
 #------------------------------------------------------------
 # Define static pattern rules dealing with .cpp source files
 #------------------------------------------------------------
 
-VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old $(tbb_root)/src/test $(tbb_root)/src/perf
+VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/rml/client $(tbb_root)/src/old $(tbb_root)/src/test $(tbb_root)/src/perf
 
 CPLUS_FLAGS += $(if $(crosstest),$(DEFINE_KEY)__TBB_NO_IMPLICIT_LINKAGE=1)
 
@@ -63,6 +60,7 @@ KNOWN_NOSTRICT += \
 	test_task_scheduler_init.o	\
 	test_model_plugin.o	\
 	test_parallel_do.o	\
+	test_lambda.o	\
 	test_eh_algorithms.o	\
 	test_parallel_sort.o    \
 	test_parallel_for_each.o	\
@@ -76,7 +74,7 @@ endif
 include $(tbb_root)/build/common_rules.inc
 
 # Rule for generating executable test
-%.exe: %.$(OBJ) $(TBB.LIB)
+%.$(TEST_EXT): %.$(OBJ) $(TBB.LIB)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
 
 # Rules for generating a test DLL
@@ -86,86 +84,106 @@ include $(tbb_root)/build/common_rules.inc
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS) $(DYLIB_KEY)
 
 # Rules for the tests, which use TBB in a dynamically loadable library
-test_model_plugin.exe: test_model_plugin.$(OBJ) test_model_plugin.$(DLL)
+test_model_plugin.$(TEST_EXT): test_model_plugin.$(OBJ) test_model_plugin.$(DLL)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
 
-TASK_CPP_DEPENDENCIES = $(TBB_ASM.OBJ) cache_aligned_allocator.$(OBJ) dynamic_link.$(OBJ) tbb_misc.$(OBJ) itt_notify.$(OBJ) mutex.$(OBJ) spin_rw_mutex.$(OBJ) spin_mutex.$(OBJ) itt_notify_proxy.$(OBJ)
+TASK_CPP_DEPENDENCIES = $(TBB_ASM.OBJ) \
+		cache_aligned_allocator.$(OBJ) \
+		dynamic_link.$(OBJ) \
+		tbb_misc.$(OBJ) \
+		tbb_thread.$(OBJ) \
+		itt_notify.$(OBJ) \
+		mutex.$(OBJ) \
+		spin_rw_mutex.$(OBJ) \
+		spin_mutex.$(OBJ) \
+		private_server.$(OBJ) \
+		rml_tbb.$(OBJ)
+
+ifeq (,$(codecov))
+    TASK_CPP_DEPENDENCIES += itt_notify_proxy.$(OBJ)
+endif
 
 # These executables don't depend on the TBB library, but include task.cpp directly
-TASK_CPP_DIRECTLY_INCLUDED = test_eh_tasks.exe \
- test_task_leaks.exe \
- test_task_assertions.exe \
- test_assembly.exe
+TASK_CPP_DIRECTLY_INCLUDED = test_eh_tasks.$(TEST_EXT) \
+ test_task_leaks.$(TEST_EXT) \
+ test_task_assertions.$(TEST_EXT) \
+ test_assembly.$(TEST_EXT)
 
 $(TASK_CPP_DIRECTLY_INCLUDED): WARNING_KEY += $(WARNING_SUPPRESS)
 
-$(TASK_CPP_DIRECTLY_INCLUDED): %.exe : %.$(OBJ) $(TASK_CPP_DEPENDENCIES)
+$(TASK_CPP_DIRECTLY_INCLUDED): %.$(TEST_EXT) : %.$(OBJ) $(TASK_CPP_DEPENDENCIES)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
 
-test_handle_perror.exe: test_handle_perror.$(OBJ) tbb_misc.$(OBJ) $(TBB_ASM.OBJ)
+test_handle_perror.$(TEST_EXT): test_handle_perror.$(OBJ) tbb_misc.$(OBJ) $(TBB_ASM.OBJ)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
 
+test_tbb_header2.$(OBJ): test_tbb_header.cpp
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $(DEFINE_KEY)__TBB_TEST_SECONDARY=1 $< $(OUTPUTOBJ_KEY)$@
+
+# Detecting "multiple definition" linker error using the test that covers the whole library
+test_tbb_header.$(TEST_EXT): test_tbb_header.$(OBJ) test_tbb_header2.$(OBJ) $(TBB.LIB)
+	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
 
 # Rules for the tests, which depend on tbbmalloc
-test_concurrent_hash_map_string.exe: test_concurrent_hash_map_string.$(OBJ)
+test_concurrent_hash_map_string.$(TEST_EXT): test_concurrent_hash_map_string.$(OBJ)
 	$(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(MALLOC.LIB) $(LIBS) $(LINK_FLAGS)
 
-
 # These are in alphabetical order
-TEST_TBB_PLAIN.EXE = test_assembly.exe   \
-	test_aligned_space.exe               \
-	test_task_assertions.exe             \
-	test_atomic.exe                      \
-	test_blocked_range.exe               \
-	test_blocked_range2d.exe             \
-	test_blocked_range3d.exe             \
-	test_compiler.exe                    \
-	test_concurrent_queue.exe            \
-	test_concurrent_vector.exe           \
-	test_concurrent_hash_map.exe         \
-	test_enumerable_thread_specific.exe  \
-	test_handle_perror.exe               \
-	test_halt.exe                        \
-	test_model_plugin.exe                \
-	test_mutex.exe                       \
-	test_mutex_native_threads.exe        \
-	test_rwm_upgrade_downgrade.exe       \
-	test_cache_aligned_allocator_STL.exe \
-	test_cache_aligned_allocator.exe     \
-	test_parallel_for.exe                \
-	test_parallel_reduce.exe             \
-	test_parallel_sort.exe               \
-	test_parallel_scan.exe               \
-	test_parallel_while.exe              \
-	test_parallel_do.exe                 \
-	test_pipeline.exe                    \
-	test_pipeline_with_tbf.exe           \
-	test_task_auto_init.exe              \
-	test_task_scheduler_init.exe         \
-	test_task_scheduler_observer.exe     \
-	test_task.exe                        \
-	test_task_leaks.exe                  \
-	test_tbb_thread.exe                  \
-	test_tick_count.exe                  \
-	test_inits_loop.exe                  \
-	test_yield.exe                       \
-	test_eh_tasks.exe                    \
-	test_eh_algorithms.exe               \
-	test_parallel_invoke.exe             \
-	test_task_group.exe                  \
-	test_ittnotify.exe                   \
-	test_parallel_for_each.exe           \
-	test_tbb_header.exe                  \
-	test_combinable.exe                  \
-	test_tbb_version.exe                 # insert new files right above
+TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT)   \
+	test_aligned_space.$(TEST_EXT)               \
+	test_task_assertions.$(TEST_EXT)             \
+	test_atomic.$(TEST_EXT)                      \
+	test_blocked_range.$(TEST_EXT)               \
+	test_blocked_range2d.$(TEST_EXT)             \
+	test_blocked_range3d.$(TEST_EXT)             \
+	test_compiler.$(TEST_EXT)                    \
+	test_concurrent_queue.$(TEST_EXT)            \
+	test_concurrent_vector.$(TEST_EXT)           \
+	test_concurrent_hash_map.$(TEST_EXT)         \
+	test_enumerable_thread_specific.$(TEST_EXT)  \
+	test_handle_perror.$(TEST_EXT)               \
+	test_halt.$(TEST_EXT)                        \
+	test_lambda.$(TEST_EXT)                      \
+	test_model_plugin.$(TEST_EXT)                \
+	test_mutex.$(TEST_EXT)                       \
+	test_mutex_native_threads.$(TEST_EXT)        \
+	test_rwm_upgrade_downgrade.$(TEST_EXT)       \
+	test_cache_aligned_allocator_STL.$(TEST_EXT) \
+	test_cache_aligned_allocator.$(TEST_EXT)     \
+	test_parallel_for.$(TEST_EXT)                \
+	test_parallel_reduce.$(TEST_EXT)             \
+	test_parallel_sort.$(TEST_EXT)               \
+	test_parallel_scan.$(TEST_EXT)               \
+	test_parallel_while.$(TEST_EXT)              \
+	test_parallel_do.$(TEST_EXT)                 \
+	test_pipeline.$(TEST_EXT)                    \
+	test_pipeline_with_tbf.$(TEST_EXT)           \
+	test_task_scheduler_init.$(TEST_EXT)         \
+	test_task_scheduler_observer.$(TEST_EXT)     \
+	test_task.$(TEST_EXT)                        \
+	test_task_leaks.$(TEST_EXT)                  \
+	test_tbb_thread.$(TEST_EXT)                  \
+	test_tick_count.$(TEST_EXT)                  \
+	test_inits_loop.$(TEST_EXT)                  \
+	test_yield.$(TEST_EXT)                       \
+	test_eh_tasks.$(TEST_EXT)                    \
+	test_eh_algorithms.$(TEST_EXT)               \
+	test_parallel_invoke.$(TEST_EXT)             \
+	test_task_group.$(TEST_EXT)                  \
+	test_ittnotify.$(TEST_EXT)                   \
+	test_parallel_for_each.$(TEST_EXT)           \
+	test_tbb_header.$(TEST_EXT)                  \
+	test_combinable.$(TEST_EXT)                  \
+	test_task_auto_init.$(TEST_EXT)              \
+	test_tbb_version.$(TEST_EXT)                 # insert new files right above
 
 ifdef OPENMP_FLAG
 	TEST_TBB_PLAIN.EXE += test_tbb_openmp
-test_openmp.exe: test_openmp.cpp 
-	$(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $^ $(LIBS) $(LINK_TBB.LIB)
+test_openmp.$(TEST_EXT): test_openmp.cpp
+	$(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $< $(LIBS) $(LINK_TBB.LIB) $(LINK_FLAGS)
 .PHONY: test_tbb_openmp
-test_tbb_openmp: test_openmp.exe
-	./test_openmp.exe 1:4
+test_tbb_openmp: test_openmp.$(TEST_EXT)
+	./test_openmp.$(TEST_EXT) 1:4
 
 endif
 
@@ -174,56 +192,57 @@ endif
 # If a component Y uses component X, then tests for Y should come after tests for X.
 # Note that usually run_cmd is empty, and tests run directly
 test_tbb_plain: $(TEST_TBB_PLAIN.EXE)
-	$(run_cmd) ./test_assembly.exe 
-	$(run_cmd) ./test_compiler.exe 
+	$(run_cmd) ./test_assembly.$(TEST_EXT)
+	$(run_cmd) ./test_compiler.$(TEST_EXT)
         # Yes, 4:8 is intended on the next line. 
-	$(run_cmd) ./test_yield.exe 4:8
-	$(run_cmd) ./test_handle_perror.exe 
-	$(run_cmd) ./test_task_auto_init.exe
-	$(run_cmd) ./test_task_scheduler_init.exe 1:4
-	$(run_cmd) ./test_task_scheduler_observer.exe 1:4
-	$(run_cmd) ./test_task_assertions.exe
-	$(run_cmd) ./test_task.exe 1:4
-	$(run_cmd) ./test_task_leaks.exe
-	$(run_cmd) ./test_atomic.exe 
-	$(run_cmd) ./test_cache_aligned_allocator.exe
-	$(run_cmd) ./test_cache_aligned_allocator_STL.exe
-	$(run_cmd) ./test_blocked_range.exe 1:4
-	$(run_cmd) ./test_blocked_range2d.exe 1:4
-	$(run_cmd) ./test_blocked_range3d.exe 1:4
-	$(run_cmd) ./test_parallel_for.exe 1:4
-	$(run_cmd) ./test_parallel_sort.exe 1:4
-	$(run_cmd) ./test_aligned_space.exe 
-	$(run_cmd) ./test_parallel_reduce.exe 1:4
-	$(run_cmd) ./test_parallel_scan.exe 1:4
-	$(run_cmd) ./test_parallel_while.exe 1:4
-	$(run_cmd) ./test_parallel_do.exe 1:4
-	$(run_cmd) ./test_inits_loop.exe
-	$(run_cmd) ./test_mutex.exe 1
-	$(run_cmd) ./test_mutex.exe 2
-	$(run_cmd) ./test_mutex.exe 4
-	$(run_cmd) ./test_mutex_native_threads.exe 1:4
-	$(run_cmd) ./test_rwm_upgrade_downgrade.exe 4
+	$(run_cmd) ./test_yield.$(TEST_EXT) 4:8
+	$(run_cmd) ./test_handle_perror.$(TEST_EXT)
+	$(run_cmd) ./test_task_auto_init.$(TEST_EXT)
+	$(run_cmd) ./test_task_scheduler_init.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_task_scheduler_observer.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_task_assertions.$(TEST_EXT)
+	$(run_cmd) ./test_task.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_task_leaks.$(TEST_EXT)
+	$(run_cmd) ./test_atomic.$(TEST_EXT)
+	$(run_cmd) ./test_cache_aligned_allocator.$(TEST_EXT)
+	$(run_cmd) ./test_cache_aligned_allocator_STL.$(TEST_EXT)
+	$(run_cmd) ./test_blocked_range.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_blocked_range2d.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_blocked_range3d.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_parallel_for.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_parallel_sort.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_aligned_space.$(TEST_EXT)
+	$(run_cmd) ./test_parallel_reduce.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_parallel_scan.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_parallel_while.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_parallel_do.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_inits_loop.$(TEST_EXT)
+	$(run_cmd) ./test_lambda.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_mutex.$(TEST_EXT) 1
+	$(run_cmd) ./test_mutex.$(TEST_EXT) 2
+	$(run_cmd) ./test_mutex.$(TEST_EXT) 4
+	$(run_cmd) ./test_mutex_native_threads.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_rwm_upgrade_downgrade.$(TEST_EXT) 4
         # Yes, 4:8 is intended on the next line. 
-	$(run_cmd) ./test_halt.exe 4:8	
-	$(run_cmd) ./test_pipeline.exe 1:4
-	$(run_cmd) ./test_pipeline_with_tbf.exe 1:4
-	$(run_cmd) ./test_tick_count.exe 1:4
-	$(run_cmd) ./test_concurrent_queue.exe 1:4
-	$(run_cmd) ./test_concurrent_vector.exe 1:4
-	$(run_cmd) ./test_concurrent_hash_map.exe 1:4
-	$(run_cmd) ./test_enumerable_thread_specific.exe 0:4
-	$(run_cmd) ./test_combinable.exe 0:4
-	$(run_cmd) ./test_model_plugin.exe 4
-	$(run_cmd) ./test_eh_tasks.exe 2:4
-	$(run_cmd) ./test_eh_algorithms.exe 2:4
-	$(run_cmd) ./test_tbb_thread.exe
-	$(run_cmd) ./test_parallel_invoke.exe 1:4
-	$(run_cmd) ./test_task_group.exe 1:4
-	$(run_cmd) ./test_ittnotify.exe 2:2
-	$(run_cmd) ./test_parallel_for_each.exe 1:4
-	$(run_cmd) ./test_tbb_header.exe
-	$(run_cmd) ./test_tbb_version.exe
+	$(run_cmd) ./test_halt.$(TEST_EXT) 4:8
+	$(run_cmd) ./test_pipeline.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_pipeline_with_tbf.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_tick_count.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_queue.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_vector.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_hash_map.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_enumerable_thread_specific.$(TEST_EXT) 0:4
+	$(run_cmd) ./test_combinable.$(TEST_EXT) 0:4
+	$(run_cmd) ./test_model_plugin.$(TEST_EXT) 4
+	$(run_cmd) ./test_eh_tasks.$(TEST_EXT) 2:4
+	$(run_cmd) ./test_eh_algorithms.$(TEST_EXT) 2:4
+	$(run_cmd) ./test_tbb_thread.$(TEST_EXT)
+	$(run_cmd) ./test_parallel_invoke.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_task_group.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_ittnotify.$(TEST_EXT) 2:2
+	$(run_cmd) ./test_parallel_for_each.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_tbb_header.$(TEST_EXT)
+	$(run_cmd) ./test_tbb_version.$(TEST_EXT)
 
 CPLUS_FLAGS_DEPRECATED = $(DEFINE_KEY)TBB_DEPRECATED=1 $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS)
 
@@ -240,25 +259,36 @@ $(TEST_TBB_OLD.OBJ): %.$(OBJ): %.cpp
 %_deprecated.$(OBJ): %.cpp
 	$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(CPLUS_FLAGS_DEPRECATED) $(INCLUDES) $<
 
-TEST_TBB_OLD.EXE = $(subst .$(OBJ),.exe,$(TEST_TBB_OLD.OBJ) $(TEST_TBB_DEPRECATED.OBJ))
+TEST_TBB_OLD.EXE = $(subst .$(OBJ),.$(TEST_EXT),$(TEST_TBB_OLD.OBJ) $(TEST_TBB_DEPRECATED.OBJ))
 
+ifeq (,$(NO_LEGACY_TESTS))
 test_tbb_old: $(TEST_TBB_OLD.EXE)
-	$(run_cmd) ./test_concurrent_vector_v2.exe 1:4
-	$(run_cmd) ./test_concurrent_vector_deprecated.exe 1:4
-	$(run_cmd) ./test_concurrent_queue_v2.exe 1:4
-	$(run_cmd) ./test_concurrent_queue_deprecated.exe 1:4
-	$(run_cmd) ./test_mutex_v2.exe 1
-	$(run_cmd) ./test_mutex_v2.exe 2
-	$(run_cmd) ./test_mutex_v2.exe 4
-
-test_% debug_%: test_%.exe
+	$(run_cmd) ./test_concurrent_vector_v2.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_vector_deprecated.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_queue_v2.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_concurrent_queue_deprecated.$(TEST_EXT) 1:4
+	$(run_cmd) ./test_mutex_v2.$(TEST_EXT) 1
+	$(run_cmd) ./test_mutex_v2.$(TEST_EXT) 2
+	$(run_cmd) ./test_mutex_v2.$(TEST_EXT) 4
+else
+test_tbb_old:
+	@echo Legacy tests skipped
+endif
+
+ifneq (,$(codecov))
+codecov_gen:
+	profmerge
+	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
+endif
+
+test_% debug_%: test_%.$(TEST_EXT) $(AUX_TEST_DEPENDENCIES)
 ifeq (,$(repeat))
-	$(run_cmd) ./$^ $(args)
+	$(run_cmd) ./$< $(args)
 else
 ifeq (windows,$(tbb_os))
-	for /L %%i in (1,1,$(repeat)) do echo %%i of $(repeat): && $^ $(args)
+	for /L %%i in (1,1,$(repeat)) do echo %%i of $(repeat): && $(run_cmd) $< $(args)
 else
-	for ((i=1;i<=$(repeat);++i)); do echo $$i of $(repeat): && ./$^ $(args); done
+	for ((i=1;i<=$(repeat);++i)); do echo $$i of $(repeat): && $(run_cmd) ./$< $(args); done
 endif
 endif # repeat
 ifneq (,$(codecov))
@@ -266,8 +296,9 @@ ifneq (,$(codecov))
 	codecov $(if $(findstring -,$(codecov)),$(codecov),) -demang -comp $(tbb_root)/build/codecov.txt
 endif
 
-time_%: time_%.exe
-	$(run_cmd) ./$^ $(args)
+time_%: time_%.$(TEST_EXT) $(AUX_TEST_DEPENDENCIES)
+	$(run_cmd) ./$< $(args)
+
 
 clean_%: 
 	$(RM) $*.$(OBJ) $*.exe $*.$(DLL) $*.$(LIBEXT) $*.res $*.map $*.ilk $*.pdb $*.exp $*.*manifest $*.tmp $*.d
diff --git a/build/codecov.txt b/build/codecov.txt
index b22397e..e22f805 100644
--- a/build/codecov.txt
+++ b/build/codecov.txt
@@ -1,4 +1,7 @@
 src/tbb
 src/tbbmalloc
 include/tbb
+src/rml/server
+src/rml/client
+src/rml/include
 source/malloc
diff --git a/build/common.inc b/build/common.inc
index 90af75d..4ccb36a 100644
--- a/build/common.inc
+++ b/build/common.inc
@@ -67,8 +67,9 @@ cross_cfg = $(if $(crosstest),$(call flip_cfg,$(1)),$(1))
 ifdef BUILDING_PHASE
  # Setting default configuration to release
  cfg?=release
- # And no lambas support by default for compilers that require special options to enable it
+ # No lambas or other C++0x extensions by default for compilers that implement them as experimental features
  lambdas ?= 0
+ cpp0x ?= 0
   # include compiler-specific build configurations
  -include $(tbb_root)/build/$(tbb_os).$(compiler).inc
  ifdef extra_inc
diff --git a/build/common_rules.inc b/build/common_rules.inc
index a751a22..5957af5 100644
--- a/build/common_rules.inc
+++ b/build/common_rules.inc
@@ -34,7 +34,11 @@ ifeq ($(tbb_strict),1)
   WARNING_KEY += $(WARNING_AS_ERROR_KEY)
 endif
 
-INCLUDES += $(INCLUDE_KEY)$(tbb_root)/src $(INCLUDE_KEY)$(tbb_root)/include
+ifndef TEST_EXT
+    TEST_EXT = exe
+endif
+
+INCLUDES += $(INCLUDE_KEY)$(tbb_root)/src $(INCLUDE_KEY)$(tbb_root)/src/rml/include $(INCLUDE_KEY)$(tbb_root)/include
 
 CPLUS_FLAGS += $(WARNING_KEY) $(CXXFLAGS)
 LINK_FLAGS += $(LDFLAGS)
@@ -53,7 +57,7 @@ CONLY ?= $(CPLUS)
 
 # The most generic rules
 %.$(OBJ): %.cpp
-	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(INCLUDES) $<
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $<
 
 %.$(OBJ): %.c
 	$(CONLY) $(COMPILE_ONLY) $(C_FLAGS) $(INCLUDES) $<
@@ -68,15 +72,15 @@ CONLY ?= $(CPLUS)
 
 # Rule for generating .E file if needed for visual inspection
 %.E: %.cpp
-	$(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) $(PREPROC_ONLY) $< >$@
+	$(CPLUS) $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(INCLUDES) $(PREPROC_ONLY) $< >$@
 
 # TODO Rule for generating .asm file if needed for visual inspection
 %.asm: %.cpp
-	$(CPLUS) /c /Fa $(CPLUS_FLAGS) $(INCLUDES) $<
+	$(CPLUS) /c /Fa $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(INCLUDES) $<
 
 # TODO Rule for generating .s file if needed for visual inspection
 %.s: %.cpp
-	$(CPLUS) -S $(CPLUS_FLAGS) $(INCLUDES) $<
+	$(CPLUS) -S $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(INCLUDES) $<
 
 # Customizations
 
@@ -86,17 +90,17 @@ ifeq (1,$(TBB_NOSTRICT))
 # The files below need the -strict_ansi flag downgraded to -ansi to compile
 
 $(KNOWN_NOSTRICT): %.$(OBJ): %.cpp
-	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDES) $<
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(CXX_ONLY_FLAGS) $(INCLUDES) $<
 endif
 
 $(KNOWN_WARNINGS): %.$(OBJ): %.cpp
-	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(INCLUDES) $<
+	$(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS_NOSTRICT)) $(CXX_ONLY_FLAGS) $(INCLUDES) $<
 
 tbb_misc.$(OBJ): tbb_misc.cpp version_string.tmp
-	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $<
+	$(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS_NOSTRICT) $(CXX_ONLY_FLAGS) $(INCLUDE_KEY). $(INCLUDES) $<
 
 tbb_misc.E: tbb_misc.cpp version_string.tmp
-	$(CPLUS) $(CPLUS_FLAGS_NOSTRICT) $(INCLUDE_KEY). $(INCLUDES) $(PREPROC_ONLY) $< >$@
+	$(CPLUS) $(CPLUS_FLAGS_NOSTRICT) $(CXX_ONLY_FLAGS) $(INCLUDE_KEY). $(INCLUDES) $(PREPROC_ONLY) $< >$@
 
 %.res: %.rc version_string.tmp $(TBB.MANIFEST)
 	rc /Fo$@ $(INCLUDES) $(filter /D%,$(CPLUS_FLAGS)) $<
diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
index 2cead9a..05b3b3f 100644
--- a/build/linux.gcc.inc
+++ b/build/linux.gcc.inc
@@ -34,6 +34,7 @@ PIC_KEY = -fPIC
 WARNING_AS_ERROR_KEY = -Werror
 WARNING_KEY = -Wall
 WARNING_SUPPRESS = -Wno-parentheses
+RML_WARNING_SUPPRESS = -Wno-non-virtual-dtor
 DYLIB_KEY = -shared
 LIBDL = -ldl
 
@@ -52,6 +53,10 @@ ifeq ($(cfg), debug)
         CPLUS_FLAGS = -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
 endif
 
+ifneq (0,$(cpp0x))
+    CXX_ONLY_FLAGS = -std=c++0x
+endif
+
 ASM=
 ASM_FLAGS=
 
diff --git a/build/linux.icc.inc b/build/linux.icc.inc
index ea68195..9c368cb 100644
--- a/build/linux.icc.inc
+++ b/build/linux.icc.inc
@@ -70,7 +70,7 @@ ifeq (ia64,$(arch))
     CPLUS_FLAGS += $(PIC_KEY)
 endif 
 
-ifneq (0,$(lambdas))
+ifneq (00,$(lambdas)$(cpp0x))
 	CPLUS_FLAGS += -std=c++0x -D_TBB_CPP0X
 endif
 
diff --git a/build/macos.gcc.inc b/build/macos.gcc.inc
index 89a2182..14a9016 100644
--- a/build/macos.gcc.inc
+++ b/build/macos.gcc.inc
@@ -59,6 +59,12 @@ ifeq (intel64,$(arch))
     LIB_LINK_FLAGS += -m64
 endif
 
+ifeq (ia32,$(arch))
+    CPLUS_FLAGS += -m32
+    LINK_FLAGS += -m32
+    LIB_LINK_FLAGS += -m32
+endif
+
 ifeq (ppc64,$(arch))
     CPLUS_FLAGS += -arch ppc64
     LINK_FLAGS += -arch ppc64
diff --git a/build/macos.icc.inc b/build/macos.icc.inc
index 039ea74..7507ec0 100644
--- a/build/macos.icc.inc
+++ b/build/macos.icc.inc
@@ -59,7 +59,7 @@ ifneq (,$(codecov))
     CPLUS_FLAGS += -prof-genx
 endif
 
-ifneq (0,$(lambdas))
+ifneq (00,$(lambdas)$(cpp0x))
 	CPLUS_FLAGS += -std=c++0x -D_TBB_CPP0X
 endif
 
diff --git a/build/vsproject/tbb.vcproj b/build/vsproject/tbb.vcproj
index 7576596..1024d7e 100644
--- a/build/vsproject/tbb.vcproj
+++ b/build/vsproject/tbb.vcproj
@@ -1,906 +1,306 @@
 <?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="tbb"
-	ProjectGUID="{F62787DD-1327-448B-9818-030062BCFAA5}"
-	RootNamespace="tbb"
-	Keyword="Win32Proj"
-	>
+<VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="tbb" ProjectGUID="{F62787DD-1327-448B-9818-030062BCFAA5}" RootNamespace="tbb" Keyword="Win32Proj">
 	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
+		<Platform Name="Win32"/>
+		<Platform Name="x64"/>
 	</Platforms>
 	<ToolFiles>
-		<DefaultToolFile
-			FileName="masm.rules"
-		/>
+		<DefaultToolFile FileName="masm.rules"/>
 	</ToolFiles>
 	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /WX /I../../src /I../../include"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def"
-				OutputFile="$(OutDir)\tbb_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include" Optimization="0" AdditionalIncludeDirectories="." PreprocessorDefinitions="" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4" Detec [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def" OutputFile="$(OutDir)\tbb_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /WX /I../../src /I../../include"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				ShowIncludes="false"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def"
-				OutputFile="$(OutDir)\tbb_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include" Optimization="0" AdditionalIncludeDirectories="." PreprocessorDefinitions="" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="4"  [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def" OutputFile="$(OutDir)\tbb_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /WX /I../../src /I../../include"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def"
-				OutputFile="$(OutDir)\tbb.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include" AdditionalIncludeDirectories="." PreprocessorDefinitions="" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" Detect64BitPortabilityProblems="false" DebugInformationFormat="3"/>
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbb.def" OutputFile="$(OutDir)\tbb.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /WX /I../../src /I../../include"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbb.def"
-				OutputFile="$(OutDir)\tbb.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include" AdditionalIncludeDirectories="." PreprocessorDefinitions="" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" Detect64BitPortabilityProblems="false" DebugInformationFormat="3"/>
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbb.def" OutputFile="$(OutDir)\tbb.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
 	</Configurations>
 	<References>
 	</References>
 	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\src\tbb\ia32-masm\atomic_support.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+		<Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File RelativePath="..\..\src\tbb\ia32-masm\atomic_support.asm">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\intel64-masm\atomic_support.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+			<File RelativePath="..\..\src\tbb\intel64-masm\atomic_support.asm">
+				<FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="building atomic_support.obj"
-						CommandLine="ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm&#x0D;&#x0A;"
-						Outputs="intel64\Debug\atomic_support.obj"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCCustomBuildTool" Description="building atomic_support.obj" CommandLine="ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+" Outputs="intel64\Debug\atomic_support.obj"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|Win32" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="building atomic_support.obj"
-						CommandLine="ml64 /Fo"intel64\Release\atomic_support.obj"  /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm&#x0D;&#x0A;"
-						Outputs="intel64\Release\atomic_support.obj"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCCustomBuildTool" Description="building atomic_support.obj" CommandLine="ml64 /Fo"intel64\Release\atomic_support.obj"  /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+" Outputs="intel64\Release\atomic_support.obj"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\cache_aligned_allocator.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\concurrent_hash_map.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\concurrent_queue.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\old\concurrent_queue_v2.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\concurrent_vector.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\old\concurrent_vector_v2.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\dynamic_link.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\itt_notify.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\itt_notify_proxy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\ia32-masm\lock_byte.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+			<File RelativePath="..\..\src\tbb\itt_notify_proxy.c">
+			</File>
+			<File RelativePath="..\..\src\tbb\ia32-masm\lock_byte.asm">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\pipeline.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\queuing_mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\queuing_rw_mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\recursive_mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\spin_mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\spin_rw_mutex.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\old\spin_rw_mutex_v2.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\task.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_misc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_thread.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\win32-tbb-export.def"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+			<File RelativePath="..\..\src\tbb\win32-tbb-export.def">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|Win32">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\win64-tbb-export.def"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+			<File RelativePath="..\..\src\tbb\win64-tbb-export.def">
+				<FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|Win32" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
 			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\include\tbb\_tbb_windef.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\aligned_space.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\atomic.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range2d.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range3d.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\cache_aligned_allocator.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_hash_map.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_queue.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\old\concurrent_queue_v2.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_vector.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\old\concurrent_vector_v2.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\dynamic_link.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\enumerable_thread_specific.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\gate.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\ibm_aix51.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\itt_notify.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\linux_common.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\linux_intel64.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\linux_ia32.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\linux_ia64.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\mac_ppc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\mutex.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\null_mutex.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\null_rw_mutex.h"
-				>
+			<File RelativePath="..\..\src\tbb\concurrent_hash_map.cpp"/><File RelativePath="..\..\src\tbb\concurrent_queue.cpp"/><File RelativePath="..\..\src\tbb\concurrent_vector.cpp"/><File RelativePath="..\..\src\tbb\dynamic_link.cpp"/><File RelativePath="..\..\src\tbb\itt_notify.cpp"/><File RelativePath="..\..\src\tbb\cache_aligned_allocator.cpp"/><File RelativePath="..\..\src\tbb\pipeline.cpp"/><File RelativePath="..\..\src\tbb\queuing_mutex.cpp"/><File RelativePath="..\..\src\tbb\queuing_r [...]
+		<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File RelativePath="..\..\include\tbb\_tbb_windef.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\aligned_space.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\atomic.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range2d.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range3d.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\cache_aligned_allocator.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_hash_map.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_queue.h">
+			</File>
+			<File RelativePath="..\..\src\old\concurrent_queue_v2.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_vector.h">
+			</File>
+			<File RelativePath="..\..\src\old\concurrent_vector_v2.h">
+			</File>
+			<File RelativePath="..\..\src\tbb\dynamic_link.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\enumerable_thread_specific.h">
+			</File>
+			<File RelativePath="..\..\src\tbb\gate.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\ibm_aix51.h">
+			</File>
+			<File RelativePath="..\..\src\tbb\itt_notify.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\linux_common.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\linux_intel64.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\linux_ia32.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\linux_ia64.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\machine\mac_ppc.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\mutex.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\null_mutex.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\null_rw_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_do.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_do.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_for.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_for.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_reduce.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_reduce.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_scan.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_scan.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_sort.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_sort.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_while.h"
-				>
+			<File RelativePath="..\..\include\tbb\parallel_while.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\partitioner.h"
-				>
+			<File RelativePath="..\..\include\tbb\partitioner.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\pipeline.h"
-				>
+			<File RelativePath="..\..\include\tbb\pipeline.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\queuing_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\queuing_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\queuing_rw_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\queuing_rw_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\recursive_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\recursive_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\scalable_allocator.h"
-				>
+			<File RelativePath="..\..\include\tbb\scalable_allocator.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\spin_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\spin_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\spin_rw_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\spin_rw_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\src\old\spin_rw_mutex_v2.h"
-				>
+			<File RelativePath="..\..\src\old\spin_rw_mutex_v2.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task.h"
-				>
+			<File RelativePath="..\..\include\tbb\task.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task_scheduler_init.h"
-				>
+			<File RelativePath="..\..\include\tbb\task_scheduler_init.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task_scheduler_observer.h"
-				>
+			<File RelativePath="..\..\include\tbb\task_scheduler_observer.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_allocator.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_allocator.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_assert_impl.h"
-				>
+			<File RelativePath="..\..\src\tbb\tbb_assert_impl.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_exception.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_exception.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_machine.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_machine.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_misc.h"
-				>
+			<File RelativePath="..\..\src\tbb\tbb_misc.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_profiling.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_profiling.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_stddef.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_stddef.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_thread.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_thread.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_version.h"
-				>
+			<File RelativePath="..\..\src\tbb\tbb_version.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbbmalloc_proxy.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbbmalloc_proxy.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tick_count.h"
-				>
+			<File RelativePath="..\..\include\tbb\tick_count.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\windows_intel64.h"
-				>
+			<File RelativePath="..\..\include\tbb\machine\windows_intel64.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\windows_ia32.h"
-				>
+			<File RelativePath="..\..\include\tbb\machine\windows_ia32.h">
 			</File>
 		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-			<File
-				RelativePath="..\..\src\tbb\tbb_resource.rc"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File RelativePath="..\..\src\tbb\tbb_resource.rc">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
 			</File>
 		</Filter>
diff --git a/build/vsproject/tbbmalloc.vcproj b/build/vsproject/tbbmalloc.vcproj
index 72e0928..26cc44b 100644
--- a/build/vsproject/tbbmalloc.vcproj
+++ b/build/vsproject/tbbmalloc.vcproj
@@ -1,814 +1,286 @@
 <?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="tbbmalloc"
-	ProjectGUID="{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}"
-	RootNamespace="tbbmalloc"
-	Keyword="Win32Proj"
-	>
+<VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="tbbmalloc" ProjectGUID="{B15F131E-328A-4D42-ADC2-9FF4CA6306D8}" RootNamespace="tbbmalloc" Keyword="Win32Proj">
 	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
+		<Platform Name="Win32"/>
+		<Platform Name="x64"/>
 	</Platforms>
 	<ToolFiles>
-		<DefaultToolFile
-			FileName="masm.rules"
-		/>
+		<DefaultToolFile FileName="masm.rules"/>
 	</ToolFiles>
 	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" Optimization="0" AdditionalIncludeDirectories="." PreprocessorDefinitions="" MinimalRebuild="true" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				TreatWChar_tAsBuiltInType="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				ShowIncludes="false"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHs- /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" Optimization="0" AdditionalIncludeDirectories="." MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" TreatWChar_tAsBu [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /Oy /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" AdditionalIncludeDirectories="." PreprocessorDefinitions="" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" SuppressStartupBanner="false" Det [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" AdditionalIncludeDirectories="." PreprocessorDefinitions="" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" SuppressStartupBanner="false" De [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
 	</Configurations>
 	<References>
 	</References>
 	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\src\tbb\ia32-masm\atomic_support.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+		<Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File RelativePath="..\..\src\tbb\ia32-masm\atomic_support.asm">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\intel64-masm\atomic_support.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+			<File RelativePath="..\..\src\tbb\intel64-masm\atomic_support.asm">
+				<FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="building atomic_support.obj"
-						CommandLine="ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm&#x0D;&#x0A;"
-						Outputs="intel64\Debug\atomic_support.obj"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCCustomBuildTool" Description="building atomic_support.obj" CommandLine="ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+" Outputs="intel64\Debug\atomic_support.obj"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|Win32" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="building atomic_support.obj"
-						CommandLine="ml64 /Fo"intel64\Release\atomic_support.obj"  /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm&#x0D;&#x0A;"
-						Outputs="intel64\Release\atomic_support.obj"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCCustomBuildTool" Description="building atomic_support.obj" CommandLine="ml64 /Fo"intel64\Release\atomic_support.obj"  /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm
+" Outputs="intel64\Release\atomic_support.obj"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbb\dynamic_link.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\itt_notify_proxy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\ia32-masm\lock_byte.asm"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+			<File RelativePath="..\..\src\tbb\itt_notify_proxy.c">
+			</File>
+			<File RelativePath="..\..\src\tbb\ia32-masm\lock_byte.asm">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-						AdditionalOptions="/coff /Zi"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM" AdditionalOptions="/coff /Zi"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="MASM"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="MASM"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\MemoryAllocator.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbb\tbb_misc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\tbbmalloc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\win32-tbbmalloc-export.def"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbbmalloc.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbbmalloc.def"
-					/>
+			<File RelativePath="..\..\src\tbbmalloc\win32-tbbmalloc-export.def">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="VCCustomBuildTool" Description="generating tbbmalloc.def file" CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def
+" Outputs="$(IntDir)\tbbmalloc.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbbmalloc.def"
-					/>
+				<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def
+" Outputs="$(IntDir)\tbbmalloc.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbbmalloc.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbbmalloc.def"
-					/>
+				<FileConfiguration Name="Release|Win32">
+					<Tool Name="VCCustomBuildTool" Description="generating tbbmalloc.def file" CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win32-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def
+" Outputs="$(IntDir)\tbbmalloc.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|x64" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win32-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
 			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\win64-tbbmalloc-export.def"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+			<File RelativePath="..\..\src\tbbmalloc\win64-tbbmalloc-export.def">
+				<FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbbmalloc.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbbmalloc.def"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCCustomBuildTool" Description="generating tbbmalloc.def file" CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def
+" Outputs="$(IntDir)\tbbmalloc.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbb.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbb.def"
-					/>
+				<FileConfiguration Name="Release|Win32" ExcludedFromBuild="true">
+					<Tool Name="VCCustomBuildTool" Description="generating tbb.def file" CommandLine="cl /nologo /TC /EP ../../src/tbb/win64-tbb-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbb.def
+" Outputs="$(IntDir)\tbb.def"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="generating tbbmalloc.def file"
-						CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def&#x0D;&#x0A;"
-						Outputs="$(IntDir)\tbbmalloc.def"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCCustomBuildTool" Description="generating tbbmalloc.def file" CommandLine="cl /nologo /TC /EP ../../src/tbbmalloc/win64-tbbmalloc-export.def /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /D__TBB_BUILD=1 >$(IntDir)\tbbmalloc.def
+" Outputs="$(IntDir)\tbbmalloc.def"/>
 				</FileConfiguration>
 			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\include\tbb\_tbb_windef.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\aligned_space.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\atomic.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range2d.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\blocked_range3d.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\cache_aligned_allocator.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_hash_map.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_queue.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\concurrent_vector.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\Customize.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\enumerable_thread_specific.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\LifoQueue.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\MapMemory.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\mutex.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\null_mutex.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\null_rw_mutex.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_do.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_for.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_reduce.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_scan.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_sort.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\parallel_while.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\partitioner.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\pipeline.h"
-				>
+			<File RelativePath="..\..\src\tbbmalloc\tbbmalloc.cpp"/><File RelativePath="..\..\src\tbb\dynamic_link.cpp"/><File RelativePath="..\..\src\tbb\tbb_misc.cpp"/><File RelativePath="..\..\src\tbbmalloc\MemoryAllocator.cpp"/></Filter>
+		<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File RelativePath="..\..\include\tbb\_tbb_windef.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\aligned_space.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\atomic.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range2d.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\blocked_range3d.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\cache_aligned_allocator.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_hash_map.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_queue.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\concurrent_vector.h">
+			</File>
+			<File RelativePath="..\..\src\tbbmalloc\Customize.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\enumerable_thread_specific.h">
+			</File>
+			<File RelativePath="..\..\src\tbbmalloc\LifoQueue.h">
+			</File>
+			<File RelativePath="..\..\src\tbbmalloc\MapMemory.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\mutex.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\null_mutex.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\null_rw_mutex.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_do.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_for.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_reduce.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_scan.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_sort.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\parallel_while.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\partitioner.h">
+			</File>
+			<File RelativePath="..\..\include\tbb\pipeline.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\queuing_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\queuing_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\queuing_rw_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\queuing_rw_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\recursive_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\recursive_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\scalable_allocator.h"
-				>
+			<File RelativePath="..\..\include\tbb\scalable_allocator.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\spin_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\spin_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\spin_rw_mutex.h"
-				>
+			<File RelativePath="..\..\include\tbb\spin_rw_mutex.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\Statistics.h"
-				>
+			<File RelativePath="..\..\src\tbbmalloc\Statistics.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task.h"
-				>
+			<File RelativePath="..\..\include\tbb\task.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task_scheduler_init.h"
-				>
+			<File RelativePath="..\..\include\tbb\task_scheduler_init.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\task_scheduler_observer.h"
-				>
+			<File RelativePath="..\..\include\tbb\task_scheduler_observer.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_allocator.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_allocator.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_exception.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_exception.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_machine.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_machine.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_profiling.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_profiling.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_stddef.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_stddef.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbb_thread.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbb_thread.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbbmalloc_proxy.h"
-				>
+			<File RelativePath="..\..\include\tbb\tbbmalloc_proxy.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\tick_count.h"
-				>
+			<File RelativePath="..\..\include\tbb\tick_count.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\TypeDefinitions.h"
-				>
+			<File RelativePath="..\..\src\tbbmalloc\TypeDefinitions.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\windows_intel64.h"
-				>
+			<File RelativePath="..\..\include\tbb\machine\windows_intel64.h">
 			</File>
-			<File
-				RelativePath="..\..\include\tbb\machine\windows_ia32.h"
-				>
+			<File RelativePath="..\..\include\tbb\machine\windows_ia32.h">
 			</File>
 		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-			<File
-				RelativePath="..\..\src\tbbmalloc\tbbmalloc.rc"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File RelativePath="..\..\src\tbbmalloc\tbbmalloc.rc">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
 			</File>
 		</Filter>
diff --git a/build/vsproject/tbbmalloc_proxy.vcproj b/build/vsproject/tbbmalloc_proxy.vcproj
index 72713df..57d65f7 100644
--- a/build/vsproject/tbbmalloc_proxy.vcproj
+++ b/build/vsproject/tbbmalloc_proxy.vcproj
@@ -1,437 +1,122 @@
 <?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="tbbmalloc_proxy"
-	ProjectGUID="{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}"
-	RootNamespace="tbbmalloc_proxy"
-	Keyword="Win32Proj"
-	>
+<VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="tbbmalloc_proxy" ProjectGUID="{02F61511-D5B6-46E6-B4BB-DEAA96E6BCC7}" RootNamespace="tbbmalloc_proxy" Keyword="Win32Proj">
 	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
+		<Platform Name="Win32"/>
+		<Platform Name="x64"/>
 	</Platforms>
 	<ToolFiles>
-		<DefaultToolFile
-			FileName="masm.rules"
-		/>
+		<DefaultToolFile FileName="masm.rules"/>
 	</ToolFiles>
 	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /WX /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				MinimalRebuild="true"
-				ExceptionHandling="1"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO "
-				AdditionalDependencies="$(OutDir)\tbbmalloc_debug.lib"
-				OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" Optimization="0" AdditionalIncludeDirectories="." PreprocessorDefinitions="" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="0" RuntimeLibrary=" [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO " AdditionalDependencies="$(OutDir)\tbbmalloc_debug.lib" OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /WX /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				Optimization="0"
-				AdditionalIncludeDirectories="."
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				TreatWChar_tAsBuiltInType="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				ShowIncludes="false"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Debug|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" Optimization="0" AdditionalIncludeDirectories="." MinimalRebuild="false" ExceptionHandling="0" BasicRuntimeChecks="0" RuntimeLibrary="3" TreatWChar_tAsBuil [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc_proxy_debug.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)"
-			IntermediateDirectory="ia32\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /WX /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  "
-				OutputFile="$(OutDir)\tbbmalloc_proxy.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)ia32\$(ConfigurationName)" IntermediateDirectory="ia32\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /Oy /D_USE_RTM_VERSION /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" AdditionalIncludeDirectories="." PreprocessorDefinitions="" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" SuppressStartupBanner="false" Detec [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO  " OutputFile="$(OutDir)\tbbmalloc_proxy.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)"
-			IntermediateDirectory="intel64\$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="0"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="MASM"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /WX /I../../src /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc"
-				AdditionalIncludeDirectories="."
-				PreprocessorDefinitions=""
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="4"
-				SuppressStartupBanner="false"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbbmalloc.def"
-				OutputFile="$(OutDir)\tbbmalloc_proxy.dll"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
+		<Configuration Name="Release|x64" OutputDirectory="$(SolutionDir)intel64\$(ConfigurationName)" IntermediateDirectory="intel64\$(ConfigurationName)" ConfigurationType="2" CharacterSet="0" WholeProgramOptimization="1">
+			<Tool Name="VCPreBuildEventTool"/>
+			<Tool Name="VCCustomBuildTool"/>
+			<Tool Name="MASM"/>
+			<Tool Name="VCXMLDataGeneratorTool"/>
+			<Tool Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool Name="VCMIDLTool" TargetEnvironment="3"/>
+			<Tool Name="VCCLCompilerTool" AdditionalOptions=" /c /MD /O2 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /D_USE_RTM_VERSION /GS- /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 /W4 /Wp64 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc" AdditionalIncludeDirectories="." PreprocessorDefinitions="" ExceptionHandling="0" RuntimeLibrary="2" UsePrecompiledHeader="0" WarningLevel="4" SuppressStartupBanner="false" Dete [...]
+			<Tool Name="VCManagedResourceCompilerTool"/>
+			<Tool Name="VCResourceCompilerTool"/>
+			<Tool Name="VCPreLinkEventTool"/>
+			<Tool Name="VCLinkerTool" AdditionalOptions="/nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:$(IntDir)\tbbmalloc.def" OutputFile="$(OutDir)\tbbmalloc_proxy.dll" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="17"/>
+			<Tool Name="VCALinkTool"/>
+			<Tool Name="VCManifestTool"/>
+			<Tool Name="VCXDCMakeTool"/>
+			<Tool Name="VCBscMakeTool"/>
+			<Tool Name="VCFxCopTool"/>
+			<Tool Name="VCAppVerifierTool"/>
+			<Tool Name="VCWebDeploymentTool"/>
+			<Tool Name="VCPostBuildEventTool"/>
 		</Configuration>
 	</Configurations>
 	<References>
 	</References>
 	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\src\tbbmalloc\proxy.cpp"
-				>
+		<Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File RelativePath="..\..\src\tbbmalloc\proxy.cpp"/><File RelativePath="..\..\src\tbbmalloc\tbb_function_replacement.cpp"/></Filter>
+		<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File RelativePath="..\..\src\tbbmalloc\tbb_function_replacement.h">
 			</File>
-			<File
-				RelativePath="..\..\src\tbbmalloc\tbb_function_replacement.cpp"
-				>
+			<File RelativePath="..\..\include\tbb\tbbmalloc_proxy.h">
 			</File>
 		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\src\tbbmalloc\tbb_function_replacement.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\tbb\tbbmalloc_proxy.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-			<File
-				RelativePath="..\..\src\tbbmalloc\tbbmalloc.rc"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File RelativePath="..\..\src\tbbmalloc\tbbmalloc.rc">
+				<FileConfiguration Name="Debug|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Debug|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|Win32">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"
-					/>
+				<FileConfiguration Name="Release|x64">
+					<Tool Name="VCResourceCompilerTool" AdditionalOptions="/I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400"/>
 				</FileConfiguration>
 			</File>
 		</Filter>
diff --git a/build/windows.icl.inc b/build/windows.icl.inc
index 4c44d4a..386c5d8 100644
--- a/build/windows.icl.inc
+++ b/build/windows.icl.inc
@@ -92,7 +92,7 @@ endif
 
 C_FLAGS = $(CPLUS_FLAGS)
 
-ifneq (0,$(lambdas))
+ifneq (00,$(lambdas)$(cpp0x))
 	CPLUS_FLAGS += /Qstd=c++0x /D_TBB_CPP0X
 endif
 
diff --git a/build/windows.inc b/build/windows.inc
index 6e899c5..400864f 100644
--- a/build/windows.inc
+++ b/build/windows.inc
@@ -78,7 +78,7 @@ MALLOC.DLL = tbbmalloc$(DEBUG_SUFFIX).$(DLL)
 MALLOC.LIB = tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
 MALLOC.RES = tbbmalloc.res
 MALLOC.MANIFEST =
-ifneq ($(runtime),vc7.1)
+ifneq ($(filter vc8 vc9,$(runtime)),)
 MALLOC.MANIFEST = tbbmanifest.exe.manifest
 endif
 LINK_MALLOC.LIB = $(MALLOC.LIB)
diff --git a/doc/Release_Notes.txt b/doc/Release_Notes.txt
index 8fc0549..8981743 100644
--- a/doc/Release_Notes.txt
+++ b/doc/Release_Notes.txt
@@ -41,14 +41,14 @@ Software - Minimum Requirements
 
     Supported operating system (see below)
     Supported compiler (see below)
-    Xcode* tool suite 2.4.1 or higher (Mac OS* X systems only)
+    Xcode* tool suite 3.1.2 or higher (Mac OS* X systems only)
     Microsoft* Internet Explorer* 6.0, or other compatible web browser
     Adobe(R) Reader(R)* 6.0 or higher
 
 Software - Recommended
 
     Intel(R) Parallel Studio
-    Intel(R) C++ Compiler 10.0 or higher
+    Intel(R) C++ Compiler 10.1 or higher
     Intel(R) Thread Checker 3.1 or higher
     Intel(R) Thread Profiler 3.1 or higher
 
@@ -59,12 +59,13 @@ Software - Supported Operating Systems
 	Microsoft* Windows* Server 2003
 	Microsoft* Windows* Vista
 	Microsoft* Windows* Server 2008
+	Microsoft* Windows* 7
     Linux* Systems
 	Red Hat* Enterprise Linux* 3, 4, 5
 	    (when using Red Hat* Enterprise Linux* 4 with Intel(R)
 	    Itanium(R) processors, operating system Update 2 or higher
 	    is recommended)
-	Red Hat* Fedora* 10, 11
+	Fedora* 10, 11
 	    (not with Intel(R) Itanium(R) processors)
 	Asianux* 3.0
 	Debian* GNU/Linux* 4.0, 5.0
@@ -83,7 +84,7 @@ Software - Supported Compilers
 	Windows* systems only)
     Microsoft* Visual C++ 9.0 (Microsoft* Visual Studio* 2008,
 	Windows* systems only)
-    Intel(R) C++ Compiler 10.0 or higher
+    Intel(R) C++ Compiler 10.1 or higher
     For each supported Linux* operating system, the standard gcc
 	version provided with that operating system is supported,
 	including gcc 3.2 through 4.4
@@ -132,14 +133,13 @@ Library Issues
 	the Tutorial in the product "doc" sub-directory for more details
 	on debug vs. release libraries.
     
-    - In some circumstances an exception thrown during concurrent_vector
-	growth operation may deadlock other threads that also attempt to
-	grow the vector. To prevent the issue, avoid going out of memory 
-	and throwing exceptions in constructors of stored objects.
-
-    - Installer doesn't accept non-commercial serial numbers on Red Hat* 
+    - Installer doesn't accept non-commercial serial numbers on 
 	Fedora* 11. To install the product on the system use license 
-	file provided after registration of the serial number.  
+	file provided after registration of the serial number.
+
+    - OpenGL* draw part in examples might freeze during execution on
+    Mac OS* X 10.6 and above but rendering and calculation parts should 
+    work there.
 
 ------------------------------------------------------------------------
 Copyright (C) 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00012.html b/doc/html/a00012.html
index 182b357..27992c6 100644
--- a/doc/html/a00012.html
+++ b/doc/html/a00012.html
@@ -20,9 +20,9 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tbb_hash_compare< T > Member List</h1>This is the complete list of members for <a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>equal</b>(const T &a, const T &b) (defined in <a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a></td><td><code> [inline, static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>hash</b>(const T &t) (defined in <a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a></td><td><code> [inline, static]</code></td></tr>
+<h1>tbb::tbb_hash_compare< T > Member List</h1>This is the complete list of members for <a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>equal</b>(const T &a, const T &b) (defined in <a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>hash</b>(const T &t) (defined in <a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a>)</td><td><a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a></td><td><code> [inline, static]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00013.html b/doc/html/a00013.html
index 0c36d5a..ab593c8 100644
--- a/doc/html/a00013.html
+++ b/doc/html/a00013.html
@@ -26,6 +26,7 @@
   <tr bgcolor="#f0f0f0"><td><b>begin</b>() const  (defined in <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#36bcd50fd5383f3682032323b2d74333">clear</a>()</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#342582ba05d9fb893ed80875d2b7a42f">concurrent_hash_map</a>(const allocator_type &a=allocator_type())</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00130.html#c1bf3c669935aceb1dc0169e3a19e0be">concurrent_hash_map</a>(size_type n, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#bc50f7bca65d0c27cbf5c31d2fa63eac">concurrent_hash_map</a>(const concurrent_hash_map &table, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">concurrent_hash_map</a>(I first, I last, const allocator_type &a=allocator_type())</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>const_accessor</b> (defined in <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [friend]</code></td></tr>
@@ -47,7 +48,6 @@
   <tr class="memlist"><td><a class="el" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">exclude</a>(const_accessor &item_accessor, bool readonly)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [protected]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#9fa1ca60af4ef761a100617b27718585">find</a>(const_accessor &result, const Key &key) const </td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">find</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00130.html#2f1ca7e8319c464349a9de304b6dbf4a">find</a>(const Key &key) const </td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline, protected]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">get_allocator</a>() const </td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">insert</a>(const_accessor &result, const Key &key)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#8ea81ff7fea044f859273b354c91c185">insert</a>(accessor &result, const Key &key)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline]</code></td></tr>
@@ -60,6 +60,7 @@
   <tr class="memlist"><td><a class="el" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">internal_copy</a>(const concurrent_hash_map &source)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [protected]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>internal_copy</b>(I first, I last) (defined in <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [protected]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">internal_equal_range</a>(const Key &key, I end) const </td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00130.html#f0cdf5930563a49ffe827c520e948e01">internal_fast_find</a>(const Key &key) const </td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [inline, protected]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>iterator</b> typedef (defined in <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>key_type</b> typedef (defined in <a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">lookup</a>(bool op_insert, const Key &key, const T *t, const_accessor *result, bool write)</td><td><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td><td><code> [protected]</code></td></tr>
diff --git a/doc/html/a00098.html b/doc/html/a00031.html
similarity index 59%
copy from doc/html/a00098.html
copy to doc/html/a00031.html
index b4f339b..ecb2c61 100644
--- a/doc/html/a00098.html
+++ b/doc/html/a00031.html
@@ -20,10 +20,11 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tick_count Member List</h1>This is the complete list of members for <a class="el" href="a00172.html">tbb::tick_count</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00172.html#fb7f78ca61cf28398645ace66e284473">now</a>()</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00172.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>()</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::null_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00144.html">tbb::null_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00144.html">tbb::null_mutex</a>)</td><td><a class="el" href="a00144.html">tbb::null_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00144.html">tbb::null_mutex</a>)</td><td><a class="el" href="a00144.html">tbb::null_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00144.html">tbb::null_mutex</a>)</td><td><a class="el" href="a00144.html">tbb::null_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>null_mutex</b>() (defined in <a class="el" href="a00144.html">tbb::null_mutex</a>)</td><td><a class="el" href="a00144.html">tbb::null_mutex</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00032.html b/doc/html/a00032.html
new file mode 100644
index 0000000..1f4a592
--- /dev/null
+++ b/doc/html/a00032.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class Members</span></a></li>
+  </ul></div>
+<h1>tbb::null_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>acquire</b>(null_mutex &) (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>release</b>() (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b>() (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b>(null_mutex &) (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>try_acquire</b>(null_mutex &) (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~scoped_lock</b>() (defined in <a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>)</td><td><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00047.html b/doc/html/a00033.html
similarity index 59%
copy from doc/html/a00047.html
copy to doc/html/a00033.html
index bd37ccc..3ace8db 100644
--- a/doc/html/a00047.html
+++ b/doc/html/a00033.html
@@ -20,13 +20,11 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::queuing_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00148.html">tbb::queuing_mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>()</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::null_rw_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00146.html">tbb::null_rw_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00146.html">tbb::null_rw_mutex</a>)</td><td><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00146.html">tbb::null_rw_mutex</a>)</td><td><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00146.html">tbb::null_rw_mutex</a>)</td><td><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>null_rw_mutex</b>() (defined in <a class="el" href="a00146.html">tbb::null_rw_mutex</a>)</td><td><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00034.html b/doc/html/a00034.html
new file mode 100644
index 0000000..8de6965
--- /dev/null
+++ b/doc/html/a00034.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class Members</span></a></li>
+  </ul></div>
+<h1>tbb::null_rw_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>acquire</b>(null_rw_mutex &, bool=true) (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>downgrade_to_reader</b>() (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>release</b>() (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b>() (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b>(null_rw_mutex &, bool=true) (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>try_acquire</b>(null_rw_mutex &, bool=true) (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>upgrade_to_writer</b>() (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~scoped_lock</b>() (defined in <a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>)</td><td><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+</table><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00035.html b/doc/html/a00035.html
index 891f6e2..a187139 100644
--- a/doc/html/a00035.html
+++ b/doc/html/a00035.html
@@ -20,9 +20,9 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::parallel_do_feeder< Item > Member List</h1>This is the complete list of members for <a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">add</a>(const Item &item)</td><td><a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::parallel_do_feeder_impl</b> (defined in <a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::parallel_do_feeder< Item > Member List</h1>This is the complete list of members for <a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">add</a>(const Item &item)</td><td><a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::parallel_do_feeder_impl</b> (defined in <a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a>)</td><td><a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a></td><td><code> [friend]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00036.html b/doc/html/a00036.html
index 577b97c..1c5bfd2 100644
--- a/doc/html/a00036.html
+++ b/doc/html/a00036.html
@@ -20,8 +20,8 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::pre_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00147.html">tbb::pre_scan_tag</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>is_final_scan</b>() (defined in <a class="el" href="a00147.html">tbb::pre_scan_tag</a>)</td><td><a class="el" href="a00147.html">tbb::pre_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
+<h1>tbb::pre_scan_tag Member List</h1>This is the complete list of members for <a class="el" href="a00151.html">tbb::pre_scan_tag</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_final_scan</b>() (defined in <a class="el" href="a00151.html">tbb::pre_scan_tag</a>)</td><td><a class="el" href="a00151.html">tbb::pre_scan_tag</a></td><td><code> [inline, static]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00038.html b/doc/html/a00038.html
index 0cf4b5e..3d7e71c 100644
--- a/doc/html/a00038.html
+++ b/doc/html/a00038.html
@@ -20,12 +20,12 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::parallel_while< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00145.html">tbb::parallel_while< Body ></a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00145.html#e131c560057a58229992b61eb8dba4c6">add</a>(const value_type &item)</td><td><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>()</td><td><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a>(Stream &stream, const Body &body)</td><td><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> typedef</td><td><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>()</td><td><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::parallel_while< Body > Member List</h1>This is the complete list of members for <a class="el" href="a00149.html">tbb::parallel_while< Body ></a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00149.html#e131c560057a58229992b61eb8dba4c6">add</a>(const value_type &item)</td><td><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>()</td><td><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a>(Stream &stream, const Body &body)</td><td><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> typedef</td><td><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>()</td><td><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00039.html b/doc/html/a00039.html
index 0b489ce..c3f3c8c 100644
--- a/doc/html/a00039.html
+++ b/doc/html/a00039.html
@@ -20,11 +20,11 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::simple_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00156.html">tbb::simple_partitioner</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00156.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00156.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce</b> (defined in <a class="el" href="a00156.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00156.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00156.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00156.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>simple_partitioner</b>() (defined in <a class="el" href="a00156.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00156.html">tbb::simple_partitioner</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::simple_partitioner Member List</h1>This is the complete list of members for <a class="el" href="a00160.html">tbb::simple_partitioner</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_for</b> (defined in <a class="el" href="a00160.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00160.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_reduce</b> (defined in <a class="el" href="a00160.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00160.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::start_scan</b> (defined in <a class="el" href="a00160.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00160.html">tbb::simple_partitioner</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>simple_partitioner</b>() (defined in <a class="el" href="a00160.html">tbb::simple_partitioner</a>)</td><td><a class="el" href="a00160.html">tbb::simple_partitioner</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00045.html b/doc/html/a00045.html
index 5587370..80f2eab 100644
--- a/doc/html/a00045.html
+++ b/doc/html/a00045.html
@@ -20,8 +20,8 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::thread_bound_filter Member List</h1>This is the complete list of members for <a class="el" href="a00171.html">tbb::thread_bound_filter</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>end_of_stream</b> enum value (defined in <a class="el" href="a00171.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
+<h1>tbb::thread_bound_filter Member List</h1>This is the complete list of members for <a class="el" href="a00175.html">tbb::thread_bound_filter</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>end_of_stream</b> enum value (defined in <a class="el" href="a00175.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>filter</b>(bool is_serial_) (defined in <a class="el" href="a00139.html">tbb::filter</a>)</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline, protected]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>filter</b>(mode filter_mode) (defined in <a class="el" href="a00139.html">tbb::filter</a>)</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline, protected]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#56275eb889c77c4807967133e21401bd">finalize</a>(void *)</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline, virtual]</code></td></tr>
@@ -30,18 +30,18 @@
   <tr class="memlist"><td><a class="el" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">is_bound</a>() const </td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#cd53206c4795ef2df5df26b795caf692">is_ordered</a>() const </td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#fcfec27656a69ff2072802ac001e936f">is_serial</a>() const </td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>item_not_available</b> enum value (defined in <a class="el" href="a00171.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>item_not_available</b> enum value (defined in <a class="el" href="a00175.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> enum name</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a>(void *item)=0</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [pure virtual]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> enum value</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00171.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a>()</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>result_type</b> enum name (defined in <a class="el" href="a00171.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00175.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a>()</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>result_type</b> enum name (defined in <a class="el" href="a00175.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> enum value</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> enum value</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> enum value</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>success</b> enum value (defined in <a class="el" href="a00171.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>thread_bound_filter</b>(mode filter_mode) (defined in <a class="el" href="a00171.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td><code> [inline, protected]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00171.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a>()</td><td><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>success</b> enum value (defined in <a class="el" href="a00175.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>thread_bound_filter</b>(mode filter_mode) (defined in <a class="el" href="a00175.html">tbb::thread_bound_filter</a>)</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00175.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a>()</td><td><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00139.html#66d159f362293e3964ba3da8bc1d2604">~filter</a>()</td><td><a class="el" href="a00139.html">tbb::filter</a></td><td><code> [virtual]</code></td></tr>
 </table><hr>
 <p></p>
diff --git a/doc/html/a00046.html b/doc/html/a00046.html
index 01f9fd1..94d4973 100644
--- a/doc/html/a00046.html
+++ b/doc/html/a00046.html
@@ -20,18 +20,18 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::pipeline Member List</h1>This is the complete list of members for <a class="el" href="a00146.html">tbb::pipeline</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00146.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>(filter &filter_)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00146.html#2c84aef5b834b555ee220b176e25931e">clear</a>()</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>filter</b> (defined in <a class="el" href="a00146.html">tbb::pipeline</a>)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_cleaner</b> (defined in <a class="el" href="a00146.html">tbb::pipeline</a>)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_root_task</b> (defined in <a class="el" href="a00146.html">tbb::pipeline</a>)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (defined in <a class="el" href="a00146.html">tbb::pipeline</a>)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>()</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00146.html#f627616049b3fe36801f37ee40403ef8">run</a>(size_t max_number_of_live_tokens)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00146.html#93d7fec8cd607b803dd2d79fb46bd260">run</a>(size_t max_number_of_live_tokens, tbb::task_group_context &context)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>thread_bound_filter</b> (defined in <a class="el" href="a00146.html">tbb::pipeline</a>)</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00146.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>()</td><td><a class="el" href="a00146.html">tbb::pipeline</a></td><td><code> [virtual]</code></td></tr>
+<h1>tbb::pipeline Member List</h1>This is the complete list of members for <a class="el" href="a00150.html">tbb::pipeline</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00150.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>(filter &filter_)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00150.html#2c84aef5b834b555ee220b176e25931e">clear</a>()</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>filter</b> (defined in <a class="el" href="a00150.html">tbb::pipeline</a>)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_cleaner</b> (defined in <a class="el" href="a00150.html">tbb::pipeline</a>)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::pipeline_root_task</b> (defined in <a class="el" href="a00150.html">tbb::pipeline</a>)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::stage_task</b> (defined in <a class="el" href="a00150.html">tbb::pipeline</a>)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00150.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>()</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00150.html#f627616049b3fe36801f37ee40403ef8">run</a>(size_t max_number_of_live_tokens)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00150.html#93d7fec8cd607b803dd2d79fb46bd260">run</a>(size_t max_number_of_live_tokens, tbb::task_group_context &context)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>thread_bound_filter</b> (defined in <a class="el" href="a00150.html">tbb::pipeline</a>)</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00150.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>()</td><td><a class="el" href="a00150.html">tbb::pipeline</a></td><td><code> [virtual]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00047.html b/doc/html/a00047.html
index bd37ccc..a5ff5e6 100644
--- a/doc/html/a00047.html
+++ b/doc/html/a00047.html
@@ -20,13 +20,13 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::queuing_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00148.html">tbb::queuing_mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>()</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00148.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::queuing_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00152.html">tbb::queuing_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00152.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00152.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00152.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00152.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>()</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00152.html">tbb::queuing_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td><code> [friend]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00048.html b/doc/html/a00048.html
index 802002e..562e2d9 100644
--- a/doc/html/a00048.html
+++ b/doc/html/a00048.html
@@ -20,13 +20,13 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::queuing_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00149.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>()</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00149.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>()</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00149.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a>(queuing_mutex &m)</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00149.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00149.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>()</td><td><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::queuing_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00153.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>()</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00153.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>()</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00153.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a>(queuing_mutex &m)</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00153.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>(queuing_mutex &m)</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00153.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>()</td><td><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00049.html b/doc/html/a00049.html
index 78a374a..6cde10f 100644
--- a/doc/html/a00049.html
+++ b/doc/html/a00049.html
@@ -20,14 +20,14 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::queuing_rw_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>()</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>()</td><td><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::queuing_rw_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>()</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>)</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>()</td><td><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00050.html b/doc/html/a00050.html
index d1e2afa..1e47035 100644
--- a/doc/html/a00050.html
+++ b/doc/html/a00050.html
@@ -20,15 +20,15 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::queuing_rw_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>()</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#67ae221109ddc69510ab593874e435d4">release</a>()</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>()</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>()</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>()</td><td><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::queuing_rw_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>()</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#67ae221109ddc69510ab593874e435d4">release</a>()</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>()</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>(queuing_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>()</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>()</td><td><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00051.html b/doc/html/a00051.html
index a668ac9..3a9e223 100644
--- a/doc/html/a00051.html
+++ b/doc/html/a00051.html
@@ -20,16 +20,16 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::recursive_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00152.html">tbb::recursive_mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00152.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00152.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00152.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>()</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>()</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00152.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00152.html#86e719b0afee25704af11ab97694d240">try_lock</a>()</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>()</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~recursive_mutex</b>() (defined in <a class="el" href="a00152.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::recursive_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00156.html">tbb::recursive_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00156.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00156.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00156.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>()</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>()</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00156.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00156.html#86e719b0afee25704af11ab97694d240">try_lock</a>()</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>()</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~recursive_mutex</b>() (defined in <a class="el" href="a00156.html">tbb::recursive_mutex</a>)</td><td><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00052.html b/doc/html/a00052.html
index 1aee537..0f870a1 100644
--- a/doc/html/a00052.html
+++ b/doc/html/a00052.html
@@ -20,14 +20,14 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::recursive_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>recursive_mutex</b> (defined in <a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a>)</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>()</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>()</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00153.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>()</td><td><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::recursive_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>recursive_mutex</b> (defined in <a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a>)</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>()</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00157.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>()</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00157.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>(recursive_mutex &mutex)</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>()</td><td><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00053.html b/doc/html/a00053.html
index 6f2f904..a4d7e5a 100644
--- a/doc/html/a00053.html
+++ b/doc/html/a00053.html
@@ -20,24 +20,24 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::scalable_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>address</b>(reference x) const  (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>address</b>(const_reference x) const  (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>construct</b>(pointer p, const value_type &val) (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>destroy</b>(pointer p) (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00154.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const </td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>() (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>(const scalable_allocator &) (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>(const scalable_allocator< U > &) (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+<h1>tbb::scalable_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>address</b>(reference x) const  (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>address</b>(const_reference x) const  (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>construct</b>(pointer p, const value_type &val) (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>destroy</b>(pointer p) (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00158.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const </td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>() (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>(const scalable_allocator &) (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scalable_allocator</b>(const scalable_allocator< U > &) (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>)</td><td><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00055.html b/doc/html/a00055.html
index 801aa32..b11b676 100644
--- a/doc/html/a00055.html
+++ b/doc/html/a00055.html
@@ -20,10 +20,10 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::scalable_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00155.html">tbb::scalable_allocator< void ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00155.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00155.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00155.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
+<h1>tbb::scalable_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00159.html">tbb::scalable_allocator< void ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00159.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00159.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00159.html">tbb::scalable_allocator< void ></a>)</td><td><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00057.html b/doc/html/a00057.html
index 75d7822..48d25f2 100644
--- a/doc/html/a00057.html
+++ b/doc/html/a00057.html
@@ -20,16 +20,16 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::spin_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00157.html">tbb::spin_mutex</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00157.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00157.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00157.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00157.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">lock</a>()</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00157.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>()</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a>()</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a>()</td><td><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::spin_mutex Member List</h1>This is the complete list of members for <a class="el" href="a00161.html">tbb::spin_mutex</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>internal_construct</b>() (defined in <a class="el" href="a00161.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00161.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00161.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00161.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">lock</a>()</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scoped_lock</b> (defined in <a class="el" href="a00161.html">tbb::spin_mutex</a>)</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>()</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a>()</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a>()</td><td><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00058.html b/doc/html/a00058.html
index 36aa31a..d2b22d1 100644
--- a/doc/html/a00058.html
+++ b/doc/html/a00058.html
@@ -20,14 +20,14 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::spin_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>()</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>()</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a>(spin_mutex &m)</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>spin_mutex</b> (defined in <a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a>)</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>()</td><td><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::spin_mutex::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>()</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00162.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>()</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00162.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a>(spin_mutex &m)</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>spin_mutex</b> (defined in <a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a>)</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>(spin_mutex &m)</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>()</td><td><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00059.html b/doc/html/a00059.html
index a4e1a6d..09de042 100644
--- a/doc/html/a00059.html
+++ b/doc/html/a00059.html
@@ -20,17 +20,17 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::spin_rw_mutex_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">lock</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#13f799708ac4ca437a16be202e263e18">lock_read</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#088bb256be794cc47d3b83791632fdfc">try_lock</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#b8667415869013f840d976aa406d385a">try_lock_read</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">unlock</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::spin_rw_mutex_v3 Member List</h1>This is the complete list of members for <a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>is_fair_mutex</b> (defined in <a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_recursive_mutex</b> (defined in <a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>is_rw_mutex</b> (defined in <a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a>)</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#4007d6e1523dbc3c2bb7f889ab789a8a">lock</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#13f799708ac4ca437a16be202e263e18">lock_read</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#088bb256be794cc47d3b83791632fdfc">try_lock</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#b8667415869013f840d976aa406d385a">try_lock_read</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#f9f52ead2098eb5fb12da59d5ae53b55">unlock</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00163.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a>()</td><td><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00060.html b/doc/html/a00060.html
index 2791fe6..ac7d368 100644
--- a/doc/html/a00060.html
+++ b/doc/html/a00060.html
@@ -20,15 +20,15 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::spin_rw_mutex_v3::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a>()</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">release</a>()</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a>()</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a>()</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a>()</td><td><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::spin_rw_mutex_v3::scoped_lock Member List</h1>This is the complete list of members for <a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00164.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a>()</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#61b14d00a78185c9b2d206ebfc379124">release</a>()</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a>()</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a>(spin_rw_mutex &m, bool write=true)</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a>()</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00164.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a>()</td><td><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00061.html b/doc/html/a00061.html
index ad29356..10e9482 100644
--- a/doc/html/a00061.html
+++ b/doc/html/a00061.html
@@ -20,24 +20,24 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::task_group_context Member List</h1>This is the complete list of members for <a class="el" href="a00163.html">tbb::task_group_context</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>bound</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a>()</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>concurrent_wait</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>default_traits</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>exact_exception</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#49a55352084fd44b8863d182e839e6dc">init</a>()</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td><code> [protected]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a>() const </td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>isolated</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>kind_type</b> enum name (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>no_cancellation</b> enum value (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a>()</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a>()</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>task</b> (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a>(kind_type relation_with_parent=bound, uintptr_t traits=default_traits)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>traits_type</b> enum name (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>~task_group_context</b>() (defined in <a class="el" href="a00163.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00163.html">tbb::task_group_context</a></td><td></td></tr>
+<h1>tbb::task_group_context Member List</h1>This is the complete list of members for <a class="el" href="a00167.html">tbb::task_group_context</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>bound</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a>()</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>concurrent_wait</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>default_traits</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>exact_exception</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#49a55352084fd44b8863d182e839e6dc">init</a>()</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td><code> [protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a>() const </td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>isolated</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>kind_type</b> enum name (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>no_cancellation</b> enum value (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a>()</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a>()</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>task</b> (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a>(kind_type relation_with_parent=bound, uintptr_t traits=default_traits)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>traits_type</b> enum name (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>~task_group_context</b>() (defined in <a class="el" href="a00167.html">tbb::task_group_context</a>)</td><td><a class="el" href="a00167.html">tbb::task_group_context</a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00063.html b/doc/html/a00063.html
index 83bb7d3..26abf35 100644
--- a/doc/html/a00063.html
+++ b/doc/html/a00063.html
@@ -20,65 +20,61 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::task Member List</h1>This is the complete list of members for <a class="el" href="a00162.html">tbb::task</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>add_to_depth</b>(int) (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a>(int delta)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">context</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>depth</b>() const  (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">depth</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> typedef</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute</a>()=0</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_child_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_continuation_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::scheduler</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::task_group_base</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>set_depth</b>(intptr_t) (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>task_list</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+<h1>tbb::task Member List</h1>This is the complete list of members for <a class="el" href="a00166.html">tbb::task</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>add_to_depth</b>(int) (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">context</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>depth</b>() const  (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute</a>()=0</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_child_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_continuation_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::scheduler</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::task_group_base</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>set_depth</b>(intptr_t) (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>task_list</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00064.html b/doc/html/a00064.html
index 2a1d5d4..6452c2b 100644
--- a/doc/html/a00064.html
+++ b/doc/html/a00064.html
@@ -21,62 +21,58 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <h1>tbb::empty_task Member List</h1>This is the complete list of members for <a class="el" href="a00137.html">tbb::empty_task</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>add_to_depth</b>(int) (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a>(int delta)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">context</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>depth</b>() const  (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">depth</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> typedef</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_child_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_continuation_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::scheduler</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>internal::task_group_base</b> (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>set_depth</b>(intptr_t) (defined in <a class="el" href="a00162.html">tbb::task</a>)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a>(depth_type new_depth)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00162.html">tbb::task</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00162.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>add_to_depth</b>(int) (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> typedef</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(task &t)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#1434c79a5138993269d034008bff7329">allocate_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a>(task_group_context &ctx)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">context</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>depth</b>() const  (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(task &victim)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_additional_child_of_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_child_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_continuation_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::allocate_root_with_context_proxy</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::scheduler</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>internal::task_group_base</b> (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a>(affinity_id id)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">parent</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a>(task &new_parent)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a> enum value</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ad774f55eaec008ae02b236423209ced">ref_count</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a>(affinity_id id)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>set_depth</b>(intptr_t) (defined in <a class="el" href="a00166.html">tbb::task</a>)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(int count)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>(task &child)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a>(task_list &list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(task &child)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a>(task_list &list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a>(task &root)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a>(task_list &root_list)</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a>() const </td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> enum name</td><td><a class="el" href="a00166.html">tbb::task</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">~task</a>()</td><td><a class="el" href="a00166.html">tbb::task</a></td><td><code> [inline, virtual]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00065.html b/doc/html/a00065.html
index 79e7040..32eb2f6 100644
--- a/doc/html/a00065.html
+++ b/doc/html/a00065.html
@@ -20,14 +20,14 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::task_list Member List</h1>This is the complete list of members for <a class="el" href="a00164.html">tbb::task_list</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00164.html#fce446ee13e025969945328f3ff59b95">clear</a>()</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00164.html#f3ac31e092814b90929f81bb30441959">empty</a>() const </td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00164.html#5fe85df5ed524418389d34051750347d">pop_front</a>()</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00164.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a>(task &task)</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>task</b> (defined in <a class="el" href="a00164.html">tbb::task_list</a>)</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">task_list</a>()</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00164.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a>()</td><td><a class="el" href="a00164.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::task_list Member List</h1>This is the complete list of members for <a class="el" href="a00168.html">tbb::task_list</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00168.html#fce446ee13e025969945328f3ff59b95">clear</a>()</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00168.html#f3ac31e092814b90929f81bb30441959">empty</a>() const </td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00168.html#5fe85df5ed524418389d34051750347d">pop_front</a>()</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00168.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a>(task &task)</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>task</b> (defined in <a class="el" href="a00168.html">tbb::task_list</a>)</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00168.html#416341c2047eaef50417b41eaf7e9de6">task_list</a>()</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00168.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a>()</td><td><a class="el" href="a00168.html">tbb::task_list</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00073.html b/doc/html/a00073.html
index e61964e..fc3eaa4 100644
--- a/doc/html/a00073.html
+++ b/doc/html/a00073.html
@@ -20,16 +20,16 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::task_scheduler_init Member List</h1>This is the complete list of members for <a class="el" href="a00165.html">tbb::task_scheduler_init</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a>()</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a></td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#d476053cc712e572554823492a5229ce">initialize</a>(int number_of_threads=automatic)</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a>(int number_of_threads, stack_size_type thread_stack_size)</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#12752282977029f23416642bc03e8b74">is_active</a>() const </td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>(int number_of_threads=automatic, stack_size_type thread_stack_size=0)</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>()</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>()</td><td><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::task_scheduler_init Member List</h1>This is the complete list of members for <a class="el" href="a00169.html">tbb::task_scheduler_init</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a>()</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a></td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#d476053cc712e572554823492a5229ce">initialize</a>(int number_of_threads=automatic)</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a>(int number_of_threads, stack_size_type thread_stack_size)</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#12752282977029f23416642bc03e8b74">is_active</a>() const </td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>(int number_of_threads=automatic, stack_size_type thread_stack_size=0)</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>()</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>()</td><td><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00075.html b/doc/html/a00075.html
index 944c030..c0c7f82 100644
--- a/doc/html/a00075.html
+++ b/doc/html/a00075.html
@@ -20,28 +20,28 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tbb_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>address</b>(reference x) const  (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>address</b>(const_reference x) const  (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>()</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline, static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>(pointer p, const value_type &value)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#ef133522bf55f05a605bee0763208281">destroy</a>(pointer p)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> enum name</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const </td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>scalable</b> enum value (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>standard</b> enum value (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>() (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>(const tbb_allocator &) (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>(const tbb_allocator< U > &) (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+<h1>tbb::tbb_allocator< T > Member List</h1>This is the complete list of members for <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>address</b>(reference x) const  (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>address</b>(const_reference x) const  (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>(size_type n, const void *=0)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>()</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline, static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>(pointer p, const value_type &value)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>(pointer p, size_type)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#ef133522bf55f05a605bee0763208281">destroy</a>(pointer p)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> enum name</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const </td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>scalable</b> enum value (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>standard</b> enum value (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>() (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>(const tbb_allocator &) (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb_allocator</b>(const tbb_allocator< U > &) (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>)</td><td><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00077.html b/doc/html/a00077.html
index 64a69cb..b4a77e9 100644
--- a/doc/html/a00077.html
+++ b/doc/html/a00077.html
@@ -20,10 +20,10 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tbb_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00167.html">tbb::tbb_allocator< void ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00167.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00167.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00167.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+<h1>tbb::tbb_allocator< void > Member List</h1>This is the complete list of members for <a class="el" href="a00171.html">tbb::tbb_allocator< void ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00171.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00171.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00171.html">tbb::tbb_allocator< void ></a>)</td><td><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00079.html b/doc/html/a00079.html
index 27b97b9..c8d9b4e 100644
--- a/doc/html/a00079.html
+++ b/doc/html/a00079.html
@@ -20,19 +20,19 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::zero_allocator< T, Allocator > Member List</h1>This is the complete list of members for <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>allocate</b>(const size_type n, const void *hint=0) (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>base_allocator_type</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>() (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>(const zero_allocator &a) (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>(const zero_allocator< U > &a) (defined in <a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::zero_allocator< T, Allocator > Member List</h1>This is the complete list of members for <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>allocate</b>(const size_type n, const void *hint=0) (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>base_allocator_type</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>() (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>(const zero_allocator &a) (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>zero_allocator</b>(const zero_allocator< U > &a) (defined in <a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>)</td><td><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00081.html b/doc/html/a00081.html
index 8b26879..ce0467d 100644
--- a/doc/html/a00081.html
+++ b/doc/html/a00081.html
@@ -20,11 +20,11 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::zero_allocator< void, Allocator > Member List</h1>This is the complete list of members for <a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>base_allocator_type</b> typedef (defined in <a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
+<h1>tbb::zero_allocator< void, Allocator > Member List</h1>This is the complete list of members for <a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>base_allocator_type</b> typedef (defined in <a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>)</td><td><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td><td></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00084.html b/doc/html/a00084.html
index 1c28d12..3b1d706 100644
--- a/doc/html/a00084.html
+++ b/doc/html/a00084.html
@@ -20,12 +20,13 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tbb_exception Member List</h1>This is the complete list of members for <a class="el" href="a00168.html">tbb::tbb_exception</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a>()=0</td><td><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">move</a>()=0</td><td><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00168.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() const =0</td><td><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a>()=0</td><td><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() const =0</td><td><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
+<h1>tbb::tbb_exception Member List</h1>This is the complete list of members for <a class="el" href="a00172.html">tbb::tbb_exception</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a>()=0</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move</a>()=0</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() const =0</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete</a>(void *p)</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a>()=0</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() const =0</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [pure virtual]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00085.html b/doc/html/a00085.html
index a437d3a..8ab0703 100644
--- a/doc/html/a00085.html
+++ b/doc/html/a00085.html
@@ -23,10 +23,13 @@
 <h1>tbb::captured_exception Member List</h1>This is the complete list of members for <a class="el" href="a00127.html">tbb::captured_exception</a>, including all inherited members.<p><table>
   <tr bgcolor="#f0f0f0"><td><b>captured_exception</b>(const captured_exception &src) (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>captured_exception</b>(const char *name, const char *info) (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00127.html#667812a82f1525e968c52593dea0ef4c">destroy</a>()</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move</a>()</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>clear</b>() (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00127.html#93d875d3555502ff6f18513525de204c">destroy</a>()</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">move</a>()</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const </td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete</a>(void *p)</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [inline]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const captured_exception &src) (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>set</b>(const char *name, const char *info) (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td></td></tr>
   <tr class="memlist"><td><a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a>()</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [inline, virtual]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const </td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [virtual]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>~captured_exception</b>() (defined in <a class="el" href="a00127.html">tbb::captured_exception</a>)</td><td><a class="el" href="a00127.html">tbb::captured_exception</a></td><td><code> [inline]</code></td></tr>
diff --git a/doc/html/a00086.html b/doc/html/a00086.html
index 2e7458f..e748dc4 100644
--- a/doc/html/a00086.html
+++ b/doc/html/a00086.html
@@ -29,6 +29,7 @@
   <tr class="memlist"><td><a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">move</a>()</td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a></td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [protected]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a>() const </td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete</a>(void *p)</td><td><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td><code> [inline]</code></td></tr>
   <tr bgcolor="#f0f0f0"><td><b>operator=</b>(const movable_exception &src) (defined in <a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a>)</td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">throw_self</a>()</td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
   <tr class="memlist"><td><a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">what</a>() const </td><td><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td><code> [inline, virtual]</code></td></tr>
diff --git a/doc/html/a00087.html b/doc/html/a00087.html
index 7c6e47e..4574c15 100644
--- a/doc/html/a00087.html
+++ b/doc/html/a00087.html
@@ -20,12 +20,12 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::internal::tbb_exception_ptr Member List</h1>This is the complete list of members for <a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>allocate</b>() (defined in <a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a>)</td><td><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>allocate</b>(const tbb_exception &) (defined in <a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a>)</td><td><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>allocate</b>(const captured_exception &) (defined in <a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a>)</td><td><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00169.html#921875bbacd2c8a5f324c7da7a415262">destroy</a>()</td><td><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00169.html#292832fd5c523e3d8081a22247840a1d">throw_self</a>()</td><td><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::internal::tbb_exception_ptr Member List</h1>This is the complete list of members for <a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>allocate</b>() (defined in <a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a>)</td><td><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>allocate</b>(const tbb_exception &tag) (defined in <a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a>)</td><td><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00173.html#c35e5db8e9cdff5d1387db5b0bad2e4a">allocate</a>(captured_exception &src)</td><td><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00173.html#921875bbacd2c8a5f324c7da7a415262">destroy</a>()</td><td><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00173.html#292832fd5c523e3d8081a22247840a1d">throw_self</a>()</td><td><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00095.html b/doc/html/a00095.html
index 0d190e7..be5fb2c 100644
--- a/doc/html/a00095.html
+++ b/doc/html/a00095.html
@@ -20,8 +20,8 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::internal::work_around_alignment_bug< Size, T > Member List</h1>This is the complete list of members for <a class="el" href="a00174.html">tbb::internal::work_around_alignment_bug< Size, T ></a>, including all inherited members.<p><table>
-  <tr bgcolor="#f0f0f0"><td><b>alignment</b> (defined in <a class="el" href="a00174.html">tbb::internal::work_around_alignment_bug< Size, T ></a>)</td><td><a class="el" href="a00174.html">tbb::internal::work_around_alignment_bug< Size, T ></a></td><td><code> [static]</code></td></tr>
+<h1>tbb::internal::work_around_alignment_bug< Size, T > Member List</h1>This is the complete list of members for <a class="el" href="a00178.html">tbb::internal::work_around_alignment_bug< Size, T ></a>, including all inherited members.<p><table>
+  <tr bgcolor="#f0f0f0"><td><b>alignment</b> (defined in <a class="el" href="a00178.html">tbb::internal::work_around_alignment_bug< Size, T ></a>)</td><td><a class="el" href="a00178.html">tbb::internal::work_around_alignment_bug< Size, T ></a></td><td><code> [static]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00098.html b/doc/html/a00098.html
index b4f339b..33cbf86 100644
--- a/doc/html/a00098.html
+++ b/doc/html/a00098.html
@@ -20,10 +20,10 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tick_count Member List</h1>This is the complete list of members for <a class="el" href="a00172.html">tbb::tick_count</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00172.html#fb7f78ca61cf28398645ace66e284473">now</a>()</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [inline, static]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00172.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>()</td><td><a class="el" href="a00172.html">tbb::tick_count</a></td><td><code> [inline]</code></td></tr>
+<h1>tbb::tick_count Member List</h1>This is the complete list of members for <a class="el" href="a00176.html">tbb::tick_count</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00176.html#fb7f78ca61cf28398645ace66e284473">now</a>()</td><td><a class="el" href="a00176.html">tbb::tick_count</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00176.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00176.html">tbb::tick_count</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>()</td><td><a class="el" href="a00176.html">tbb::tick_count</a></td><td><code> [inline]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00099.html b/doc/html/a00099.html
index 8ed7242..c0830c3 100644
--- a/doc/html/a00099.html
+++ b/doc/html/a00099.html
@@ -20,16 +20,16 @@
     <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
-<h1>tbb::tick_count::interval_t Member List</h1>This is the complete list of members for <a class="el" href="a00173.html">tbb::tick_count::interval_t</a>, including all inherited members.<p><table>
-  <tr class="memlist"><td><a class="el" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>()</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a>(double sec)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [inline, explicit]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#5871ead1ca230efbe52a5008470e6428">operator+</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#cd9814947902e26463a69a111530f81b">operator+=</a>(const interval_t &i)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#fa509691e1d689830931e36edd274f76">operator-</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>(const interval_t &i)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr class="memlist"><td><a class="el" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() const </td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
-  <tr bgcolor="#f0f0f0"><td><b>tbb::tick_count</b> (defined in <a class="el" href="a00173.html">tbb::tick_count::interval_t</a>)</td><td><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+<h1>tbb::tick_count::interval_t Member List</h1>This is the complete list of members for <a class="el" href="a00177.html">tbb::tick_count::interval_t</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>()</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a>(double sec)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [inline, explicit]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#5871ead1ca230efbe52a5008470e6428">operator+</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#cd9814947902e26463a69a111530f81b">operator+=</a>(const interval_t &i)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#09dde78a4100800c11bb883d6204b586">operator-</a>(const tick_count &t1, const tick_count &t0)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#fa509691e1d689830931e36edd274f76">operator-</a>(const interval_t &i, const interval_t &j)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>(const interval_t &i)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() const </td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [inline]</code></td></tr>
+  <tr bgcolor="#f0f0f0"><td><b>tbb::tick_count</b> (defined in <a class="el" href="a00177.html">tbb::tick_count::interval_t</a>)</td><td><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td><code> [friend]</code></td></tr>
 </table><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00115.html b/doc/html/a00115.html
index 1d13c2a..02d980b 100644
--- a/doc/html/a00115.html
+++ b/doc/html/a00115.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00115.html">affinity_partitioner</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00115.html">affinity_partitioner</a></div>
 <h1>tbb::affinity_partitioner Class Reference</h1><!-- doxytag: class="tbb::affinity_partitioner" -->An affinity partitioner.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
+<code>#include <<a class="el" href="a00342.html">partitioner.h</a>></code>
 <p>
 <a href="a00043.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -50,7 +50,7 @@ class </td><td class="memItemRight" valign="bottom"><b>internal::affinity_p
 An affinity partitioner. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00339.html">partitioner.h</a></ul>
+<li><a class="el" href="a00342.html">partitioner.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00116.html b/doc/html/a00116.html
index da49523..abd9c43 100644
--- a/doc/html/a00116.html
+++ b/doc/html/a00116.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00116.html">aligned_space</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00116.html">aligned_space</a></div>
 <h1>tbb::aligned_space< T, N > Class Template Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
 </h1><!-- doxytag: class="tbb::aligned_space" -->Block of space aligned sufficiently to construct an array T with N elements.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00252.html">aligned_space.h</a>></code>
+<code>#include <<a class="el" href="a00257.html">aligned_space.h</a>></code>
 <p>
 <a href="a00001.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -51,7 +51,7 @@ Block of space aligned sufficiently to construct an array T with N elements.
 The elements are not constructed or destroyed by this class. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00252.html">aligned_space.h</a></ul>
+<li><a class="el" href="a00257.html">aligned_space.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00117.html b/doc/html/a00117.html
index 59b36dc..92402eb 100644
--- a/doc/html/a00117.html
+++ b/doc/html/a00117.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00117.html">atomic</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00117.html">atomic</a></div>
 <h1>tbb::atomic< T > Struct Template Reference<br>
 <small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
 </h1><!-- doxytag: class="tbb::atomic" -->Primary template for atomic.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00253.html">atomic.h</a>></code>
+<code>#include <<a class="el" href="a00258.html">atomic.h</a>></code>
 <p>
 <a href="a00002.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -49,7 +49,7 @@ Primary template for atomic.
 See the Reference for details. 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00253.html">atomic.h</a></ul>
+<li><a class="el" href="a00258.html">atomic.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00118.html b/doc/html/a00118.html
index d41f740..a9046fc 100644
--- a/doc/html/a00118.html
+++ b/doc/html/a00118.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00118.html">atomic< void * ></a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00118.html">atomic< void * ></a></div>
 <h1>tbb::atomic< void * > Struct Template Reference</h1><!-- doxytag: class="tbb::atomic< void * >" -->Specialization for <a class="el" href="a00118.html">atomic<void*></a>, for sake of not allowing arithmetic or operator->.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00253.html">atomic.h</a>></code>
+<code>#include <<a class="el" href="a00258.html">atomic.h</a>></code>
 <p>
 <a href="a00003.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -44,7 +44,7 @@ void * </td><td class="memItemRight" valign="bottom"><b>operator=</b> (void
 Specialization for <a class="el" href="a00118.html">atomic<void*></a>, for sake of not allowing arithmetic or operator->. 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00253.html">atomic.h</a></ul>
+<li><a class="el" href="a00258.html">atomic.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00119.html b/doc/html/a00119.html
index 29cafc0..019a152 100644
--- a/doc/html/a00119.html
+++ b/doc/html/a00119.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>internal</b>::<a class="el" href="a00119.html">atomic_backoff</a></div>
+<a class="el" href="a00229.html">tbb</a>::<b>internal</b>::<a class="el" href="a00119.html">atomic_backoff</a></div>
 <h1>tbb::internal::atomic_backoff Class Reference</h1><!-- doxytag: class="tbb::internal::atomic_backoff" -->Class that implements exponential backoff.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00378.html">tbb_machine.h</a>></code>
+<code>#include <<a class="el" href="a00382.html">tbb_machine.h</a>></code>
 <p>
 <a href="a00088.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -47,7 +47,7 @@ Class that implements exponential backoff.
 See implementation of spin_wait_while_eq for an example. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00378.html">tbb_machine.h</a></ul>
+<li><a class="el" href="a00382.html">tbb_machine.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00120.html b/doc/html/a00120.html
index 6f053f5..b545d6d 100644
--- a/doc/html/a00120.html
+++ b/doc/html/a00120.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00120.html">auto_partitioner</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00120.html">auto_partitioner</a></div>
 <h1>tbb::auto_partitioner Class Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::auto_partitioner" -->An auto partitioner.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
+<code>#include <<a class="el" href="a00342.html">partitioner.h</a>></code>
 <p>
 <a href="a00041.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -52,7 +52,7 @@ An auto partitioner.
 The range is initial divided into several large chunks. Chunks are further subdivided into VICTIM_CHUNKS pieces if they are stolen and divisible. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00339.html">partitioner.h</a></ul>
+<li><a class="el" href="a00342.html">partitioner.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00121.html b/doc/html/a00121.html
index b0ecb85..f103606 100644
--- a/doc/html/a00121.html
+++ b/doc/html/a00121.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00121.html">bad_last_alloc</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00121.html">bad_last_alloc</a></div>
 <h1>tbb::bad_last_alloc Class Reference</h1><!-- doxytag: class="tbb::bad_last_alloc" -->Exception for concurrent containers.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00381.html">tbb_exception.h</a>></code>
 <p>
 <a href="a00083.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -38,7 +38,7 @@ virtual const char * </td><td class="memItemRight" valign="bottom"><b>what<
 Exception for concurrent containers. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00377.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00381.html">tbb_exception.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00122.html b/doc/html/a00122.html
index 638cb05..2d6160e 100644
--- a/doc/html/a00122.html
+++ b/doc/html/a00122.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00122.html">blocked_range</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00122.html">blocked_range</a></div>
 <h1>tbb::blocked_range< Value > Class Template Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::blocked_range" -->A range over which to iterate.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00261.html">blocked_range.h</a>></code>
+<code>#include <<a class="el" href="a00266.html">blocked_range.h</a>></code>
 <p>
 <a href="a00004.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -70,7 +70,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a001
 <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a> () const </td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is divisible.  <a href="#41a58b703d574b6e1ca155df3576f578"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a> (<a class="el" href="a00122.html">blocked_range</a> &r, <a class="el" href="a00161.html">split</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">blocked_range</a> (<a class="el" href="a00122.html">blocked_range</a> &r, <a class="el" href="a00165.html">split</a>)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Split range.  <a href="#4c0efd2be3f96a0ab3ba5085e8b3fcc7"></a><br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
@@ -146,7 +146,7 @@ template<typename Value> </div>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype"><a class="el" href="a00161.html">split</a> </td>
+          <td class="paramtype"><a class="el" href="a00165.html">split</a> </td>
           <td class="paramname"></td><td> </td>
         </tr>
         <tr>
@@ -212,7 +212,7 @@ Unspecified if <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8"
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00261.html">blocked_range.h</a></ul>
+<li><a class="el" href="a00266.html">blocked_range.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00123.html b/doc/html/a00123.html
index ae80032..8b958ab 100644
--- a/doc/html/a00123.html
+++ b/doc/html/a00123.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00123.html">blocked_range2d</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00123.html">blocked_range2d</a></div>
 <h1>tbb::blocked_range2d< RowValue, ColValue > Class Template Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::blocked_range2d" -->A 2-dimensional range that models the Range concept.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00262.html">blocked_range2d.h</a>></code>
+<code>#include <<a class="el" href="a00267.html">blocked_range2d.h</a>></code>
 <p>
 <a href="a00005.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -56,7 +56,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a001
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is divisible into two pieces. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f80e6db02bfa4e90e2a219de9f17461"></a><!-- doxytag: member="tbb::blocked_range2d::blocked_range2d" ref="4f80e6db02bfa4e90e2a219de9f17461" args="(blocked_range2d &r, split)" -->
- </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (<a class="el" href="a00123.html">blocked_range2d</a> &r, <a class="el" href="a00161.html">split</a>)</td></tr>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range2d</b> (<a class="el" href="a00123.html">blocked_range2d</a> &r, <a class="el" href="a00165.html">split</a>)</td></tr>
 
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f496e7348a82652fba581203477cc07c"></a><!-- doxytag: member="tbb::blocked_range2d::rows" ref="f496e7348a82652fba581203477cc07c" args="() const " -->
 const <a class="el" href="a00122.html">row_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html#f496e7348a82652fba581203477cc07c">rows</a> () const </td></tr>
@@ -74,7 +74,7 @@ const <a class="el" href="a00122.html">col_range_type</a> & </td><td cl
 A 2-dimensional range that models the Range concept. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00262.html">blocked_range2d.h</a></ul>
+<li><a class="el" href="a00267.html">blocked_range2d.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00124.html b/doc/html/a00124.html
index 010da81..a687046 100644
--- a/doc/html/a00124.html
+++ b/doc/html/a00124.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00124.html">blocked_range3d</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00124.html">blocked_range3d</a></div>
 <h1>tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::blocked_range3d" -->A 3-dimensional range that models the Range concept.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00263.html">blocked_range3d.h</a>></code>
+<code>#include <<a class="el" href="a00268.html">blocked_range3d.h</a>></code>
 <p>
 <a href="a00006.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -59,7 +59,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a001
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">True if range is divisible into two pieces. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0d6f0085c9fb364ddcbc2197da6c251"></a><!-- doxytag: member="tbb::blocked_range3d::blocked_range3d" ref="a0d6f0085c9fb364ddcbc2197da6c251" args="(blocked_range3d &r, split)" -->
- </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (<a class="el" href="a00124.html">blocked_range3d</a> &r, <a class="el" href="a00161.html">split</a>)</td></tr>
+ </td><td class="memItemRight" valign="bottom"><b>blocked_range3d</b> (<a class="el" href="a00124.html">blocked_range3d</a> &r, <a class="el" href="a00165.html">split</a>)</td></tr>
 
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf971430aa12361d3ed245344b7c6764"></a><!-- doxytag: member="tbb::blocked_range3d::pages" ref="cf971430aa12361d3ed245344b7c6764" args="() const " -->
 const <a class="el" href="a00122.html">page_range_type</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html#cf971430aa12361d3ed245344b7c6764">pages</a> () const </td></tr>
@@ -81,7 +81,7 @@ const <a class="el" href="a00122.html">col_range_type</a> & </td><td cl
 A 3-dimensional range that models the Range concept. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00263.html">blocked_range3d.h</a></ul>
+<li><a class="el" href="a00268.html">blocked_range3d.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00125.html b/doc/html/a00125.html
index ae23823..a1677f2 100644
--- a/doc/html/a00125.html
+++ b/doc/html/a00125.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00125.html">cache_aligned_allocator</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00125.html">cache_aligned_allocator</a></div>
 <h1>tbb::cache_aligned_allocator< T > Class Template Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
 </h1><!-- doxytag: class="tbb::cache_aligned_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00264.html">cache_aligned_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00269.html">cache_aligned_allocator.h</a>></code>
 <p>
 <a href="a00007.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -102,7 +102,7 @@ Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
 The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00264.html">cache_aligned_allocator.h</a></ul>
+<li><a class="el" href="a00269.html">cache_aligned_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00126.html b/doc/html/a00126.html
index a76bd67..80a1393 100644
--- a/doc/html/a00126.html
+++ b/doc/html/a00126.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00126.html">cache_aligned_allocator< void ></a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00126.html">cache_aligned_allocator< void ></a></div>
 <h1>tbb::cache_aligned_allocator< void > Class Template Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
 </h1><!-- doxytag: class="tbb::cache_aligned_allocator< void >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00264.html">cache_aligned_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00269.html">cache_aligned_allocator.h</a>></code>
 <p>
 <a href="a00009.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -53,7 +53,7 @@ typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b
 Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00264.html">cache_aligned_allocator.h</a></ul>
+<li><a class="el" href="a00269.html">cache_aligned_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00127.html b/doc/html/a00127.html
index 66c4f35..92754a4 100644
--- a/doc/html/a00127.html
+++ b/doc/html/a00127.html
@@ -21,13 +21,13 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00127.html">captured_exception</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00127.html">captured_exception</a></div>
 <h1>tbb::captured_exception Class Reference</h1><!-- doxytag: class="tbb::captured_exception" --><!-- doxytag: inherits="tbb::tbb_exception" -->This class is used by TBB to propagate information about unhandled exceptions into the root thread.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00381.html">tbb_exception.h</a>></code>
 <p>
-Inherits <a class="el" href="a00168.html">tbb::tbb_exception</a>.
+Inherits <a class="el" href="a00172.html">tbb::tbb_exception</a>.
 <p>
 Inheritance diagram for tbb::captured_exception:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00085.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -41,12 +41,12 @@ Inheritance diagram for tbb::captured_exception:<center><font size="2">[<a href=
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e95b8eb99ec9dea22934ac528a08654c"></a><!-- doxytag: member="tbb::captured_exception::operator=" ref="e95b8eb99ec9dea22934ac528a08654c" args="(const captured_exception &src)" -->
 <a class="el" href="a00127.html">captured_exception</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00127.html">captured_exception</a> &src)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00127.html">captured_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move</a> ()  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00127.html">captured_exception</a> *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">move</a> ()  throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns pointer to the deep copy of this exception object.  <a href="#df6bbb78a362fe862a341e81e2999810"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#667812a82f1525e968c52593dea0ef4c">destroy</a> ()  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns pointer to the deep copy of this exception object.  <a href="#837a50b8f6a800bda225c39d1699643f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#93d875d3555502ff6f18513525de204c">destroy</a> ()  throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move()</a> method.  <a href="#667812a82f1525e968c52593dea0ef4c"></a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">move()</a> method.  <a href="#93d875d3555502ff6f18513525de204c"></a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#2dd1be66ab32fa27e0ddef5707fa67ef"></a><br></td></tr>
@@ -58,20 +58,26 @@ const char *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bot
 const char *__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what</a> () const   throw ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of originally intercepted exception's <a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what()</a> method. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="92ed4100413eef26969f8299f6845e18"></a><!-- doxytag: member="tbb::captured_exception::set" ref="92ed4100413eef26969f8299f6845e18" args="(const char *name, const char *info)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>set</b> (const char *name, const char *info)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5f56d05102acdba6c2f09ba6db3baeb"></a><!-- doxytag: member="tbb::captured_exception::clear" ref="d5f56d05102acdba6c2f09ba6db3baeb" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>clear</b> ()  throw ()</td></tr>
+
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 This class is used by TBB to propagate information about unhandled exceptions into the root thread. 
 <p>
-Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00168.html">tbb::tbb_exception</a> </dd></dl>
+Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00172.html">tbb::tbb_exception</a> </dd></dl>
 
 <p>
 <hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="667812a82f1525e968c52593dea0ef4c"></a><!-- doxytag: member="tbb::captured_exception::destroy" ref="667812a82f1525e968c52593dea0ef4c" args="()" -->
+<a class="anchor" name="93d875d3555502ff6f18513525de204c"></a><!-- doxytag: member="tbb::captured_exception::destroy" ref="93d875d3555502ff6f18513525de204c" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void tbb::captured_exception::destroy           </td>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::captured_exception::destroy           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
@@ -82,19 +88,19 @@ Exception of this type is thrown by TBB in the root thread (thread that started
 <div class="memdoc">
 
 <p>
-Destroys objects created by the <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move()</a> method. 
+Destroys objects created by the <a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">move()</a> method. 
 <p>
 Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method. 
 <p>
-Implements <a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
 </div>
 </div><p>
-<a class="anchor" name="df6bbb78a362fe862a341e81e2999810"></a><!-- doxytag: member="tbb::captured_exception::move" ref="df6bbb78a362fe862a341e81e2999810" args="()" -->
+<a class="anchor" name="837a50b8f6a800bda225c39d1699643f"></a><!-- doxytag: member="tbb::captured_exception::move" ref="837a50b8f6a800bda225c39d1699643f" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="a00127.html">captured_exception</a>* tbb::captured_exception::move           </td>
+          <td class="memname"><a class="el" href="a00127.html">captured_exception</a>* __TBB_EXPORTED_METHOD tbb::captured_exception::move           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
@@ -109,7 +115,7 @@ Creates and returns pointer to the deep copy of this exception object.
 <p>
 Move semantics is allowed. 
 <p>
-Implements <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a>.
 </div>
 </div><p>
 <a class="anchor" name="2dd1be66ab32fa27e0ddef5707fa67ef"></a><!-- doxytag: member="tbb::captured_exception::throw_self" ref="2dd1be66ab32fa27e0ddef5707fa67ef" args="()" -->
@@ -132,11 +138,11 @@ Throws this exception object.
 <p>
 Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown. 
 <p>
-Implements <a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a>.
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00377.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00381.html">tbb_exception.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00128.html b/doc/html/a00128.html
index 0e1d69b..54edb83 100644
--- a/doc/html/a00128.html
+++ b/doc/html/a00128.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00128.html">combinable</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00128.html">combinable</a></div>
 <h1>tbb::combinable< T > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::combinable" -->Thread-local storage with optional reduction.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00266.html">combinable.h</a>></code>
+<code>#include <<a class="el" href="a00271.html">combinable.h</a>></code>
 <p>
 <a href="a00011.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -72,7 +72,7 @@ template<typename FCombine> </td></tr>
 Thread-local storage with optional reduction. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00266.html">combinable.h</a></ul>
+<li><a class="el" href="a00271.html">combinable.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00129.html b/doc/html/a00129.html
index 829b5da..8c1a6bc 100644
--- a/doc/html/a00129.html
+++ b/doc/html/a00129.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00129.html">concurrent_bounded_queue</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00129.html">concurrent_bounded_queue</a></div>
 <h1>tbb::concurrent_bounded_queue< T, A > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::concurrent_bounded_queue" -->A high-performance thread-safe blocking concurrent bounded queue.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
+<code>#include <<a class="el" href="a00282.html">concurrent_queue.h</a>></code>
 <p>
 Inherited by <a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a>.
 <p>
@@ -291,7 +291,7 @@ Does not wait for queue to become not full. Returns true if item is pushed; fals
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00276.html">concurrent_queue.h</a></ul>
+<li><a class="el" href="a00282.html">concurrent_queue.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00130.html b/doc/html/a00130.html
index 7070c71..918a6ab 100644
--- a/doc/html/a00130.html
+++ b/doc/html/a00130.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a></div>
 <h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::concurrent_hash_map" -->Unordered map from Key to T.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00272.html">concurrent_hash_map.h</a>></code>
 <p>
 <a href="a00013.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -86,6 +86,10 @@ typedef Allocator </td><td class="memItemRight" valign="bottom"><b>allocato
  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#342582ba05d9fb893ed80875d2b7a42f">concurrent_hash_map</a> (const allocator_type &a=allocator_type())</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty table. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c1bf3c669935aceb1dc0169e3a19e0be"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="c1bf3c669935aceb1dc0169e3a19e0be" args="(size_type n, const allocator_type &a=allocator_type())" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#c1bf3c669935aceb1dc0169e3a19e0be">concurrent_hash_map</a> (size_type n, const allocator_type &a=allocator_type())</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc50f7bca65d0c27cbf5c31d2fa63eac"></a><!-- doxytag: member="tbb::concurrent_hash_map::concurrent_hash_map" ref="bc50f7bca65d0c27cbf5c31d2fa63eac" args="(const concurrent_hash_map &table, const allocator_type &a=allocator_type())" -->
  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#bc50f7bca65d0c27cbf5c31d2fa63eac">concurrent_hash_map</a> (const <a class="el" href="a00130.html">concurrent_hash_map</a> &table, const allocator_type &a=allocator_type())</td></tr>
 
@@ -227,10 +231,9 @@ void </td><td class="memItemRight" valign="bottom"><a class="el" href="a001
 template<typename I> </td></tr>
 <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>internal_copy</b> (I first, I last)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2f1ca7e8319c464349a9de304b6dbf4a"></a><!-- doxytag: member="tbb::concurrent_hash_map::find" ref="2f1ca7e8319c464349a9de304b6dbf4a" args="(const Key &key) const " -->
-const_pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#2f1ca7e8319c464349a9de304b6dbf4a">find</a> (const Key &key) const </td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const_pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html#f0cdf5930563a49ffe827c520e948e01">internal_fast_find</a> (const Key &key) const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">fast find when no concurrent erasure is used <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast find when no concurrent erasure is used. For internal use inside TBB only!  <a href="#f0cdf5930563a49ffe827c520e948e01"></a><br></td></tr>
 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="964dbe9bfcb2ac0157f8b77f252f951b"></a><!-- doxytag: member="tbb::concurrent_hash_map::my_allocator" ref="964dbe9bfcb2ac0157f8b77f252f951b" args="" -->
 node_allocator_type </td><td class="memItemRight" valign="bottom"><b>my_allocator</b></td></tr>
@@ -273,7 +276,7 @@ Unordered map from Key to T.
 <li>Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.</li><li>If exception happens during <a class="el" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">insert()</a> operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).</li><li>If exception happens during <a class="el" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">operator=()</a> operati [...]
 </dd></dl>
 <dl compact><dt><b>Changes since TBB 2.1</b></dt><dd><ul>
-<li>Replaced internal algorithm and data structure. Patent is pending.</li></ul>
+<li>Replaced internal algorithm and data structure. Patent is pending.</li><li>Added buckets number argument for constructor</li></ul>
 </dd></dl>
 <dl compact><dt><b>Changes since TBB 2.0</b></dt><dd><ul>
 <li>Fixed exception-safety</li><li>Added template argument for allocator</li><li>Added allocator argument in constructors</li><li>Added constructor from a range of iterators</li><li>Added several new overloaded <a class="el" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">insert()</a> methods</li><li>Added <a class="el" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">get_allocator()</a></li><li>Added <a class="el" href="a00130.html#dd73f70aa6602021ea2c56bac9715353">swap()</a></li [...]
@@ -575,8 +578,32 @@ Insert item (if not already present) and acquire a read lock on the item.
 Returns true if item is new. 
 </div>
 </div><p>
+<a class="anchor" name="f0cdf5930563a49ffe827c520e948e01"></a><!-- doxytag: member="tbb::concurrent_hash_map::internal_fast_find" ref="f0cdf5930563a49ffe827c520e948e01" args="(const Key &key) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename Key, typename T, typename HashCompare, typename Allocator> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">const_pointer <a class="el" href="a00130.html">tbb::concurrent_hash_map</a>< Key, T, HashCompare, Allocator >::internal_fast_find           </td>
+          <td>(</td>
+          <td class="paramtype">const Key & </td>
+          <td class="paramname"> <em>key</em>          </td>
+          <td> ) </td>
+          <td width="100%"> const<code> [inline, protected]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Fast find when no concurrent erasure is used. For internal use inside TBB only! 
+<p>
+Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00267.html">concurrent_hash_map.h</a></ul>
+<li><a class="el" href="a00272.html">concurrent_hash_map.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00131.html b/doc/html/a00131.html
index ca9bafb..bb77cd5 100644
--- a/doc/html/a00131.html
+++ b/doc/html/a00131.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00131.html">accessor</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00131.html">accessor</a></div>
 <h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor Class Reference</h1><!-- doxytag: class="tbb::concurrent_hash_map::accessor" --><!-- doxytag: inherits="tbb::concurrent_hash_map::const_accessor" -->Allows write access to elements and combines data access, locking, and garbage collection.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00272.html">concurrent_hash_map.h</a>></code>
 <p>
 Inherits <a class="el" href="a00133.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a>.
 <p>
@@ -53,7 +53,7 @@ pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a
 Allows write access to elements and combines data access, locking, and garbage collection. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00267.html">concurrent_hash_map.h</a></ul>
+<li><a class="el" href="a00272.html">concurrent_hash_map.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00132.html b/doc/html/a00132.html
index e6bdd2d..4231a51 100644
--- a/doc/html/a00132.html
+++ b/doc/html/a00132.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00132.html">bucket_accessor</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00132.html">bucket_accessor</a></div>
 <h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor Class Reference</h1><!-- doxytag: class="tbb::concurrent_hash_map::bucket_accessor" -->bucket accessor is to find, rehash, acquire a lock, and access a bucket  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00272.html">concurrent_hash_map.h</a>></code>
 <p>
 <a href="a00015.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -36,7 +36,7 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b75959ce5a971b05cfefcbc1d09a022"></a><!-- doxytag: member="tbb::concurrent_hash_map::bucket_accessor::acquire" ref="7b75959ce5a971b05cfefcbc1d09a022" args="(concurrent_hash_map *base, const hashcode_t h, bool writer=false)" -->
 void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#7b75959ce5a971b05cfefcbc1d09a022">acquire</a> (<a class="el" href="a00130.html">concurrent_hash_map</a> *base, const hashcode_t h, bool writer=false)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">find a bucket by maksed hashcode, optionally rehash, and acquire the lock <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">find a bucket by masked hashcode, optionally rehash, and acquire the lock <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adf8e405df5787351fe816c42042b9ec"></a><!-- doxytag: member="tbb::concurrent_hash_map::bucket_accessor::is_writer" ref="adf8e405df5787351fe816c42042b9ec" args="()" -->
 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a> ()</td></tr>
 
@@ -56,7 +56,7 @@ bool </td><td class="memItemRight" valign="bottom"><b>upgrade_to_writer</b>
 bucket accessor is to find, rehash, acquire a lock, and access a bucket 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00267.html">concurrent_hash_map.h</a></ul>
+<li><a class="el" href="a00272.html">concurrent_hash_map.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00133.html b/doc/html/a00133.html
index ac46151..92375ea 100644
--- a/doc/html/a00133.html
+++ b/doc/html/a00133.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00133.html">const_accessor</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00130.html">concurrent_hash_map</a>::<a class="el" href="a00133.html">const_accessor</a></div>
 <h1>tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor Class Reference</h1><!-- doxytag: class="tbb::concurrent_hash_map::const_accessor" -->Combines data access, locking, and garbage collection.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00272.html">concurrent_hash_map.h</a>></code>
 <p>
 Inherited by <a class="el" href="a00131.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>.
 <p>
@@ -76,7 +76,7 @@ class </td><td class="memItemRight" valign="bottom"><b>accessor</b></td></t
 Combines data access, locking, and garbage collection. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00267.html">concurrent_hash_map.h</a></ul>
+<li><a class="el" href="a00272.html">concurrent_hash_map.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00134.html b/doc/html/a00134.html
index 4eded08..53fec6e 100644
--- a/doc/html/a00134.html
+++ b/doc/html/a00134.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>strict_ppl</b>::<a class="el" href="a00134.html">concurrent_queue</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00232.html">strict_ppl</a>::<a class="el" href="a00134.html">concurrent_queue</a></div>
 <h1>tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::strict_ppl::concurrent_queue" -->A high-performance thread-safe non-blocking concurrent queue.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
+<code>#include <<a class="el" href="a00282.html">concurrent_queue.h</a>></code>
 <p>
 <a href="a00018.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -157,7 +157,7 @@ Does not wait for item to become available. Returns true if successful; false ot
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00276.html">concurrent_queue.h</a></ul>
+<li><a class="el" href="a00282.html">concurrent_queue.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00135.html b/doc/html/a00135.html
index 8801477..a360975 100644
--- a/doc/html/a00135.html
+++ b/doc/html/a00135.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>deprecated</b>::<a class="el" href="a00135.html">concurrent_queue</a></div>
+<a class="el" href="a00229.html">tbb</a>::<b>deprecated</b>::<a class="el" href="a00135.html">concurrent_queue</a></div>
 <h1>tbb::deprecated::concurrent_queue< T, A > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::deprecated::concurrent_queue" --><!-- doxytag: inherits="tbb::concurrent_bounded_queue" -->A high-performance thread-safe blocking concurrent bounded queue.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00276.html">concurrent_queue.h</a>></code>
+<code>#include <<a class="el" href="a00282.html">concurrent_queue.h</a>></code>
 <p>
 Inherits <a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A >< T, A ></a>.
 <p>
@@ -139,7 +139,7 @@ Does not wait for queue to become not full. Returns true if item is pushed; fals
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00276.html">concurrent_queue.h</a></ul>
+<li><a class="el" href="a00282.html">concurrent_queue.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00136.html b/doc/html/a00136.html
index 09f7585..210b7ef 100644
--- a/doc/html/a00136.html
+++ b/doc/html/a00136.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00136.html">concurrent_vector</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00136.html">concurrent_vector</a></div>
 <h1>tbb::concurrent_vector< T, A > Class Template Reference<br>
 <small>
-[<a class="el" href="a00229.html">Containers</a>]</small>
+[<a class="el" href="a00234.html">Containers</a>]</small>
 </h1><!-- doxytag: class="tbb::concurrent_vector" -->Concurrent vector container.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00277.html">concurrent_vector.h</a>></code>
+<code>#include <<a class="el" href="a00283.html">concurrent_vector.h</a>></code>
 <p>
 <a href="a00022.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -584,7 +584,7 @@ Like most of the methods provided for STL compatibility, this method is *not* th
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00277.html">concurrent_vector.h</a></ul>
+<li><a class="el" href="a00283.html">concurrent_vector.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00137.html b/doc/html/a00137.html
index 8a31e8c..85a1150 100644
--- a/doc/html/a00137.html
+++ b/doc/html/a00137.html
@@ -21,16 +21,16 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00137.html">empty_task</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00137.html">empty_task</a></div>
 <h1>tbb::empty_task Class Reference<br>
 <small>
-[<a class="el" href="a00233.html">Task Scheduling</a>]</small>
+[<a class="el" href="a00238.html">Task Scheduling</a>]</small>
 </h1><!-- doxytag: class="tbb::empty_task" --><!-- doxytag: inherits="tbb::task" -->task that does nothing. Useful for synchronization.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00354.html">task.h</a>></code>
 <p>
-Inherits <a class="el" href="a00162.html">tbb::task</a>.
+Inherits <a class="el" href="a00166.html">tbb::task</a>.
 <p>
 Inheritance diagram for tbb::empty_task:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00064.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -39,7 +39,7 @@ Inheritance diagram for tbb::empty_task:<center><font size="2">[<a href="graph_l
 task that does nothing. Useful for synchronization. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00351.html">task.h</a></ul>
+<li><a class="el" href="a00354.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00138.html b/doc/html/a00138.html
index c683308..1aa6ea7 100644
--- a/doc/html/a00138.html
+++ b/doc/html/a00138.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00138.html">enumerable_thread_specific</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00138.html">enumerable_thread_specific</a></div>
 <h1>tbb::enumerable_thread_specific< T, Allocator, ETS_key_type > Class Template Reference</h1><!-- doxytag: class="tbb::enumerable_thread_specific" -->The thread local class template.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00286.html">enumerable_thread_specific.h</a>></code>
+<code>#include <<a class="el" href="a00292.html">enumerable_thread_specific.h</a>></code>
 <p>
 <a href="a00025.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -176,7 +176,7 @@ class </td><td class="memItemRight" valign="bottom"><b>enumerable_thread_sp
 The thread local class template. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00286.html">enumerable_thread_specific.h</a></ul>
+<li><a class="el" href="a00292.html">enumerable_thread_specific.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00139.html b/doc/html/a00139.html
index f183e2f..e3ddfee 100644
--- a/doc/html/a00139.html
+++ b/doc/html/a00139.html
@@ -21,16 +21,16 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00139.html">filter</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00139.html">filter</a></div>
 <h1>tbb::filter Class Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::filter" -->A stage in a pipeline.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00344.html">pipeline.h</a>></code>
+<code>#include <<a class="el" href="a00347.html">pipeline.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00171.html">tbb::thread_bound_filter</a>.
+Inherited by <a class="el" href="a00175.html">tbb::thread_bound_filter</a>.
 <p>
 Inheritance diagram for tbb::filter:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00044.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -195,7 +195,7 @@ Returns NULL if filter is a sink.
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00344.html">pipeline.h</a></ul>
+<li><a class="el" href="a00347.html">pipeline.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00140.html b/doc/html/a00140.html
index 6827625..ba81446 100644
--- a/doc/html/a00140.html
+++ b/doc/html/a00140.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00140.html">final_scan_tag</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00140.html">final_scan_tag</a></div>
 <h1>tbb::final_scan_tag Struct Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
 </h1><!-- doxytag: class="tbb::final_scan_tag" -->Used to indicate that the final scan is being performed.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00326.html">parallel_scan.h</a>></code>
+<code>#include <<a class="el" href="a00329.html">parallel_scan.h</a>></code>
 <p>
 <a href="a00037.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -41,7 +41,7 @@ static bool </td><td class="memItemRight" valign="bottom"><b>is_final_scan<
 Used to indicate that the final scan is being performed. 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00326.html">parallel_scan.h</a></ul>
+<li><a class="el" href="a00329.html">parallel_scan.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00141.html b/doc/html/a00141.html
index 43619ab..680d8d6 100644
--- a/doc/html/a00141.html
+++ b/doc/html/a00141.html
@@ -21,13 +21,13 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00141.html">movable_exception</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00141.html">movable_exception</a></div>
 <h1>tbb::movable_exception< ExceptionData > Class Template Reference</h1><!-- doxytag: class="tbb::movable_exception" --><!-- doxytag: inherits="tbb::tbb_exception" -->Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00381.html">tbb_exception.h</a>></code>
 <p>
-Inherits <a class="el" href="a00168.html">tbb::tbb_exception</a>.
+Inherits <a class="el" href="a00172.html">tbb::tbb_exception</a>.
 <p>
 Inheritance diagram for tbb::movable_exception< ExceptionData >:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00086.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -76,7 +76,7 @@ ExceptionData </td><td class="memItemRight" valign="bottom"><a class="el" h
 
 Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread. 
 <p>
-Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread (). <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00168.html">tbb::tbb_exception</a> </dd></dl>
+Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread (). <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00172.html">tbb::tbb_exception</a> </dd></dl>
 
 <p>
 <hr><h2>Member Function Documentation</h2>
@@ -102,7 +102,7 @@ Destroys objects created by the <a class="el" href="a00141.html#1aea0ad179d6f048
 <p>
 Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method. 
 <p>
-Implements <a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>.
 </div>
 </div><p>
 <a class="anchor" name="1aea0ad179d6f0481fe7f3495f66adf9"></a><!-- doxytag: member="tbb::movable_exception::move" ref="1aea0ad179d6f0481fe7f3495f66adf9" args="()" -->
@@ -127,7 +127,7 @@ Creates and returns pointer to the deep copy of this exception object.
 <p>
 Move semantics is allowed. 
 <p>
-Implements <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a>.
 </div>
 </div><p>
 <a class="anchor" name="17cffba35811c92b7e65d63506b69602"></a><!-- doxytag: member="tbb::movable_exception::throw_self" ref="17cffba35811c92b7e65d63506b69602" args="()" -->
@@ -152,11 +152,11 @@ Throws this exception object.
 <p>
 Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown. 
 <p>
-Implements <a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a>.
+Implements <a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a>.
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00377.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00381.html">tbb_exception.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00142.html b/doc/html/a00142.html
index b179b1d..862ff32 100644
--- a/doc/html/a00142.html
+++ b/doc/html/a00142.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00142.html">mutex</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00142.html">mutex</a></div>
 <h1>tbb::mutex Class Reference<br>
 <small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
 </h1><!-- doxytag: class="tbb::mutex" -->Wrapper around the platform's native reader-writer lock.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00294.html">mutex.h</a>></code>
+<code>#include <<a class="el" href="a00300.html">mutex.h</a>></code>
 <p>
 <a href="a00029.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -95,7 +95,7 @@ Return true if lock acquired; false otherwise.
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00294.html">mutex.h</a></ul>
+<li><a class="el" href="a00300.html">mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00143.html b/doc/html/a00143.html
index 2f62f18..e228d4e 100644
--- a/doc/html/a00143.html
+++ b/doc/html/a00143.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00142.html">mutex</a>::<a class="el" href="a00143.html">scoped_lock</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00142.html">mutex</a>::<a class="el" href="a00143.html">scoped_lock</a></div>
 <h1>tbb::mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::mutex::scoped_lock" -->The scoped locking pattern.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00294.html">mutex.h</a>></code>
+<code>#include <<a class="el" href="a00300.html">mutex.h</a>></code>
 <p>
 <a href="a00030.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -87,7 +87,7 @@ Upon entry, *this should not be in the "have acquired a mutex" state.
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00294.html">mutex.h</a></ul>
+<li><a class="el" href="a00300.html">mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00144.html b/doc/html/a00144.html
index 260cd99..d130f1b 100644
--- a/doc/html/a00144.html
+++ b/doc/html/a00144.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::parallel_do_feeder< Item > Class Template Reference</title>
+<title>tbb::null_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,39 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00144.html">parallel_do_feeder</a></div>
-<h1>tbb::parallel_do_feeder< Item > Class Template Reference</h1><!-- doxytag: class="tbb::parallel_do_feeder" -->Class the user supplied algorithm body uses to add new tasks.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00144.html">null_mutex</a></div>
+<h1>tbb::null_mutex Class Reference<br>
+<small>
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::null_mutex" -->A mutex which does nothing.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00301.html">parallel_do.h</a>></code>
+<code>#include <<a class="el" href="a00302.html">null_mutex.h</a>></code>
 <p>
-<a href="a00035.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00031.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40baaf0f6856f4491dd0adf896c93516"></a><!-- doxytag: member="tbb::parallel_do_feeder::add" ref="40baaf0f6856f4491dd0adf896c93516" args="(const Item &item)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">add</a> (const Item &item)</td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a960bed8b19a4d111ca047de206f5f77"></a><!-- doxytag: member="tbb::null_mutex::is_rw_mutex" ref="a960bed8b19a4d111ca047de206f5f77" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item to a running parallel_do. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b381179b22f5f5e8511470c73d64b37f"></a><!-- doxytag: member="tbb::parallel_do_feeder::internal::parallel_do_feeder_impl" ref="b381179b22f5f5e8511470c73d64b37f" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::parallel_do_feeder_impl</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0fefed74b341d43ccf0e2fc30d31b75"></a><!-- doxytag: member="tbb::null_mutex::is_recursive_mutex" ref="a0fefed74b341d43ccf0e2fc30d31b75" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = true</td></tr>
 
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="707cf399055d68177b1d64c2e112603a"></a><!-- doxytag: member="tbb::null_mutex::is_fair_mutex" ref="707cf399055d68177b1d64c2e112603a" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
+
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html">scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00145.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Item><br>
- class tbb::parallel_do_feeder< Item ></h3>
-
-Class the user supplied algorithm body uses to add new tasks. 
+A mutex which does nothing. 
 <p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
-  <table border="0" cellspacing="2" cellpadding="0">
-    <tr><td valign="top"></td><td valign="top"><em>Item</em> </td><td>Work item type </td></tr>
-  </table>
-</dl>
-
+A <a class="el" href="a00144.html">null_mutex</a> does no operation and simulates success. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00301.html">parallel_do.h</a></ul>
+<li><a class="el" href="a00302.html">null_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00145.html b/doc/html/a00145.html
index 2d98ef1..1a090a5 100644
--- a/doc/html/a00145.html
+++ b/doc/html/a00145.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::parallel_while< Body > Class Template Reference</title>
+<title>tbb::null_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,114 +21,33 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00145.html">parallel_while</a></div>
-<h1>tbb::parallel_while< Body > Class Template Reference<br>
-<small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::parallel_while" -->Parallel iteration over a stream, with optional addition of more work.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00144.html">null_mutex</a>::<a class="el" href="a00145.html">scoped_lock</a></div>
+<h1>tbb::null_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::null_mutex::scoped_lock" -->Represents acquisition of a mutex.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00335.html">parallel_while.h</a>></code>
+<code>#include <<a class="el" href="a00302.html">null_mutex.h</a>></code>
 <p>
-<a href="a00038.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00032.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa297e53d3af2a101e712bc200233e9c"></a><!-- doxytag: member="tbb::parallel_while::value_type" ref="fa297e53d3af2a101e712bc200233e9c" args="" -->
-typedef Body::argument_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of items. <br></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36e26ba3880c7bcf804a97ba0cbe133f"></a><!-- doxytag: member="tbb::parallel_while::parallel_while" ref="36e26ba3880c7bcf804a97ba0cbe133f" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="765e64065919fdd9665e78b5ec4d3c6f"></a><!-- doxytag: member="tbb::null_mutex::scoped_lock::scoped_lock" ref="765e64065919fdd9665e78b5ec4d3c6f" args="(null_mutex &)" -->
+ </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b> (<a class="el" href="a00144.html">null_mutex</a> &)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty non-running parallel while. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fcfc973cc56b79c6d0fbb8a31be7e84"></a><!-- doxytag: member="tbb::parallel_while::~parallel_while" ref="6fcfc973cc56b79c6d0fbb8a31be7e84" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6889f00ca3946906e89e856988bb890"></a><!-- doxytag: member="tbb::null_mutex::scoped_lock::acquire" ref="f6889f00ca3946906e89e856988bb890" args="(null_mutex &)" -->
+void </td><td class="memItemRight" valign="bottom"><b>acquire</b> (<a class="el" href="a00144.html">null_mutex</a> &)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor cleans up data members before returning. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2">template<typename Stream> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &stream, const Body &body)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90eb562a9de52b33362a6fe237b3df42"></a><!-- doxytag: member="tbb::null_mutex::scoped_lock::try_acquire" ref="90eb562a9de52b33362a6fe237b3df42" args="(null_mutex &)" -->
+bool </td><td class="memItemRight" valign="bottom"><b>try_acquire</b> (<a class="el" href="a00144.html">null_mutex</a> &)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Apply body.apply to each item in the stream.  <a href="#b32a0a6e5e09ebb7fad3e6652c19afe5"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &item)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b29fdf07b4c295850a6e433001c2c6a7"></a><!-- doxytag: member="tbb::null_mutex::scoped_lock::release" ref="b29fdf07b4c295850a6e433001c2c6a7" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><b>release</b> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item while running.  <a href="#e131c560057a58229992b61eb8dba4c6"></a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename Body><br>
- class tbb::parallel_while< Body ></h3>
-
-Parallel iteration over a stream, with optional addition of more work. 
-<p>
-The Body b has the requirement: <br>
- "b(v)" <br>
- "b.argument_type" <br>
- where v is an argument_type 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="e131c560057a58229992b61eb8dba4c6"></a><!-- doxytag: member="tbb::parallel_while::add" ref="e131c560057a58229992b61eb8dba4c6" args="(const value_type &item)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Body> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00145.html">tbb::parallel_while</a>< Body >::add           </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> & </td>
-          <td class="paramname"> <em>item</em>          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Add a work item while running. 
-<p>
-Should be executed only by body.apply or a thread spawned therefrom. 
-</div>
-</div><p>
-<a class="anchor" name="b32a0a6e5e09ebb7fad3e6652c19afe5"></a><!-- doxytag: member="tbb::parallel_while::run" ref="b32a0a6e5e09ebb7fad3e6652c19afe5" args="(Stream &stream, const Body &body)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename Body> </div>
-<div class="memtemplate">
-template<typename Stream> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void <a class="el" href="a00145.html">tbb::parallel_while</a>< Body >::run           </td>
-          <td>(</td>
-          <td class="paramtype">Stream & </td>
-          <td class="paramname"> <em>stream</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Body & </td>
-          <td class="paramname"> <em>body</em></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Apply body.apply to each item in the stream. 
+Represents acquisition of a mutex. 
 <p>
-A Stream s has the requirements <br>
- "S::value_type" <br>
- "s.pop_if_present(value) is convertible to bool 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00335.html">parallel_while.h</a></ul>
+<li><a class="el" href="a00302.html">null_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00146.html b/doc/html/a00146.html
index 3ad289a..00f33a4 100644
--- a/doc/html/a00146.html
+++ b/doc/html/a00146.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::pipeline Class Reference</title>
+<title>tbb::null_rw_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,82 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00146.html">pipeline</a></div>
-<h1>tbb::pipeline Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00146.html">null_rw_mutex</a></div>
+<h1>tbb::null_rw_mutex Class Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::pipeline" -->A processing pipeling that applies filters to items.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::null_rw_mutex" -->A rw mutex which does nothing.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00344.html">pipeline.h</a>></code>
+<code>#include <<a class="el" href="a00303.html">null_rw_mutex.h</a>></code>
 <p>
-<a href="a00046.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00033.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="596dc3beba27099c4c8581cb419e1a59"></a><!-- doxytag: member="tbb::pipeline::pipeline" ref="596dc3beba27099c4c8581cb419e1a59" args="()" -->
-__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a> ()</td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2f3235cbf63812f72e5755a4c820f523"></a><!-- doxytag: member="tbb::null_rw_mutex::is_rw_mutex" ref="2f3235cbf63812f72e5755a4c820f523" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = true</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty pipeline. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e33ac3b047901e69e7997a16e221a330"></a><!-- doxytag: member="tbb::null_rw_mutex::is_recursive_mutex" ref="e33ac3b047901e69e7997a16e221a330" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = true</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38fb5c9c8395dd6f89a4ae2011a83e0d"></a><!-- doxytag: member="tbb::pipeline::add_filter" ref="38fb5c9c8395dd6f89a4ae2011a83e0d" args="(filter &filter_)" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a> (<a class="el" href="a00139.html">filter</a> &filter_)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e5248faf1412f9283185a0b5d72d7456"></a><!-- doxytag: member="tbb::null_rw_mutex::is_fair_mutex" ref="e5248faf1412f9283185a0b5d72d7456" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Add filter to end of pipeline. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f627616049b3fe36801f37ee40403ef8"></a><!-- doxytag: member="tbb::pipeline::run" ref="f627616049b3fe36801f37ee40403ef8" args="(size_t max_number_of_live_tokens)" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#f627616049b3fe36801f37ee40403ef8">run</a> (size_t max_number_of_live_tokens)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Run the pipeline to completion. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="93d7fec8cd607b803dd2d79fb46bd260"></a><!-- doxytag: member="tbb::pipeline::run" ref="93d7fec8cd607b803dd2d79fb46bd260" args="(size_t max_number_of_live_tokens, tbb::task_group_context &context)" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#93d7fec8cd607b803dd2d79fb46bd260">run</a> (size_t max_number_of_live_tokens, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Run the pipeline to completion with user-supplied context. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c84aef5b834b555ee220b176e25931e"></a><!-- doxytag: member="tbb::pipeline::clear" ref="2c84aef5b834b555ee220b176e25931e" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#2c84aef5b834b555ee220b176e25931e">clear</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all filters from the pipeline. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8228ce0751009045e8158d2e642715a6"></a><!-- doxytag: member="tbb::pipeline::internal::stage_task" ref="8228ce0751009045e8158d2e642715a6" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::stage_task</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05d67150ca324698ba852553e223d3eb"></a><!-- doxytag: member="tbb::pipeline::internal::pipeline_root_task" ref="05d67150ca324698ba852553e223d3eb" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::pipeline_root_task</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c991e50853b0cac7da039550344d3ef"></a><!-- doxytag: member="tbb::pipeline::filter" ref="4c991e50853b0cac7da039550344d3ef" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>filter</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e43b69a482df8e053cb199af69eb5139"></a><!-- doxytag: member="tbb::pipeline::thread_bound_filter" ref="e43b69a482df8e053cb199af69eb5139" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d033d41ff53a0ae6ef824aceee7ecbc"></a><!-- doxytag: member="tbb::pipeline::internal::pipeline_cleaner" ref="9d033d41ff53a0ae6ef824aceee7ecbc" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::pipeline_cleaner</b></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html">scoped_lock</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00147.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A processing pipeling that applies filters to items. 
+A rw mutex which does nothing. 
 <p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="49513c6c24f9d5bbbb27edca5efe01c9"></a><!-- doxytag: member="tbb::pipeline::~pipeline" ref="49513c6c24f9d5bbbb27edca5efe01c9" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual __TBB_EXPORTED_METHOD tbb::pipeline::~pipeline           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
+A <a class="el" href="a00146.html">null_rw_mutex</a> is a rw mutex that does nothing and simulates successful operation. 
 <p>
-Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00344.html">pipeline.h</a></ul>
+<li><a class="el" href="a00303.html">null_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00147.html b/doc/html/a00147.html
index 55461a9..a2c45f8 100644
--- a/doc/html/a00147.html
+++ b/doc/html/a00147.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::pre_scan_tag Struct Reference</title>
+<title>tbb::null_rw_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,27 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00147.html">pre_scan_tag</a></div>
-<h1>tbb::pre_scan_tag Struct Reference<br>
-<small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::pre_scan_tag" -->Used to indicate that the initial scan is being performed.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00146.html">null_rw_mutex</a>::<a class="el" href="a00147.html">scoped_lock</a></div>
+<h1>tbb::null_rw_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::null_rw_mutex::scoped_lock" -->Represents acquisition of a mutex.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00326.html">parallel_scan.h</a>></code>
+<code>#include <<a class="el" href="a00303.html">null_rw_mutex.h</a>></code>
 <p>
-<a href="a00036.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00034.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d45d2cf548e51140ad6faafbea8ca6b5"></a><!-- doxytag: member="tbb::pre_scan_tag::is_final_scan" ref="d45d2cf548e51140ad6faafbea8ca6b5" args="()" -->
-static bool </td><td class="memItemRight" valign="bottom"><b>is_final_scan</b> ()</td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e11281a13a7b6243c6c9ab243c5ad5a8"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::scoped_lock" ref="e11281a13a7b6243c6c9ab243c5ad5a8" args="(null_rw_mutex &, bool=true)" -->
+ </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b> (<a class="el" href="a00146.html">null_rw_mutex</a> &, bool=true)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72c4c302fdfc20187a650348e432b0a7"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::acquire" ref="72c4c302fdfc20187a650348e432b0a7" args="(null_rw_mutex &, bool=true)" -->
+void </td><td class="memItemRight" valign="bottom"><b>acquire</b> (<a class="el" href="a00146.html">null_rw_mutex</a> &, bool=true)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa1e2a5592ee2672470ea44d98f1c498"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::upgrade_to_writer" ref="fa1e2a5592ee2672470ea44d98f1c498" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><b>upgrade_to_writer</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="efcb7948649e1652d59aaff9c8ea40f1"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::downgrade_to_reader" ref="efcb7948649e1652d59aaff9c8ea40f1" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><b>downgrade_to_reader</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="56686c4dfe4a32a1d9bd8e7e729130e6"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::try_acquire" ref="56686c4dfe4a32a1d9bd8e7e729130e6" args="(null_rw_mutex &, bool=true)" -->
+bool </td><td class="memItemRight" valign="bottom"><b>try_acquire</b> (<a class="el" href="a00146.html">null_rw_mutex</a> &, bool=true)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6146c803a4ad2f14263fdc019a72b5a9"></a><!-- doxytag: member="tbb::null_rw_mutex::scoped_lock::release" ref="6146c803a4ad2f14263fdc019a72b5a9" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><b>release</b> ()</td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Used to indicate that the initial scan is being performed. 
+Represents acquisition of a mutex. 
 <p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00326.html">parallel_scan.h</a></ul>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00303.html">null_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00148.html b/doc/html/a00148.html
index bf60f84..a928110 100644
--- a/doc/html/a00148.html
+++ b/doc/html/a00148.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::queuing_mutex Class Reference</title>
+<title>tbb::parallel_do_feeder< Item > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,49 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00148.html">queuing_mutex</a></div>
-<h1>tbb::queuing_mutex Class Reference<br>
-<small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::queuing_mutex" -->Queuing lock with local-only spinning.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00148.html">parallel_do_feeder</a></div>
+<h1>tbb::parallel_do_feeder< Item > Class Template Reference</h1><!-- doxytag: class="tbb::parallel_do_feeder" -->Class the user supplied algorithm body uses to add new tasks.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00345.html">queuing_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00304.html">parallel_do.h</a>></code>
 <p>
-<a href="a00047.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00035.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b389ad9c4db7293e4bdb5b8cda69ec04"></a><!-- doxytag: member="tbb::queuing_mutex::queuing_mutex" ref="b389ad9c4db7293e4bdb5b8cda69ec04" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="96c1fe92760dcd1c5a7ed52c6599a72f"></a><!-- doxytag: member="tbb::queuing_mutex::internal_construct" ref="96c1fe92760dcd1c5a7ed52c6599a72f" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
-
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="420932f70ff3b85f7280ff11a133938d"></a><!-- doxytag: member="tbb::queuing_mutex::is_rw_mutex" ref="420932f70ff3b85f7280ff11a133938d" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dc0c749f3a4e6ea75418677cb8f9205f"></a><!-- doxytag: member="tbb::queuing_mutex::is_recursive_mutex" ref="dc0c749f3a4e6ea75418677cb8f9205f" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55d5339e4ca04b759f90c0c1ef966539"></a><!-- doxytag: member="tbb::queuing_mutex::is_fair_mutex" ref="55d5339e4ca04b759f90c0c1ef966539" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40baaf0f6856f4491dd0adf896c93516"></a><!-- doxytag: member="tbb::parallel_do_feeder::add" ref="40baaf0f6856f4491dd0adf896c93516" args="(const Item &item)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">add</a> (const Item &item)</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item to a running parallel_do. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b381179b22f5f5e8511470c73d64b37f"></a><!-- doxytag: member="tbb::parallel_do_feeder::internal::parallel_do_feeder_impl" ref="b381179b22f5f5e8511470c73d64b37f" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::parallel_do_feeder_impl</b></td></tr>
 
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html">scoped_lock</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00149.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Queuing lock with local-only spinning. 
+<h3>template<typename Item><br>
+ class tbb::parallel_do_feeder< Item ></h3>
+
+Class the user supplied algorithm body uses to add new tasks. 
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"></td><td valign="top"><em>Item</em> </td><td>Work item type </td></tr>
+  </table>
+</dl>
+
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00345.html">queuing_mutex.h</a></ul>
+<li><a class="el" href="a00304.html">parallel_do.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00149.html b/doc/html/a00149.html
index 42af21c..d5cd8c3 100644
--- a/doc/html/a00149.html
+++ b/doc/html/a00149.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::queuing_mutex::scoped_lock Class Reference</title>
+<title>tbb::parallel_while< Body > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,89 +21,114 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00148.html">queuing_mutex</a>::<a class="el" href="a00149.html">scoped_lock</a></div>
-<h1>tbb::queuing_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_mutex::scoped_lock" -->The scoped locking pattern.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00149.html">parallel_while</a></div>
+<h1>tbb::parallel_while< Body > Class Template Reference<br>
+<small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::parallel_while" -->Parallel iteration over a stream, with optional addition of more work.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00345.html">queuing_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00338.html">parallel_while.h</a>></code>
 <p>
-<a href="a00048.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00038.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#db0fa3967491014572e24d6607bdc971"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00148.html">queuing_mutex</a> &m)</td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa297e53d3af2a101e712bc200233e9c"></a><!-- doxytag: member="tbb::parallel_while::value_type" ref="fa297e53d3af2a101e712bc200233e9c" args="" -->
+typedef Body::argument_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#9b51ef972f5618ac17caadb58841ab6d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac2c576a93570957d694192a5f491443"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::~scoped_lock" ref="ac2c576a93570957d694192a5f491443" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of items. <br></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36e26ba3880c7bcf804a97ba0cbe133f"></a><!-- doxytag: member="tbb::parallel_while::parallel_while" ref="36e26ba3880c7bcf804a97ba0cbe133f" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="533e4fc8355ee321206a0609c42d909d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::acquire" ref="533e4fc8355ee321206a0609c42d909d" args="(queuing_mutex &m)" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00148.html">queuing_mutex</a> &m)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty non-running parallel while. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fcfc973cc56b79c6d0fbb8a31be7e84"></a><!-- doxytag: member="tbb::parallel_while::~parallel_while" ref="6fcfc973cc56b79c6d0fbb8a31be7e84" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e5a014fb817599386a87170cf2cf51a9"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::try_acquire" ref="e5a014fb817599386a87170cf2cf51a9" args="(queuing_mutex &m)" -->
-bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00148.html">queuing_mutex</a> &m)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor cleans up data members before returning. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename Stream> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &stream, const Body &body)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex if free (i.e. non-blocking). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3bf2b8c87ff22115be9b2eac179f2d30"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::release" ref="3bf2b8c87ff22115be9b2eac179f2d30" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Apply body.apply to each item in the stream.  <a href="#b32a0a6e5e09ebb7fad3e6652c19afe5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &item)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item while running.  <a href="#e131c560057a58229992b61eb8dba4c6"></a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-The scoped locking pattern. 
+<h3>template<typename Body><br>
+ class tbb::parallel_while< Body ></h3>
+
+Parallel iteration over a stream, with optional addition of more work. 
 <p>
-It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
+The Body b has the requirement: <br>
+ "b(v)" <br>
+ "b.argument_type" <br>
+ where v is an argument_type 
 <p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="db0fa3967491014572e24d6607bdc971"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="db0fa3967491014572e24d6607bdc971" args="()" -->
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="e131c560057a58229992b61eb8dba4c6"></a><!-- doxytag: member="tbb::parallel_while::add" ref="e131c560057a58229992b61eb8dba4c6" args="(const value_type &item)" -->
 <div class="memitem">
 <div class="memproto">
+<div class="memtemplate">
+template<typename Body> </div>
       <table class="memname">
         <tr>
-          <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td class="memname">void <a class="el" href="a00149.html">tbb::parallel_while</a>< Body >::add           </td>
           <td>(</td>
-          <td class="paramname">          </td>
+          <td class="paramtype">const <a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> & </td>
+          <td class="paramname"> <em>item</em>          </td>
           <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
+          <td width="100%"></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Construct lock that has not acquired a mutex. 
+Add a work item while running. 
 <p>
-Equivalent to zero-initialization of *this. 
+Should be executed only by body.apply or a thread spawned therefrom. 
 </div>
 </div><p>
-<a class="anchor" name="9b51ef972f5618ac17caadb58841ab6d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="9b51ef972f5618ac17caadb58841ab6d" args="(queuing_mutex &m)" -->
+<a class="anchor" name="b32a0a6e5e09ebb7fad3e6652c19afe5"></a><!-- doxytag: member="tbb::parallel_while::run" ref="b32a0a6e5e09ebb7fad3e6652c19afe5" args="(Stream &stream, const Body &body)" -->
 <div class="memitem">
 <div class="memproto">
+<div class="memtemplate">
+template<typename Body> </div>
+<div class="memtemplate">
+template<typename Stream> </div>
       <table class="memname">
         <tr>
-          <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td class="memname">void <a class="el" href="a00149.html">tbb::parallel_while</a>< Body >::run           </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="a00148.html">queuing_mutex</a> & </td>
-          <td class="paramname"> <em>m</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
+          <td class="paramtype">Stream & </td>
+          <td class="paramname"> <em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const Body & </td>
+          <td class="paramname"> <em>body</em></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Acquire lock on given mutex. 
+Apply body.apply to each item in the stream. 
 <p>
-Upon entry, *this should not be in the "have acquired a mutex" state. 
+A Stream s has the requirements <br>
+ "S::value_type" <br>
+ "s.pop_if_present(value) is convertible to bool 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00345.html">queuing_mutex.h</a></ul>
+<li><a class="el" href="a00338.html">parallel_while.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00150.html b/doc/html/a00150.html
index 9cfffa8..3f3fa93 100644
--- a/doc/html/a00150.html
+++ b/doc/html/a00150.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::queuing_rw_mutex Class Reference</title>
+<title>tbb::pipeline Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,55 +21,82 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00150.html">queuing_rw_mutex</a></div>
-<h1>tbb::queuing_rw_mutex Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00150.html">pipeline</a></div>
+<h1>tbb::pipeline Class Reference<br>
 <small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::queuing_rw_mutex" -->Reader-writer lock with local-only spinning.  
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::pipeline" -->A processing pipeling that applies filters to items.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00346.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00347.html">pipeline.h</a>></code>
 <p>
-<a href="a00049.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00046.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="85c90877c3447690ac4e2ac4ff8dea5e"></a><!-- doxytag: member="tbb::queuing_rw_mutex::queuing_rw_mutex" ref="85c90877c3447690ac4e2ac4ff8dea5e" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="596dc3beba27099c4c8581cb419e1a59"></a><!-- doxytag: member="tbb::pipeline::pipeline" ref="596dc3beba27099c4c8581cb419e1a59" args="()" -->
+__TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ba73e3d95cfdf8323880bc623af9099"></a><!-- doxytag: member="tbb::queuing_rw_mutex::~queuing_rw_mutex" ref="1ba73e3d95cfdf8323880bc623af9099" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty pipeline. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb88522d145ad7bcf5bebfa7d2a6122b"></a><!-- doxytag: member="tbb::queuing_rw_mutex::internal_construct" ref="eb88522d145ad7bcf5bebfa7d2a6122b" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38fb5c9c8395dd6f89a4ae2011a83e0d"></a><!-- doxytag: member="tbb::pipeline::add_filter" ref="38fb5c9c8395dd6f89a4ae2011a83e0d" args="(filter &filter_)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a> (<a class="el" href="a00139.html">filter</a> &filter_)</td></tr>
 
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0dc1e28d3033e8f9556f5b13b7b57d0f"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_rw_mutex" ref="0dc1e28d3033e8f9556f5b13b7b57d0f" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = true</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Add filter to end of pipeline. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f627616049b3fe36801f37ee40403ef8"></a><!-- doxytag: member="tbb::pipeline::run" ref="f627616049b3fe36801f37ee40403ef8" args="(size_t max_number_of_live_tokens)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#f627616049b3fe36801f37ee40403ef8">run</a> (size_t max_number_of_live_tokens)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6ad08ef251f9ea898bd5f67963869c5"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_recursive_mutex" ref="e6ad08ef251f9ea898bd5f67963869c5" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Run the pipeline to completion. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="93d7fec8cd607b803dd2d79fb46bd260"></a><!-- doxytag: member="tbb::pipeline::run" ref="93d7fec8cd607b803dd2d79fb46bd260" args="(size_t max_number_of_live_tokens, tbb::task_group_context &context)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#93d7fec8cd607b803dd2d79fb46bd260">run</a> (size_t max_number_of_live_tokens, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="147b34120505e419f6ea8d631ec4375d"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_fair_mutex" ref="147b34120505e419f6ea8d631ec4375d" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Run the pipeline to completion with user-supplied context. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c84aef5b834b555ee220b176e25931e"></a><!-- doxytag: member="tbb::pipeline::clear" ref="2c84aef5b834b555ee220b176e25931e" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html#2c84aef5b834b555ee220b176e25931e">clear</a> ()</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all filters from the pipeline. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8228ce0751009045e8158d2e642715a6"></a><!-- doxytag: member="tbb::pipeline::internal::stage_task" ref="8228ce0751009045e8158d2e642715a6" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::stage_task</b></td></tr>
 
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05d67150ca324698ba852553e223d3eb"></a><!-- doxytag: member="tbb::pipeline::internal::pipeline_root_task" ref="05d67150ca324698ba852553e223d3eb" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::pipeline_root_task</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c991e50853b0cac7da039550344d3ef"></a><!-- doxytag: member="tbb::pipeline::filter" ref="4c991e50853b0cac7da039550344d3ef" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>filter</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e43b69a482df8e053cb199af69eb5139"></a><!-- doxytag: member="tbb::pipeline::thread_bound_filter" ref="e43b69a482df8e053cb199af69eb5139" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d033d41ff53a0ae6ef824aceee7ecbc"></a><!-- doxytag: member="tbb::pipeline::internal::pipeline_cleaner" ref="9d033d41ff53a0ae6ef824aceee7ecbc" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::pipeline_cleaner</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00151.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Reader-writer lock with local-only spinning. 
+A processing pipeling that applies filters to items. 
 <p>
-Adapted from Krieger, Stumm, et al. pseudocode at <a href="http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93">http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93</a> 
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="49513c6c24f9d5bbbb27edca5efe01c9"></a><!-- doxytag: member="tbb::pipeline::~pipeline" ref="49513c6c24f9d5bbbb27edca5efe01c9" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual __TBB_EXPORTED_METHOD tbb::pipeline::~pipeline           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
 <p>
+Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00346.html">queuing_rw_mutex.h</a></ul>
+<li><a class="el" href="a00347.html">pipeline.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00151.html b/doc/html/a00151.html
index 7d84757..831986b 100644
--- a/doc/html/a00151.html
+++ b/doc/html/a00151.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::queuing_rw_mutex::scoped_lock Class Reference</title>
+<title>tbb::pre_scan_tag Struct Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,127 +21,27 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00150.html">queuing_rw_mutex</a>::<a class="el" href="a00151.html">scoped_lock</a></div>
-<h1>tbb::queuing_rw_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_rw_mutex::scoped_lock" -->The scoped locking pattern.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00151.html">pre_scan_tag</a></div>
+<h1>tbb::pre_scan_tag Struct Reference<br>
+<small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::pre_scan_tag" -->Used to indicate that the initial scan is being performed.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00346.html">queuing_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00329.html">parallel_scan.h</a>></code>
 <p>
-<a href="a00050.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00036.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a> ()</td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d45d2cf548e51140ad6faafbea8ca6b5"></a><!-- doxytag: member="tbb::pre_scan_tag::is_final_scan" ref="d45d2cf548e51140ad6faafbea8ca6b5" args="()" -->
+static bool </td><td class="memItemRight" valign="bottom"><b>is_final_scan</b> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#c62e365be7bcbba091c9ea7454a4d22c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a> (<a class="el" href="a00150.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#fbb8798792d3aebb136c46fc63d2529e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32c7d67a660d23ebbaab1a1d2826d31a"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::~scoped_lock" ref="32c7d67a660d23ebbaab1a1d2826d31a" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8dd5ab8686e76de21587544dbb681e0"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::acquire" ref="a8dd5ab8686e76de21587544dbb681e0" args="(queuing_rw_mutex &m, bool write=true)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a> (<a class="el" href="a00150.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e4ff6c9ec2fee6682f95290d1f42baa"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::try_acquire" ref="2e4ff6c9ec2fee6682f95290d1f42baa" args="(queuing_rw_mutex &m, bool write=true)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a> (<a class="el" href="a00150.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67ae221109ddc69510ab593874e435d4"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::release" ref="67ae221109ddc69510ab593874e435d4" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#67ae221109ddc69510ab593874e435d4">release</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#11ba1da4a722c9e6f73339a52c487e82"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d2f93edf7b15ec4bcee138823220c52"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader" ref="0d2f93edf7b15ec4bcee138823220c52" args="()" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Downgrade writer to become a reader. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-The scoped locking pattern. 
-<p>
-It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
-<p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="c62e365be7bcbba091c9ea7454a4d22c"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="c62e365be7bcbba091c9ea7454a4d22c" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Construct lock that has not acquired a mutex. 
-<p>
-Equivalent to zero-initialization of *this. 
-</div>
-</div><p>
-<a class="anchor" name="fbb8798792d3aebb136c46fc63d2529e"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="fbb8798792d3aebb136c46fc63d2529e" args="(queuing_rw_mutex &m, bool write=true)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00150.html">queuing_rw_mutex</a> & </td>
-          <td class="paramname"> <em>m</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">bool </td>
-          <td class="paramname"> <em>write</em> = <code>true</code></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Acquire lock on given mutex. 
-<p>
-Upon entry, *this should not be in the "have acquired a mutex" state. 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="11ba1da4a722c9e6f73339a52c487e82"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer" ref="11ba1da4a722c9e6f73339a52c487e82" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Upgrade reader to become a writer. 
+Used to indicate that the initial scan is being performed. 
 <p>
-Returns true if the upgrade happened without re-acquiring the lock and false if opposite 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00346.html">queuing_rw_mutex.h</a></ul>
+<hr>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="a00329.html">parallel_scan.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00152.html b/doc/html/a00152.html
index ddd62c3..a51c5a2 100644
--- a/doc/html/a00152.html
+++ b/doc/html/a00152.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::recursive_mutex Class Reference</title>
+<title>tbb::queuing_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,45 +21,37 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00152.html">recursive_mutex</a></div>
-<h1>tbb::recursive_mutex Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00152.html">queuing_mutex</a></div>
+<h1>tbb::queuing_mutex Class Reference<br>
 <small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::recursive_mutex" -->Mutex that allows recursive mutex acquisition.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::queuing_mutex" -->Queuing lock with local-only spinning.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00347.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00348.html">queuing_mutex.h</a>></code>
 <p>
-<a href="a00051.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00047.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2fceb7f95c24a8cd1457d4527e4b8c6"></a><!-- doxytag: member="tbb::recursive_mutex::recursive_mutex" ref="d2fceb7f95c24a8cd1457d4527e4b8c6" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b389ad9c4db7293e4bdb5b8cda69ec04"></a><!-- doxytag: member="tbb::queuing_mutex::queuing_mutex" ref="b389ad9c4db7293e4bdb5b8cda69ec04" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired <a class="el" href="a00152.html">recursive_mutex</a>. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c342c69d47f4bb0b393535dee4015d6"></a><!-- doxytag: member="tbb::recursive_mutex::lock" ref="4c342c69d47f4bb0b393535dee4015d6" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="96c1fe92760dcd1c5a7ed52c6599a72f"></a><!-- doxytag: member="tbb::queuing_mutex::internal_construct" ref="96c1fe92760dcd1c5a7ed52c6599a72f" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#86e719b0afee25704af11ab97694d240">try_lock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#86e719b0afee25704af11ab97694d240"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f0a96e26b7f074588dc31e32524856ae"></a><!-- doxytag: member="tbb::recursive_mutex::unlock" ref="f0a96e26b7f074588dc31e32524856ae" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">unlock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
 <tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="718cc53f6b33d8c396ccca0e4ebc5606"></a><!-- doxytag: member="tbb::recursive_mutex::is_rw_mutex" ref="718cc53f6b33d8c396ccca0e4ebc5606" args="" -->
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="420932f70ff3b85f7280ff11a133938d"></a><!-- doxytag: member="tbb::queuing_mutex::is_rw_mutex" ref="420932f70ff3b85f7280ff11a133938d" args="" -->
 static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6149d7541063d8b35afd98df6f0f89d"></a><!-- doxytag: member="tbb::recursive_mutex::is_recursive_mutex" ref="f6149d7541063d8b35afd98df6f0f89d" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = true</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dc0c749f3a4e6ea75418677cb8f9205f"></a><!-- doxytag: member="tbb::queuing_mutex::is_recursive_mutex" ref="dc0c749f3a4e6ea75418677cb8f9205f" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f01aacad6b9b9d51573c0803323182fe"></a><!-- doxytag: member="tbb::recursive_mutex::is_fair_mutex" ref="f01aacad6b9b9d51573c0803323182fe" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55d5339e4ca04b759f90c0c1ef966539"></a><!-- doxytag: member="tbb::queuing_mutex::is_fair_mutex" ref="55d5339e4ca04b759f90c0c1ef966539" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
 
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
 class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
 
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
@@ -68,34 +60,10 @@ class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td>
 <tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00153.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Mutex that allows recursive mutex acquisition. 
-<p>
-Mutex that allows recursive mutex acquisition. 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="86e719b0afee25704af11ab97694d240"></a><!-- doxytag: member="tbb::recursive_mutex::try_lock" ref="86e719b0afee25704af11ab97694d240" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::recursive_mutex::try_lock           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Try acquiring lock (non-blocking). 
+Queuing lock with local-only spinning. 
 <p>
-Return true if lock acquired; false otherwise. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00347.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00348.html">queuing_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00153.html b/doc/html/a00153.html
index 8eeff49..6b2f95c 100644
--- a/doc/html/a00153.html
+++ b/doc/html/a00153.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::recursive_mutex::scoped_lock Class Reference</title>
+<title>tbb::queuing_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,51 +21,89 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00152.html">recursive_mutex</a>::<a class="el" href="a00153.html">scoped_lock</a></div>
-<h1>tbb::recursive_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::recursive_mutex::scoped_lock" -->The scoped locking pattern.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00152.html">queuing_mutex</a>::<a class="el" href="a00153.html">scoped_lock</a></div>
+<h1>tbb::queuing_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_mutex::scoped_lock" -->The scoped locking pattern.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00347.html">recursive_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00348.html">queuing_mutex.h</a>></code>
 <p>
-<a href="a00052.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00048.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d82d4d36fbf9727a493d26ae50855fe7"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="d82d4d36fbf9727a493d26ae50855fe7" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00152.html">recursive_mutex</a>. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dec17713c4c1321ac8fec66816d0c602"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="dec17713c4c1321ac8fec66816d0c602" args="(recursive_mutex &mutex)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a> (<a class="el" href="a00152.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#db0fa3967491014572e24d6607bdc971"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#9b51ef972f5618ac17caadb58841ab6d">scoped_lock</a> (<a class="el" href="a00152.html">queuing_mutex</a> &m)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c1197ffb8f3cd9d4fed71d7e06265b7c"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::~scoped_lock" ref="c1197ffb8f3cd9d4fed71d7e06265b7c" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#9b51ef972f5618ac17caadb58841ab6d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac2c576a93570957d694192a5f491443"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::~scoped_lock" ref="ac2c576a93570957d694192a5f491443" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a> ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fb04da37cccf8c99b1f9102d9074f9a"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::acquire" ref="7fb04da37cccf8c99b1f9102d9074f9a" args="(recursive_mutex &mutex)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a> (<a class="el" href="a00152.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="533e4fc8355ee321206a0609c42d909d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::acquire" ref="533e4fc8355ee321206a0609c42d909d" args="(queuing_mutex &m)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#533e4fc8355ee321206a0609c42d909d">acquire</a> (<a class="el" href="a00152.html">queuing_mutex</a> &m)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36bfc3e93e3ef6340abef4901444d340"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::try_acquire" ref="36bfc3e93e3ef6340abef4901444d340" args="(recursive_mutex &mutex)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a> (<a class="el" href="a00152.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e5a014fb817599386a87170cf2cf51a9"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::try_acquire" ref="e5a014fb817599386a87170cf2cf51a9" args="(queuing_mutex &m)" -->
+bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a> (<a class="el" href="a00152.html">queuing_mutex</a> &m)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00152.html">recursive_mutex</a>. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac480ea0e9d5ea0345a67d57008b6263"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::release" ref="ac480ea0e9d5ea0345a67d57008b6263" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">release</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex if free (i.e. non-blocking). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3bf2b8c87ff22115be9b2eac179f2d30"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::release" ref="3bf2b8c87ff22115be9b2eac179f2d30" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a> ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="459818b78a3e9985dc5a9d5638b6593e"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::recursive_mutex" ref="459818b78a3e9985dc5a9d5638b6593e" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>recursive_mutex</b></td></tr>
-
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 The scoped locking pattern. 
 <p>
 It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
 <p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="db0fa3967491014572e24d6607bdc971"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="db0fa3967491014572e24d6607bdc971" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this. 
+</div>
+</div><p>
+<a class="anchor" name="9b51ef972f5618ac17caadb58841ab6d"></a><!-- doxytag: member="tbb::queuing_mutex::scoped_lock::scoped_lock" ref="9b51ef972f5618ac17caadb58841ab6d" args="(queuing_mutex &m)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::queuing_mutex::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00152.html">queuing_mutex</a> & </td>
+          <td class="paramname"> <em>m</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00347.html">recursive_mutex.h</a></ul>
+<li><a class="el" href="a00348.html">queuing_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00154.html b/doc/html/a00154.html
index b924660..86e4cb0 100644
--- a/doc/html/a00154.html
+++ b/doc/html/a00154.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::scalable_allocator< T > Class Template Reference</title>
+<title>tbb::queuing_rw_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,86 +21,55 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00154.html">scalable_allocator</a></div>
-<h1>tbb::scalable_allocator< T > Class Template Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00154.html">queuing_rw_mutex</a></div>
+<h1>tbb::queuing_rw_mutex Class Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::scalable_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::queuing_rw_mutex" -->Reader-writer lock with local-only spinning.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00348.html">scalable_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00349.html">queuing_rw_mutex.h</a>></code>
 <p>
-<a href="a00053.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00049.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a1cf13c339ee177a103a7e19bf2710a"></a><!-- doxytag: member="tbb::scalable_allocator::value_type" ref="5a1cf13c339ee177a103a7e19bf2710a" args="" -->
-typedef internal::allocator_type<<br>
- T >::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5121ec62bc79faba6a4b674d59e7260"></a><!-- doxytag: member="tbb::scalable_allocator::pointer" ref="a5121ec62bc79faba6a4b674d59e7260" args="" -->
-typedef value_type * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="846a6fcec3bc7fa3839a12266a729a02"></a><!-- doxytag: member="tbb::scalable_allocator::const_pointer" ref="846a6fcec3bc7fa3839a12266a729a02" args="" -->
-typedef const value_type * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="254d7749de9277bb7711470c04d963ea"></a><!-- doxytag: member="tbb::scalable_allocator::reference" ref="254d7749de9277bb7711470c04d963ea" args="" -->
-typedef value_type & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acad193a7f6e16253f772ba3e9b2c98f"></a><!-- doxytag: member="tbb::scalable_allocator::const_reference" ref="acad193a7f6e16253f772ba3e9b2c98f" args="" -->
-typedef const value_type & </td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a5cb7482f222a14b513bbdd4ad8507d"></a><!-- doxytag: member="tbb::scalable_allocator::size_type" ref="4a5cb7482f222a14b513bbdd4ad8507d" args="" -->
-typedef size_t </td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb96c23f650cf91a73e2810b54c481bb"></a><!-- doxytag: member="tbb::scalable_allocator::difference_type" ref="cb96c23f650cf91a73e2810b54c481bb" args="" -->
-typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
-
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eee1873729ed05c7f92544c3ff0c08bc"></a><!-- doxytag: member="tbb::scalable_allocator::scalable_allocator" ref="eee1873729ed05c7f92544c3ff0c08bc" args="(const scalable_allocator &)" -->
- </td><td class="memItemRight" valign="bottom"><b>scalable_allocator</b> (const <a class="el" href="a00154.html">scalable_allocator</a> &)  throw ()</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="d56dc9f231c59f912297ac3c3b3b93b6"></a><!-- doxytag: member="tbb::scalable_allocator::scalable_allocator" ref="d56dc9f231c59f912297ac3c3b3b93b6" args="(const scalable_allocator< U > &)" -->
-template<typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>scalable_allocator</b> (const <a class="el" href="a00154.html">scalable_allocator</a>< U > &)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="85c90877c3447690ac4e2ac4ff8dea5e"></a><!-- doxytag: member="tbb::queuing_rw_mutex::queuing_rw_mutex" ref="85c90877c3447690ac4e2ac4ff8dea5e" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78fa13a188b542ea724d45a9dbf5a071"></a><!-- doxytag: member="tbb::scalable_allocator::address" ref="78fa13a188b542ea724d45a9dbf5a071" args="(reference x) const " -->
-pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (reference x) const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ba73e3d95cfdf8323880bc623af9099"></a><!-- doxytag: member="tbb::queuing_rw_mutex::~queuing_rw_mutex" ref="1ba73e3d95cfdf8323880bc623af9099" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14be4ad8eb478c87e240e605221ab455"></a><!-- doxytag: member="tbb::scalable_allocator::address" ref="14be4ad8eb478c87e240e605221ab455" args="(const_reference x) const " -->
-const_pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (const_reference x) const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb88522d145ad7bcf5bebfa7d2a6122b"></a><!-- doxytag: member="tbb::queuing_rw_mutex::internal_construct" ref="eb88522d145ad7bcf5bebfa7d2a6122b" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="726b1586d05d44665a36e1c7b2699bfd"></a><!-- doxytag: member="tbb::scalable_allocator::allocate" ref="726b1586d05d44665a36e1c7b2699bfd" args="(size_type n, const void *=0)" -->
-pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a> (size_type n, const void *=0)</td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0dc1e28d3033e8f9556f5b13b7b57d0f"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_rw_mutex" ref="0dc1e28d3033e8f9556f5b13b7b57d0f" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = true</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f806a238c18cbcfb531e1e0a0d2ec59d"></a><!-- doxytag: member="tbb::scalable_allocator::deallocate" ref="f806a238c18cbcfb531e1e0a0d2ec59d" args="(pointer p, size_type)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a> (pointer p, size_type)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6ad08ef251f9ea898bd5f67963869c5"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_recursive_mutex" ref="e6ad08ef251f9ea898bd5f67963869c5" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Free previously allocated block of memory. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="880e766f1d913988c21973dbdd874fd5"></a><!-- doxytag: member="tbb::scalable_allocator::max_size" ref="880e766f1d913988c21973dbdd874fd5" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#880e766f1d913988c21973dbdd874fd5">max_size</a> () const   throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="147b34120505e419f6ea8d631ec4375d"></a><!-- doxytag: member="tbb::queuing_rw_mutex::is_fair_mutex" ref="147b34120505e419f6ea8d631ec4375d" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = true</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Largest value for which method allocate might succeed. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a9891a26790b98e9b9a68dad875faa8"></a><!-- doxytag: member="tbb::scalable_allocator::construct" ref="5a9891a26790b98e9b9a68dad875faa8" args="(pointer p, const value_type &val)" -->
-void </td><td class="memItemRight" valign="bottom"><b>construct</b> (pointer p, const value_type &val)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="743f878b04a492bf7ae0e82a64dc20c8"></a><!-- doxytag: member="tbb::scalable_allocator::destroy" ref="743f878b04a492bf7ae0e82a64dc20c8" args="(pointer p)" -->
-void </td><td class="memItemRight" valign="bottom"><b>destroy</b> (pointer p)</td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
 
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html">scoped_lock</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00155.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T><br>
- class tbb::scalable_allocator< T ></h3>
-
-Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
+Reader-writer lock with local-only spinning. 
 <p>
-The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
+Adapted from Krieger, Stumm, et al. pseudocode at <a href="http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93">http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93</a> 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00348.html">scalable_allocator.h</a></ul>
+<li><a class="el" href="a00349.html">queuing_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00155.html b/doc/html/a00155.html
index 8978a31..0bb3fb3 100644
--- a/doc/html/a00155.html
+++ b/doc/html/a00155.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::scalable_allocator< void > Class Template Reference</title>
+<title>tbb::queuing_rw_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,39 +21,127 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00155.html">scalable_allocator< void ></a></div>
-<h1>tbb::scalable_allocator< void > Class Template Reference<br>
-<small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::scalable_allocator< void >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00154.html">queuing_rw_mutex</a>::<a class="el" href="a00155.html">scoped_lock</a></div>
+<h1>tbb::queuing_rw_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::queuing_rw_mutex::scoped_lock" -->The scoped locking pattern.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00348.html">scalable_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00349.html">queuing_rw_mutex.h</a>></code>
 <p>
-<a href="a00055.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00050.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2046816029c2c7856f7684aed2af9cff"></a><!-- doxytag: member="tbb::scalable_allocator< void >::pointer" ref="2046816029c2c7856f7684aed2af9cff" args="" -->
-typedef void * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="591c568d23f8aadf6ea8d1dc939c4e75"></a><!-- doxytag: member="tbb::scalable_allocator< void >::const_pointer" ref="591c568d23f8aadf6ea8d1dc939c4e75" args="" -->
-typedef const void * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#c62e365be7bcbba091c9ea7454a4d22c"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#fbb8798792d3aebb136c46fc63d2529e">scoped_lock</a> (<a class="el" href="a00154.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="64dbab666af0740c30b77edac9f157ce"></a><!-- doxytag: member="tbb::scalable_allocator< void >::value_type" ref="64dbab666af0740c30b77edac9f157ce" args="" -->
-typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#fbb8798792d3aebb136c46fc63d2529e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32c7d67a660d23ebbaab1a1d2826d31a"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::~scoped_lock" ref="32c7d67a660d23ebbaab1a1d2826d31a" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a> ()</td></tr>
 
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8dd5ab8686e76de21587544dbb681e0"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::acquire" ref="a8dd5ab8686e76de21587544dbb681e0" args="(queuing_rw_mutex &m, bool write=true)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a> (<a class="el" href="a00154.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e4ff6c9ec2fee6682f95290d1f42baa"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::try_acquire" ref="2e4ff6c9ec2fee6682f95290d1f42baa" args="(queuing_rw_mutex &m, bool write=true)" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a> (<a class="el" href="a00154.html">queuing_rw_mutex</a> &m, bool write=true)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67ae221109ddc69510ab593874e435d4"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::release" ref="67ae221109ddc69510ab593874e435d4" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#67ae221109ddc69510ab593874e435d4">release</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#11ba1da4a722c9e6f73339a52c487e82"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d2f93edf7b15ec4bcee138823220c52"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::downgrade_to_reader" ref="0d2f93edf7b15ec4bcee138823220c52" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Downgrade writer to become a reader. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<><br>
- class tbb::scalable_allocator< void ></h3>
+The scoped locking pattern. 
+<p>
+It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
+<p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="c62e365be7bcbba091c9ea7454a4d22c"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="c62e365be7bcbba091c9ea7454a4d22c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
 
-Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this. 
+</div>
+</div><p>
+<a class="anchor" name="fbb8798792d3aebb136c46fc63d2529e"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::scoped_lock" ref="fbb8798792d3aebb136c46fc63d2529e" args="(queuing_rw_mutex &m, bool write=true)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::queuing_rw_mutex::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00154.html">queuing_rw_mutex</a> & </td>
+          <td class="paramname"> <em>m</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool </td>
+          <td class="paramname"> <em>write</em> = <code>true</code></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="11ba1da4a722c9e6f73339a52c487e82"></a><!-- doxytag: member="tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer" ref="11ba1da4a722c9e6f73339a52c487e82" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Upgrade reader to become a writer. 
+<p>
+Returns true if the upgrade happened without re-acquiring the lock and false if opposite 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00348.html">scalable_allocator.h</a></ul>
+<li><a class="el" href="a00349.html">queuing_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00156.html b/doc/html/a00156.html
index f6c3249..a427a14 100644
--- a/doc/html/a00156.html
+++ b/doc/html/a00156.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::simple_partitioner Class Reference</title>
+<title>tbb::recursive_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,38 +21,81 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00156.html">simple_partitioner</a></div>
-<h1>tbb::simple_partitioner Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00156.html">recursive_mutex</a></div>
+<h1>tbb::recursive_mutex Class Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::simple_partitioner" -->A simple partitioner.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::recursive_mutex" -->Mutex that allows recursive mutex acquisition.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00339.html">partitioner.h</a>></code>
+<code>#include <<a class="el" href="a00350.html">recursive_mutex.h</a>></code>
 <p>
-<a href="a00039.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00051.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a47f7e0208a2bf68f35b51b27d2ddf2a"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_for" ref="a47f7e0208a2bf68f35b51b27d2ddf2a" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_for</b></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2fceb7f95c24a8cd1457d4527e4b8c6"></a><!-- doxytag: member="tbb::recursive_mutex::recursive_mutex" ref="d2fceb7f95c24a8cd1457d4527e4b8c6" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired <a class="el" href="a00156.html">recursive_mutex</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c342c69d47f4bb0b393535dee4015d6"></a><!-- doxytag: member="tbb::recursive_mutex::lock" ref="4c342c69d47f4bb0b393535dee4015d6" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html#86e719b0afee25704af11ab97694d240">try_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#86e719b0afee25704af11ab97694d240"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f0a96e26b7f074588dc31e32524856ae"></a><!-- doxytag: member="tbb::recursive_mutex::unlock" ref="f0a96e26b7f074588dc31e32524856ae" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">unlock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="718cc53f6b33d8c396ccca0e4ebc5606"></a><!-- doxytag: member="tbb::recursive_mutex::is_rw_mutex" ref="718cc53f6b33d8c396ccca0e4ebc5606" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8f710e431b62c2a48914bd99d0fe034"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_reduce" ref="e8f710e431b62c2a48914bd99d0fe034" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_reduce</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6149d7541063d8b35afd98df6f0f89d"></a><!-- doxytag: member="tbb::recursive_mutex::is_recursive_mutex" ref="f6149d7541063d8b35afd98df6f0f89d" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = true</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_scan" ref="76d97ae6ad98db0acfc8ed8cb7c76705" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f01aacad6b9b9d51573c0803323182fe"></a><!-- doxytag: member="tbb::recursive_mutex::is_fair_mutex" ref="f01aacad6b9b9d51573c0803323182fe" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
+
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
 
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>partition_type</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html">scoped_lock</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00157.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A simple partitioner. 
+Mutex that allows recursive mutex acquisition. 
+<p>
+Mutex that allows recursive mutex acquisition. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="86e719b0afee25704af11ab97694d240"></a><!-- doxytag: member="tbb::recursive_mutex::try_lock" ref="86e719b0afee25704af11ab97694d240" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::recursive_mutex::try_lock           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
 <p>
-Divides the range until the range is not divisible. 
+Try acquiring lock (non-blocking). 
 <p>
+Return true if lock acquired; false otherwise. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00339.html">partitioner.h</a></ul>
+<li><a class="el" href="a00350.html">recursive_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00157.html b/doc/html/a00157.html
index 9ee7a73..7a2754c 100644
--- a/doc/html/a00157.html
+++ b/doc/html/a00157.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::spin_mutex Class Reference</title>
+<title>tbb::recursive_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,105 +21,51 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00157.html">spin_mutex</a></div>
-<h1>tbb::spin_mutex Class Reference<br>
-<small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::spin_mutex" -->A lock that occupies a single byte.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00156.html">recursive_mutex</a>::<a class="el" href="a00157.html">scoped_lock</a></div>
+<h1>tbb::recursive_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::recursive_mutex::scoped_lock" -->The scoped locking pattern.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00349.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00350.html">recursive_mutex.h</a>></code>
 <p>
-<a href="a00057.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00052.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d82d4d36fbf9727a493d26ae50855fe7"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="d82d4d36fbf9727a493d26ae50855fe7" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired lock.  <a href="#3d8fb44644fd8d41ada1fbeba7409be3"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b3fa21632815f8fab2fd6c67ec0d48c"></a><!-- doxytag: member="tbb::spin_mutex::internal_construct" ref="4b3fa21632815f8fab2fd6c67ec0d48c" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a <a class="el" href="a00156.html">recursive_mutex</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dec17713c4c1321ac8fec66816d0c602"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::scoped_lock" ref="dec17713c4c1321ac8fec66816d0c602" args="(recursive_mutex &mutex)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#dec17713c4c1321ac8fec66816d0c602">scoped_lock</a> (<a class="el" href="a00156.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f748989e19b6045e3a2d2ee73626a28"></a><!-- doxytag: member="tbb::spin_mutex::lock" ref="4f748989e19b6045e3a2d2ee73626a28" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c1197ffb8f3cd9d4fed71d7e06265b7c"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::~scoped_lock" ref="c1197ffb8f3cd9d4fed71d7e06265b7c" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fb04da37cccf8c99b1f9102d9074f9a"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::acquire" ref="7fb04da37cccf8c99b1f9102d9074f9a" args="(recursive_mutex &mutex)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a> (<a class="el" href="a00156.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#8f9a58fb56a2b4c5efe1a7f7c1ae2074"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e843ee6265f57f27d228ba91e7308ef"></a><!-- doxytag: member="tbb::spin_mutex::unlock" ref="0e843ee6265f57f27d228ba91e7308ef" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36bfc3e93e3ef6340abef4901444d340"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::try_acquire" ref="36bfc3e93e3ef6340abef4901444d340" args="(recursive_mutex &mutex)" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a> (<a class="el" href="a00156.html">recursive_mutex</a> &<a class="el" href="a00142.html">mutex</a>)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a7c93ca9e7ab656037a43984f24c051"></a><!-- doxytag: member="tbb::spin_mutex::is_rw_mutex" ref="5a7c93ca9e7ab656037a43984f24c051" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a967c455d0d80c9bbe030905201391b6"></a><!-- doxytag: member="tbb::spin_mutex::is_recursive_mutex" ref="a967c455d0d80c9bbe030905201391b6" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec12e4036073fb684b6d2d33493ed0aa"></a><!-- doxytag: member="tbb::spin_mutex::is_fair_mutex" ref="ec12e4036073fb684b6d2d33493ed0aa" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given <a class="el" href="a00156.html">recursive_mutex</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac480ea0e9d5ea0345a67d57008b6263"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::release" ref="ac480ea0e9d5ea0345a67d57008b6263" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">release</a> ()</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
-
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="459818b78a3e9985dc5a9d5638b6593e"></a><!-- doxytag: member="tbb::recursive_mutex::scoped_lock::recursive_mutex" ref="459818b78a3e9985dc5a9d5638b6593e" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>recursive_mutex</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00158.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A lock that occupies a single byte. 
-<p>
-A <a class="el" href="a00157.html">spin_mutex</a> is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically <20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld. 
-<p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="3d8fb44644fd8d41ada1fbeba7409be3"></a><!-- doxytag: member="tbb::spin_mutex::spin_mutex" ref="3d8fb44644fd8d41ada1fbeba7409be3" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::spin_mutex::spin_mutex           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Construct unacquired lock. 
-<p>
-Equivalent to zero-initialization of *this. 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="8f9a58fb56a2b4c5efe1a7f7c1ae2074"></a><!-- doxytag: member="tbb::spin_mutex::try_lock" ref="8f9a58fb56a2b4c5efe1a7f7c1ae2074" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::spin_mutex::try_lock           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
+The scoped locking pattern. 
 <p>
-Try acquiring lock (non-blocking). 
+It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
 <p>
-Return true if lock acquired; false otherwise. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00349.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00350.html">recursive_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00158.html b/doc/html/a00158.html
index aac0c6b..6789e29 100644
--- a/doc/html/a00158.html
+++ b/doc/html/a00158.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::spin_mutex::scoped_lock Class Reference</title>
+<title>tbb::scalable_allocator< T > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,71 +21,86 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00157.html">spin_mutex</a>::<a class="el" href="a00158.html">scoped_lock</a></div>
-<h1>tbb::spin_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::spin_mutex::scoped_lock" -->Represents acquisition of a mutex.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00158.html">scalable_allocator</a></div>
+<h1>tbb::scalable_allocator< T > Class Template Reference<br>
+<small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
+</h1><!-- doxytag: class="tbb::scalable_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00349.html">spin_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">scalable_allocator.h</a>></code>
 <p>
-<a href="a00058.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00053.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a1cf13c339ee177a103a7e19bf2710a"></a><!-- doxytag: member="tbb::scalable_allocator::value_type" ref="5a1cf13c339ee177a103a7e19bf2710a" args="" -->
+typedef internal::allocator_type<<br>
+ T >::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5121ec62bc79faba6a4b674d59e7260"></a><!-- doxytag: member="tbb::scalable_allocator::pointer" ref="a5121ec62bc79faba6a4b674d59e7260" args="" -->
+typedef value_type * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="846a6fcec3bc7fa3839a12266a729a02"></a><!-- doxytag: member="tbb::scalable_allocator::const_pointer" ref="846a6fcec3bc7fa3839a12266a729a02" args="" -->
+typedef const value_type * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="254d7749de9277bb7711470c04d963ea"></a><!-- doxytag: member="tbb::scalable_allocator::reference" ref="254d7749de9277bb7711470c04d963ea" args="" -->
+typedef value_type & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acad193a7f6e16253f772ba3e9b2c98f"></a><!-- doxytag: member="tbb::scalable_allocator::const_reference" ref="acad193a7f6e16253f772ba3e9b2c98f" args="" -->
+typedef const value_type & </td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a5cb7482f222a14b513bbdd4ad8507d"></a><!-- doxytag: member="tbb::scalable_allocator::size_type" ref="4a5cb7482f222a14b513bbdd4ad8507d" args="" -->
+typedef size_t </td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb96c23f650cf91a73e2810b54c481bb"></a><!-- doxytag: member="tbb::scalable_allocator::difference_type" ref="cb96c23f650cf91a73e2810b54c481bb" args="" -->
+typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
+
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29ae680ae7f5e685c2e15535b9c855b3"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::scoped_lock" ref="29ae680ae7f5e685c2e15535b9c855b3" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eee1873729ed05c7f92544c3ff0c08bc"></a><!-- doxytag: member="tbb::scalable_allocator::scalable_allocator" ref="eee1873729ed05c7f92544c3ff0c08bc" args="(const scalable_allocator &)" -->
+ </td><td class="memItemRight" valign="bottom"><b>scalable_allocator</b> (const <a class="el" href="a00158.html">scalable_allocator</a> &)  throw ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="d56dc9f231c59f912297ac3c3b3b93b6"></a><!-- doxytag: member="tbb::scalable_allocator::scalable_allocator" ref="d56dc9f231c59f912297ac3c3b3b93b6" args="(const scalable_allocator< U > &)" -->
+template<typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>scalable_allocator</b> (const <a class="el" href="a00158.html">scalable_allocator</a>< U > &)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78fa13a188b542ea724d45a9dbf5a071"></a><!-- doxytag: member="tbb::scalable_allocator::address" ref="78fa13a188b542ea724d45a9dbf5a071" args="(reference x) const " -->
+pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (reference x) const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct without acquiring a mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5ce6807050a9e8f87bcb4a65dccb12ef"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::scoped_lock" ref="5ce6807050a9e8f87bcb4a65dccb12ef" args="(spin_mutex &m)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a> (<a class="el" href="a00157.html">spin_mutex</a> &m)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14be4ad8eb478c87e240e605221ab455"></a><!-- doxytag: member="tbb::scalable_allocator::address" ref="14be4ad8eb478c87e240e605221ab455" args="(const_reference x) const " -->
+const_pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (const_reference x) const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct and acquire lock on a mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ee3c338732b1f64b0b32a757807a30d"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::acquire" ref="3ee3c338732b1f64b0b32a757807a30d" args="(spin_mutex &m)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a> (<a class="el" href="a00157.html">spin_mutex</a> &m)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="726b1586d05d44665a36e1c7b2699bfd"></a><!-- doxytag: member="tbb::scalable_allocator::allocate" ref="726b1586d05d44665a36e1c7b2699bfd" args="(size_type n, const void *=0)" -->
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a> (size_type n, const void *=0)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a> (<a class="el" href="a00157.html">spin_mutex</a> &m)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f806a238c18cbcfb531e1e0a0d2ec59d"></a><!-- doxytag: member="tbb::scalable_allocator::deallocate" ref="f806a238c18cbcfb531e1e0a0d2ec59d" args="(pointer p, size_type)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a> (pointer p, size_type)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#9297ec188534b45dc0ca48f2f39a0501"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eeb615e68e963e6bf8d9c11402d0ce8e"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::release" ref="eeb615e68e963e6bf8d9c11402d0ce8e" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Free previously allocated block of memory. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="880e766f1d913988c21973dbdd874fd5"></a><!-- doxytag: member="tbb::scalable_allocator::max_size" ref="880e766f1d913988c21973dbdd874fd5" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#880e766f1d913988c21973dbdd874fd5">max_size</a> () const   throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac6fa425d1f06c56d8b70abc51aac844"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::~scoped_lock" ref="ac6fa425d1f06c56d8b70abc51aac844" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Largest value for which method allocate might succeed. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a9891a26790b98e9b9a68dad875faa8"></a><!-- doxytag: member="tbb::scalable_allocator::construct" ref="5a9891a26790b98e9b9a68dad875faa8" args="(pointer p, const value_type &val)" -->
+void </td><td class="memItemRight" valign="bottom"><b>construct</b> (pointer p, const value_type &val)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy lock. If holding a lock, releases the lock first. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ee2a2cdaf6a2128849e7d7723d9174f"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::spin_mutex" ref="6ee2a2cdaf6a2128849e7d7723d9174f" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>spin_mutex</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="743f878b04a492bf7ae0e82a64dc20c8"></a><!-- doxytag: member="tbb::scalable_allocator::destroy" ref="743f878b04a492bf7ae0e82a64dc20c8" args="(pointer p)" -->
+void </td><td class="memItemRight" valign="bottom"><b>destroy</b> (pointer p)</td></tr>
+
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents acquisition of a mutex. 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="9297ec188534b45dc0ca48f2f39a0501"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::try_acquire" ref="9297ec188534b45dc0ca48f2f39a0501" args="(spin_mutex &m)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::spin_mutex::scoped_lock::try_acquire           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00157.html">spin_mutex</a> & </td>
-          <td class="paramname"> <em>m</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<h3>template<typename T><br>
+ class tbb::scalable_allocator< T ></h3>
 
+Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
 <p>
-Try acquiring lock (non-blocking). 
+The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
 <p>
-Return true if lock acquired; false otherwise. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00349.html">spin_mutex.h</a></ul>
+<li><a class="el" href="a00351.html">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00159.html b/doc/html/a00159.html
index f1a8df9..5486048 100644
--- a/doc/html/a00159.html
+++ b/doc/html/a00159.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::spin_rw_mutex_v3 Class Reference</title>
+<title>tbb::scalable_allocator< void > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,107 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00159.html">spin_rw_mutex_v3</a></div>
-<h1>tbb::spin_rw_mutex_v3 Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00159.html">scalable_allocator< void ></a></div>
+<h1>tbb::scalable_allocator< void > Class Template Reference<br>
 <small>
-[<a class="el" href="a00231.html">Synchronization</a>]</small>
-</h1><!-- doxytag: class="tbb::spin_rw_mutex_v3" -->Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
+</h1><!-- doxytag: class="tbb::scalable_allocator< void >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00350.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00351.html">scalable_allocator.h</a>></code>
 <p>
-<a href="a00059.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00055.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61332b2756de89f3f5f69310cbb6e70c"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::spin_rw_mutex_v3" ref="61332b2756de89f3f5f69310cbb6e70c" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a> ()</td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2046816029c2c7856f7684aed2af9cff"></a><!-- doxytag: member="tbb::scalable_allocator< void >::pointer" ref="2046816029c2c7856f7684aed2af9cff" args="" -->
+typedef void * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9a815fb2759e55072ed413f1b6970cf3"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::~spin_rw_mutex_v3" ref="9a815fb2759e55072ed413f1b6970cf3" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="591c568d23f8aadf6ea8d1dc939c4e75"></a><!-- doxytag: member="tbb::scalable_allocator< void >::const_pointer" ref="591c568d23f8aadf6ea8d1dc939c4e75" args="" -->
+typedef const void * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor asserts if the mutex is acquired, i.e. state is zero. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4007d6e1523dbc3c2bb7f889ab789a8a"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::lock" ref="4007d6e1523dbc3c2bb7f889ab789a8a" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">lock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire writer lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#088bb256be794cc47d3b83791632fdfc">try_lock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring writer lock (non-blocking).  <a href="#088bb256be794cc47d3b83791632fdfc"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9f52ead2098eb5fb12da59d5ae53b55"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::unlock" ref="f9f52ead2098eb5fb12da59d5ae53b55" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">unlock</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13f799708ac4ca437a16be202e263e18"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::lock_read" ref="13f799708ac4ca437a16be202e263e18" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#13f799708ac4ca437a16be202e263e18">lock_read</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire reader lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html#b8667415869013f840d976aa406d385a">try_lock_read</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring reader lock (non-blocking).  <a href="#b8667415869013f840d976aa406d385a"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c1e60f22c01604ca93c41b8334cc15e"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_rw_mutex" ref="4c1e60f22c01604ca93c41b8334cc15e" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = true</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="681a816fe76d6ca7752303f9dcc3c4b2"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_recursive_mutex" ref="681a816fe76d6ca7752303f9dcc3c4b2" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4dd66d90df6247da6050e88b2aa3b820"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_fair_mutex" ref="4dd66d90df6247da6050e88b2aa3b820" args="" -->
-static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="64dbab666af0740c30b77edac9f157ce"></a><!-- doxytag: member="tbb::scalable_allocator< void >::value_type" ref="64dbab666af0740c30b77edac9f157ce" args="" -->
+typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
 
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html">scoped_lock</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00160.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Fast, unfair, spinning reader-writer lock with backoff and writer-preference. 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="088bb256be794cc47d3b83791632fdfc"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::try_lock" ref="088bb256be794cc47d3b83791632fdfc" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::spin_rw_mutex_v3::try_lock           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Try acquiring writer lock (non-blocking). 
-<p>
-Return true if lock acquired; false otherwise. 
-</div>
-</div><p>
-<a class="anchor" name="b8667415869013f840d976aa406d385a"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::try_lock_read" ref="b8667415869013f840d976aa406d385a" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::spin_rw_mutex_v3::try_lock_read           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<h3>template<><br>
+ class tbb::scalable_allocator< void ></h3>
 
+Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
-Try acquiring reader lock (non-blocking). 
-<p>
-Return true if reader lock acquired; false otherwise. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00350.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00351.html">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00160.html b/doc/html/a00160.html
index ffcddcb..740685d 100644
--- a/doc/html/a00160.html
+++ b/doc/html/a00160.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::spin_rw_mutex_v3::scoped_lock Class Reference</title>
+<title>tbb::simple_partitioner Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,127 +21,38 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00159.html">spin_rw_mutex_v3</a>::<a class="el" href="a00160.html">scoped_lock</a></div>
-<h1>tbb::spin_rw_mutex_v3::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::spin_rw_mutex_v3::scoped_lock" -->The scoped locking pattern.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00160.html">simple_partitioner</a></div>
+<h1>tbb::simple_partitioner Class Reference<br>
+<small>
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::simple_partitioner" -->A simple partitioner.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00350.html">spin_rw_mutex.h</a>></code>
+<code>#include <<a class="el" href="a00342.html">partitioner.h</a>></code>
 <p>
-<a href="a00060.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00039.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a> ()</td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a47f7e0208a2bf68f35b51b27d2ddf2a"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_for" ref="a47f7e0208a2bf68f35b51b27d2ddf2a" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_for</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#d6ea60dee5563f702379bf5e51aa8806"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a> (<a class="el" href="a00159.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8f710e431b62c2a48914bd99d0fe034"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_reduce" ref="e8f710e431b62c2a48914bd99d0fe034" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_reduce</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#42a92d4f8fdde425b111cfa8a9228071"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7eaaa3f2e2c5dc11e7005811b1bdd04"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::~scoped_lock" ref="d7eaaa3f2e2c5dc11e7005811b1bdd04" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76d97ae6ad98db0acfc8ed8cb7c76705"></a><!-- doxytag: member="tbb::simple_partitioner::internal::start_scan" ref="76d97ae6ad98db0acfc8ed8cb7c76705" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::start_scan</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0b646ec5be02a127d159bbb7ca65353"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::acquire" ref="b0b646ec5be02a127d159bbb7ca65353" args="(spin_rw_mutex &m, bool write=true)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a> (<a class="el" href="a00159.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>partition_type</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#3f0b1e3f2efab63336400348bd070226"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61b14d00a78185c9b2d206ebfc379124"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::release" ref="61b14d00a78185c9b2d206ebfc379124" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">release</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2c2c38a08cb9080e87099fac3e5bc94"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::downgrade_to_reader" ref="c2c2c38a08cb9080e87099fac3e5bc94" args="()" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Downgrade writer to become a reader. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9879626968d9b9a04cd2ec0fb2e84ae1"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::try_acquire" ref="9879626968d9b9a04cd2ec0fb2e84ae1" args="(spin_rw_mutex &m, bool write=true)" -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a> (<a class="el" href="a00159.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-The scoped locking pattern. 
-<p>
-It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
-<p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="d6ea60dee5563f702379bf5e51aa8806"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock" ref="d6ea60dee5563f702379bf5e51aa8806" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Construct lock that has not acquired a mutex. 
-<p>
-Equivalent to zero-initialization of *this. 
-</div>
-</div><p>
-<a class="anchor" name="42a92d4f8fdde425b111cfa8a9228071"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock" ref="42a92d4f8fdde425b111cfa8a9228071" args="(spin_rw_mutex &m, bool write=true)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00159.html">spin_rw_mutex</a> & </td>
-          <td class="paramname"> <em>m</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">bool </td>
-          <td class="paramname"> <em>write</em> = <code>true</code></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Acquire lock on given mutex. 
-<p>
-Upon entry, *this should not be in the "have acquired a mutex" state. 
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="3f0b1e3f2efab63336400348bd070226"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer" ref="3f0b1e3f2efab63336400348bd070226" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
+A simple partitioner. 
 <p>
-Upgrade reader to become a writer. 
+Divides the range until the range is not divisible. 
 <p>
-Returns true if the upgrade happened without re-acquiring the lock and false if opposite 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00350.html">spin_rw_mutex.h</a></ul>
+<li><a class="el" href="a00342.html">partitioner.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00161.html b/doc/html/a00161.html
index e442c12..34cf476 100644
--- a/doc/html/a00161.html
+++ b/doc/html/a00161.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::split Class Reference</title>
+<title>tbb::spin_mutex Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,25 +21,105 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00161.html">split</a></div>
-<h1>tbb::split Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00161.html">spin_mutex</a></div>
+<h1>tbb::spin_mutex Class Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::split" -->Dummy type that distinguishes splitting constructor from copy constructor.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::spin_mutex" -->A lock that occupies a single byte.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00382.html">tbb_stddef.h</a>></code>
+<code>#include <<a class="el" href="a00352.html">spin_mutex.h</a>></code>
 <p>
-<table border="0" cellpadding="0" cellspacing="0">
+<a href="a00057.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired lock.  <a href="#3d8fb44644fd8d41ada1fbeba7409be3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b3fa21632815f8fab2fd6c67ec0d48c"></a><!-- doxytag: member="tbb::spin_mutex::internal_construct" ref="4b3fa21632815f8fab2fd6c67ec0d48c" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><b>internal_construct</b> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f748989e19b6045e3a2d2ee73626a28"></a><!-- doxytag: member="tbb::spin_mutex::lock" ref="4f748989e19b6045e3a2d2ee73626a28" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#8f9a58fb56a2b4c5efe1a7f7c1ae2074"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e843ee6265f57f27d228ba91e7308ef"></a><!-- doxytag: member="tbb::spin_mutex::unlock" ref="0e843ee6265f57f27d228ba91e7308ef" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a7c93ca9e7ab656037a43984f24c051"></a><!-- doxytag: member="tbb::spin_mutex::is_rw_mutex" ref="5a7c93ca9e7ab656037a43984f24c051" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = false</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a967c455d0d80c9bbe030905201391b6"></a><!-- doxytag: member="tbb::spin_mutex::is_recursive_mutex" ref="a967c455d0d80c9bbe030905201391b6" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec12e4036073fb684b6d2d33493ed0aa"></a><!-- doxytag: member="tbb::spin_mutex::is_fair_mutex" ref="ec12e4036073fb684b6d2d33493ed0aa" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
+
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36f15b770a1bb0b56e33d7fa75ebd1a"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock" ref="a36f15b770a1bb0b56e33d7fa75ebd1a" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>scoped_lock</b></td></tr>
+
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html">scoped_lock</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents acquisition of a mutex.  <a href="a00162.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Dummy type that distinguishes splitting constructor from copy constructor. 
+A lock that occupies a single byte. 
 <p>
-See description of parallel_for and parallel_reduce for example usages. 
+A <a class="el" href="a00161.html">spin_mutex</a> is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically <20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld. 
 <p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="3d8fb44644fd8d41ada1fbeba7409be3"></a><!-- doxytag: member="tbb::spin_mutex::spin_mutex" ref="3d8fb44644fd8d41ada1fbeba7409be3" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::spin_mutex::spin_mutex           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Construct unacquired lock. 
+<p>
+Equivalent to zero-initialization of *this. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="8f9a58fb56a2b4c5efe1a7f7c1ae2074"></a><!-- doxytag: member="tbb::spin_mutex::try_lock" ref="8f9a58fb56a2b4c5efe1a7f7c1ae2074" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::spin_mutex::try_lock           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Try acquiring lock (non-blocking). 
+<p>
+Return true if lock acquired; false otherwise. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00382.html">tbb_stddef.h</a></ul>
+<li><a class="el" href="a00352.html">spin_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00162.html b/doc/html/a00162.html
index 4bda324..baa3982 100644
--- a/doc/html/a00162.html
+++ b/doc/html/a00162.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::task Class Reference</title>
+<title>tbb::spin_mutex::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,658 +21,56 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00162.html">task</a></div>
-<h1>tbb::task Class Reference<br>
-<small>
-[<a class="el" href="a00233.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task" -->Base class for user-defined tasks.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00161.html">spin_mutex</a>::<a class="el" href="a00162.html">scoped_lock</a></div>
+<h1>tbb::spin_mutex::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::spin_mutex::scoped_lock" -->Represents acquisition of a mutex.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00352.html">spin_mutex.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00137.html">tbb::empty_task</a>, tbb::internal::function_task< F >, and tbb::internal::task_handle_task< F >.
-<p>
-Inheritance diagram for tbb::task:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00063.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00058.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef internal::intptr </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A scheduling depth.  <a href="#d8815c39bb61bd7e2d2691c476ed03b9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef internal::affinity_id </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">An id as used for specifying affinity.  <a href="#d61bb32389d3857bf7511d69beaafb76"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task is running, and will be destroyed after method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> completes.  <a href="#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task to be rescheduled.  <a href="#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task is in ready pool, or is going to be put there, or was just taken off.  <a href="#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task object is freshly allocated or recycled.  <a href="#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task object is on free list, or is going to be put there, or was just taken off.  <a href="#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task to be recycled as continuation  <a href="#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> { <br>
-  <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>, 
-<a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>, 
-<a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>, 
-<a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>, 
-<br>
-  <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>, 
-<a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
-<br>
- }</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of task states that the scheduler considers.  <a href="a00162.html#4a3c415562d17905390ea5b49d12293e">More...</a><br></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98245ee0473f84cb19dbbf8c81134908"></a><!-- doxytag: member="tbb::task::~task" ref="98245ee0473f84cb19dbbf8c81134908" args="()" -->
-virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">~task</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22c298cd40937a431a06777423f002f6"></a><!-- doxytag: member="tbb::task::execute" ref="22c298cd40937a431a06777423f002f6" args="()=0" -->
-virtual <a class="el" href="a00162.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Should be overridden by derived classes. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">internal::allocate_continuation_proxy & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#1434c79a5138993269d034008bff7329">allocate_continuation</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a continuation task of *this.  <a href="#1434c79a5138993269d034008bff7329"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ff794f7053cd9148d5f280fbf07377f"></a><!-- doxytag: member="tbb::task::allocate_child" ref="1ff794f7053cd9148d5f280fbf07377f" args="()" -->
-internal::allocate_child_proxy & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a child task of *this. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">internal::allocate_additional_child_of_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a> (<a class="el" href="a00162.html">task</a> &t)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Like allocate_child, except that task's parent becomes "t", not this.  <a href="#43bfe64c0e9333c0ca895cc0c375512b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a> (<a class="el" href="a00162.html">task</a> &victim)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a task.  <a href="#a57def00c8e9d932dbea0b3ee23991b9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Change this to be a continuation of its former self.  <a href="#a67a79e18f62b43a623a00cfbd76db4c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Recommended to use, safe variant of recycle_as_continuation.  <a href="#3b290d14109704e2b69dc1ac980a7a76"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db399855177438bbc9cc61d508dae8d2"></a><!-- doxytag: member="tbb::task::recycle_as_child_of" ref="db399855177438bbc9cc61d508dae8d2" args="(task &new_parent)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a> (<a class="el" href="a00162.html">task</a> &new_parent)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Change this to be a child of new_parent. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Schedule this for reexecution after current <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> returns.  <a href="#4f1be9bbcdb487830dbe298b68d85144"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7653ceef53a188d05b5c779e1104b698"></a><!-- doxytag: member="tbb::task::depth" ref="7653ceef53a188d05b5c779e1104b698" args="() const " -->
-intptr_t </td><td class="memItemRight" valign="bottom"><b>depth</b> () const </td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e864e9c80e3d79f00d77fb99f4757621"></a><!-- doxytag: member="tbb::task::set_depth" ref="e864e9c80e3d79f00d77fb99f4757621" args="(intptr_t)" -->
-void </td><td class="memItemRight" valign="bottom"><b>set_depth</b> (intptr_t)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c83fcc26f6513f0e06de70cbab9dee46"></a><!-- doxytag: member="tbb::task::add_to_depth" ref="c83fcc26f6513f0e06de70cbab9dee46" args="(int)" -->
-void </td><td class="memItemRight" valign="bottom"><b>add_to_depth</b> (int)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be823a972b3c3b9901c5963eeb050fd"></a><!-- doxytag: member="tbb::task::depth" ref="5be823a972b3c3b9901c5963eeb050fd" args="() const " -->
-<a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">depth</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Scheduling depth. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">set_depth</a> (<a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> new_depth)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set scheduling depth to given value.  <a href="#fc4d4e61a56823aa1efdbb5d59e42973"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">add_to_depth</a> (int delta)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Change scheduling depth by given amount.  <a href="#b0f98c633647fc73b978fe4cd2277ac4"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06a4206a57e8e12a439b14d6d41cfd92"></a><!-- doxytag: member="tbb::task::set_ref_count" ref="06a4206a57e8e12a439b14d6d41cfd92" args="(int count)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a> (int count)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set reference count. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically increment reference count.  <a href="#f5fb43c7ad0de5a4b95703cebc39e345"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically decrement reference count.  <a href="#ef4680f5c148020c5e7e43ddef44cd5d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a> (<a class="el" href="a00162.html">task</a> &child)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Schedule task for execution when a worker becomes available.  <a href="#f7737143d458f1ed1c0d7da3971d9e6b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a> (<a class="el" href="a00164.html">task_list</a> &list)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn multiple tasks and clear list.  <a href="#db841c647eb6d754440c2f4e4a73c80b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ce28ca9baa771cfc37ecd72e69c4f3c"></a><!-- doxytag: member="tbb::task::spawn_and_wait_for_all" ref="3ce28ca9baa771cfc37ecd72e69c4f3c" args="(task &child)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a> (<a class="el" href="a00162.html">task</a> &child)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Similar to spawn followed by wait_for_all, but more efficient. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="894ab68378e502776d8220eea7ce9fa1"></a><!-- doxytag: member="tbb::task::spawn_and_wait_for_all" ref="894ab68378e502776d8220eea7ce9fa1" args="(task_list &list)" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a> (<a class="el" href="a00164.html">task_list</a> &list)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Similar to spawn followed by wait_for_all, but more efficient. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for reference count to become one, and set reference count to zero.  <a href="#53d2615ad9c38859b4c8080936600283"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="314e98ee4347ccec83efcb9ee22e8596"></a><!-- doxytag: member="tbb::task::parent" ref="314e98ee4347ccec83efcb9ee22e8596" args="() const " -->
-<a class="el" href="a00162.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">parent</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task on whose behalf this task is working, or NULL if this is a root. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8c36a93f3972590fbb65ff1cef3173b"></a><!-- doxytag: member="tbb::task::context" ref="d8c36a93f3972590fbb65ff1cef3173b" args="()" -->
-<a class="el" href="a00163.html">task_group_context</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">context</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Shared context that is used to communicate asynchronous state changes. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9169402702f56bf519448aaf34450aa"></a><!-- doxytag: member="tbb::task::is_stolen_task" ref="f9169402702f56bf519448aaf34450aa" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if task is owned by different thread than thread that owns its parent. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0af7b2d7e6e8b4333b2accfce3dfb374"></a><!-- doxytag: member="tbb::task::state" ref="0af7b2d7e6e8b4333b2accfce3dfb374" args="() const " -->
-<a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Current execution state. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad774f55eaec008ae02b236423209ced"></a><!-- doxytag: member="tbb::task::ref_count" ref="ad774f55eaec008ae02b236423209ced" args="() const " -->
-int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ad774f55eaec008ae02b236423209ced">ref_count</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The internal reference count. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c26718b3b247cd13deb1a741902e7105"></a><!-- doxytag: member="tbb::task::is_owned_by_current_thread" ref="c26718b3b247cd13deb1a741902e7105" args="() const " -->
-bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if this task is owned by the calling thread; false otherwise. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dca19d7a45487a7d67a0db517e2b57c9"></a><!-- doxytag: member="tbb::task::set_affinity" ref="dca19d7a45487a7d67a0db517e2b57c9" args="(affinity_id id)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a> (<a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set affinity for this task. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a920a56b0bcf2801518fb45b2c9d2be"></a><!-- doxytag: member="tbb::task::affinity" ref="3a920a56b0bcf2801518fb45b2c9d2be" args="() const " -->
-<a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Current affinity of this task. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a> (<a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Invoked by scheduler to notify task that it ran on unexpected thread.  <a href="#713c338c8eeaebdc5a6b10a69c039b06"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiates cancellation of all tasks in this cancellation group and its subordinate groups.  <a href="#0f3fb4aac549ab642022450a4bd13326"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="025f18118c057c4c8db87ff2ce8df975"></a><!-- doxytag: member="tbb::task::is_cancelled" ref="025f18118c057c4c8db87ff2ce8df975" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a> () const </td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29ae680ae7f5e685c2e15535b9c855b3"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::scoped_lock" ref="29ae680ae7f5e685c2e15535b9c855b3" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the context received cancellation request. <br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23acb0da0afd690da797f9f882027d34"></a><!-- doxytag: member="tbb::task::allocate_root" ref="23acb0da0afd690da797f9f882027d34" args="()" -->
-static internal::allocate_root_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#23acb0da0afd690da797f9f882027d34">allocate_root</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct without acquiring a mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5ce6807050a9e8f87bcb4a65dccb12ef"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::scoped_lock" ref="5ce6807050a9e8f87bcb4a65dccb12ef" args="(spin_mutex &m)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#5ce6807050a9e8f87bcb4a65dccb12ef">scoped_lock</a> (<a class="el" href="a00161.html">spin_mutex</a> &m)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a root task. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ccc518caf31075a3e073996d2d240a4"></a><!-- doxytag: member="tbb::task::allocate_root" ref="8ccc518caf31075a3e073996d2d240a4" args="(task_group_context &ctx)" -->
-static internal::allocate_root_with_context_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a> (<a class="el" href="a00163.html">task_group_context</a> &ctx)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct and acquire lock on a mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ee3c338732b1f64b0b32a757807a30d"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::acquire" ref="3ee3c338732b1f64b0b32a757807a30d" args="(spin_mutex &m)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a> (<a class="el" href="a00161.html">spin_mutex</a> &m)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a root task associated with user supplied context. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a> (<a class="el" href="a00162.html">task</a> &root)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a> (<a class="el" href="a00161.html">spin_mutex</a> &m)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn task allocated by allocate_root, wait for it to complete, and deallocate it.  <a href="#ce8ce689c26a4ddf343829bc3c73290a"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a> (<a class="el" href="a00164.html">task_list</a> &root_list)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring lock (non-blocking).  <a href="#9297ec188534b45dc0ca48f2f39a0501"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eeb615e68e963e6bf8d9c11402d0ce8e"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::release" ref="eeb615e68e963e6bf8d9c11402d0ce8e" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn root tasks on list and wait for all of them to finish.  <a href="#c33c7edbaec67aa8a56f48986a9dc69f"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd43e8d6249738efafd12d6a4c72c5e3"></a><!-- doxytag: member="tbb::task::self" ref="bd43e8d6249738efafd12d6a4c72c5e3" args="()" -->
-static <a class="el" href="a00162.html">task</a> &__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac6fa425d1f06c56d8b70abc51aac844"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::~scoped_lock" ref="ac6fa425d1f06c56d8b70abc51aac844" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The innermost task being executed or destroyed by the current thread at the moment. <br></td></tr>
-<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2bce8ec6e44706e70128f5cf91b76e67"></a><!-- doxytag: member="tbb::task::task" ref="2bce8ec6e44706e70128f5cf91b76e67" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy lock. If holding a lock, releases the lock first. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5eabadbca46f93ce6fb08290e85a0a65"></a><!-- doxytag: member="tbb::task::task_list" ref="5eabadbca46f93ce6fb08290e85a0a65" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>task_list</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e296810002652d771f692e20ca87e898"></a><!-- doxytag: member="tbb::task::internal::scheduler" ref="e296810002652d771f692e20ca87e898" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::scheduler</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="387b945c106854e1ed525f0668092930"></a><!-- doxytag: member="tbb::task::internal::allocate_root_proxy" ref="387b945c106854e1ed525f0668092930" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_proxy</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecedb9436fb30df30cb3a52c64bb97e5"></a><!-- doxytag: member="tbb::task::internal::allocate_root_with_context_proxy" ref="ecedb9436fb30df30cb3a52c64bb97e5" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_with_context_proxy</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9987b3b1174772e5e853bd94b9f15350"></a><!-- doxytag: member="tbb::task::internal::allocate_continuation_proxy" ref="9987b3b1174772e5e853bd94b9f15350" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_continuation_proxy</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1f9e255654086b52fe107e4d8bbc8b7d"></a><!-- doxytag: member="tbb::task::internal::allocate_child_proxy" ref="1f9e255654086b52fe107e4d8bbc8b7d" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_child_proxy</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e99ce0045ea3c55d239f38ea026b8a7"></a><!-- doxytag: member="tbb::task::internal::allocate_additional_child_of_proxy" ref="0e99ce0045ea3c55d239f38ea026b8a7" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_additional_child_of_proxy</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc65e26bdbb61f5e5a3d7ac92948bbd1"></a><!-- doxytag: member="tbb::task::internal::task_group_base" ref="bc65e26bdbb61f5e5a3d7ac92948bbd1" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::task_group_base</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ee2a2cdaf6a2128849e7d7723d9174f"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::spin_mutex" ref="6ee2a2cdaf6a2128849e7d7723d9174f" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>spin_mutex</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Base class for user-defined tasks. 
-<p>
-<hr><h2>Member Typedef Documentation</h2>
-<a class="anchor" name="d61bb32389d3857bf7511d69beaafb76"></a><!-- doxytag: member="tbb::task::affinity_id" ref="d61bb32389d3857bf7511d69beaafb76" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef internal::affinity_id <a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">tbb::task::affinity_id</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-An id as used for specifying affinity. 
+Represents acquisition of a mutex. 
 <p>
-Guaranteed to be integral type. Value of 0 means no affinity. 
-</div>
-</div><p>
-<a class="anchor" name="d8815c39bb61bd7e2d2691c476ed03b9"></a><!-- doxytag: member="tbb::task::depth_type" ref="d8815c39bb61bd7e2d2691c476ed03b9" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef internal::intptr <a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task::depth_type</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-A scheduling depth. 
-<p>
-Guaranteed to be a signed integral type. 
-</div>
-</div><p>
-<hr><h2>Member Enumeration Documentation</h2>
-<a class="anchor" name="4a3c415562d17905390ea5b49d12293e"></a><!-- doxytag: member="tbb::task::state_type" ref="4a3c415562d17905390ea5b49d12293e" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">enum <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">tbb::task::state_type</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Enumeration of task states that the scheduler considers. 
-<p>
-<dl compact><dt><b>Enumerator: </b></dt><dd>
-<table border="0" cellspacing="2" cellpadding="0">
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9"></a><!-- doxytag: member="executing" ref="4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9" args="" -->executing</em> </td><td>
-task is running, and will be destroyed after method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> completes. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513"></a><!-- doxytag: member="reexecute" ref="4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513" args="" -->reexecute</em> </td><td>
-task to be rescheduled. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a"></a><!-- doxytag: member="ready" ref="4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a" args="" -->ready</em> </td><td>
-task is in ready pool, or is going to be put there, or was just taken off. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c"></a><!-- doxytag: member="allocated" ref="4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c" args="" -->allocated</em> </td><td>
-task object is freshly allocated or recycled. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735"></a><!-- doxytag: member="freed" ref="4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735" args="" -->freed</em> </td><td>
-task object is on free list, or is going to be put there, or was just taken off. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d"></a><!-- doxytag: member="recycle" ref="4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d" args="" -->recycle</em> </td><td>
-task to be recycled as continuation </td></tr>
-</table>
-</dl>
-
-</div>
-</div><p>
 <hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="b0f98c633647fc73b978fe4cd2277ac4"></a><!-- doxytag: member="tbb::task::add_to_depth" ref="b0f98c633647fc73b978fe4cd2277ac4" args="(int delta)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::add_to_depth           </td>
-          <td>(</td>
-          <td class="paramtype">int </td>
-          <td class="paramname"> <em>delta</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Change scheduling depth by given amount. 
-<p>
-The resulting depth must be non-negative. 
-</div>
-</div><p>
-<a class="anchor" name="43bfe64c0e9333c0ca895cc0c375512b"></a><!-- doxytag: member="tbb::task::allocate_additional_child_of" ref="43bfe64c0e9333c0ca895cc0c375512b" args="(task &t)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">internal::allocate_additional_child_of_proxy tbb::task::allocate_additional_child_of           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html">task</a> & </td>
-          <td class="paramname"> <em>t</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Like allocate_child, except that task's parent becomes "t", not this. 
-<p>
-Typically used in conjunction with schedule_to_reexecute to implement while loops. Atomically increments the reference count of t.parent() 
-</div>
-</div><p>
-<a class="anchor" name="1434c79a5138993269d034008bff7329"></a><!-- doxytag: member="tbb::task::allocate_continuation" ref="1434c79a5138993269d034008bff7329" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">internal::allocate_continuation_proxy& tbb::task::allocate_continuation           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Returns proxy for overloaded new that allocates a continuation task of *this. 
-<p>
-The continuation's parent becomes the parent of *this. 
-</div>
-</div><p>
-<a class="anchor" name="0f3fb4aac549ab642022450a4bd13326"></a><!-- doxytag: member="tbb::task::cancel_group_execution" ref="0f3fb4aac549ab642022450a4bd13326" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool tbb::task::cancel_group_execution           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Initiates cancellation of all tasks in this cancellation group and its subordinate groups. 
-<p>
-<dl compact><dt><b>Returns:</b></dt><dd>false if cancellation has already been requested, true otherwise. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="ef4680f5c148020c5e7e43ddef44cd5d"></a><!-- doxytag: member="tbb::task::decrement_ref_count" ref="ef4680f5c148020c5e7e43ddef44cd5d" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int tbb::task::decrement_ref_count           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Atomically decrement reference count. 
-<p>
-Has release semanics. 
-</div>
-</div><p>
-<a class="anchor" name="a57def00c8e9d932dbea0b3ee23991b9"></a><!-- doxytag: member="tbb::task::destroy" ref="a57def00c8e9d932dbea0b3ee23991b9" args="(task &victim)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task::destroy           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html">task</a> & </td>
-          <td class="paramname"> <em>victim</em>          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Destroy a task. 
-<p>
-Usually, calling this method is unnecessary, because a task is implicitly deleted after its <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> method runs. However, sometimes a task needs to be explicitly deallocated, such as when a root task is used as the parent in spawn_and_wait_for_all. 
-</div>
-</div><p>
-<a class="anchor" name="f5fb43c7ad0de5a4b95703cebc39e345"></a><!-- doxytag: member="tbb::task::increment_ref_count" ref="f5fb43c7ad0de5a4b95703cebc39e345" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::increment_ref_count           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Atomically increment reference count. 
-<p>
-Has acquire semantics 
-</div>
-</div><p>
-<a class="anchor" name="713c338c8eeaebdc5a6b10a69c039b06"></a><!-- doxytag: member="tbb::task::note_affinity" ref="713c338c8eeaebdc5a6b10a69c039b06" args="(affinity_id id)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void __TBB_EXPORTED_METHOD tbb::task::note_affinity           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td>
-          <td class="paramname"> <em>id</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Invoked by scheduler to notify task that it ran on unexpected thread. 
-<p>
-Invoked before method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> runs, if task is stolen, or task has affinity but will be executed on another thread.<p>
-The default action does nothing. 
-</div>
-</div><p>
-<a class="anchor" name="a67a79e18f62b43a623a00cfbd76db4c"></a><!-- doxytag: member="tbb::task::recycle_as_continuation" ref="a67a79e18f62b43a623a00cfbd76db4c" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::recycle_as_continuation           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Change this to be a continuation of its former self. 
-<p>
-The caller must guarantee that the task's refcount does not become zero until after the method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. Typically, this is done by having method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> return a pointer to a child of the task. If the guarantee cannot be made, use method recycle_as_safe_continuation instead.<p>
-Because of the hazard, this method may be deprecated in the future. 
-</div>
-</div><p>
-<a class="anchor" name="3b290d14109704e2b69dc1ac980a7a76"></a><!-- doxytag: member="tbb::task::recycle_as_safe_continuation" ref="3b290d14109704e2b69dc1ac980a7a76" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::recycle_as_safe_continuation           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Recommended to use, safe variant of recycle_as_continuation. 
-<p>
-For safety, it requires additional increment of ref_count. 
-</div>
-</div><p>
-<a class="anchor" name="4f1be9bbcdb487830dbe298b68d85144"></a><!-- doxytag: member="tbb::task::recycle_to_reexecute" ref="4f1be9bbcdb487830dbe298b68d85144" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::recycle_to_reexecute           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Schedule this for reexecution after current <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. 
-<p>
-Requires that this.execute() be running. 
-</div>
-</div><p>
-<a class="anchor" name="fc4d4e61a56823aa1efdbb5d59e42973"></a><!-- doxytag: member="tbb::task::set_depth" ref="fc4d4e61a56823aa1efdbb5d59e42973" args="(depth_type new_depth)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::set_depth           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">depth_type</a> </td>
-          <td class="paramname"> <em>new_depth</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Set scheduling depth to given value. 
-<p>
-The depth must be non-negative 
-</div>
-</div><p>
-<a class="anchor" name="db841c647eb6d754440c2f4e4a73c80b"></a><!-- doxytag: member="tbb::task::spawn" ref="db841c647eb6d754440c2f4e4a73c80b" args="(task_list &list)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::spawn           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00164.html">task_list</a> & </td>
-          <td class="paramname"> <em>list</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Spawn multiple tasks and clear list. 
-<p>
-All of the tasks must be at the same depth. 
-</div>
-</div><p>
-<a class="anchor" name="f7737143d458f1ed1c0d7da3971d9e6b"></a><!-- doxytag: member="tbb::task::spawn" ref="f7737143d458f1ed1c0d7da3971d9e6b" args="(task &child)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::spawn           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html">task</a> & </td>
-          <td class="paramname"> <em>child</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Schedule task for execution when a worker becomes available. 
-<p>
-After all children spawned so far finish their method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">task::execute</a>, their parent's method <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">task::execute</a> may start running. Therefore, it is important to ensure that at least one child has not completed until the parent is ready to run. 
-</div>
-</div><p>
-<a class="anchor" name="c33c7edbaec67aa8a56f48986a9dc69f"></a><!-- doxytag: member="tbb::task::spawn_root_and_wait" ref="c33c7edbaec67aa8a56f48986a9dc69f" args="(task_list &root_list)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::task::spawn_root_and_wait           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00164.html">task_list</a> & </td>
-          <td class="paramname"> <em>root_list</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline, static]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Spawn root tasks on list and wait for all of them to finish. 
-<p>
-If there are more tasks than worker threads, the tasks are spawned in order of front to back. 
-</div>
-</div><p>
-<a class="anchor" name="ce8ce689c26a4ddf343829bc3c73290a"></a><!-- doxytag: member="tbb::task::spawn_root_and_wait" ref="ce8ce689c26a4ddf343829bc3c73290a" args="(task &root)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">static void tbb::task::spawn_root_and_wait           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="a00162.html">task</a> & </td>
-          <td class="paramname"> <em>root</em>          </td>
-          <td> ) </td>
-          <td width="100%"><code> [inline, static]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Spawn task allocated by allocate_root, wait for it to complete, and deallocate it. 
-<p>
-The thread that calls spawn_root_and_wait must be the same thread that allocated the task. 
-</div>
-</div><p>
-<a class="anchor" name="53d2615ad9c38859b4c8080936600283"></a><!-- doxytag: member="tbb::task::wait_for_all" ref="53d2615ad9c38859b4c8080936600283" args="()" -->
+<a class="anchor" name="9297ec188534b45dc0ca48f2f39a0501"></a><!-- doxytag: member="tbb::spin_mutex::scoped_lock::try_acquire" ref="9297ec188534b45dc0ca48f2f39a0501" args="(spin_mutex &m)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void tbb::task::wait_for_all           </td>
+          <td class="memname">bool tbb::spin_mutex::scoped_lock::try_acquire           </td>
           <td>(</td>
-          <td class="paramname">          </td>
+          <td class="paramtype"><a class="el" href="a00161.html">spin_mutex</a> & </td>
+          <td class="paramname"> <em>m</em>          </td>
           <td> ) </td>
           <td width="100%"><code> [inline]</code></td>
         </tr>
@@ -681,13 +79,13 @@ The thread that calls spawn_root_and_wait must be the same thread that allocated
 <div class="memdoc">
 
 <p>
-Wait for reference count to become one, and set reference count to zero. 
+Try acquiring lock (non-blocking). 
 <p>
-Works on tasks while waiting. 
+Return true if lock acquired; false otherwise. 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00351.html">task.h</a></ul>
+<li><a class="el" href="a00352.html">spin_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00163.html b/doc/html/a00163.html
index 744de7f..69e8010 100644
--- a/doc/html/a00163.html
+++ b/doc/html/a00163.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::task_group_context Class Reference</title>
+<title>tbb::spin_rw_mutex_v3 Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,209 +21,107 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00163.html">task_group_context</a></div>
-<h1>tbb::task_group_context Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00163.html">spin_rw_mutex_v3</a></div>
+<h1>tbb::spin_rw_mutex_v3 Class Reference<br>
 <small>
-[<a class="el" href="a00233.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_group_context" -->Used to form groups of tasks.  
+[<a class="el" href="a00236.html">Synchronization</a>]</small>
+</h1><!-- doxytag: class="tbb::spin_rw_mutex_v3" -->Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00353.html">spin_rw_mutex.h</a>></code>
 <p>
-<a href="a00061.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00059.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4"></a><!-- doxytag: member="tbb::task_group_context::isolated" ref="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>isolated</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5af85179a348162d4ddd66b6fc0d60fc7f37e067ba1fca8a5c809d20522662b"></a><!-- doxytag: member="tbb::task_group_context::bound" ref="d5af85179a348162d4ddd66b6fc0d60fc7f37e067ba1fca8a5c809d20522662b" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>bound</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0ebf774f9c21343eba6303927b5ae0be44c"></a><!-- doxytag: member="tbb::task_group_context::exact_exception" ref="b8dce4661b346756cb4f584529ecd0ebf774f9c21343eba6303927b5ae0be44c" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>exact_exception</b> = 0x0001ul << traits_offset</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0ebad65d11fe6fab6ecbb356464170f6a38"></a><!-- doxytag: member="tbb::task_group_context::no_cancellation" ref="b8dce4661b346756cb4f584529ecd0ebad65d11fe6fab6ecbb356464170f6a38" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>no_cancellation</b> = 0x0002ul << traits_offset</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0eb4002d8f90c8c9f7c3f80ad349aee7cce"></a><!-- doxytag: member="tbb::task_group_context::concurrent_wait" ref="b8dce4661b346756cb4f584529ecd0eb4002d8f90c8c9f7c3f80ad349aee7cce" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>concurrent_wait</b> = 0x0004ul << traits_offset</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><b>default_traits</b></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61332b2756de89f3f5f69310cbb6e70c"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::spin_rw_mutex_v3" ref="61332b2756de89f3f5f69310cbb6e70c" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>kind_type</b> { <b>isolated</b>, 
-<b>bound</b>
- }</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct unacquired mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9a815fb2759e55072ed413f1b6970cf3"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::~spin_rw_mutex_v3" ref="9a815fb2759e55072ed413f1b6970cf3" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#9a815fb2759e55072ed413f1b6970cf3">~spin_rw_mutex_v3</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>traits_type</b> { <b>exact_exception</b> =  0x0001ul << traits_offset, 
-<b>no_cancellation</b> =  0x0002ul << traits_offset, 
-<b>concurrent_wait</b> =  0x0004ul << traits_offset, 
-<b>default_traits</b>
- }</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor asserts if the mutex is acquired, i.e. state is zero. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4007d6e1523dbc3c2bb7f889ab789a8a"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::lock" ref="4007d6e1523dbc3c2bb7f889ab789a8a" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#4007d6e1523dbc3c2bb7f889ab789a8a">lock</a> ()</td></tr>
 
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a> (kind_type relation_with_parent=bound, uintptr_t traits=default_traits)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire writer lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#088bb256be794cc47d3b83791632fdfc">try_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Default & binding constructor.  <a href="#19fee08fb8ac98adccfe69c1aa63c491"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring writer lock (non-blocking).  <a href="#088bb256be794cc47d3b83791632fdfc"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9f52ead2098eb5fb12da59d5ae53b55"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::unlock" ref="f9f52ead2098eb5fb12da59d5ae53b55" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#f9f52ead2098eb5fb12da59d5ae53b55">unlock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Forcefully reinitializes the context after the task tree it was associated with is completed.  <a href="#6d30d16bf1cd22f86c6afaf29c2b430c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13f799708ac4ca437a16be202e263e18"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::lock_read" ref="13f799708ac4ca437a16be202e263e18" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#13f799708ac4ca437a16be202e263e18">lock_read</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiates cancellation of all tasks in this cancellation group and its subordinate groups.  <a href="#8bcdfdf4e6bfb76125b6de15c00b571d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4db72f16210b0a991b2c134d6763a4cc"></a><!-- doxytag: member="tbb::task_group_context::is_group_execution_cancelled" ref="4db72f16210b0a991b2c134d6763a4cc" args="() const " -->
-bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire reader lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#b8667415869013f840d976aa406d385a">try_lock_read</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the context received cancellation request. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquiring reader lock (non-blocking).  <a href="#b8667415869013f840d976aa406d385a"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c1e60f22c01604ca93c41b8334cc15e"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_rw_mutex" ref="4c1e60f22c01604ca93c41b8334cc15e" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_rw_mutex</b> = true</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Records the pending exception, and cancels the task group.  <a href="#d97c8a03615594b71b4ef06ff75cf561"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html#49a55352084fd44b8863d182e839e6dc">init</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="681a816fe76d6ca7752303f9dcc3c4b2"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_recursive_mutex" ref="681a816fe76d6ca7752303f9dcc3c4b2" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_recursive_mutex</b> = false</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Out-of-line part of the constructor.  <a href="#49a55352084fd44b8863d182e839e6dc"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e656073628561c8fd68f6134d527e2de"></a><!-- doxytag: member="tbb::task_group_context::task" ref="e656073628561c8fd68f6134d527e2de" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>task</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4dd66d90df6247da6050e88b2aa3b820"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::is_fair_mutex" ref="4dd66d90df6247da6050e88b2aa3b820" args="" -->
+static const bool </td><td class="memItemRight" valign="bottom"><b>is_fair_mutex</b> = false</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecedb9436fb30df30cb3a52c64bb97e5"></a><!-- doxytag: member="tbb::task_group_context::internal::allocate_root_with_context_proxy" ref="ecedb9436fb30df30cb3a52c64bb97e5" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_with_context_proxy</b></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html">scoped_lock</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The scoped locking pattern.  <a href="a00164.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Used to form groups of tasks. 
-<p>
-The context services explicit cancellation requests from user code, and unhandled exceptions intercepted during tasks execution. Intercepting an exception results in generating internal cancellation requests (which is processed in exactly the same way as external ones).<p>
-The context is associated with one or more root tasks and defines the cancellation group that includes all the descendants of the corresponding root task(s). Association is established when a context object is passed as an argument to the <a class="el" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root()</a> method. See <a class="el" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context::task_group_context</a> for more details.<p>
-The context can be bound to another one, and other contexts can be bound to it, forming a tree-like structure: parent -> this -> children. Arrows here designate cancellation propagation direction. If a task in a cancellation group is canceled all the other tasks in this group and groups bound to it (as children) get canceled too.<p>
-IMPLEMENTATION NOTE: When adding new members to <a class="el" href="a00163.html">task_group_context</a> or changing types of existing ones, update the size of both padding buffers (_leading_padding and _trailing_padding) appropriately. See also VERSIONING NOTE at the constructor definition below. 
+Fast, unfair, spinning reader-writer lock with backoff and writer-preference. 
 <p>
-<hr><h2>Constructor & Destructor Documentation</h2>
-<a class="anchor" name="19fee08fb8ac98adccfe69c1aa63c491"></a><!-- doxytag: member="tbb::task_group_context::task_group_context" ref="19fee08fb8ac98adccfe69c1aa63c491" args="(kind_type relation_with_parent=bound, uintptr_t traits=default_traits)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">tbb::task_group_context::task_group_context           </td>
-          <td>(</td>
-          <td class="paramtype">kind_type </td>
-          <td class="paramname"> <em>relation_with_parent</em> = <code>bound</code>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uintptr_t </td>
-          <td class="paramname"> <em>traits</em> = <code>default_traits</code></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"><code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Default & binding constructor. 
-<p>
-By default a bound context is created. That is this context will be bound (as child) to the context of the task calling task::allocate_root(this_context) method. Cancellation requests passed to the parent context are propagated to all the contexts bound to it.<p>
-If task_group_context::isolated is used as the argument, then the tasks associated with this context will never be affected by events in any other context.<p>
-Creating isolated contexts involve much less overhead, but they have limited utility. Normally when an exception occurs in an algorithm that has nested ones running, it is desirably to have all the nested algorithms canceled as well. Such a behavior requires nested algorithms to use bound contexts.<p>
-There is one good place where using isolated algorithms is beneficial. It is a master thread. That is if a particular algorithm is invoked directly from the master thread (not from a TBB task), supplying it with explicitly created isolated context will result in a faster algorithm startup.<p>
-VERSIONING NOTE: Implementation(s) of <a class="el" href="a00163.html">task_group_context</a> constructor(s) cannot be made entirely out-of-line because the run-time version must be set by the user code. This will become critically important for binary compatibility, if we ever have to change the size of the context object.<p>
-Boosting the runtime version will also be necessary whenever new fields are introduced in the currently unused padding areas or the meaning of the existing fields is changed or extended. 
-</div>
-</div><p>
 <hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="8bcdfdf4e6bfb76125b6de15c00b571d"></a><!-- doxytag: member="tbb::task_group_context::cancel_group_execution" ref="8bcdfdf4e6bfb76125b6de15c00b571d" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool __TBB_EXPORTED_METHOD tbb::task_group_context::cancel_group_execution           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Initiates cancellation of all tasks in this cancellation group and its subordinate groups. 
-<p>
-<dl compact><dt><b>Returns:</b></dt><dd>false if cancellation has already been requested, true otherwise.</dd></dl>
-Note that canceling never fails. When false is returned, it just means that another thread (or this one) has already sent cancellation request to this context or to one of its ancestors (if this context is bound). It is guaranteed that when this method is concurrently called on the same not yet cancelled context, true will be returned by one and only one invocation. 
-</div>
-</div><p>
-<a class="anchor" name="49a55352084fd44b8863d182e839e6dc"></a><!-- doxytag: member="tbb::task_group_context::init" ref="49a55352084fd44b8863d182e839e6dc" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::init           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [protected]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Out-of-line part of the constructor. 
-<p>
-Singled out to ensure backward binary compatibility of the future versions. 
-</div>
-</div><p>
-<a class="anchor" name="d97c8a03615594b71b4ef06ff75cf561"></a><!-- doxytag: member="tbb::task_group_context::register_pending_exception" ref="d97c8a03615594b71b4ef06ff75cf561" args="()" -->
+<a class="anchor" name="088bb256be794cc47d3b83791632fdfc"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::try_lock" ref="088bb256be794cc47d3b83791632fdfc" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::register_pending_exception           </td>
+          <td class="memname">bool tbb::spin_rw_mutex_v3::try_lock           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
-          <td width="100%"></td>
+          <td width="100%"><code> [inline]</code></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Records the pending exception, and cancels the task group. 
+Try acquiring writer lock (non-blocking). 
 <p>
-May be called only from inside a catch-block. If the context is already canceled, does nothing. The method brings the task group associated with this context exactly into the state it would be in, if one of its tasks threw the currently pending exception during its execution. In other words, it emulates the actions of the scheduler's dispatch loop exception handler. 
+Return true if lock acquired; false otherwise. 
 </div>
 </div><p>
-<a class="anchor" name="6d30d16bf1cd22f86c6afaf29c2b430c"></a><!-- doxytag: member="tbb::task_group_context::reset" ref="6d30d16bf1cd22f86c6afaf29c2b430c" args="()" -->
+<a class="anchor" name="b8667415869013f840d976aa406d385a"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::try_lock_read" ref="b8667415869013f840d976aa406d385a" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::reset           </td>
+          <td class="memname">bool tbb::spin_rw_mutex_v3::try_lock_read           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
-          <td width="100%"></td>
+          <td width="100%"><code> [inline]</code></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Forcefully reinitializes the context after the task tree it was associated with is completed. 
+Try acquiring reader lock (non-blocking). 
 <p>
-Because the method assumes that all the tasks that used to be associated with this context have already finished, calling it while the context is still in use somewhere in the task hierarchy leads to undefined behavior.<p>
-IMPORTANT: This method is not thread safe!<p>
-The method does not change the context's parent if it is set. 
+Return true if reader lock acquired; false otherwise. 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00351.html">task.h</a></ul>
+<li><a class="el" href="a00353.html">spin_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00164.html b/doc/html/a00164.html
index e12606f..7047970 100644
--- a/doc/html/a00164.html
+++ b/doc/html/a00164.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::task_list Class Reference</title>
+<title>tbb::spin_rw_mutex_v3::scoped_lock Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,54 +21,127 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00164.html">task_list</a></div>
-<h1>tbb::task_list Class Reference<br>
-<small>
-[<a class="el" href="a00233.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_list" -->A list of children.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00163.html">spin_rw_mutex_v3</a>::<a class="el" href="a00164.html">scoped_lock</a></div>
+<h1>tbb::spin_rw_mutex_v3::scoped_lock Class Reference</h1><!-- doxytag: class="tbb::spin_rw_mutex_v3::scoped_lock" -->The scoped locking pattern.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00351.html">task.h</a>></code>
+<code>#include <<a class="el" href="a00353.html">spin_rw_mutex.h</a>></code>
 <p>
-<a href="a00065.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00060.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="416341c2047eaef50417b41eaf7e9de6"></a><!-- doxytag: member="tbb::task_list::task_list" ref="416341c2047eaef50417b41eaf7e9de6" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">task_list</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#d6ea60dee5563f702379bf5e51aa8806">scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty list. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6d438f1499a02db1e59c24ab6043e5ba"></a><!-- doxytag: member="tbb::task_list::~task_list" ref="6d438f1499a02db1e59c24ab6043e5ba" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex.  <a href="#d6ea60dee5563f702379bf5e51aa8806"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#42a92d4f8fdde425b111cfa8a9228071">scoped_lock</a> (<a class="el" href="a00163.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys the list, but does not destroy the task objects. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3ac31e092814b90929f81bb30441959"></a><!-- doxytag: member="tbb::task_list::empty" ref="f3ac31e092814b90929f81bb30441959" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#f3ac31e092814b90929f81bb30441959">empty</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex.  <a href="#42a92d4f8fdde425b111cfa8a9228071"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7eaaa3f2e2c5dc11e7005811b1bdd04"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::~scoped_lock" ref="d7eaaa3f2e2c5dc11e7005811b1bdd04" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">~scoped_lock</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">True if list if empty; false otherwise. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4cd34756bc4763dafb8c84838a0124ff"></a><!-- doxytag: member="tbb::task_list::push_back" ref="4cd34756bc4763dafb8c84838a0124ff" args="(task &task)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a> (<a class="el" href="a00162.html">task</a> &<a class="el" href="a00162.html">task</a>)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0b646ec5be02a127d159bbb7ca65353"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::acquire" ref="b0b646ec5be02a127d159bbb7ca65353" args="(spin_rw_mutex &m, bool write=true)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#b0b646ec5be02a127d159bbb7ca65353">acquire</a> (<a class="el" href="a00163.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Push task onto back of list. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5fe85df5ed524418389d34051750347d"></a><!-- doxytag: member="tbb::task_list::pop_front" ref="5fe85df5ed524418389d34051750347d" args="()" -->
-<a class="el" href="a00162.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#5fe85df5ed524418389d34051750347d">pop_front</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#3f0b1e3f2efab63336400348bd070226">upgrade_to_writer</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Pop the front task from the list. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fce446ee13e025969945328f3ff59b95"></a><!-- doxytag: member="tbb::task_list::clear" ref="fce446ee13e025969945328f3ff59b95" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#fce446ee13e025969945328f3ff59b95">clear</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Upgrade reader to become a writer.  <a href="#3f0b1e3f2efab63336400348bd070226"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61b14d00a78185c9b2d206ebfc379124"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::release" ref="61b14d00a78185c9b2d206ebfc379124" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#61b14d00a78185c9b2d206ebfc379124">release</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the list. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e656073628561c8fd68f6134d527e2de"></a><!-- doxytag: member="tbb::task_list::task" ref="e656073628561c8fd68f6134d527e2de" args="" -->
-class </td><td class="memItemRight" valign="bottom"><b>task</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2c2c38a08cb9080e87099fac3e5bc94"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::downgrade_to_reader" ref="c2c2c38a08cb9080e87099fac3e5bc94" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#c2c2c38a08cb9080e87099fac3e5bc94">downgrade_to_reader</a> ()</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Downgrade writer to become a reader. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9879626968d9b9a04cd2ec0fb2e84ae1"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::try_acquire" ref="9879626968d9b9a04cd2ec0fb2e84ae1" args="(spin_rw_mutex &m, bool write=true)" -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html#9879626968d9b9a04cd2ec0fb2e84ae1">try_acquire</a> (<a class="el" href="a00163.html">spin_rw_mutex</a> &m, bool write=true)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A list of children. 
+The scoped locking pattern. 
+<p>
+It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. 
+<p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="d6ea60dee5563f702379bf5e51aa8806"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock" ref="d6ea60dee5563f702379bf5e51aa8806" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Construct lock that has not acquired a mutex. 
+<p>
+Equivalent to zero-initialization of *this. 
+</div>
+</div><p>
+<a class="anchor" name="42a92d4f8fdde425b111cfa8a9228071"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock" ref="42a92d4f8fdde425b111cfa8a9228071" args="(spin_rw_mutex &m, bool write=true)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00163.html">spin_rw_mutex</a> & </td>
+          <td class="paramname"> <em>m</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool </td>
+          <td class="paramname"> <em>write</em> = <code>true</code></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Acquire lock on given mutex. 
+<p>
+Upon entry, *this should not be in the "have acquired a mutex" state. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="3f0b1e3f2efab63336400348bd070226"></a><!-- doxytag: member="tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer" ref="3f0b1e3f2efab63336400348bd070226" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
 <p>
-Used for method task::spawn_children 
+Upgrade reader to become a writer. 
 <p>
+Returns true if the upgrade happened without re-acquiring the lock and false if opposite 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00351.html">task.h</a></ul>
+<li><a class="el" href="a00353.html">spin_rw_mutex.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00165.html b/doc/html/a00165.html
index 15e1c04..75b3c13 100644
--- a/doc/html/a00165.html
+++ b/doc/html/a00165.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::task_scheduler_init Class Reference</title>
+<title>tbb::split Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,138 +21,25 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00165.html">task_scheduler_init</a></div>
-<h1>tbb::task_scheduler_init Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00165.html">split</a></div>
+<h1>tbb::split Class Reference<br>
 <small>
-[<a class="el" href="a00233.html">Task Scheduling</a>]</small>
-</h1><!-- doxytag: class="tbb::task_scheduler_init" -->Class representing reference to tbb scheduler.  
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::split" -->Dummy type that distinguishes splitting constructor from copy constructor.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00368.html">task_scheduler_init.h</a>></code>
+<code>#include <<a class="el" href="a00386.html">tbb_stddef.h</a>></code>
 <p>
-<a href="a00073.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#d476053cc712e572554823492a5229ce">initialize</a> (int number_of_threads=<a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Ensure that scheduler exists for this thread.  <a href="#d476053cc712e572554823492a5229ce"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a> (int number_of_threads, stack_size_type thread_stack_size)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The overloaded method with stack size parameter.  <a href="#d5ed214a8bb53b0466ed91ff4734b9a3"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f73257e04cb7fb9bd5be2b635d9016f1"></a><!-- doxytag: member="tbb::task_scheduler_init::terminate" ref="f73257e04cb7fb9bd5be2b635d9016f1" args="()" -->
-void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Inverse of method initialize. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="421600bf9bf9338bcf937063f2ff0e90"></a><!-- doxytag: member="tbb::task_scheduler_init::task_scheduler_init" ref="421600bf9bf9338bcf937063f2ff0e90" args="(int number_of_threads=automatic, stack_size_type thread_stack_size=0)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a> (int number_of_threads=<a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Shorthand for default constructor followed by call to intialize(number_of_threads). <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4da6c86292d80c703a66c1f6f5299488"></a><!-- doxytag: member="tbb::task_scheduler_init::~task_scheduler_init" ref="4da6c86292d80c703a66c1f6f5299488" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy scheduler for this thread if thread has no other live task_scheduler_inits. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="12752282977029f23416642bc03e8b74"></a><!-- doxytag: member="tbb::task_scheduler_init::is_active" ref="12752282977029f23416642bc03e8b74" args="() const " -->
-bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#12752282977029f23416642bc03e8b74">is_active</a> () const </td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if scheduler is active (initialized); false otherwise. <br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">static int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of threads tbb scheduler would create if initialized by default.  <a href="#ba00714c33a41a3c2216f48613971cab"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f5988e2b0fbb2d533fcbb7f2583743f"></a><!-- doxytag: member="tbb::task_scheduler_init::automatic" ref="8f5988e2b0fbb2d533fcbb7f2583743f" args="" -->
-static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Typedef for number of threads that is automatic. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6c860f1e559026ff3ef4599c0d6c514"></a><!-- doxytag: member="tbb::task_scheduler_init::deferred" ref="e6c860f1e559026ff3ef4599c0d6c514" args="" -->
-static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Argument to <a class="el" href="a00165.html#d476053cc712e572554823492a5229ce">initialize()</a> or constructor that causes initialization to be deferred. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Class representing reference to tbb scheduler. 
+Dummy type that distinguishes splitting constructor from copy constructor. 
 <p>
-A thread must construct a <a class="el" href="a00165.html">task_scheduler_init</a>, and keep it alive, during the time that it uses the services of class task. 
+See description of parallel_for and parallel_reduce for example usages. 
 <p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="ba00714c33a41a3c2216f48613971cab"></a><!-- doxytag: member="tbb::task_scheduler_init::default_num_threads" ref="ba00714c33a41a3c2216f48613971cab" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">static int __TBB_EXPORTED_FUNC tbb::task_scheduler_init::default_num_threads           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [static]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Returns the number of threads tbb scheduler would create if initialized by default. 
-<p>
-Result returned by this method does not depend on whether the scheduler has already been initialized.<p>
-Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state. 
-</div>
-</div><p>
-<a class="anchor" name="d5ed214a8bb53b0466ed91ff4734b9a3"></a><!-- doxytag: member="tbb::task_scheduler_init::initialize" ref="d5ed214a8bb53b0466ed91ff4734b9a3" args="(int number_of_threads, stack_size_type thread_stack_size)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize           </td>
-          <td>(</td>
-          <td class="paramtype">int </td>
-          <td class="paramname"> <em>number_of_threads</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">stack_size_type </td>
-          <td class="paramname"> <em>thread_stack_size</em></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-The overloaded method with stack size parameter. 
-<p>
-Overloading is necessary to preserve ABI compatibility 
-</div>
-</div><p>
-<a class="anchor" name="d476053cc712e572554823492a5229ce"></a><!-- doxytag: member="tbb::task_scheduler_init::initialize" ref="d476053cc712e572554823492a5229ce" args="(int number_of_threads=automatic)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize           </td>
-          <td>(</td>
-          <td class="paramtype">int </td>
-          <td class="paramname"> <em>number_of_threads</em> = <code><a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></code>          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Ensure that scheduler exists for this thread. 
-<p>
-A value of -1 lets tbb decide on the number of threads, which is typically the number of hardware threads. For production code, the default value of -1 should be used, particularly if the client code is mixed with third party clients that might also use tbb.<p>
-The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00368.html">task_scheduler_init.h</a></ul>
+<li><a class="el" href="a00386.html">tbb_stddef.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00166.html b/doc/html/a00166.html
index a177b7c..346b24b 100644
--- a/doc/html/a00166.html
+++ b/doc/html/a00166.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tbb_allocator< T > Class Template Reference</title>
+<title>tbb::task Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,104 +21,578 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00166.html">tbb_allocator</a></div>
-<h1>tbb::tbb_allocator< T > Class Template Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00166.html">task</a></div>
+<h1>tbb::task Class Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::tbb_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
+[<a class="el" href="a00238.html">Task Scheduling</a>]</small>
+</h1><!-- doxytag: class="tbb::task" -->Base class for user-defined tasks.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00354.html">task.h</a>></code>
 <p>
-<a href="a00075.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherited by <a class="el" href="a00137.html">tbb::empty_task</a>, tbb::internal::function_task< F >, and tbb::internal::task_handle_task< F >.
+<p>
+Inheritance diagram for tbb::task:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00063.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3cdd9619bc0a802763e7823068f83a4c"></a><!-- doxytag: member="tbb::tbb_allocator::value_type" ref="3cdd9619bc0a802763e7823068f83a4c" args="" -->
-typedef internal::allocator_type<<br>
- T >::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f979d0e74d7c6e5aeb0d26408776a9e1"></a><!-- doxytag: member="tbb::tbb_allocator::pointer" ref="f979d0e74d7c6e5aeb0d26408776a9e1" args="" -->
-typedef value_type * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1622504886ef265016a5821d61bf7adc"></a><!-- doxytag: member="tbb::tbb_allocator::const_pointer" ref="1622504886ef265016a5821d61bf7adc" args="" -->
-typedef const value_type * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef internal::affinity_id </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8e58d23c5c98fd65d4432c1e324f4c0"></a><!-- doxytag: member="tbb::tbb_allocator::reference" ref="b8e58d23c5c98fd65d4432c1e324f4c0" args="" -->
-typedef value_type & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An id as used for specifying affinity.  <a href="#d61bb32389d3857bf7511d69beaafb76"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="532f36f99650b1c26a2b8899383c5411"></a><!-- doxytag: member="tbb::tbb_allocator::const_reference" ref="532f36f99650b1c26a2b8899383c5411" args="" -->
-typedef const value_type & </td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task is running, and will be destroyed after method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> completes.  <a href="#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="639df0fb169cfcb94ba1b12429b736f4"></a><!-- doxytag: member="tbb::tbb_allocator::size_type" ref="639df0fb169cfcb94ba1b12429b736f4" args="" -->
-typedef size_t </td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task to be rescheduled.  <a href="#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="54828b5d0b937d608f76650a5df0e39f"></a><!-- doxytag: member="tbb::tbb_allocator::difference_type" ref="54828b5d0b937d608f76650a5df0e39f" args="" -->
-typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task is in ready pool, or is going to be put there, or was just taken off.  <a href="#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09a7f81fb2c3055aaecf058b11538544d524c717485b74aa552fb45b45562cb5"></a><!-- doxytag: member="tbb::tbb_allocator::scalable" ref="09a7f81fb2c3055aaecf058b11538544d524c717485b74aa552fb45b45562cb5" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>scalable</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task object is freshly allocated or recycled.  <a href="#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09a7f81fb2c3055aaecf058b11538544e108c3168e3be5de1d98e74723136fbf"></a><!-- doxytag: member="tbb::tbb_allocator::standard" ref="09a7f81fb2c3055aaecf058b11538544e108c3168e3be5de1d98e74723136fbf" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>standard</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task object is on free list, or is going to be put there, or was just taken off.  <a href="#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> { <b>scalable</b>, 
-<b>standard</b>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task to be recycled as continuation  <a href="#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> { <br>
+  <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>, 
+<a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>, 
+<a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>, 
+<a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>, 
+<br>
+  <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>, 
+<a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
+<br>
  }</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies current allocator. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of task states that the scheduler considers.  <a href="a00166.html#4a3c415562d17905390ea5b49d12293e">More...</a><br></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d85cd071047b52eeb207d458d54098cc"></a><!-- doxytag: member="tbb::tbb_allocator::tbb_allocator" ref="d85cd071047b52eeb207d458d54098cc" args="(const tbb_allocator &)" -->
- </td><td class="memItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00166.html">tbb_allocator</a> &)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98245ee0473f84cb19dbbf8c81134908"></a><!-- doxytag: member="tbb::task::~task" ref="98245ee0473f84cb19dbbf8c81134908" args="()" -->
+virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">~task</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22c298cd40937a431a06777423f002f6"></a><!-- doxytag: member="tbb::task::execute" ref="22c298cd40937a431a06777423f002f6" args="()=0" -->
+virtual <a class="el" href="a00166.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute</a> ()=0</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Should be overridden by derived classes. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">internal::allocate_continuation_proxy & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#1434c79a5138993269d034008bff7329">allocate_continuation</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a continuation task of *this.  <a href="#1434c79a5138993269d034008bff7329"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ff794f7053cd9148d5f280fbf07377f"></a><!-- doxytag: member="tbb::task::allocate_child" ref="1ff794f7053cd9148d5f280fbf07377f" args="()" -->
+internal::allocate_child_proxy & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a child task of *this. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">internal::allocate_additional_child_of_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a> (<a class="el" href="a00166.html">task</a> &t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Like allocate_child, except that task's parent becomes "t", not this.  <a href="#43bfe64c0e9333c0ca895cc0c375512b"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a> (<a class="el" href="a00166.html">task</a> &victim)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a task.  <a href="#a57def00c8e9d932dbea0b3ee23991b9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">recycle_as_continuation</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Change this to be a continuation of its former self.  <a href="#a67a79e18f62b43a623a00cfbd76db4c"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">recycle_as_safe_continuation</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Recommended to use, safe variant of recycle_as_continuation.  <a href="#3b290d14109704e2b69dc1ac980a7a76"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db399855177438bbc9cc61d508dae8d2"></a><!-- doxytag: member="tbb::task::recycle_as_child_of" ref="db399855177438bbc9cc61d508dae8d2" args="(task &new_parent)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#db399855177438bbc9cc61d508dae8d2">recycle_as_child_of</a> (<a class="el" href="a00166.html">task</a> &new_parent)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Change this to be a child of new_parent. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">recycle_to_reexecute</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Schedule this for reexecution after current <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> returns.  <a href="#4f1be9bbcdb487830dbe298b68d85144"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7653ceef53a188d05b5c779e1104b698"></a><!-- doxytag: member="tbb::task::depth" ref="7653ceef53a188d05b5c779e1104b698" args="() const " -->
+intptr_t </td><td class="memItemRight" valign="bottom"><b>depth</b> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e864e9c80e3d79f00d77fb99f4757621"></a><!-- doxytag: member="tbb::task::set_depth" ref="e864e9c80e3d79f00d77fb99f4757621" args="(intptr_t)" -->
+void </td><td class="memItemRight" valign="bottom"><b>set_depth</b> (intptr_t)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c83fcc26f6513f0e06de70cbab9dee46"></a><!-- doxytag: member="tbb::task::add_to_depth" ref="c83fcc26f6513f0e06de70cbab9dee46" args="(int)" -->
+void </td><td class="memItemRight" valign="bottom"><b>add_to_depth</b> (int)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06a4206a57e8e12a439b14d6d41cfd92"></a><!-- doxytag: member="tbb::task::set_ref_count" ref="06a4206a57e8e12a439b14d6d41cfd92" args="(int count)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a> (int count)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set reference count. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">increment_ref_count</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically increment reference count.  <a href="#f5fb43c7ad0de5a4b95703cebc39e345"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">decrement_ref_count</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically decrement reference count.  <a href="#ef4680f5c148020c5e7e43ddef44cd5d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a> (<a class="el" href="a00166.html">task</a> &child)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Schedule task for execution when a worker becomes available.  <a href="#f7737143d458f1ed1c0d7da3971d9e6b"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db841c647eb6d754440c2f4e4a73c80b"></a><!-- doxytag: member="tbb::task::spawn" ref="db841c647eb6d754440c2f4e4a73c80b" args="(task_list &list)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">spawn</a> (<a class="el" href="a00168.html">task_list</a> &list)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn multiple tasks and clear list. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ce28ca9baa771cfc37ecd72e69c4f3c"></a><!-- doxytag: member="tbb::task::spawn_and_wait_for_all" ref="3ce28ca9baa771cfc37ecd72e69c4f3c" args="(task &child)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a> (<a class="el" href="a00166.html">task</a> &child)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Similar to spawn followed by wait_for_all, but more efficient. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="894ab68378e502776d8220eea7ce9fa1"></a><!-- doxytag: member="tbb::task::spawn_and_wait_for_all" ref="894ab68378e502776d8220eea7ce9fa1" args="(task_list &list)" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#894ab68378e502776d8220eea7ce9fa1">spawn_and_wait_for_all</a> (<a class="el" href="a00168.html">task_list</a> &list)</td></tr>
 
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="5c3cb04a50d15d38f4c66ca3e5d2f6af"></a><!-- doxytag: member="tbb::tbb_allocator::tbb_allocator" ref="5c3cb04a50d15d38f4c66ca3e5d2f6af" args="(const tbb_allocator< U > &)" -->
-template<typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00166.html">tbb_allocator</a>< U > &)  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Similar to spawn followed by wait_for_all, but more efficient. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#53d2615ad9c38859b4c8080936600283">wait_for_all</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="08d3822344271d0a1c2e64e8c9c16b58"></a><!-- doxytag: member="tbb::tbb_allocator::address" ref="08d3822344271d0a1c2e64e8c9c16b58" args="(reference x) const " -->
-pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (reference x) const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for reference count to become one, and set reference count to zero.  <a href="#53d2615ad9c38859b4c8080936600283"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="314e98ee4347ccec83efcb9ee22e8596"></a><!-- doxytag: member="tbb::task::parent" ref="314e98ee4347ccec83efcb9ee22e8596" args="() const " -->
+<a class="el" href="a00166.html">task</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">parent</a> () const </td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b388f25858f783d995d61506de24656"></a><!-- doxytag: member="tbb::tbb_allocator::address" ref="2b388f25858f783d995d61506de24656" args="(const_reference x) const " -->
-const_pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (const_reference x) const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task on whose behalf this task is working, or NULL if this is a root. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8c36a93f3972590fbb65ff1cef3173b"></a><!-- doxytag: member="tbb::task::context" ref="d8c36a93f3972590fbb65ff1cef3173b" args="()" -->
+<a class="el" href="a00167.html">task_group_context</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">context</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6cb487b1bdce0b581f265a77dca6d53"></a><!-- doxytag: member="tbb::tbb_allocator::allocate" ref="f6cb487b1bdce0b581f265a77dca6d53" args="(size_type n, const void *=0)" -->
-pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a> (size_type n, const void *=0)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Shared context that is used to communicate asynchronous state changes. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9169402702f56bf519448aaf34450aa"></a><!-- doxytag: member="tbb::task::is_stolen_task" ref="f9169402702f56bf519448aaf34450aa" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fdd011fdf2f9ad07006dc7c0a7ec1da2"></a><!-- doxytag: member="tbb::tbb_allocator::deallocate" ref="fdd011fdf2f9ad07006dc7c0a7ec1da2" args="(pointer p, size_type)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a> (pointer p, size_type)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if task is owned by different thread than thread that owns its parent. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0af7b2d7e6e8b4333b2accfce3dfb374"></a><!-- doxytag: member="tbb::task::state" ref="0af7b2d7e6e8b4333b2accfce3dfb374" args="() const " -->
+<a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">state</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Free previously allocated block of memory. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f059ca2c96243024f0d562ee3a87a3a5"></a><!-- doxytag: member="tbb::tbb_allocator::max_size" ref="f059ca2c96243024f0d562ee3a87a3a5" args="() const " -->
-size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a> () const   throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Current execution state. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad774f55eaec008ae02b236423209ced"></a><!-- doxytag: member="tbb::task::ref_count" ref="ad774f55eaec008ae02b236423209ced" args="() const " -->
+int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#ad774f55eaec008ae02b236423209ced">ref_count</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Largest value for which method allocate might succeed. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ab228ab9e324ed041c2226e1d717df5f"></a><!-- doxytag: member="tbb::tbb_allocator::construct" ref="ab228ab9e324ed041c2226e1d717df5f" args="(pointer p, const value_type &value)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">construct</a> (pointer p, const value_type &value)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The internal reference count. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c26718b3b247cd13deb1a741902e7105"></a><!-- doxytag: member="tbb::task::is_owned_by_current_thread" ref="c26718b3b247cd13deb1a741902e7105" args="() const " -->
+bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy-construct value at location pointed to by p. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef133522bf55f05a605bee0763208281"></a><!-- doxytag: member="tbb::tbb_allocator::destroy" ref="ef133522bf55f05a605bee0763208281" args="(pointer p)" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#ef133522bf55f05a605bee0763208281">destroy</a> (pointer p)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Obsolete, and only retained for the sake of backward compatibility. Always returns true. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dca19d7a45487a7d67a0db517e2b57c9"></a><!-- doxytag: member="tbb::task::set_affinity" ref="dca19d7a45487a7d67a0db517e2b57c9" args="(affinity_id id)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">set_affinity</a> (<a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy value at location pointed to by p. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set affinity for this task. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a920a56b0bcf2801518fb45b2c9d2be"></a><!-- doxytag: member="tbb::task::affinity" ref="3a920a56b0bcf2801518fb45b2c9d2be" args="() const " -->
+<a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">affinity</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Current affinity of this task. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#713c338c8eeaebdc5a6b10a69c039b06">note_affinity</a> (<a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> id)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Invoked by scheduler to notify task that it ran on unexpected thread.  <a href="#713c338c8eeaebdc5a6b10a69c039b06"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">cancel_group_execution</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiates cancellation of all tasks in this cancellation group and its subordinate groups.  <a href="#0f3fb4aac549ab642022450a4bd13326"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="025f18118c057c4c8db87ff2ce8df975"></a><!-- doxytag: member="tbb::task::is_cancelled" ref="025f18118c057c4c8db87ff2ce8df975" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the context received cancellation request. <br></td></tr>
 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78701e7454ef8e1a25b5acd364367080"></a><!-- doxytag: member="tbb::tbb_allocator::allocator_type" ref="78701e7454ef8e1a25b5acd364367080" args="()" -->
-static <a class="el" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23acb0da0afd690da797f9f882027d34"></a><!-- doxytag: member="tbb::task::allocate_root" ref="23acb0da0afd690da797f9f882027d34" args="()" -->
+static internal::allocate_root_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#23acb0da0afd690da797f9f882027d34">allocate_root</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a root task. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ccc518caf31075a3e073996d2d240a4"></a><!-- doxytag: member="tbb::task::allocate_root" ref="8ccc518caf31075a3e073996d2d240a4" args="(task_group_context &ctx)" -->
+static internal::allocate_root_with_context_proxy </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">allocate_root</a> (<a class="el" href="a00167.html">task_group_context</a> &ctx)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns proxy for overloaded new that allocates a root task associated with user supplied context. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">spawn_root_and_wait</a> (<a class="el" href="a00166.html">task</a> &root)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn task allocated by allocate_root, wait for it to complete, and deallocate it.  <a href="#ce8ce689c26a4ddf343829bc3c73290a"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">spawn_root_and_wait</a> (<a class="el" href="a00168.html">task_list</a> &root_list)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Spawn root tasks on list and wait for all of them to finish.  <a href="#c33c7edbaec67aa8a56f48986a9dc69f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd43e8d6249738efafd12d6a4c72c5e3"></a><!-- doxytag: member="tbb::task::self" ref="bd43e8d6249738efafd12d6a4c72c5e3" args="()" -->
+static <a class="el" href="a00166.html">task</a> &__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">self</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The innermost task being executed or destroyed by the current thread at the moment. <br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2bce8ec6e44706e70128f5cf91b76e67"></a><!-- doxytag: member="tbb::task::task" ref="2bce8ec6e44706e70128f5cf91b76e67" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5eabadbca46f93ce6fb08290e85a0a65"></a><!-- doxytag: member="tbb::task::task_list" ref="5eabadbca46f93ce6fb08290e85a0a65" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>task_list</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e296810002652d771f692e20ca87e898"></a><!-- doxytag: member="tbb::task::internal::scheduler" ref="e296810002652d771f692e20ca87e898" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::scheduler</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current allocator. <br></td></tr>
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="387b945c106854e1ed525f0668092930"></a><!-- doxytag: member="tbb::task::internal::allocate_root_proxy" ref="387b945c106854e1ed525f0668092930" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecedb9436fb30df30cb3a52c64bb97e5"></a><!-- doxytag: member="tbb::task::internal::allocate_root_with_context_proxy" ref="ecedb9436fb30df30cb3a52c64bb97e5" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_with_context_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9987b3b1174772e5e853bd94b9f15350"></a><!-- doxytag: member="tbb::task::internal::allocate_continuation_proxy" ref="9987b3b1174772e5e853bd94b9f15350" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_continuation_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1f9e255654086b52fe107e4d8bbc8b7d"></a><!-- doxytag: member="tbb::task::internal::allocate_child_proxy" ref="1f9e255654086b52fe107e4d8bbc8b7d" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_child_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e99ce0045ea3c55d239f38ea026b8a7"></a><!-- doxytag: member="tbb::task::internal::allocate_additional_child_of_proxy" ref="0e99ce0045ea3c55d239f38ea026b8a7" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_additional_child_of_proxy</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc65e26bdbb61f5e5a3d7ac92948bbd1"></a><!-- doxytag: member="tbb::task::internal::task_group_base" ref="bc65e26bdbb61f5e5a3d7ac92948bbd1" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::task_group_base</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T><br>
- class tbb::tbb_allocator< T ></h3>
+Base class for user-defined tasks. 
+<p>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="d61bb32389d3857bf7511d69beaafb76"></a><!-- doxytag: member="tbb::task::affinity_id" ref="d61bb32389d3857bf7511d69beaafb76" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef internal::affinity_id <a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">tbb::task::affinity_id</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+An id as used for specifying affinity. 
+<p>
+Guaranteed to be integral type. Value of 0 means no affinity. 
+</div>
+</div><p>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="4a3c415562d17905390ea5b49d12293e"></a><!-- doxytag: member="tbb::task::state_type" ref="4a3c415562d17905390ea5b49d12293e" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">tbb::task::state_type</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Enumeration of task states that the scheduler considers. 
+<p>
+<dl compact><dt><b>Enumerator: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9"></a><!-- doxytag: member="executing" ref="4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9" args="" -->executing</em> </td><td>
+task is running, and will be destroyed after method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> completes. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513"></a><!-- doxytag: member="reexecute" ref="4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513" args="" -->reexecute</em> </td><td>
+task to be rescheduled. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a"></a><!-- doxytag: member="ready" ref="4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a" args="" -->ready</em> </td><td>
+task is in ready pool, or is going to be put there, or was just taken off. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c"></a><!-- doxytag: member="allocated" ref="4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c" args="" -->allocated</em> </td><td>
+task object is freshly allocated or recycled. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735"></a><!-- doxytag: member="freed" ref="4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735" args="" -->freed</em> </td><td>
+task object is on free list, or is going to be put there, or was just taken off. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d"></a><!-- doxytag: member="recycle" ref="4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d" args="" -->recycle</em> </td><td>
+task to be recycled as continuation </td></tr>
+</table>
+</dl>
+
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="43bfe64c0e9333c0ca895cc0c375512b"></a><!-- doxytag: member="tbb::task::allocate_additional_child_of" ref="43bfe64c0e9333c0ca895cc0c375512b" args="(task &t)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">internal::allocate_additional_child_of_proxy tbb::task::allocate_additional_child_of           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00166.html">task</a> & </td>
+          <td class="paramname"> <em>t</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Like allocate_child, except that task's parent becomes "t", not this. 
+<p>
+Typically used in conjunction with schedule_to_reexecute to implement while loops. Atomically increments the reference count of t.parent() 
+</div>
+</div><p>
+<a class="anchor" name="1434c79a5138993269d034008bff7329"></a><!-- doxytag: member="tbb::task::allocate_continuation" ref="1434c79a5138993269d034008bff7329" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">internal::allocate_continuation_proxy& tbb::task::allocate_continuation           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns proxy for overloaded new that allocates a continuation task of *this. 
+<p>
+The continuation's parent becomes the parent of *this. 
+</div>
+</div><p>
+<a class="anchor" name="0f3fb4aac549ab642022450a4bd13326"></a><!-- doxytag: member="tbb::task::cancel_group_execution" ref="0f3fb4aac549ab642022450a4bd13326" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool tbb::task::cancel_group_execution           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Initiates cancellation of all tasks in this cancellation group and its subordinate groups. 
+<p>
+<dl compact><dt><b>Returns:</b></dt><dd>false if cancellation has already been requested, true otherwise. </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="ef4680f5c148020c5e7e43ddef44cd5d"></a><!-- doxytag: member="tbb::task::decrement_ref_count" ref="ef4680f5c148020c5e7e43ddef44cd5d" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int tbb::task::decrement_ref_count           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Atomically decrement reference count. 
+<p>
+Has release semanics. 
+</div>
+</div><p>
+<a class="anchor" name="a57def00c8e9d932dbea0b3ee23991b9"></a><!-- doxytag: member="tbb::task::destroy" ref="a57def00c8e9d932dbea0b3ee23991b9" args="(task &victim)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task::destroy           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00166.html">task</a> & </td>
+          <td class="paramname"> <em>victim</em>          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroy a task. 
+<p>
+Usually, calling this method is unnecessary, because a task is implicitly deleted after its <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> method runs. However, sometimes a task needs to be explicitly deallocated, such as when a root task is used as the parent in spawn_and_wait_for_all. 
+</div>
+</div><p>
+<a class="anchor" name="f5fb43c7ad0de5a4b95703cebc39e345"></a><!-- doxytag: member="tbb::task::increment_ref_count" ref="f5fb43c7ad0de5a4b95703cebc39e345" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::increment_ref_count           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Atomically increment reference count. 
+<p>
+Has acquire semantics 
+</div>
+</div><p>
+<a class="anchor" name="713c338c8eeaebdc5a6b10a69c039b06"></a><!-- doxytag: member="tbb::task::note_affinity" ref="713c338c8eeaebdc5a6b10a69c039b06" args="(affinity_id id)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void __TBB_EXPORTED_METHOD tbb::task::note_affinity           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">affinity_id</a> </td>
+          <td class="paramname"> <em>id</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Invoked by scheduler to notify task that it ran on unexpected thread. 
+<p>
+Invoked before method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> runs, if task is stolen, or task has affinity but will be executed on another thread.<p>
+The default action does nothing. 
+</div>
+</div><p>
+<a class="anchor" name="a67a79e18f62b43a623a00cfbd76db4c"></a><!-- doxytag: member="tbb::task::recycle_as_continuation" ref="a67a79e18f62b43a623a00cfbd76db4c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::recycle_as_continuation           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Change this to be a continuation of its former self. 
+<p>
+The caller must guarantee that the task's refcount does not become zero until after the method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. Typically, this is done by having method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> return a pointer to a child of the task. If the guarantee cannot be made, use method recycle_as_safe_continuation instead.<p>
+Because of the hazard, this method may be deprecated in the future. 
+</div>
+</div><p>
+<a class="anchor" name="3b290d14109704e2b69dc1ac980a7a76"></a><!-- doxytag: member="tbb::task::recycle_as_safe_continuation" ref="3b290d14109704e2b69dc1ac980a7a76" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::recycle_as_safe_continuation           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Recommended to use, safe variant of recycle_as_continuation. 
+<p>
+For safety, it requires additional increment of ref_count. 
+</div>
+</div><p>
+<a class="anchor" name="4f1be9bbcdb487830dbe298b68d85144"></a><!-- doxytag: member="tbb::task::recycle_to_reexecute" ref="4f1be9bbcdb487830dbe298b68d85144" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::recycle_to_reexecute           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Schedule this for reexecution after current <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">execute()</a> returns. 
+<p>
+Requires that this.execute() be running. 
+</div>
+</div><p>
+<a class="anchor" name="f7737143d458f1ed1c0d7da3971d9e6b"></a><!-- doxytag: member="tbb::task::spawn" ref="f7737143d458f1ed1c0d7da3971d9e6b" args="(task &child)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::spawn           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00166.html">task</a> & </td>
+          <td class="paramname"> <em>child</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Schedule task for execution when a worker becomes available. 
+<p>
+After all children spawned so far finish their method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">task::execute</a>, their parent's method <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">task::execute</a> may start running. Therefore, it is important to ensure that at least one child has not completed until the parent is ready to run. 
+</div>
+</div><p>
+<a class="anchor" name="c33c7edbaec67aa8a56f48986a9dc69f"></a><!-- doxytag: member="tbb::task::spawn_root_and_wait" ref="c33c7edbaec67aa8a56f48986a9dc69f" args="(task_list &root_list)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::spawn_root_and_wait           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00168.html">task_list</a> & </td>
+          <td class="paramname"> <em>root_list</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline, static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Spawn root tasks on list and wait for all of them to finish. 
+<p>
+If there are more tasks than worker threads, the tasks are spawned in order of front to back. 
+</div>
+</div><p>
+<a class="anchor" name="ce8ce689c26a4ddf343829bc3c73290a"></a><!-- doxytag: member="tbb::task::spawn_root_and_wait" ref="ce8ce689c26a4ddf343829bc3c73290a" args="(task &root)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">static void tbb::task::spawn_root_and_wait           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="a00166.html">task</a> & </td>
+          <td class="paramname"> <em>root</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline, static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Spawn task allocated by allocate_root, wait for it to complete, and deallocate it. 
+<p>
+The thread that calls spawn_root_and_wait must be the same thread that allocated the task. 
+</div>
+</div><p>
+<a class="anchor" name="53d2615ad9c38859b4c8080936600283"></a><!-- doxytag: member="tbb::task::wait_for_all" ref="53d2615ad9c38859b4c8080936600283" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::task::wait_for_all           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
 
-Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
 <p>
-The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
+Wait for reference count to become one, and set reference count to zero. 
 <p>
+Works on tasks while waiting. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00354.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00167.html b/doc/html/a00167.html
index cc5fab8..c2b33fc 100644
--- a/doc/html/a00167.html
+++ b/doc/html/a00167.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tbb_allocator< void > Class Template Reference</title>
+<title>tbb::task_group_context Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,39 +21,209 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00167.html">tbb_allocator< void ></a></div>
-<h1>tbb::tbb_allocator< void > Class Template Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00167.html">task_group_context</a></div>
+<h1>tbb::task_group_context Class Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::tbb_allocator< void >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
+[<a class="el" href="a00238.html">Task Scheduling</a>]</small>
+</h1><!-- doxytag: class="tbb::task_group_context" -->Used to form groups of tasks.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00354.html">task.h</a>></code>
 <p>
-<a href="a00077.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00061.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05f5ff584890407c8d672e4b4378744d"></a><!-- doxytag: member="tbb::tbb_allocator< void >::pointer" ref="05f5ff584890407c8d672e4b4378744d" args="" -->
-typedef void * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4"></a><!-- doxytag: member="tbb::task_group_context::isolated" ref="d5af85179a348162d4ddd66b6fc0d60fb4fda16c4f77defd3d0f6aad87fceed4" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>isolated</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33e64ba71f06ef24a5093415185e66cb"></a><!-- doxytag: member="tbb::tbb_allocator< void >::const_pointer" ref="33e64ba71f06ef24a5093415185e66cb" args="" -->
-typedef const void * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5af85179a348162d4ddd66b6fc0d60fc7f37e067ba1fca8a5c809d20522662b"></a><!-- doxytag: member="tbb::task_group_context::bound" ref="d5af85179a348162d4ddd66b6fc0d60fc7f37e067ba1fca8a5c809d20522662b" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>bound</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="81595a776b9d206a92caa526cad9c637"></a><!-- doxytag: member="tbb::tbb_allocator< void >::value_type" ref="81595a776b9d206a92caa526cad9c637" args="" -->
-typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0ebf774f9c21343eba6303927b5ae0be44c"></a><!-- doxytag: member="tbb::task_group_context::exact_exception" ref="b8dce4661b346756cb4f584529ecd0ebf774f9c21343eba6303927b5ae0be44c" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>exact_exception</b> = 0x0001ul << traits_offset</td></tr>
 
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0ebad65d11fe6fab6ecbb356464170f6a38"></a><!-- doxytag: member="tbb::task_group_context::no_cancellation" ref="b8dce4661b346756cb4f584529ecd0ebad65d11fe6fab6ecbb356464170f6a38" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>no_cancellation</b> = 0x0002ul << traits_offset</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8dce4661b346756cb4f584529ecd0eb4002d8f90c8c9f7c3f80ad349aee7cce"></a><!-- doxytag: member="tbb::task_group_context::concurrent_wait" ref="b8dce4661b346756cb4f584529ecd0eb4002d8f90c8c9f7c3f80ad349aee7cce" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>concurrent_wait</b> = 0x0004ul << traits_offset</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><b>default_traits</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>kind_type</b> { <b>isolated</b>, 
+<b>bound</b>
+ }</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>traits_type</b> { <b>exact_exception</b> =  0x0001ul << traits_offset, 
+<b>no_cancellation</b> =  0x0002ul << traits_offset, 
+<b>concurrent_wait</b> =  0x0004ul << traits_offset, 
+<b>default_traits</b>
+ }</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a> (kind_type relation_with_parent=bound, uintptr_t traits=default_traits)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Default & binding constructor.  <a href="#19fee08fb8ac98adccfe69c1aa63c491"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Forcefully reinitializes the context after the task tree it was associated with is completed.  <a href="#6d30d16bf1cd22f86c6afaf29c2b430c"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Initiates cancellation of all tasks in this cancellation group and its subordinate groups.  <a href="#8bcdfdf4e6bfb76125b6de15c00b571d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4db72f16210b0a991b2c134d6763a4cc"></a><!-- doxytag: member="tbb::task_group_context::is_group_execution_cancelled" ref="4db72f16210b0a991b2c134d6763a4cc" args="() const " -->
+bool __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the context received cancellation request. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Records the pending exception, and cancels the task group.  <a href="#d97c8a03615594b71b4ef06ff75cf561"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html#49a55352084fd44b8863d182e839e6dc">init</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Out-of-line part of the constructor.  <a href="#49a55352084fd44b8863d182e839e6dc"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e656073628561c8fd68f6134d527e2de"></a><!-- doxytag: member="tbb::task_group_context::task" ref="e656073628561c8fd68f6134d527e2de" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>task</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ecedb9436fb30df30cb3a52c64bb97e5"></a><!-- doxytag: member="tbb::task_group_context::internal::allocate_root_with_context_proxy" ref="ecedb9436fb30df30cb3a52c64bb97e5" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>internal::allocate_root_with_context_proxy</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<><br>
- class tbb::tbb_allocator< void ></h3>
+Used to form groups of tasks. 
+<p>
+The context services explicit cancellation requests from user code, and unhandled exceptions intercepted during tasks execution. Intercepting an exception results in generating internal cancellation requests (which is processed in exactly the same way as external ones).<p>
+The context is associated with one or more root tasks and defines the cancellation group that includes all the descendants of the corresponding root task(s). Association is established when a context object is passed as an argument to the <a class="el" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root()</a> method. See <a class="el" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context::task_group_context</a> for more details.<p>
+The context can be bound to another one, and other contexts can be bound to it, forming a tree-like structure: parent -> this -> children. Arrows here designate cancellation propagation direction. If a task in a cancellation group is canceled all the other tasks in this group and groups bound to it (as children) get canceled too.<p>
+IMPLEMENTATION NOTE: When adding new members to <a class="el" href="a00167.html">task_group_context</a> or changing types of existing ones, update the size of both padding buffers (_leading_padding and _trailing_padding) appropriately. See also VERSIONING NOTE at the constructor definition below. 
+<p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="19fee08fb8ac98adccfe69c1aa63c491"></a><!-- doxytag: member="tbb::task_group_context::task_group_context" ref="19fee08fb8ac98adccfe69c1aa63c491" args="(kind_type relation_with_parent=bound, uintptr_t traits=default_traits)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">tbb::task_group_context::task_group_context           </td>
+          <td>(</td>
+          <td class="paramtype">kind_type </td>
+          <td class="paramname"> <em>relation_with_parent</em> = <code>bound</code>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uintptr_t </td>
+          <td class="paramname"> <em>traits</em> = <code>default_traits</code></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
 
-Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
+Default & binding constructor. 
+<p>
+By default a bound context is created. That is this context will be bound (as child) to the context of the task calling task::allocate_root(this_context) method. Cancellation requests passed to the parent context are propagated to all the contexts bound to it.<p>
+If task_group_context::isolated is used as the argument, then the tasks associated with this context will never be affected by events in any other context.<p>
+Creating isolated contexts involve much less overhead, but they have limited utility. Normally when an exception occurs in an algorithm that has nested ones running, it is desirably to have all the nested algorithms canceled as well. Such a behavior requires nested algorithms to use bound contexts.<p>
+There is one good place where using isolated algorithms is beneficial. It is a master thread. That is if a particular algorithm is invoked directly from the master thread (not from a TBB task), supplying it with explicitly created isolated context will result in a faster algorithm startup.<p>
+VERSIONING NOTE: Implementation(s) of <a class="el" href="a00167.html">task_group_context</a> constructor(s) cannot be made entirely out-of-line because the run-time version must be set by the user code. This will become critically important for binary compatibility, if we ever have to change the size of the context object.<p>
+Boosting the runtime version will also be necessary whenever new fields are introduced in the currently unused padding areas or the meaning of the existing fields is changed or extended. 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="8bcdfdf4e6bfb76125b6de15c00b571d"></a><!-- doxytag: member="tbb::task_group_context::cancel_group_execution" ref="8bcdfdf4e6bfb76125b6de15c00b571d" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool __TBB_EXPORTED_METHOD tbb::task_group_context::cancel_group_execution           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Initiates cancellation of all tasks in this cancellation group and its subordinate groups. 
+<p>
+<dl compact><dt><b>Returns:</b></dt><dd>false if cancellation has already been requested, true otherwise.</dd></dl>
+Note that canceling never fails. When false is returned, it just means that another thread (or this one) has already sent cancellation request to this context or to one of its ancestors (if this context is bound). It is guaranteed that when this method is concurrently called on the same not yet cancelled context, true will be returned by one and only one invocation. 
+</div>
+</div><p>
+<a class="anchor" name="49a55352084fd44b8863d182e839e6dc"></a><!-- doxytag: member="tbb::task_group_context::init" ref="49a55352084fd44b8863d182e839e6dc" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::init           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [protected]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Out-of-line part of the constructor. 
+<p>
+Singled out to ensure backward binary compatibility of the future versions. 
+</div>
+</div><p>
+<a class="anchor" name="d97c8a03615594b71b4ef06ff75cf561"></a><!-- doxytag: member="tbb::task_group_context::register_pending_exception" ref="d97c8a03615594b71b4ef06ff75cf561" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::register_pending_exception           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Records the pending exception, and cancels the task group. 
+<p>
+May be called only from inside a catch-block. If the context is already canceled, does nothing. The method brings the task group associated with this context exactly into the state it would be in, if one of its tasks threw the currently pending exception during its execution. In other words, it emulates the actions of the scheduler's dispatch loop exception handler. 
+</div>
+</div><p>
+<a class="anchor" name="6d30d16bf1cd22f86c6afaf29c2b430c"></a><!-- doxytag: member="tbb::task_group_context::reset" ref="6d30d16bf1cd22f86c6afaf29c2b430c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_group_context::reset           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Forcefully reinitializes the context after the task tree it was associated with is completed. 
+<p>
+Because the method assumes that all the tasks that used to be associated with this context have already finished, calling it while the context is still in use somewhere in the task hierarchy leads to undefined behavior.<p>
+IMPORTANT: This method is not thread safe!<p>
+The method does not change the context's parent if it is set. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00354.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00168.html b/doc/html/a00168.html
index 08d49ec..ed734cf 100644
--- a/doc/html/a00168.html
+++ b/doc/html/a00168.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tbb_exception Class Reference</title>
+<title>tbb::task_list Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,115 +21,54 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00168.html">tbb_exception</a></div>
-<h1>tbb::tbb_exception Class Reference</h1><!-- doxytag: class="tbb::tbb_exception" -->Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00168.html">task_list</a></div>
+<h1>tbb::task_list Class Reference<br>
+<small>
+[<a class="el" href="a00238.html">Task Scheduling</a>]</small>
+</h1><!-- doxytag: class="tbb::task_list" -->A list of children.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00354.html">task.h</a>></code>
 <p>
-Inherited by <a class="el" href="a00127.html">tbb::captured_exception</a>, and <a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a>.
-<p>
-Inheritance diagram for tbb::tbb_exception:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00084.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00065.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="a00168.html">tbb_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> ()=0  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="416341c2047eaef50417b41eaf7e9de6"></a><!-- doxytag: member="tbb::task_list::task_list" ref="416341c2047eaef50417b41eaf7e9de6" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#416341c2047eaef50417b41eaf7e9de6">task_list</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns pointer to the deep copy of this exception object.  <a href="#3e3482bf264d4ca4dde046cd9c02c766"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> ()=0  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty list. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6d438f1499a02db1e59c24ab6043e5ba"></a><!-- doxytag: member="tbb::task_list::~task_list" ref="6d438f1499a02db1e59c24ab6043e5ba" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#6d438f1499a02db1e59c24ab6043e5ba">~task_list</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> method.  <a href="#66c94938eca8bf88b76f3eccaaf215d8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> ()=0</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys the list, but does not destroy the task objects. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3ac31e092814b90929f81bb30441959"></a><!-- doxytag: member="tbb::task_list::empty" ref="f3ac31e092814b90929f81bb30441959" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#f3ac31e092814b90929f81bb30441959">empty</a> () const </td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#8588e07fa49692f4d734e4f2e4f048f4"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d00f6497e552fee978a02bfcbebf46e2"></a><!-- doxytag: member="tbb::tbb_exception::name" ref="d00f6497e552fee978a02bfcbebf46e2" args="() const =0" -->
-virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#d00f6497e552fee978a02bfcbebf46e2">name</a> () const =0  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">True if list if empty; false otherwise. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4cd34756bc4763dafb8c84838a0124ff"></a><!-- doxytag: member="tbb::task_list::push_back" ref="4cd34756bc4763dafb8c84838a0124ff" args="(task &task)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#4cd34756bc4763dafb8c84838a0124ff">push_back</a> (<a class="el" href="a00166.html">task</a> &<a class="el" href="a00166.html">task</a>)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns RTTI name of the originally intercepted exception. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8157689ecb66bc6c72d3618bf3cc371"></a><!-- doxytag: member="tbb::tbb_exception::what" ref="e8157689ecb66bc6c72d3618bf3cc371" args="() const =0" -->
-virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">what</a> () const =0  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Push task onto back of list. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5fe85df5ed524418389d34051750347d"></a><!-- doxytag: member="tbb::task_list::pop_front" ref="5fe85df5ed524418389d34051750347d" args="()" -->
+<a class="el" href="a00166.html">task</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#5fe85df5ed524418389d34051750347d">pop_front</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of originally intercepted exception's <a class="el" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">what()</a> method. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. 
-<p>
-If an unhandled exception of the type derived from <a class="el" href="a00168.html">tbb::tbb_exception</a> is intercepted by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in the root thread. The root thread is the thread that has started the outermost algorithm or root task sharing the same <a class="el" href="a00163.html">task_group_context</a> with the guilty algorithm/task (the one that threw the exception first).<p>
-Note: when documentation mentions workers with respect to exception handling, masters are implied as well, because they are completely equivalent in this context. Consequently a root thread can be master or worker thread.<p>
-NOTE: In case of nested algorithms or complex task hierarchies when the nested levels share (explicitly or by means of implicit inheritance) the task group context of the outermost level, the exception may be (re-)thrown multiple times (ultimately - in each worker on each nesting level) before reaching the root thread at the outermost level. IMPORTANT: if you intercept an exception derived from this class on a nested level, you must re-throw it in the catch block by means of the "throw;" [...]
-TBB provides two implementations of this interface: <a class="el" href="a00127.html">tbb::captured_exception</a> and template class <a class="el" href="a00141.html">tbb::movable_exception</a>. See their declarations for more info. 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="66c94938eca8bf88b76f3eccaaf215d8"></a><!-- doxytag: member="tbb::tbb_exception::destroy" ref="66c94938eca8bf88b76f3eccaaf215d8" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void tbb::tbb_exception::destroy           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Pop the front task from the list. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fce446ee13e025969945328f3ff59b95"></a><!-- doxytag: member="tbb::task_list::clear" ref="fce446ee13e025969945328f3ff59b95" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#fce446ee13e025969945328f3ff59b95">clear</a> ()</td></tr>
 
-<p>
-Destroys objects created by the <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> method. 
-<p>
-Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method. 
-<p>
-Implemented in <a class="el" href="a00127.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, and <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>.
-</div>
-</div><p>
-<a class="anchor" name="3e3482bf264d4ca4dde046cd9c02c766"></a><!-- doxytag: member="tbb::tbb_exception::move" ref="3e3482bf264d4ca4dde046cd9c02c766" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual <a class="el" href="a00168.html">tbb_exception</a>* tbb::tbb_exception::move           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%">  throw ()<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the list. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e656073628561c8fd68f6134d527e2de"></a><!-- doxytag: member="tbb::task_list::task" ref="e656073628561c8fd68f6134d527e2de" args="" -->
+class </td><td class="memItemRight" valign="bottom"><b>task</b></td></tr>
 
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A list of children. 
 <p>
-Creates and returns pointer to the deep copy of this exception object. 
-<p>
-Move semantics is allowed. 
-<p>
-Implemented in <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, and <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>.
-</div>
-</div><p>
-<a class="anchor" name="8588e07fa49692f4d734e4f2e4f048f4"></a><!-- doxytag: member="tbb::tbb_exception::throw_self" ref="8588e07fa49692f4d734e4f2e4f048f4" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void tbb::tbb_exception::throw_self           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Throws this exception object. 
-<p>
-Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown. 
+Used for method task::spawn_children 
 <p>
-Implemented in <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, and <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>.
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00377.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00354.html">task.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00169.html b/doc/html/a00169.html
index 9fd6dd6..628efdf 100644
--- a/doc/html/a00169.html
+++ b/doc/html/a00169.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::internal::tbb_exception_ptr Class Reference</title>
+<title>tbb::task_scheduler_init Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,62 +21,138 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>internal</b>::<a class="el" href="a00169.html">tbb_exception_ptr</a></div>
-<h1>tbb::internal::tbb_exception_ptr Class Reference</h1><!-- doxytag: class="tbb::internal::tbb_exception_ptr" -->Exception container that preserves the exact copy of the original exception.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00169.html">task_scheduler_init</a></div>
+<h1>tbb::task_scheduler_init Class Reference<br>
+<small>
+[<a class="el" href="a00238.html">Task Scheduling</a>]</small>
+</h1><!-- doxytag: class="tbb::task_scheduler_init" -->Class representing reference to tbb scheduler.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00377.html">tbb_exception.h</a>></code>
+<code>#include <<a class="el" href="a00371.html">task_scheduler_init.h</a>></code>
 <p>
-<a href="a00087.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00073.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#921875bbacd2c8a5f324c7da7a415262">destroy</a> ()  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#d476053cc712e572554823492a5229ce">initialize</a> (int number_of_threads=<a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys this objects.  <a href="#921875bbacd2c8a5f324c7da7a415262"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="292832fd5c523e3d8081a22247840a1d"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::throw_self" ref="292832fd5c523e3d8081a22247840a1d" args="()" -->
-void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#292832fd5c523e3d8081a22247840a1d">throw_self</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Ensure that scheduler exists for this thread.  <a href="#d476053cc712e572554823492a5229ce"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#d5ed214a8bb53b0466ed91ff4734b9a3">initialize</a> (int number_of_threads, stack_size_type thread_stack_size)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws the contained exception . <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The overloaded method with stack size parameter.  <a href="#d5ed214a8bb53b0466ed91ff4734b9a3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f73257e04cb7fb9bd5be2b635d9016f1"></a><!-- doxytag: member="tbb::task_scheduler_init::terminate" ref="f73257e04cb7fb9bd5be2b635d9016f1" args="()" -->
+void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Inverse of method initialize. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="421600bf9bf9338bcf937063f2ff0e90"></a><!-- doxytag: member="tbb::task_scheduler_init::task_scheduler_init" ref="421600bf9bf9338bcf937063f2ff0e90" args="(int number_of_threads=automatic, stack_size_type thread_stack_size=0)" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a> (int number_of_threads=<a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Shorthand for default constructor followed by call to intialize(number_of_threads). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4da6c86292d80c703a66c1f6f5299488"></a><!-- doxytag: member="tbb::task_scheduler_init::~task_scheduler_init" ref="4da6c86292d80c703a66c1f6f5299488" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy scheduler for this thread if thread has no other live task_scheduler_inits. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="12752282977029f23416642bc03e8b74"></a><!-- doxytag: member="tbb::task_scheduler_init::is_active" ref="12752282977029f23416642bc03e8b74" args="() const " -->
+bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#12752282977029f23416642bc03e8b74">is_active</a> () const </td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if scheduler is active (initialized); false otherwise. <br></td></tr>
 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65083750bebe799d3fe8143c794523bb"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="65083750bebe799d3fe8143c794523bb" args="()" -->
-static <a class="el" href="a00169.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><b>allocate</b> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90930262be794c7284ccae8f2fa0ae80"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="90930262be794c7284ccae8f2fa0ae80" args="(const tbb_exception &)" -->
-static <a class="el" href="a00169.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><b>allocate</b> (const <a class="el" href="a00168.html">tbb_exception</a> &)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of threads tbb scheduler would create if initialized by default.  <a href="#ba00714c33a41a3c2216f48613971cab"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f5988e2b0fbb2d533fcbb7f2583743f"></a><!-- doxytag: member="tbb::task_scheduler_init::automatic" ref="8f5988e2b0fbb2d533fcbb7f2583743f" args="" -->
+static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8855dd659f1d5c6cf3c3d11787e278f6"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="8855dd659f1d5c6cf3c3d11787e278f6" args="(const captured_exception &)" -->
-static <a class="el" href="a00169.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><b>allocate</b> (const <a class="el" href="a00127.html">captured_exception</a> &)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Typedef for number of threads that is automatic. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e6c860f1e559026ff3ef4599c0d6c514"></a><!-- doxytag: member="tbb::task_scheduler_init::deferred" ref="e6c860f1e559026ff3ef4599c0d6c514" args="" -->
+static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Argument to <a class="el" href="a00169.html#d476053cc712e572554823492a5229ce">initialize()</a> or constructor that causes initialization to be deferred. <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Exception container that preserves the exact copy of the original exception. 
+Class representing reference to tbb scheduler. 
 <p>
-This class can be used only when the appropriate runtime support (mandated by C++0x) is present 
+A thread must construct a <a class="el" href="a00169.html">task_scheduler_init</a>, and keep it alive, during the time that it uses the services of class task. 
 <p>
 <hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="921875bbacd2c8a5f324c7da7a415262"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::destroy" ref="921875bbacd2c8a5f324c7da7a415262" args="()" -->
+<a class="anchor" name="ba00714c33a41a3c2216f48613971cab"></a><!-- doxytag: member="tbb::task_scheduler_init::default_num_threads" ref="ba00714c33a41a3c2216f48613971cab" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void tbb::internal::tbb_exception_ptr::destroy           </td>
+          <td class="memname">static int __TBB_EXPORTED_FUNC tbb::task_scheduler_init::default_num_threads           </td>
           <td>(</td>
           <td class="paramname">          </td>
           <td> ) </td>
-          <td width="100%">  throw ()</td>
+          <td width="100%"><code> [static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns the number of threads tbb scheduler would create if initialized by default. 
+<p>
+Result returned by this method does not depend on whether the scheduler has already been initialized.<p>
+Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state. 
+</div>
+</div><p>
+<a class="anchor" name="d5ed214a8bb53b0466ed91ff4734b9a3"></a><!-- doxytag: member="tbb::task_scheduler_init::initialize" ref="d5ed214a8bb53b0466ed91ff4734b9a3" args="(int number_of_threads, stack_size_type thread_stack_size)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize           </td>
+          <td>(</td>
+          <td class="paramtype">int </td>
+          <td class="paramname"> <em>number_of_threads</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">stack_size_type </td>
+          <td class="paramname"> <em>thread_stack_size</em></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The overloaded method with stack size parameter. 
+<p>
+Overloading is necessary to preserve ABI compatibility 
+</div>
+</div><p>
+<a class="anchor" name="d476053cc712e572554823492a5229ce"></a><!-- doxytag: member="tbb::task_scheduler_init::initialize" ref="d476053cc712e572554823492a5229ce" args="(int number_of_threads=automatic)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize           </td>
+          <td>(</td>
+          <td class="paramtype">int </td>
+          <td class="paramname"> <em>number_of_threads</em> = <code><a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a></code>          </td>
+          <td> ) </td>
+          <td width="100%"></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
 <p>
-Destroys this objects. 
+Ensure that scheduler exists for this thread. 
 <p>
-Note that objects of this type can be created only by the allocate() method. 
+A value of -1 lets tbb decide on the number of threads, which is typically the number of hardware threads. For production code, the default value of -1 should be used, particularly if the client code is mixed with third party clients that might also use tbb.<p>
+The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted. 
 </div>
 </div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00377.html">tbb_exception.h</a></ul>
+<li><a class="el" href="a00371.html">task_scheduler_init.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00170.html b/doc/html/a00170.html
index c077f85..b4f5b8a 100644
--- a/doc/html/a00170.html
+++ b/doc/html/a00170.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tbb_hash_compare< T > Struct Template Reference</title>
+<title>tbb::tbb_allocator< T > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,30 +21,104 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00170.html">tbb_hash_compare</a></div>
-<h1>tbb::tbb_hash_compare< T > Struct Template Reference</h1><!-- doxytag: class="tbb::tbb_hash_compare" -->hash_compare - default argument  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00170.html">tbb_allocator</a></div>
+<h1>tbb::tbb_allocator< T > Class Template Reference<br>
+<small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
+</h1><!-- doxytag: class="tbb::tbb_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00267.html">concurrent_hash_map.h</a>></code>
+<code>#include <<a class="el" href="a00375.html">tbb_allocator.h</a>></code>
 <p>
-<a href="a00012.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00075.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3cdd9619bc0a802763e7823068f83a4c"></a><!-- doxytag: member="tbb::tbb_allocator::value_type" ref="3cdd9619bc0a802763e7823068f83a4c" args="" -->
+typedef internal::allocator_type<<br>
+ T >::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f979d0e74d7c6e5aeb0d26408776a9e1"></a><!-- doxytag: member="tbb::tbb_allocator::pointer" ref="f979d0e74d7c6e5aeb0d26408776a9e1" args="" -->
+typedef value_type * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1622504886ef265016a5821d61bf7adc"></a><!-- doxytag: member="tbb::tbb_allocator::const_pointer" ref="1622504886ef265016a5821d61bf7adc" args="" -->
+typedef const value_type * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8e58d23c5c98fd65d4432c1e324f4c0"></a><!-- doxytag: member="tbb::tbb_allocator::reference" ref="b8e58d23c5c98fd65d4432c1e324f4c0" args="" -->
+typedef value_type & </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="532f36f99650b1c26a2b8899383c5411"></a><!-- doxytag: member="tbb::tbb_allocator::const_reference" ref="532f36f99650b1c26a2b8899383c5411" args="" -->
+typedef const value_type & </td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="639df0fb169cfcb94ba1b12429b736f4"></a><!-- doxytag: member="tbb::tbb_allocator::size_type" ref="639df0fb169cfcb94ba1b12429b736f4" args="" -->
+typedef size_t </td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="54828b5d0b937d608f76650a5df0e39f"></a><!-- doxytag: member="tbb::tbb_allocator::difference_type" ref="54828b5d0b937d608f76650a5df0e39f" args="" -->
+typedef ptrdiff_t </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09a7f81fb2c3055aaecf058b11538544d524c717485b74aa552fb45b45562cb5"></a><!-- doxytag: member="tbb::tbb_allocator::scalable" ref="09a7f81fb2c3055aaecf058b11538544d524c717485b74aa552fb45b45562cb5" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>scalable</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09a7f81fb2c3055aaecf058b11538544e108c3168e3be5de1d98e74723136fbf"></a><!-- doxytag: member="tbb::tbb_allocator::standard" ref="09a7f81fb2c3055aaecf058b11538544e108c3168e3be5de1d98e74723136fbf" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>standard</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> { <b>scalable</b>, 
+<b>standard</b>
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies current allocator. <br></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d85cd071047b52eeb207d458d54098cc"></a><!-- doxytag: member="tbb::tbb_allocator::tbb_allocator" ref="d85cd071047b52eeb207d458d54098cc" args="(const tbb_allocator &)" -->
+ </td><td class="memItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00170.html">tbb_allocator</a> &)  throw ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="5c3cb04a50d15d38f4c66ca3e5d2f6af"></a><!-- doxytag: member="tbb::tbb_allocator::tbb_allocator" ref="5c3cb04a50d15d38f4c66ca3e5d2f6af" args="(const tbb_allocator< U > &)" -->
+template<typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>tbb_allocator</b> (const <a class="el" href="a00170.html">tbb_allocator</a>< U > &)  throw ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="08d3822344271d0a1c2e64e8c9c16b58"></a><!-- doxytag: member="tbb::tbb_allocator::address" ref="08d3822344271d0a1c2e64e8c9c16b58" args="(reference x) const " -->
+pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (reference x) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b388f25858f783d995d61506de24656"></a><!-- doxytag: member="tbb::tbb_allocator::address" ref="2b388f25858f783d995d61506de24656" args="(const_reference x) const " -->
+const_pointer </td><td class="memItemRight" valign="bottom"><b>address</b> (const_reference x) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6cb487b1bdce0b581f265a77dca6d53"></a><!-- doxytag: member="tbb::tbb_allocator::allocate" ref="f6cb487b1bdce0b581f265a77dca6d53" args="(size_type n, const void *=0)" -->
+pointer </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a> (size_type n, const void *=0)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate space for n objects. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fdd011fdf2f9ad07006dc7c0a7ec1da2"></a><!-- doxytag: member="tbb::tbb_allocator::deallocate" ref="fdd011fdf2f9ad07006dc7c0a7ec1da2" args="(pointer p, size_type)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a> (pointer p, size_type)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Free previously allocated block of memory. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f059ca2c96243024f0d562ee3a87a3a5"></a><!-- doxytag: member="tbb::tbb_allocator::max_size" ref="f059ca2c96243024f0d562ee3a87a3a5" args="() const " -->
+size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a> () const   throw ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Largest value for which method allocate might succeed. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ab228ab9e324ed041c2226e1d717df5f"></a><!-- doxytag: member="tbb::tbb_allocator::construct" ref="ab228ab9e324ed041c2226e1d717df5f" args="(pointer p, const value_type &value)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">construct</a> (pointer p, const value_type &value)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy-construct value at location pointed to by p. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef133522bf55f05a605bee0763208281"></a><!-- doxytag: member="tbb::tbb_allocator::destroy" ref="ef133522bf55f05a605bee0763208281" args="(pointer p)" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#ef133522bf55f05a605bee0763208281">destroy</a> (pointer p)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy value at location pointed to by p. <br></td></tr>
 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a1e6b9c8719d73dee49e64becf5aa37"></a><!-- doxytag: member="tbb::tbb_hash_compare::hash" ref="4a1e6b9c8719d73dee49e64becf5aa37" args="(const T &t)" -->
-static size_t </td><td class="memItemRight" valign="bottom"><b>hash</b> (const T &t)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="78701e7454ef8e1a25b5acd364367080"></a><!-- doxytag: member="tbb::tbb_allocator::allocator_type" ref="78701e7454ef8e1a25b5acd364367080" args="()" -->
+static <a class="el" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="553e13ec26df66be906c01cc4c39ed88"></a><!-- doxytag: member="tbb::tbb_hash_compare::equal" ref="553e13ec26df66be906c01cc4c39ed88" args="(const T &a, const T &b)" -->
-static bool </td><td class="memItemRight" valign="bottom"><b>equal</b> (const T &a, const T &b)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns current allocator. <br></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
 <h3>template<typename T><br>
- struct tbb::tbb_hash_compare< T ></h3>
+ class tbb::tbb_allocator< T ></h3>
 
-hash_compare - default argument 
+Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
+<p>
+The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
 <p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00267.html">concurrent_hash_map.h</a></ul>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a00375.html">tbb_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00171.html b/doc/html/a00171.html
index ff879f6..e8203a3 100644
--- a/doc/html/a00171.html
+++ b/doc/html/a00171.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::thread_bound_filter Class Reference</title>
+<title>tbb::tbb_allocator< void > Class Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,94 +21,39 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00171.html">thread_bound_filter</a></div>
-<h1>tbb::thread_bound_filter Class Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00171.html">tbb_allocator< void ></a></div>
+<h1>tbb::tbb_allocator< void > Class Template Reference<br>
 <small>
-[<a class="el" href="a00228.html">Algorithms</a>]</small>
-</h1><!-- doxytag: class="tbb::thread_bound_filter" --><!-- doxytag: inherits="tbb::filter" -->A stage in a pipeline served by a user thread.  
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
+</h1><!-- doxytag: class="tbb::tbb_allocator< void >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00344.html">pipeline.h</a>></code>
+<code>#include <<a class="el" href="a00375.html">tbb_allocator.h</a>></code>
 <p>
-Inherits <a class="el" href="a00139.html">tbb::filter</a>.
-<p>
-Inheritance diagram for tbb::thread_bound_filter:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00045.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00077.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331de0c135a0274225f59d2b2a682d1103f23"></a><!-- doxytag: member="tbb::thread_bound_filter::success" ref="902c4645e624e8f589b89841df5331de0c135a0274225f59d2b2a682d1103f23" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>success</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331de5243cf0030982cfa4ac1a8e97acb39f4"></a><!-- doxytag: member="tbb::thread_bound_filter::item_not_available" ref="902c4645e624e8f589b89841df5331de5243cf0030982cfa4ac1a8e97acb39f4" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>item_not_available</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331ded4085a8b251604b51c0f19602eeef09f"></a><!-- doxytag: member="tbb::thread_bound_filter::end_of_stream" ref="902c4645e624e8f589b89841df5331ded4085a8b251604b51c0f19602eeef09f" args="" -->
- </td><td class="memItemRight" valign="bottom"><b>end_of_stream</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05f5ff584890407c8d672e4b4378744d"></a><!-- doxytag: member="tbb::tbb_allocator< void >::pointer" ref="05f5ff584890407c8d672e4b4378744d" args="" -->
+typedef void * </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>result_type</b> { <b>success</b>, 
-<b>item_not_available</b>, 
-<b>end_of_stream</b>
- }</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33e64ba71f06ef24a5093415185e66cb"></a><!-- doxytag: member="tbb::tbb_allocator< void >::const_pointer" ref="33e64ba71f06ef24a5093415185e66cb" args="" -->
+typedef const void * </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
 
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">result_type __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="81595a776b9d206a92caa526cad9c637"></a><!-- doxytag: member="tbb::tbb_allocator< void >::value_type" ref="81595a776b9d206a92caa526cad9c637" args="" -->
+typedef void </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">If a data item is available, invoke operator() on that item.  <a href="#c4f90f2c771bce748beb9be734fa286c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">result_type __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait until a data item becomes available, and invoke operator() on that item.  <a href="#5e726bdc7fbd924c0b07bd558b1d4d5d"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="413fad2ade743d9af5dcabc56aedf4fe"></a><!-- doxytag: member="tbb::thread_bound_filter::thread_bound_filter" ref="413fad2ade743d9af5dcabc56aedf4fe" args="(mode filter_mode)" -->
- </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</b> (<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode)</td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-A stage in a pipeline served by a user thread. 
-<p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="5e726bdc7fbd924c0b07bd558b1d4d5d"></a><!-- doxytag: member="tbb::thread_bound_filter::process_item" ref="5e726bdc7fbd924c0b07bd558b1d4d5d" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::process_item           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
+<h3>template<><br>
+ class tbb::tbb_allocator< void ></h3>
 
+Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
-Wait until a data item becomes available, and invoke operator() on that item. 
-<p>
-This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies. 
-</div>
-</div><p>
-<a class="anchor" name="c4f90f2c771bce748beb9be734fa286c"></a><!-- doxytag: member="tbb::thread_bound_filter::try_process_item" ref="c4f90f2c771bce748beb9be734fa286c" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::try_process_item           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-If a data item is available, invoke operator() on that item. 
-<p>
-This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process. 
-</div>
-</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00344.html">pipeline.h</a></ul>
+<li><a class="el" href="a00375.html">tbb_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00172.html b/doc/html/a00172.html
index 35a2b6c..4f96dc1 100644
--- a/doc/html/a00172.html
+++ b/doc/html/a00172.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tick_count Class Reference</title>
+<title>tbb::tbb_exception Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,42 +21,138 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00172.html">tick_count</a></div>
-<h1>tbb::tick_count Class Reference<br>
-<small>
-[<a class="el" href="a00232.html">Timing</a>]</small>
-</h1><!-- doxytag: class="tbb::tick_count" -->Absolute timestamp.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00172.html">tbb_exception</a></div>
+<h1>tbb::tbb_exception Class Reference</h1><!-- doxytag: class="tbb::tbb_exception" -->Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00397.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00381.html">tbb_exception.h</a>></code>
 <p>
-<a href="a00098.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherited by <a class="el" href="a00127.html">tbb::captured_exception</a>, and <a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a>.
+<p>
+Inheritance diagram for tbb::tbb_exception:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00084.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34593326ae4191e02a13c7cbdab9de4c"></a><!-- doxytag: member="tbb::tick_count::tick_count" ref="34593326ae4191e02a13c7cbdab9de4c" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="a00172.html">tbb_exception</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> ()=0  throw ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns pointer to the deep copy of this exception object.  <a href="#3e3482bf264d4ca4dde046cd9c02c766"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> ()=0  throw ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys objects created by the <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> method.  <a href="#66c94938eca8bf88b76f3eccaaf215d8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> ()=0</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an absolute timestamp initialized to zero. <br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb7f78ca61cf28398645ace66e284473"></a><!-- doxytag: member="tbb::tick_count::now" ref="fb7f78ca61cf28398645ace66e284473" args="()" -->
-static <a class="el" href="a00172.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#fb7f78ca61cf28398645ace66e284473">now</a> ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws this exception object.  <a href="#8588e07fa49692f4d734e4f2e4f048f4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d00f6497e552fee978a02bfcbebf46e2"></a><!-- doxytag: member="tbb::tbb_exception::name" ref="d00f6497e552fee978a02bfcbebf46e2" args="() const =0" -->
+virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#d00f6497e552fee978a02bfcbebf46e2">name</a> () const =0  throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return current time. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09dde78a4100800c11bb883d6204b586"></a><!-- doxytag: member="tbb::tick_count::operator-" ref="09dde78a4100800c11bb883d6204b586" args="(const tick_count &t1, const tick_count &t0)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00172.html">tick_count</a> &t1, const <a class="el" href="a00172.html">tick_count</a> &t0)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns RTTI name of the originally intercepted exception. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8157689ecb66bc6c72d3618bf3cc371"></a><!-- doxytag: member="tbb::tbb_exception::what" ref="e8157689ecb66bc6c72d3618bf3cc371" args="() const =0" -->
+virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">what</a> () const =0  throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two timestamps to get the time interval between. <br></td></tr>
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html">interval_t</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of originally intercepted exception's <a class="el" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">what()</a> method. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete</a> (void *p)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Relative time interval.  <a href="a00173.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Absolute timestamp. 
+Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. 
+<p>
+If an unhandled exception of the type derived from <a class="el" href="a00172.html">tbb::tbb_exception</a> is intercepted by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in the root thread. The root thread is the thread that has started the outermost algorithm or root task sharing the same <a class="el" href="a00167.html">task_group_context</a> with the guilty algorithm/task (the one that threw the exception first).<p>
+Note: when documentation mentions workers with respect to exception handling, masters are implied as well, because they are completely equivalent in this context. Consequently a root thread can be master or worker thread.<p>
+NOTE: In case of nested algorithms or complex task hierarchies when the nested levels share (explicitly or by means of implicit inheritance) the task group context of the outermost level, the exception may be (re-)thrown multiple times (ultimately - in each worker on each nesting level) before reaching the root thread at the outermost level. IMPORTANT: if you intercept an exception derived from this class on a nested level, you must re-throw it in the catch block by means of the "throw;" [...]
+TBB provides two implementations of this interface: <a class="el" href="a00127.html">tbb::captured_exception</a> and template class <a class="el" href="a00141.html">tbb::movable_exception</a>. See their declarations for more info. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="66c94938eca8bf88b76f3eccaaf215d8"></a><!-- doxytag: member="tbb::tbb_exception::destroy" ref="66c94938eca8bf88b76f3eccaaf215d8" args="()=0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void tbb::tbb_exception::destroy           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys objects created by the <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> method. 
+<p>
+Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method. 
+<p>
+Implemented in <a class="el" href="a00127.html#93d875d3555502ff6f18513525de204c">tbb::captured_exception</a>, and <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>.
+</div>
+</div><p>
+<a class="anchor" name="3e3482bf264d4ca4dde046cd9c02c766"></a><!-- doxytag: member="tbb::tbb_exception::move" ref="3e3482bf264d4ca4dde046cd9c02c766" args="()=0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual <a class="el" href="a00172.html">tbb_exception</a>* tbb::tbb_exception::move           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()<code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Creates and returns pointer to the deep copy of this exception object. 
+<p>
+Move semantics is allowed. 
+<p>
+Implemented in <a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">tbb::captured_exception</a>, and <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>.
+</div>
+</div><p>
+<a class="anchor" name="3f2da7f3d8a6e4c1df522af1213afb5a"></a><!-- doxytag: member="tbb::tbb_exception::operator delete" ref="3f2da7f3d8a6e4c1df522af1213afb5a" args="(void *p)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::tbb_exception::operator delete           </td>
+          <td>(</td>
+          <td class="paramtype">void * </td>
+          <td class="paramname"> <em>p</em>          </td>
+          <td> ) </td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Operator delete is provided only to allow using existing smart pointers with TBB exception objects obtained as the result of applying <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> operation on an exception thrown out of TBB scheduler.<p>
+When overriding method <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move()</a> make sure to override operator delete as well if memory is allocated not by TBB's scalable allocator. 
+</div>
+</div><p>
+<a class="anchor" name="8588e07fa49692f4d734e4f2e4f048f4"></a><!-- doxytag: member="tbb::tbb_exception::throw_self" ref="8588e07fa49692f4d734e4f2e4f048f4" args="()=0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void tbb::tbb_exception::throw_self           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"><code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Throws this exception object. 
+<p>
+Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown. 
 <p>
+Implemented in <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, and <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>.
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00397.html">tick_count.h</a></ul>
+<li><a class="el" href="a00381.html">tbb_exception.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00173.html b/doc/html/a00173.html
index abbfd6b..d10e484 100644
--- a/doc/html/a00173.html
+++ b/doc/html/a00173.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::tick_count::interval_t Class Reference</title>
+<title>tbb::internal::tbb_exception_ptr Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,57 +21,63 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00172.html">tick_count</a>::<a class="el" href="a00173.html">interval_t</a></div>
-<h1>tbb::tick_count::interval_t Class Reference</h1><!-- doxytag: class="tbb::tick_count::interval_t" -->Relative time interval.  
+<a class="el" href="a00229.html">tbb</a>::<b>internal</b>::<a class="el" href="a00173.html">tbb_exception_ptr</a></div>
+<h1>tbb::internal::tbb_exception_ptr Class Reference</h1><!-- doxytag: class="tbb::internal::tbb_exception_ptr" -->Exception container that preserves the exact copy of the original exception.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00397.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00381.html">tbb_exception.h</a>></code>
 <p>
-<a href="a00099.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00087.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="75a9a0949f8a8a84d6758835f1b48dad"></a><!-- doxytag: member="tbb::tick_count::interval_t::interval_t" ref="75a9a0949f8a8a84d6758835f1b48dad" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a> ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#921875bbacd2c8a5f324c7da7a415262">destroy</a> ()  throw ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a time interval representing zero time duration. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a21a428e00cced2e6a49e0f5f2258bf"></a><!-- doxytag: member="tbb::tick_count::interval_t::interval_t" ref="1a21a428e00cced2e6a49e0f5f2258bf" args="(double sec)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a> (double sec)</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys this objects.  <a href="#921875bbacd2c8a5f324c7da7a415262"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="292832fd5c523e3d8081a22247840a1d"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::throw_self" ref="292832fd5c523e3d8081a22247840a1d" args="()" -->
+void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#292832fd5c523e3d8081a22247840a1d">throw_self</a> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a time interval representing sec seconds time duration. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5d8429c0bc59cf6131b2abc7929fa59"></a><!-- doxytag: member="tbb::tick_count::interval_t::seconds" ref="d5d8429c0bc59cf6131b2abc7929fa59" args="() const " -->
-double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a> () const </td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Throws the contained exception . <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65083750bebe799d3fe8143c794523bb"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="65083750bebe799d3fe8143c794523bb" args="()" -->
+static <a class="el" href="a00173.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><b>allocate</b> ()</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the length of a time interval in seconds. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd9814947902e26463a69a111530f81b"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator+=" ref="cd9814947902e26463a69a111530f81b" args="(const interval_t &i)" -->
-<a class="el" href="a00173.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#cd9814947902e26463a69a111530f81b">operator+=</a> (const <a class="el" href="a00173.html">interval_t</a> &i)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1111b00ba54b7fe35e6d3a0f21de287"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="d1111b00ba54b7fe35e6d3a0f21de287" args="(const tbb_exception &tag)" -->
+static <a class="el" href="a00173.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><b>allocate</b> (const <a class="el" href="a00172.html">tbb_exception</a> &tag)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Accumulation operator. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35ff7eaf7c2031b4a991402ac9ecb940"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-=" ref="35ff7eaf7c2031b4a991402ac9ecb940" args="(const interval_t &i)" -->
-<a class="el" href="a00173.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a> (const <a class="el" href="a00173.html">interval_t</a> &i)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c35e5db8e9cdff5d1387db5b0bad2e4a"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::allocate" ref="c35e5db8e9cdff5d1387db5b0bad2e4a" args="(captured_exception &src)" -->
+static <a class="el" href="a00173.html">tbb_exception_ptr</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#c35e5db8e9cdff5d1387db5b0bad2e4a">allocate</a> (<a class="el" href="a00127.html">captured_exception</a> &src)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtraction operator. <br></td></tr>
-<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc3a7ad7000317951ce61f706163efe8"></a><!-- doxytag: member="tbb::tick_count::interval_t::tbb::tick_count" ref="cc3a7ad7000317951ce61f706163efe8" args="" -->
-class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#cc3a7ad7000317951ce61f706163efe8">tbb::tick_count</a></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09dde78a4100800c11bb883d6204b586"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-" ref="09dde78a4100800c11bb883d6204b586" args="(const tick_count &t1, const tick_count &t0)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00172.html">tick_count</a> &t1, const <a class="el" href="a00172.html">tick_count</a> &t0)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Extract the intervals from the tick_counts and subtract them. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5871ead1ca230efbe52a5008470e6428"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator+" ref="5871ead1ca230efbe52a5008470e6428" args="(const interval_t &i, const interval_t &j)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#5871ead1ca230efbe52a5008470e6428">operator+</a> (const <a class="el" href="a00173.html">interval_t</a> &i, const <a class="el" href="a00173.html">interval_t</a> &j)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Add two intervals. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa509691e1d689830931e36edd274f76"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-" ref="fa509691e1d689830931e36edd274f76" args="(const interval_t &i, const interval_t &j)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#fa509691e1d689830931e36edd274f76">operator-</a> (const <a class="el" href="a00173.html">interval_t</a> &i, const <a class="el" href="a00173.html">interval_t</a> &j)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two intervals. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">This overload uses move semantics (i.e. it empties src). <br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-Relative time interval. 
+Exception container that preserves the exact copy of the original exception. 
+<p>
+This class can be used only when the appropriate runtime support (mandated by C++0x) is present 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="921875bbacd2c8a5f324c7da7a415262"></a><!-- doxytag: member="tbb::internal::tbb_exception_ptr::destroy" ref="921875bbacd2c8a5f324c7da7a415262" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::internal::tbb_exception_ptr::destroy           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%">  throw ()</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys this objects. 
 <p>
+Note that objects of this type can be created only by the allocate() method. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00397.html">tick_count.h</a></ul>
+<li><a class="el" href="a00381.html">tbb_exception.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00174.html b/doc/html/a00174.html
index a8615c5..bd3c473 100644
--- a/doc/html/a00174.html
+++ b/doc/html/a00174.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::internal::work_around_alignment_bug< Size, T > Struct Template Reference</title>
+<title>tbb::tbb_hash_compare< T > Struct Template Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,29 +21,30 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>internal</b>::<a class="el" href="a00174.html">work_around_alignment_bug</a></div>
-<h1>tbb::internal::work_around_alignment_bug< Size, T > Struct Template Reference</h1><!-- doxytag: class="tbb::internal::work_around_alignment_bug" -->Work around for bug in GNU 3.2 and MSVC compilers.  
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00174.html">tbb_hash_compare</a></div>
+<h1>tbb::tbb_hash_compare< T > Struct Template Reference</h1><!-- doxytag: class="tbb::tbb_hash_compare" -->hash_compare - default argument  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00378.html">tbb_machine.h</a>></code>
+<code>#include <<a class="el" href="a00272.html">concurrent_hash_map.h</a>></code>
 <p>
-<a href="a00095.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00012.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="137d1b1dd94016bc52e423dc33c4fd1d"></a><!-- doxytag: member="tbb::internal::work_around_alignment_bug::alignment" ref="137d1b1dd94016bc52e423dc33c4fd1d" args="" -->
-static const size_t </td><td class="memItemRight" valign="bottom"><b>alignment</b> = __alignof(T)</td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a1e6b9c8719d73dee49e64becf5aa37"></a><!-- doxytag: member="tbb::tbb_hash_compare::hash" ref="4a1e6b9c8719d73dee49e64becf5aa37" args="(const T &t)" -->
+static size_t </td><td class="memItemRight" valign="bottom"><b>hash</b> (const T &t)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="553e13ec26df66be906c01cc4c39ed88"></a><!-- doxytag: member="tbb::tbb_hash_compare::equal" ref="553e13ec26df66be906c01cc4c39ed88" args="(const T &a, const T &b)" -->
+static bool </td><td class="memItemRight" valign="bottom"><b>equal</b> (const T &a, const T &b)</td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<size_t Size, typename T><br>
- struct tbb::internal::work_around_alignment_bug< Size, T ></h3>
+<h3>template<typename T><br>
+ struct tbb::tbb_hash_compare< T ></h3>
 
-Work around for bug in GNU 3.2 and MSVC compilers. 
-<p>
-Bug is that compiler sometimes returns 0 for __alignof(T) when T has not yet been instantiated. The work-around forces instantiation by forcing computation of sizeof(T) before __alignof(T). 
+hash_compare - default argument 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00378.html">tbb_machine.h</a></ul>
+<li><a class="el" href="a00272.html">concurrent_hash_map.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00175.html b/doc/html/a00175.html
index 600b1f6..650724d 100644
--- a/doc/html/a00175.html
+++ b/doc/html/a00175.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::zero_allocator< T, Allocator > Class Template Reference</title>
+<title>tbb::thread_bound_filter Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,67 +21,94 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00175.html">zero_allocator</a></div>
-<h1>tbb::zero_allocator< T, Allocator > Class Template Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00175.html">thread_bound_filter</a></div>
+<h1>tbb::thread_bound_filter Class Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::zero_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
+[<a class="el" href="a00233.html">Algorithms</a>]</small>
+</h1><!-- doxytag: class="tbb::thread_bound_filter" --><!-- doxytag: inherits="tbb::filter" -->A stage in a pipeline served by a user thread.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00347.html">pipeline.h</a>></code>
 <p>
-<a href="a00079.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+Inherits <a class="el" href="a00139.html">tbb::filter</a>.
+<p>
+Inheritance diagram for tbb::thread_bound_filter:<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00045.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="77c87446a645cc3dbeba6fc82cc7eec0"></a><!-- doxytag: member="tbb::zero_allocator::base_allocator_type" ref="77c87446a645cc3dbeba6fc82cc7eec0" args="" -->
-typedef Allocator< T > </td><td class="memItemRight" valign="bottom"><b>base_allocator_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2eb3bf02103f455e0614e0a392388428"></a><!-- doxytag: member="tbb::zero_allocator::value_type" ref="2eb3bf02103f455e0614e0a392388428" args="" -->
-typedef base_allocator_type::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="54d0a81317a90278dc492d44cc7dcdfc"></a><!-- doxytag: member="tbb::zero_allocator::pointer" ref="54d0a81317a90278dc492d44cc7dcdfc" args="" -->
-typedef base_allocator_type::pointer </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="50536b451124814064b0e8ff7b6cea21"></a><!-- doxytag: member="tbb::zero_allocator::const_pointer" ref="50536b451124814064b0e8ff7b6cea21" args="" -->
-typedef base_allocator_type::const_pointer </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ef488ecc55bf4a619f68b021d5b93e2"></a><!-- doxytag: member="tbb::zero_allocator::reference" ref="2ef488ecc55bf4a619f68b021d5b93e2" args="" -->
-typedef base_allocator_type::reference </td><td class="memItemRight" valign="bottom"><b>reference</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331de0c135a0274225f59d2b2a682d1103f23"></a><!-- doxytag: member="tbb::thread_bound_filter::success" ref="902c4645e624e8f589b89841df5331de0c135a0274225f59d2b2a682d1103f23" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>success</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31f0de5db53e4c219e8548078572e1ff"></a><!-- doxytag: member="tbb::zero_allocator::const_reference" ref="31f0de5db53e4c219e8548078572e1ff" args="" -->
-typedef base_allocator_type::const_reference </td><td class="memItemRight" valign="bottom"><b>const_reference</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331de5243cf0030982cfa4ac1a8e97acb39f4"></a><!-- doxytag: member="tbb::thread_bound_filter::item_not_available" ref="902c4645e624e8f589b89841df5331de5243cf0030982cfa4ac1a8e97acb39f4" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>item_not_available</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55acbfec8d7fd904c9b2040816522084"></a><!-- doxytag: member="tbb::zero_allocator::size_type" ref="55acbfec8d7fd904c9b2040816522084" args="" -->
-typedef base_allocator_type::size_type </td><td class="memItemRight" valign="bottom"><b>size_type</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="902c4645e624e8f589b89841df5331ded4085a8b251604b51c0f19602eeef09f"></a><!-- doxytag: member="tbb::thread_bound_filter::end_of_stream" ref="902c4645e624e8f589b89841df5331ded4085a8b251604b51c0f19602eeef09f" args="" -->
+ </td><td class="memItemRight" valign="bottom"><b>end_of_stream</b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c54d45a74bd3b48ff8db174c266ddede"></a><!-- doxytag: member="tbb::zero_allocator::difference_type" ref="c54d45a74bd3b48ff8db174c266ddede" args="" -->
-typedef base_allocator_type::difference_type </td><td class="memItemRight" valign="bottom"><b>difference_type</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>result_type</b> { <b>success</b>, 
+<b>item_not_available</b>, 
+<b>end_of_stream</b>
+ }</td></tr>
 
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8c48c0436e3239be8f07c53c7f6658e4"></a><!-- doxytag: member="tbb::zero_allocator::zero_allocator" ref="8c48c0436e3239be8f07c53c7f6658e4" args="(const zero_allocator &a)" -->
- </td><td class="memItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00175.html">zero_allocator</a> &a)  throw ()</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">result_type __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a> ()</td></tr>
 
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="67685c1cfcd3b5f81ac8f3c8dd1375b9"></a><!-- doxytag: member="tbb::zero_allocator::zero_allocator" ref="67685c1cfcd3b5f81ac8f3c8dd1375b9" args="(const zero_allocator< U > &a)" -->
-template<typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00175.html">zero_allocator</a>< U > &a)  throw ()</td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">If a data item is available, invoke operator() on that item.  <a href="#c4f90f2c771bce748beb9be734fa286c"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">result_type __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6e7eb50d9faeca418d56a9758357377"></a><!-- doxytag: member="tbb::zero_allocator::allocate" ref="b6e7eb50d9faeca418d56a9758357377" args="(const size_type n, const void *hint=0)" -->
-pointer </td><td class="memItemRight" valign="bottom"><b>allocate</b> (const size_type n, const void *hint=0)</td></tr>
-
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait until a data item becomes available, and invoke operator() on that item.  <a href="#5e726bdc7fbd924c0b07bd558b1d4d5d"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="413fad2ade743d9af5dcabc56aedf4fe"></a><!-- doxytag: member="tbb::thread_bound_filter::thread_bound_filter" ref="413fad2ade743d9af5dcabc56aedf4fe" args="(mode filter_mode)" -->
+ </td><td class="memItemRight" valign="bottom"><b>thread_bound_filter</b> (<a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode)</td></tr>
 
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<typename T, template< typename X > class Allocator = tbb_allocator><br>
- class tbb::zero_allocator< T, Allocator ></h3>
+A stage in a pipeline served by a user thread. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="5e726bdc7fbd924c0b07bd558b1d4d5d"></a><!-- doxytag: member="tbb::thread_bound_filter::process_item" ref="5e726bdc7fbd924c0b07bd558b1d4d5d" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::process_item           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Wait until a data item becomes available, and invoke operator() on that item. 
+<p>
+This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies. 
+</div>
+</div><p>
+<a class="anchor" name="c4f90f2c771bce748beb9be734fa286c"></a><!-- doxytag: member="tbb::thread_bound_filter::try_process_item" ref="c4f90f2c771bce748beb9be734fa286c" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::try_process_item           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
 
-Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. 
 <p>
-The class is an adapter over an actual allocator that fills the allocation using memset function with template argument C as the value. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
+If a data item is available, invoke operator() on that item. 
 <p>
+This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process. 
+</div>
+</div><p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00347.html">pipeline.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00176.html b/doc/html/a00176.html
index 633ae8f..92e11dc 100644
--- a/doc/html/a00176.html
+++ b/doc/html/a00176.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb::zero_allocator< void, Allocator > Class Template Reference</title>
+<title>tbb::tick_count Class Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -21,42 +21,42 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00176.html">zero_allocator< void, Allocator ></a></div>
-<h1>tbb::zero_allocator< void, Allocator > Class Template Reference<br>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00176.html">tick_count</a></div>
+<h1>tbb::tick_count Class Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
-</h1><!-- doxytag: class="tbb::zero_allocator< void, Allocator >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
+[<a class="el" href="a00237.html">Timing</a>]</small>
+</h1><!-- doxytag: class="tbb::tick_count" -->Absolute timestamp.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00401.html">tick_count.h</a>></code>
 <p>
-<a href="a00081.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00098.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce4f3bf06e8aaf8020fa443297eff5f7"></a><!-- doxytag: member="tbb::zero_allocator< void, Allocator >::base_allocator_type" ref="ce4f3bf06e8aaf8020fa443297eff5f7" args="" -->
-typedef Allocator< void > </td><td class="memItemRight" valign="bottom"><b>base_allocator_type</b></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34593326ae4191e02a13c7cbdab9de4c"></a><!-- doxytag: member="tbb::tick_count::tick_count" ref="34593326ae4191e02a13c7cbdab9de4c" args="()" -->
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5cd644eeecd6d729c848c8e99ffd4592"></a><!-- doxytag: member="tbb::zero_allocator< void, Allocator >::value_type" ref="5cd644eeecd6d729c848c8e99ffd4592" args="" -->
-typedef base_allocator_type::value_type </td><td class="memItemRight" valign="bottom"><b>value_type</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an absolute timestamp initialized to zero. <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb7f78ca61cf28398645ace66e284473"></a><!-- doxytag: member="tbb::tick_count::now" ref="fb7f78ca61cf28398645ace66e284473" args="()" -->
+static <a class="el" href="a00176.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#fb7f78ca61cf28398645ace66e284473">now</a> ()</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f68aa346a17c94f8c5c7945a2c50858"></a><!-- doxytag: member="tbb::zero_allocator< void, Allocator >::pointer" ref="8f68aa346a17c94f8c5c7945a2c50858" args="" -->
-typedef base_allocator_type::pointer </td><td class="memItemRight" valign="bottom"><b>pointer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ae95a5761371ee7b61f2c339385684e9"></a><!-- doxytag: member="tbb::zero_allocator< void, Allocator >::const_pointer" ref="ae95a5761371ee7b61f2c339385684e9" args="" -->
-typedef base_allocator_type::const_pointer </td><td class="memItemRight" valign="bottom"><b>const_pointer</b></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Return current time. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09dde78a4100800c11bb883d6204b586"></a><!-- doxytag: member="tbb::tick_count::operator-" ref="09dde78a4100800c11bb883d6204b586" args="(const tick_count &t1, const tick_count &t0)" -->
+<a class="el" href="a00177.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00176.html">tick_count</a> &t1, const <a class="el" href="a00176.html">tick_count</a> &t0)</td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two timestamps to get the time interval between. <br></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>rebind</b></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html">interval_t</a></td></tr>
 
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Relative time interval.  <a href="a00177.html#_details">More...</a><br></td></tr>
 </table>
 <hr><a name="_details"></a><h2>Detailed Description</h2>
-<h3>template<template< typename T > class Allocator><br>
- class tbb::zero_allocator< void, Allocator ></h3>
-
-Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
+Absolute timestamp. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00401.html">tick_count.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00173.html b/doc/html/a00177.html
similarity index 78%
copy from doc/html/a00173.html
copy to doc/html/a00177.html
index abbfd6b..697ab47 100644
--- a/doc/html/a00173.html
+++ b/doc/html/a00177.html
@@ -21,49 +21,49 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00172.html">tick_count</a>::<a class="el" href="a00173.html">interval_t</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00176.html">tick_count</a>::<a class="el" href="a00177.html">interval_t</a></div>
 <h1>tbb::tick_count::interval_t Class Reference</h1><!-- doxytag: class="tbb::tick_count::interval_t" -->Relative time interval.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00397.html">tick_count.h</a>></code>
+<code>#include <<a class="el" href="a00401.html">tick_count.h</a>></code>
 <p>
 <a href="a00099.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="75a9a0949f8a8a84d6758835f1b48dad"></a><!-- doxytag: member="tbb::tick_count::interval_t::interval_t" ref="75a9a0949f8a8a84d6758835f1b48dad" args="()" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a> ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a> ()</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a time interval representing zero time duration. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a21a428e00cced2e6a49e0f5f2258bf"></a><!-- doxytag: member="tbb::tick_count::interval_t::interval_t" ref="1a21a428e00cced2e6a49e0f5f2258bf" args="(double sec)" -->
- </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a> (double sec)</td></tr>
+ </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#1a21a428e00cced2e6a49e0f5f2258bf">interval_t</a> (double sec)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a time interval representing sec seconds time duration. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5d8429c0bc59cf6131b2abc7929fa59"></a><!-- doxytag: member="tbb::tick_count::interval_t::seconds" ref="d5d8429c0bc59cf6131b2abc7929fa59" args="() const " -->
-double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a> () const </td></tr>
+double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a> () const </td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the length of a time interval in seconds. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd9814947902e26463a69a111530f81b"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator+=" ref="cd9814947902e26463a69a111530f81b" args="(const interval_t &i)" -->
-<a class="el" href="a00173.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#cd9814947902e26463a69a111530f81b">operator+=</a> (const <a class="el" href="a00173.html">interval_t</a> &i)</td></tr>
+<a class="el" href="a00177.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#cd9814947902e26463a69a111530f81b">operator+=</a> (const <a class="el" href="a00177.html">interval_t</a> &i)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Accumulation operator. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35ff7eaf7c2031b4a991402ac9ecb940"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-=" ref="35ff7eaf7c2031b4a991402ac9ecb940" args="(const interval_t &i)" -->
-<a class="el" href="a00173.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a> (const <a class="el" href="a00173.html">interval_t</a> &i)</td></tr>
+<a class="el" href="a00177.html">interval_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a> (const <a class="el" href="a00177.html">interval_t</a> &i)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtraction operator. <br></td></tr>
 <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc3a7ad7000317951ce61f706163efe8"></a><!-- doxytag: member="tbb::tick_count::interval_t::tbb::tick_count" ref="cc3a7ad7000317951ce61f706163efe8" args="" -->
-class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#cc3a7ad7000317951ce61f706163efe8">tbb::tick_count</a></td></tr>
+class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#cc3a7ad7000317951ce61f706163efe8">tbb::tick_count</a></td></tr>
 
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="09dde78a4100800c11bb883d6204b586"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-" ref="09dde78a4100800c11bb883d6204b586" args="(const tick_count &t1, const tick_count &t0)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00172.html">tick_count</a> &t1, const <a class="el" href="a00172.html">tick_count</a> &t0)</td></tr>
+<a class="el" href="a00177.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#09dde78a4100800c11bb883d6204b586">operator-</a> (const <a class="el" href="a00176.html">tick_count</a> &t1, const <a class="el" href="a00176.html">tick_count</a> &t0)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract the intervals from the tick_counts and subtract them. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5871ead1ca230efbe52a5008470e6428"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator+" ref="5871ead1ca230efbe52a5008470e6428" args="(const interval_t &i, const interval_t &j)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#5871ead1ca230efbe52a5008470e6428">operator+</a> (const <a class="el" href="a00173.html">interval_t</a> &i, const <a class="el" href="a00173.html">interval_t</a> &j)</td></tr>
+<a class="el" href="a00177.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#5871ead1ca230efbe52a5008470e6428">operator+</a> (const <a class="el" href="a00177.html">interval_t</a> &i, const <a class="el" href="a00177.html">interval_t</a> &j)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Add two intervals. <br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa509691e1d689830931e36edd274f76"></a><!-- doxytag: member="tbb::tick_count::interval_t::operator-" ref="fa509691e1d689830931e36edd274f76" args="(const interval_t &i, const interval_t &j)" -->
-<a class="el" href="a00173.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#fa509691e1d689830931e36edd274f76">operator-</a> (const <a class="el" href="a00173.html">interval_t</a> &i, const <a class="el" href="a00173.html">interval_t</a> &j)</td></tr>
+<a class="el" href="a00177.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00177.html#fa509691e1d689830931e36edd274f76">operator-</a> (const <a class="el" href="a00177.html">interval_t</a> &i, const <a class="el" href="a00177.html">interval_t</a> &j)</td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract two intervals. <br></td></tr>
 </table>
@@ -71,7 +71,7 @@ class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00
 Relative time interval. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00397.html">tick_count.h</a></ul>
+<li><a class="el" href="a00401.html">tick_count.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00174.html b/doc/html/a00178.html
similarity index 91%
copy from doc/html/a00174.html
copy to doc/html/a00178.html
index a8615c5..59b2c0b 100644
--- a/doc/html/a00174.html
+++ b/doc/html/a00178.html
@@ -21,11 +21,11 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<b>internal</b>::<a class="el" href="a00174.html">work_around_alignment_bug</a></div>
+<a class="el" href="a00229.html">tbb</a>::<b>internal</b>::<a class="el" href="a00178.html">work_around_alignment_bug</a></div>
 <h1>tbb::internal::work_around_alignment_bug< Size, T > Struct Template Reference</h1><!-- doxytag: class="tbb::internal::work_around_alignment_bug" -->Work around for bug in GNU 3.2 and MSVC compilers.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00378.html">tbb_machine.h</a>></code>
+<code>#include <<a class="el" href="a00382.html">tbb_machine.h</a>></code>
 <p>
 <a href="a00095.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -43,7 +43,7 @@ Work around for bug in GNU 3.2 and MSVC compilers.
 Bug is that compiler sometimes returns 0 for __alignof(T) when T has not yet been instantiated. The work-around forces instantiation by forcing computation of sizeof(T) before __alignof(T). 
 <p>
 <hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="a00378.html">tbb_machine.h</a></ul>
+<li><a class="el" href="a00382.html">tbb_machine.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00175.html b/doc/html/a00179.html
similarity index 94%
copy from doc/html/a00175.html
copy to doc/html/a00179.html
index 600b1f6..7a11d92 100644
--- a/doc/html/a00175.html
+++ b/doc/html/a00179.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00175.html">zero_allocator</a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00179.html">zero_allocator</a></div>
 <h1>tbb::zero_allocator< T, Allocator > Class Template Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
 </h1><!-- doxytag: class="tbb::zero_allocator" -->Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00375.html">tbb_allocator.h</a>></code>
 <p>
 <a href="a00079.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -59,11 +59,11 @@ typedef base_allocator_type::difference_type </td><td class="memItemRight"
 
 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8c48c0436e3239be8f07c53c7f6658e4"></a><!-- doxytag: member="tbb::zero_allocator::zero_allocator" ref="8c48c0436e3239be8f07c53c7f6658e4" args="(const zero_allocator &a)" -->
- </td><td class="memItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00175.html">zero_allocator</a> &a)  throw ()</td></tr>
+ </td><td class="memItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00179.html">zero_allocator</a> &a)  throw ()</td></tr>
 
 <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="67685c1cfcd3b5f81ac8f3c8dd1375b9"></a><!-- doxytag: member="tbb::zero_allocator::zero_allocator" ref="67685c1cfcd3b5f81ac8f3c8dd1375b9" args="(const zero_allocator< U > &a)" -->
 template<typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00175.html">zero_allocator</a>< U > &a)  throw ()</td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><b>zero_allocator</b> (const <a class="el" href="a00179.html">zero_allocator</a>< U > &a)  throw ()</td></tr>
 
 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6e7eb50d9faeca418d56a9758357377"></a><!-- doxytag: member="tbb::zero_allocator::allocate" ref="b6e7eb50d9faeca418d56a9758357377" args="(const size_type n, const void *hint=0)" -->
 pointer </td><td class="memItemRight" valign="bottom"><b>allocate</b> (const size_type n, const void *hint=0)</td></tr>
@@ -81,7 +81,7 @@ Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
 The class is an adapter over an actual allocator that fills the allocation using memset function with template argument C as the value. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00375.html">tbb_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00176.html b/doc/html/a00180.html
similarity index 92%
copy from doc/html/a00176.html
copy to doc/html/a00180.html
index 633ae8f..6120f53 100644
--- a/doc/html/a00176.html
+++ b/doc/html/a00180.html
@@ -21,14 +21,14 @@
     <li><a href="functions.html"><span>Class Members</span></a></li>
   </ul></div>
 <div class="nav">
-<a class="el" href="a00224.html">tbb</a>::<a class="el" href="a00176.html">zero_allocator< void, Allocator ></a></div>
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00180.html">zero_allocator< void, Allocator ></a></div>
 <h1>tbb::zero_allocator< void, Allocator > Class Template Reference<br>
 <small>
-[<a class="el" href="a00230.html">Memory Allocation</a>]</small>
+[<a class="el" href="a00235.html">Memory Allocation</a>]</small>
 </h1><!-- doxytag: class="tbb::zero_allocator< void, Allocator >" -->Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  
 <a href="#_details">More...</a>
 <p>
-<code>#include <<a class="el" href="a00372.html">tbb_allocator.h</a>></code>
+<code>#include <<a class="el" href="a00375.html">tbb_allocator.h</a>></code>
 <p>
 <a href="a00081.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
@@ -56,7 +56,7 @@ typedef base_allocator_type::const_pointer </td><td class="memItemRight" va
 Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. 
 <p>
 <hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="a00372.html">tbb_allocator.h</a></ul>
+<li><a class="el" href="a00375.html">tbb_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00206.html b/doc/html/a00210.html
similarity index 83%
rename from doc/html/a00206.html
rename to doc/html/a00210.html
index 4dbe3d0..a82debe 100644
--- a/doc/html/a00206.html
+++ b/doc/html/a00210.html
@@ -21,38 +21,40 @@
   </ul></div>
 <h1>scalable_allocator.h File Reference</h1>
 <p>
-<a href="a00348.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<a href="a00351.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html">tbb</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html">tbb</a></td></tr>
 
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00154.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00158.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::scalable_allocator< T >::rebind< U ></b></td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00155.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00159.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><b>tbb::scalable_allocator< void >::rebind< U ></b></td></tr>
 
 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (void *ptr)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (void *ptr)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (void *ptr, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (void *ptr, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (void **memptr, size_t alignment, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (void **memptr, size_t alignment, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (void *ptr, size_t size, size_t alignment)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (void *ptr, size_t size, size_t alignment)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (void *ptr)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (void *ptr)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g0965ce1b4b7835f92869c7fd867265f7">scalable_msize</a> (void *ptr)</td></tr>
 
 <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="906ebb461ecb0446989739fd0399e4b8"></a><!-- doxytag: member="scalable_allocator.h::operator==" ref="906ebb461ecb0446989739fd0399e4b8" args="(const scalable_allocator< T > &, const scalable_allocator< U > &)" -->
 template<typename T, typename U> </td></tr>
diff --git a/doc/html/a00224.html b/doc/html/a00224.html
deleted file mode 100644
index 232c220..0000000
--- a/doc/html/a00224.html
+++ /dev/null
@@ -1,682 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb Namespace Reference</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li id="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="namespaces.html"><span>Namespace List</span></a></li>
-    <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
-  </ul></div>
-<h1>tbb Namespace Reference</h1>The namespace tbb contains all components of the library.  
-<a href="#_details">More...</a>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html">aligned_space</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Block of space aligned sufficiently to construct an array T with N elements.  <a href="a00116.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html">atomic</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Primary template for atomic.  <a href="a00117.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00118.html">atomic< void * ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Specialization for <a class="el" href="a00118.html">atomic<void*></a>, for sake of not allowing arithmetic or operator->.  <a href="a00118.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html">blocked_range</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00122.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html">blocked_range2d</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A 2-dimensional range that models the Range concept.  <a href="a00123.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html">blocked_range3d</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A 3-dimensional range that models the Range concept.  <a href="a00124.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html">cache_aligned_allocator</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00125.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00126.html">cache_aligned_allocator< void ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00126.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html">combinable</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Thread-local storage with optional reduction.  <a href="a00128.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html">tbb_hash_compare</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">hash_compare - default argument  <a href="a00170.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html">concurrent_hash_map</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Unordered map from Key to T.  <a href="a00130.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html">concurrent_bounded_queue</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe blocking concurrent bounded queue.  <a href="a00129.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html">concurrent_vector</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Concurrent vector container.  <a href="a00136.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html">enumerable_thread_specific</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The thread local class template.  <a href="a00138.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>flattened2d</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html">mutex</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around the platform's native reader-writer lock.  <a href="a00142.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>null_mutex</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>null_rw_mutex</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html">parallel_do_feeder</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Class the user supplied algorithm body uses to add new tasks.  <a href="a00144.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html">pre_scan_tag</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the initial scan is being performed.  <a href="a00147.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html">final_scan_tag</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the final scan is being performed.  <a href="a00140.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html">parallel_while</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a stream, with optional addition of more work.  <a href="a00145.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html">simple_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner.  <a href="a00156.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html">auto_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <a href="a00120.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html">affinity_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">An affinity partitioner.  <a href="a00115.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html">filter</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00139.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">thread_bound_filter</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline served by a user thread.  <a href="a00171.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html">pipeline</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00146.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00148.html">queuing_mutex</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <a href="a00148.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html">queuing_rw_mutex</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Reader-writer lock with local-only spinning.  <a href="a00150.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html">recursive_mutex</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Mutex that allows recursive mutex acquisition.  <a href="a00152.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html">scalable_allocator</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00154.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html">scalable_allocator< void ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00155.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html">spin_mutex</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A lock that occupies a single byte.  <a href="a00157.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">spin_rw_mutex_v3</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <a href="a00159.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">task_group_context</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00163.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html">task</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00162.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html">empty_task</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00137.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html">task_list</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00164.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>task_handle</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>task_group</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>missing_wait</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>structured_task_group</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html">task_scheduler_init</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00165.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html">tbb_allocator</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00166.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html">tbb_allocator< void ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00167.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html">zero_allocator</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00175.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html">zero_allocator< void, Allocator ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00176.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00121.html">bad_last_alloc</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception for concurrent containers.  <a href="a00121.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html">tbb_exception</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.  <a href="a00168.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html">captured_exception</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">This class is used by TBB to propagate information about unhandled exceptions into the root thread.  <a href="a00127.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html">movable_exception</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.  <a href="a00141.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">split</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Dummy type that distinguishes splitting constructor from copy constructor.  <a href="a00161.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html">tick_count</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00172.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_do</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="parallel_do_body_req.html">parallel_do Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3383e2703977012b6f384d673410f1f7"></a><!-- doxytag: member="tbb::parallel_do" ref="g3383e2703977012b6f384d673410f1f7" args="(Iterator first, Iterator last, const Body &body)" -->
-template<typename Iterator, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2617dc9b88b3285a7212599d49f74228"></a><!-- doxytag: member="tbb::parallel_do" ref="g2617dc9b88b3285a7212599d49f74228" args="(Iterator first, Iterator last, const Body &body, task_group_context &context)" -->
-template<typename Iterator, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g2617dc9b88b3285a7212599d49f74228">parallel_do</a> (Iterator first, Iterator last, const Body &body, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_for</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_for_body_req.html">parallel_for Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g68cc046ef72c42ce205fccbc435a0d81"></a><!-- doxytag: member="tbb::parallel_for" ref="g68cc046ef72c42ce205fccbc435a0d81" args="(const Range &range, const Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a> (const Range &range, const Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g13cac5dd55c7533bccea43a51c33d0e5"></a><!-- doxytag: member="tbb::parallel_for" ref="g13cac5dd55c7533bccea43a51c33d0e5" args="(const Range &range, const Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g13cac5dd55c7533bccea43a51c33d0e5">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga7ac75d532389b55b9247f3fdb0b00d1"></a><!-- doxytag: member="tbb::parallel_for" ref="ga7ac75d532389b55b9247f3fdb0b00d1" args="(const Range &range, const Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#ga7ac75d532389b55b9247f3fdb0b00d1">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g9cd1b210ceb1c040f30e390b4a21bde8"></a><!-- doxytag: member="tbb::parallel_for" ref="g9cd1b210ceb1c040f30e390b4a21bde8" args="(const Range &range, const Body &body, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g9cd1b210ceb1c040f30e390b4a21bde8">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2d317a5e0078cd193125439fed60dfdc"></a><!-- doxytag: member="tbb::parallel_for" ref="g2d317a5e0078cd193125439fed60dfdc" args="(const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g2d317a5e0078cd193125439fed60dfdc">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c0700e3f85e83a788ff3ede88ebb7e9"></a><!-- doxytag: member="tbb::parallel_for" ref="g1c0700e3f85e83a788ff3ede88ebb7e9" args="(const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1c0700e3f85e83a788ff3ede88ebb7e9">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g04b4696b67370c01353ff5974c8f1196"></a><!-- doxytag: member="tbb::parallel_for" ref="g04b4696b67370c01353ff5974c8f1196" args="(const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g04b4696b67370c01353ff5974c8f1196">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_for_each</h2></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g99b24f5d0e90aa76fd5f089e263a99b4"></a><!-- doxytag: member="tbb::parallel_for_each" ref="g99b24f5d0e90aa76fd5f089e263a99b4" args="(Input_iterator _First, Input_iterator _Last, Function _Func, task_group_context &context)" -->
-template<typename Input_iterator, typename Function> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g99b24f5d0e90aa76fd5f089e263a99b4">parallel_for_each</a> (Input_iterator _First, Input_iterator _Last, Function _Func, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls function _Func for all items from [_First, Last) interval using user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g59794cb24f74cda4253fd9aed0a4b150"></a><!-- doxytag: member="tbb::parallel_for_each" ref="g59794cb24f74cda4253fd9aed0a4b150" args="(Input_iterator _First, Input_iterator _Last, Function _Func)" -->
-template<typename Input_iterator, typename Function> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g59794cb24f74cda4253fd9aed0a4b150">parallel_for_each</a> (Input_iterator _First, Input_iterator _Last, Function _Func)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">uses default context <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_invoke</h2></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbaadafdb93d290acec86e07fc8909c29"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gbaadafdb93d290acec86e07fc8909c29" args="(F0 f0, F1 f1, tbb::task_group_context &context)" -->
-template<typename F0, typename F1> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a> (F0 f0, F1 f1, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Executes a list of tasks in parallel and waits for all tasks to complete. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3cbf43007d0caeb4a2470265f50b25df"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3cbf43007d0caeb4a2470265f50b25df" args="(F0 f0, F1 f1, F2 f2, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g063924a497ba64c49351e80e39bd2c17"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g063924a497ba64c49351e80e39bd2c17" args="(F0 f0, F1 f1, F2 f2, F3 f3, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2ca8b49b9b36515247e45ffd9c0c11cf"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g2ca8b49b9b36515247e45ffd9c0c11cf" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g559685c3c13e103c6d570efef419c2b9"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g559685c3c13e103c6d570efef419c2b9" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd979d007cc4026c34691a4b38edd36af"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gd979d007cc4026c34691a4b38edd36af" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd01a5d8f4902387d9081352e1edd1632"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gd01a5d8f4902387d9081352e1edd1632" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0a66bfc0ac0691dfa71d230f5c8c3e96"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g0a66bfc0ac0691dfa71d230f5c8c3e96" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7182f6b5c88469cfc2b7c2ebbbd4a28c"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g7182f6b5c88469cfc2b7c2ebbbd4a28c" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb999ec5f8b7f0b68b9752f11ad39ab08"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gb999ec5f8b7f0b68b9752f11ad39ab08" args="(F0 f0, F1 f1)" -->
-template<typename F0, typename F1> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd" args="(F0 f0, F1 f1, F2 f2)" -->
-template<typename F0, typename F1, typename F2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g89c0569d95abd182f80acc38d0dbe2d4"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g89c0569d95abd182f80acc38d0dbe2d4" args="(F0 f0, F1 f1, F2 f2, F3 f3)" -->
-template<typename F0, typename F1, typename F2, typename F3> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3ef71e9441745fe708e66a0b817bebc7"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3ef71e9441745fe708e66a0b817bebc7" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g78fa19efd1a7cf7ffd1c23251c80b31d"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g78fa19efd1a7cf7ffd1c23251c80b31d" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gab2e69dbef9b3f0e658cf4b8e574f552"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gab2e69dbef9b3f0e658cf4b8e574f552" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g262f0347e5690bb692b6dc26e26b9ebe"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g262f0347e5690bb692b6dc26e26b9ebe" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g06a090fbd0eaaccf20e2409a2a222733"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g06a090fbd0eaaccf20e2409a2a222733" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3330e3c33053875705e19e29eda37627"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3330e3c33053875705e19e29eda37627" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)</td></tr>
-
-<tr><td colspan="2"><br><h2>parallel_reduce</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_reduce_body_req.html">parallel_reduce Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1b3d59c5eb62683c5754db6970392fa3"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g1b3d59c5eb62683c5754db6970392fa3" args="(const Range &range, Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a> (const Range &range, Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gec1b7c03f9da909bef5db12e3d41bed3"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gec1b7c03f9da909bef5db12e3d41bed3" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gec1b7c03f9da909bef5db12e3d41bed3">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g18a19157e6245992fc00ca0adeb7dd37"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g18a19157e6245992fc00ca0adeb7dd37" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g18a19157e6245992fc00ca0adeb7dd37">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc61e73fcc36c92d79a217fc355ff4a6b"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gc61e73fcc36c92d79a217fc355ff4a6b" args="(const Range &range, Body &body, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc61e73fcc36c92d79a217fc355ff4a6b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g45cb00c42a18e334bbde8b7535afe460"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g45cb00c42a18e334bbde8b7535afe460" args="(const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g45cb00c42a18e334bbde8b7535afe460">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c1ea1d7c61b3c225e92c70d669a53a5"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g1c1ea1d7c61b3c225e92c70d669a53a5" args="(const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1c1ea1d7c61b3c225e92c70d669a53a5">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd9ac3a3811060314695f33b703c6e11b"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gd9ac3a3811060314695f33b703c6e11b" args="(const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gd9ac3a3811060314695f33b703c6e11b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9412e09fb01fcad8c018ea9cffb28ef"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gc9412e09fb01fcad8c018ea9cffb28ef" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc9412e09fb01fcad8c018ea9cffb28ef">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gaddffeec0e892ac3d6fc7fc2053e1eca"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gaddffeec0e892ac3d6fc7fc2053e1eca" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gaddffeec0e892ac3d6fc7fc2053e1eca">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb175401f0729e40dd2c5860a17c14385"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gb175401f0729e40dd2c5860a17c14385" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gb175401f0729e40dd2c5860a17c14385">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb7f1f1828ae2b330ce05b8513a495154"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gb7f1f1828ae2b330ce05b8513a495154" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gb7f1f1828ae2b330ce05b8513a495154">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gfbc0cc2026d87f11a96bcd62788f5bb5"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gfbc0cc2026d87f11a96bcd62788f5bb5" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gfbc0cc2026d87f11a96bcd62788f5bb5">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g630c90a399937d9d4ae70ff883186dfd"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g630c90a399937d9d4ae70ff883186dfd" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g630c90a399937d9d4ae70ff883186dfd">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g496bd7eadb3b97495ccb5655ef90319e"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g496bd7eadb3b97495ccb5655ef90319e" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g496bd7eadb3b97495ccb5655ef90319e">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00163.html">task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_scan</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_scan_body_req.html">parallel_scan Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ged143f31dd3d96ded02ab3db915b91c7"></a><!-- doxytag: member="tbb::parallel_scan" ref="ged143f31dd3d96ded02ab3db915b91c7" args="(const Range &range, Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a> (const Range &range, Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9fac8870b2e6365fb337014404529df"></a><!-- doxytag: member="tbb::parallel_scan" ref="gc9fac8870b2e6365fb337014404529df" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc9fac8870b2e6365fb337014404529df">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00156.html">simple_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g62fde400a37bbca1a2fddc8e3d22f556"></a><!-- doxytag: member="tbb::parallel_scan" ref="g62fde400a37bbca1a2fddc8e3d22f556" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g62fde400a37bbca1a2fddc8e3d22f556">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_sort</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="parallel_sort_iter_req.html">iterators for parallel_sort</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2">template<typename RandomAccessIterator, typename Compare> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) using the given comparator.  <a href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa"></a><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g16c3eb77d0e530834c51ce3857f01012"></a><!-- doxytag: member="tbb::parallel_sort" ref="g16c3eb77d0e530834c51ce3857f01012" args="(RandomAccessIterator begin, RandomAccessIterator end)" -->
-template<typename RandomAccessIterator> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g16c3eb77d0e530834c51ce3857f01012">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) with a default comparator <code>std::less<RandomAccessIterator></code>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc7576f82fdedc8a701a6c17ad9415926"></a><!-- doxytag: member="tbb::parallel_sort" ref="gc7576f82fdedc8a701a6c17ad9415926" args="(T *begin, T *end)" -->
-template<typename T> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc7576f82fdedc8a701a6c17ad9415926">parallel_sort</a> (T *begin, T *end)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in the range <code></code>[begin,end) with a default comparator <code>std::less<T></code>. <br></td></tr>
-<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fdc2b067a243747d4c3dfe6f3d28476"></a><!-- doxytag: member="tbb::spin_rw_mutex" ref="7fdc2b067a243747d4c3dfe6f3d28476" args="" -->
-typedef <a class="el" href="a00159.html">spin_rw_mutex_v3</a> </td><td class="memItemRight" valign="bottom"><b>spin_rw_mutex</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3d457eb737199125df5ab0cf2f44094"></a><!-- doxytag: member="tbb::stack_size_type" ref="a3d457eb737199125df5ab0cf2f44094" args="" -->
-typedef std::size_t </td><td class="memItemRight" valign="bottom"><b>stack_size_type</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ceb89493291d4b03ce5f062fbaac0653"></a><!-- doxytag: member="tbb::task_scheduler_observer" ref="ceb89493291d4b03ce5f062fbaac0653" args="" -->
-typedef internal::task_scheduler_observer_v3 </td><td class="memItemRight" valign="bottom"><b>task_scheduler_observer</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed375248ff6019a70ca0f9da528e5d0b"></a><!-- doxytag: member="tbb::assertion_handler_type" ref="ed375248ff6019a70ca0f9da528e5d0b" args="(const char *filename, int line, const char *expression, const char *comment)" -->
-typedef void(*) </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> (const char *filename, int line, const char *expression, const char *comment)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for an assertion handler. <br></td></tr>
-<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> { <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>, 
-<a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>, 
-<a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>
- }</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies memory fencing.  <a href="a00224.html#a8686246bb5d3664bd07563749970fef">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> { <b>ets_key_per_instance</b>, 
-<b>ets_no_key</b>
- }</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">enum for selecting between single key and key-per-instance versions <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>task_group_status</b> { <b>not_complete</b>, 
-<b>complete</b>, 
-<b>canceled</b>
- }</td></tr>
-
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e067bc86f20023cf3034f2ac310927b"></a><!-- doxytag: member="tbb::__TBB_DECL_ATOMIC" ref="2e067bc86f20023cf3034f2ac310927b" args="(__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) __TBB_DECL_ATOMIC_ALT(unsigned" -->
- </td><td class="memItemRight" valign="bottom"><b>__TBB_DECL_ATOMIC</b> (__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) __TBB_DECL_ATOMIC_ALT(unsigned</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad165cf61abbe349d413df2589679add"></a><!-- doxytag: member="tbb::__TBB_DECL_ATOMIC_ALT" ref="ad165cf61abbe349d413df2589679add" args="(int, ptrdiff_t) __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) __TBB_DECL_ATOMIC(wchar_t) template< typename T > st [...]
-size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#ad165cf61abbe349d413df2589679add">__TBB_DECL_ATOMIC_ALT</a> (int, ptrdiff_t) __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) __TBB_DECL_ATOMIC(wchar_t) template< typename T > struct <a class="el" href="a00117.html">atomic</a>< T * ></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Specialization for atomic<T*> with arithmetic and operator->. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="7af9509624a62ea848afe775f892ed12"></a><!-- doxytag: member="tbb::operator==" ref="7af9509624a62ea848afe775f892ed12" args="(const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00125.html">cache_aligned_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="426abbf5243087148f5e3767e68c286b"></a><!-- doxytag: member="tbb::operator!=" ref="426abbf5243087148f5e3767e68c286b" args="(const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00125.html">cache_aligned_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="2babc190640003767a3049a4d3c5ee35"></a><!-- doxytag: member="tbb::tbb_hasher" ref="2babc190640003767a3049a4d3c5ee35" args="(const T &t)" -->
-template<typename T> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a> (const T &t)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Hasher functions. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3835d3fac75c3963cbfc312c67ddbba3"></a><!-- doxytag: member="tbb::tbb_hasher" ref="3835d3fac75c3963cbfc312c67ddbba3" args="(P *ptr)" -->
-template<typename P> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (P *ptr)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="057a50bf70efdeabd5756f8698015b0f"></a><!-- doxytag: member="tbb::tbb_hasher" ref="057a50bf70efdeabd5756f8698015b0f" args="(const std::basic_string< E, S, A > &s)" -->
-template<typename E, typename S, typename A> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (const std::basic_string< E, S, A > &s)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="77bb4a96964d4d9cb058a9791bac9b0d"></a><!-- doxytag: member="tbb::tbb_hasher" ref="77bb4a96964d4d9cb058a9791bac9b0d" args="(const std::pair< F, S > &p)" -->
-template<typename F, typename S> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (const std::pair< F, S > &p)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f3609fc523a99c101572fdc68f918d66"></a><!-- doxytag: member="tbb::operator==" ref="f3609fc523a99c101572fdc68f918d66" args="(const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)" -->
-template<typename Key, typename T, typename HashCompare, typename A1, typename A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="2da30ff86b9a39722f45bc35e1c6934d"></a><!-- doxytag: member="tbb::operator!=" ref="2da30ff86b9a39722f45bc35e1c6934d" args="(const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)" -->
-template<typename Key, typename T, typename HashCompare, typename A1, typename A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="817c20df80fe1a933a8557eb76113e24"></a><!-- doxytag: member="tbb::swap" ref="817c20df80fe1a933a8557eb76113e24" args="(concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)" -->
-template<typename Key, typename T, typename HashCompare, typename A> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &a, <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="11419db87ac98110907dda08a24f0949"></a><!-- doxytag: member="tbb::operator==" ref="11419db87ac98110907dda08a24f0949" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="aa9e09f2e9154ffd6658fad8355fb491"></a><!-- doxytag: member="tbb::operator!=" ref="aa9e09f2e9154ffd6658fad8355fb491" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="33267dd805415351956d45b4b5347190"></a><!-- doxytag: member="tbb::operator<" ref="33267dd805415351956d45b4b5347190" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator<</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="14e2968ab20cb714bef1f0352fc152f0"></a><!-- doxytag: member="tbb::operator>" ref="14e2968ab20cb714bef1f0352fc152f0" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator></b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="0042a36a670a397fb52e713edbaecd0e"></a><!-- doxytag: member="tbb::operator<=" ref="0042a36a670a397fb52e713edbaecd0e" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator<=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f70eb1d931473b69ba4bcf93af8baa33"></a><!-- doxytag: member="tbb::operator>=" ref="f70eb1d931473b69ba4bcf93af8baa33" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
-template<typename T, class A1, class A2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator>=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4a3897ea8d8a48e885d764bd7d370d50"></a><!-- doxytag: member="tbb::swap" ref="4a3897ea8d8a48e885d764bd7d370d50" args="(concurrent_vector< T, A > &a, concurrent_vector< T, A > &b)" -->
-template<typename T, class A> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00136.html">concurrent_vector</a>< T, A > &a, <a class="el" href="a00136.html">concurrent_vector</a>< T, A > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="cac990ecc7b1d2088bf5d047801d63a5"></a><!-- doxytag: member="tbb::flatten2d" ref="cac990ecc7b1d2088bf5d047801d63a5" args="(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e)" -->
-template<typename Container> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">flattened2d< Container > </td><td class="memTemplItemRight" valign="bottom"><b>flatten2d</b> (const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b327db9f1ccb9bdfcdbacbf07fac6d10"></a><!-- doxytag: member="tbb::flatten2d" ref="b327db9f1ccb9bdfcdbacbf07fac6d10" args="(const Container &c)" -->
-template<typename Container> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">flattened2d< Container > </td><td class="memTemplItemRight" valign="bottom"><b>flatten2d</b> (const Container &c)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="906ebb461ecb0446989739fd0399e4b8"></a><!-- doxytag: member="tbb::operator==" ref="906ebb461ecb0446989739fd0399e4b8" args="(const scalable_allocator< T > &, const scalable_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00154.html">scalable_allocator</a>< T > &, const <a class="el" href="a00154.html">scalable_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a92757aca0a69082eb8dc223eb257433"></a><!-- doxytag: member="tbb::operator!=" ref="a92757aca0a69082eb8dc223eb257433" args="(const scalable_allocator< T > &, const scalable_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00154.html">scalable_allocator</a>< T > &, const <a class="el" href="a00154.html">scalable_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e2f5baabe173fbf48e94fb9058f1b41"></a><!-- doxytag: member="tbb::is_current_task_group_canceling" ref="7e2f5baabe173fbf48e94fb9058f1b41" args="()" -->
-bool </td><td class="memItemRight" valign="bottom"><b>is_current_task_group_canceling</b> ()</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="c8a46d6c0fe474eb399d0d09c27a4685"></a><!-- doxytag: member="tbb::operator==" ref="c8a46d6c0fe474eb399d0d09c27a4685" args="(const tbb_allocator< T > &, const tbb_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00166.html">tbb_allocator</a>< T > &, const <a class="el" href="a00166.html">tbb_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3d9665c21c894f06f1614947103dc9d6"></a><!-- doxytag: member="tbb::operator!=" ref="3d9665c21c894f06f1614947103dc9d6" args="(const tbb_allocator< T > &, const tbb_allocator< U > &)" -->
-template<typename T, typename U> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00166.html">tbb_allocator</a>< T > &, const <a class="el" href="a00166.html">tbb_allocator</a>< U > &)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b64fb7e52f0049b5a103cbb6fb5814f0"></a><!-- doxytag: member="tbb::operator==" ref="b64fb7e52f0049b5a103cbb6fb5814f0" args="(const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)" -->
-template<typename T1, template< typename X1 > class B1, typename T2, template< typename X2 > class B2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00175.html">zero_allocator</a>< T1, B1 > &a, const <a class="el" href="a00175.html">zero_allocator</a>< T2, B2 > &b)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ae43b5151d0220fe3ade0b447cd64f0d"></a><!-- doxytag: member="tbb::operator!=" ref="ae43b5151d0220fe3ade0b447cd64f0d" args="(const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)" -->
-template<typename T1, template< typename X1 > class B1, typename T2, template< typename X2 > class B2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00175.html">zero_allocator</a>< T1, B1 > &a, const <a class="el" href="a00175.html">zero_allocator</a>< T2, B2 > &b)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="823fa1c15dd829d1d9167157450ddcd9"></a><!-- doxytag: member="tbb::set_assertion_handler" ref="823fa1c15dd829d1d9167157450ddcd9" args="(assertion_handler_type new_handler)" -->
-<a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a> (<a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Set assertion handler and return previous value of it. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a> (const char *filename, int line, const char *expression, const char *comment)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Process an assertion failure.  <a href="#3d1252787be39b4aef311f1cadaff9e8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a> ()</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">The function returns the interface version of the TBB shared library being used.  <a href="#a6858b22e90041c9c4669674ff39b056"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a42aa5dbcf06ba86c71efb73d8311c3"></a><!-- doxytag: member="tbb::operator-" ref="6a42aa5dbcf06ba86c71efb73d8311c3" args="(const tick_count &t1, const tick_count &t0)" -->
-<a class="el" href="a00173.html">tick_count::interval_t</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00172.html">tick_count</a> &t1, const <a class="el" href="a00172.html">tick_count</a> &t0)</td></tr>
-
-<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6902d551186a654ffbf88582d4a0bdfa"></a><!-- doxytag: member="tbb::hash_multiplier" ref="6902d551186a654ffbf88582d4a0bdfa" args="" -->
-static const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00224.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a> = sizeof(size_t)==4? 2654435769U : 11400714819323198485ULL</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash multiplier. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-The namespace tbb contains all components of the library. <hr><h2>Enumeration Type Documentation</h2>
-<a class="anchor" name="a8686246bb5d3664bd07563749970fef"></a><!-- doxytag: member="tbb::memory_semantics" ref="a8686246bb5d3664bd07563749970fef" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">enum <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef">tbb::memory_semantics</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Specifies memory fencing. 
-<p>
-<dl compact><dt><b>Enumerator: </b></dt><dd>
-<table border="0" cellspacing="2" cellpadding="0">
-<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c"></a><!-- doxytag: member="__TBB_full_fence" ref="a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c" args="" -->__TBB_full_fence</em> </td><td>
-For internal use only. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7"></a><!-- doxytag: member="acquire" ref="a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7" args="" -->acquire</em> </td><td>
-Acquire fence. </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70"></a><!-- doxytag: member="release" ref="a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70" args="" -->release</em> </td><td>
-Release fence. </td></tr>
-</table>
-</dl>
-
-</div>
-</div><p>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="3d1252787be39b4aef311f1cadaff9e8"></a><!-- doxytag: member="tbb::assertion_failure" ref="3d1252787be39b4aef311f1cadaff9e8" args="(const char *filename, int line, const char *expression, const char *comment)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void __TBB_EXPORTED_FUNC tbb::assertion_failure           </td>
-          <td>(</td>
-          <td class="paramtype">const char * </td>
-          <td class="paramname"> <em>filename</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int </td>
-          <td class="paramname"> <em>line</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char * </td>
-          <td class="paramname"> <em>expression</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char * </td>
-          <td class="paramname"> <em>comment</em></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Process an assertion failure. 
-<p>
-Normally called from __TBB_ASSERT macro. If assertion handler is null, print message for assertion failure and abort. Otherwise call the assertion handler. 
-</div>
-</div><p>
-<a class="anchor" name="a6858b22e90041c9c4669674ff39b056"></a><!-- doxytag: member="tbb::TBB_runtime_interface_version" ref="a6858b22e90041c9c4669674ff39b056" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int __TBB_EXPORTED_FUNC tbb::TBB_runtime_interface_version           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td> ) </td>
-          <td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-The function returns the interface version of the TBB shared library being used. 
-<p>
-The version it returns is determined at runtime, not at compile/link time. So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. 
-</div>
-</div><p>
-<hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00228.html b/doc/html/a00228.html
deleted file mode 100644
index 8f0483f..0000000
--- a/doc/html/a00228.html
+++ /dev/null
@@ -1,344 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>Algorithms</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<h1>Algorithms</h1><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00122.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A 2-dimensional range that models the Range concept.  <a href="a00123.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A 3-dimensional range that models the Range concept.  <a href="a00124.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html">tbb::pre_scan_tag</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the initial scan is being performed.  <a href="a00147.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html">tbb::final_scan_tag</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the final scan is being performed.  <a href="a00140.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a stream, with optional addition of more work.  <a href="a00145.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html">tbb::simple_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner.  <a href="a00156.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html">tbb::auto_partitioner</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <a href="a00120.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html">tbb::filter</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00139.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline served by a user thread.  <a href="a00171.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html">tbb::pipeline</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00146.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">tbb::split</a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Dummy type that distinguishes splitting constructor from copy constructor.  <a href="a00161.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_do</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="parallel_do_body_req.html">parallel_do Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3383e2703977012b6f384d673410f1f7"></a><!-- doxytag: member="algorithms::parallel_do" ref="g3383e2703977012b6f384d673410f1f7" args="(Iterator first, Iterator last, const Body &body)" -->
-template<typename Iterator, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2617dc9b88b3285a7212599d49f74228"></a><!-- doxytag: member="algorithms::parallel_do" ref="g2617dc9b88b3285a7212599d49f74228" args="(Iterator first, Iterator last, const Body &body, task_group_context &context)" -->
-template<typename Iterator, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g2617dc9b88b3285a7212599d49f74228">tbb::parallel_do</a> (Iterator first, Iterator last, const Body &body, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_for</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_for_body_req.html">parallel_for Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g68cc046ef72c42ce205fccbc435a0d81"></a><!-- doxytag: member="algorithms::parallel_for" ref="g68cc046ef72c42ce205fccbc435a0d81" args="(const Range &range, const Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">tbb::parallel_for</a> (const Range &range, const Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g13cac5dd55c7533bccea43a51c33d0e5"></a><!-- doxytag: member="algorithms::parallel_for" ref="g13cac5dd55c7533bccea43a51c33d0e5" args="(const Range &range, const Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g13cac5dd55c7533bccea43a51c33d0e5">tbb::parallel_for</a> (const Range &range, const Body &body, const simple_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga7ac75d532389b55b9247f3fdb0b00d1"></a><!-- doxytag: member="algorithms::parallel_for" ref="ga7ac75d532389b55b9247f3fdb0b00d1" args="(const Range &range, const Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#ga7ac75d532389b55b9247f3fdb0b00d1">tbb::parallel_for</a> (const Range &range, const Body &body, const auto_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g9cd1b210ceb1c040f30e390b4a21bde8"></a><!-- doxytag: member="algorithms::parallel_for" ref="g9cd1b210ceb1c040f30e390b4a21bde8" args="(const Range &range, const Body &body, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g9cd1b210ceb1c040f30e390b4a21bde8">tbb::parallel_for</a> (const Range &range, const Body &body, affinity_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2d317a5e0078cd193125439fed60dfdc"></a><!-- doxytag: member="algorithms::parallel_for" ref="g2d317a5e0078cd193125439fed60dfdc" args="(const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g2d317a5e0078cd193125439fed60dfdc">tbb::parallel_for</a> (const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c0700e3f85e83a788ff3ede88ebb7e9"></a><!-- doxytag: member="algorithms::parallel_for" ref="g1c0700e3f85e83a788ff3ede88ebb7e9" args="(const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1c0700e3f85e83a788ff3ede88ebb7e9">tbb::parallel_for</a> (const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g04b4696b67370c01353ff5974c8f1196"></a><!-- doxytag: member="algorithms::parallel_for" ref="g04b4696b67370c01353ff5974c8f1196" args="(const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g04b4696b67370c01353ff5974c8f1196">tbb::parallel_for</a> (const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_for_each</h2></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g99b24f5d0e90aa76fd5f089e263a99b4"></a><!-- doxytag: member="algorithms::parallel_for_each" ref="g99b24f5d0e90aa76fd5f089e263a99b4" args="(Input_iterator _First, Input_iterator _Last, Function _Func, task_group_context &context)" -->
-template<typename Input_iterator, typename Function> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g99b24f5d0e90aa76fd5f089e263a99b4">tbb::parallel_for_each</a> (Input_iterator _First, Input_iterator _Last, Function _Func, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls function _Func for all items from [_First, Last) interval using user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g59794cb24f74cda4253fd9aed0a4b150"></a><!-- doxytag: member="algorithms::parallel_for_each" ref="g59794cb24f74cda4253fd9aed0a4b150" args="(Input_iterator _First, Input_iterator _Last, Function _Func)" -->
-template<typename Input_iterator, typename Function> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g59794cb24f74cda4253fd9aed0a4b150">tbb::parallel_for_each</a> (Input_iterator _First, Input_iterator _Last, Function _Func)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">uses default context <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_invoke</h2></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbaadafdb93d290acec86e07fc8909c29"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gbaadafdb93d290acec86e07fc8909c29" args="(F0 f0, F1 f1, tbb::task_group_context &context)" -->
-template<typename F0, typename F1> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">tbb::parallel_invoke</a> (F0 f0, F1 f1, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Executes a list of tasks in parallel and waits for all tasks to complete. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3cbf43007d0caeb4a2470265f50b25df"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3cbf43007d0caeb4a2470265f50b25df" args="(F0 f0, F1 f1, F2 f2, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g063924a497ba64c49351e80e39bd2c17"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g063924a497ba64c49351e80e39bd2c17" args="(F0 f0, F1 f1, F2 f2, F3 f3, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2ca8b49b9b36515247e45ffd9c0c11cf"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g2ca8b49b9b36515247e45ffd9c0c11cf" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g559685c3c13e103c6d570efef419c2b9"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g559685c3c13e103c6d570efef419c2b9" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd979d007cc4026c34691a4b38edd36af"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gd979d007cc4026c34691a4b38edd36af" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd01a5d8f4902387d9081352e1edd1632"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gd01a5d8f4902387d9081352e1edd1632" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0a66bfc0ac0691dfa71d230f5c8c3e96"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g0a66bfc0ac0691dfa71d230f5c8c3e96" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7182f6b5c88469cfc2b7c2ebbbd4a28c"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g7182f6b5c88469cfc2b7c2ebbbd4a28c" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, tbb::task_group_context &context)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="el" href="a00163.html">tbb::task_group_context</a> &context)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb999ec5f8b7f0b68b9752f11ad39ab08"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gb999ec5f8b7f0b68b9752f11ad39ab08" args="(F0 f0, F1 f1)" -->
-template<typename F0, typename F1> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd" args="(F0 f0, F1 f1, F2 f2)" -->
-template<typename F0, typename F1, typename F2> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g89c0569d95abd182f80acc38d0dbe2d4"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g89c0569d95abd182f80acc38d0dbe2d4" args="(F0 f0, F1 f1, F2 f2, F3 f3)" -->
-template<typename F0, typename F1, typename F2, typename F3> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3ef71e9441745fe708e66a0b817bebc7"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3ef71e9441745fe708e66a0b817bebc7" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g78fa19efd1a7cf7ffd1c23251c80b31d"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g78fa19efd1a7cf7ffd1c23251c80b31d" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gab2e69dbef9b3f0e658cf4b8e574f552"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gab2e69dbef9b3f0e658cf4b8e574f552" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g262f0347e5690bb692b6dc26e26b9ebe"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g262f0347e5690bb692b6dc26e26b9ebe" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g06a090fbd0eaaccf20e2409a2a222733"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g06a090fbd0eaaccf20e2409a2a222733" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)</td></tr>
-
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3330e3c33053875705e19e29eda37627"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3330e3c33053875705e19e29eda37627" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)" -->
-template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)</td></tr>
-
-<tr><td colspan="2"><br><h2>parallel_reduce</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_reduce_body_req.html">parallel_reduce Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1b3d59c5eb62683c5754db6970392fa3"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g1b3d59c5eb62683c5754db6970392fa3" args="(const Range &range, Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">tbb::parallel_reduce</a> (const Range &range, Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gec1b7c03f9da909bef5db12e3d41bed3"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gec1b7c03f9da909bef5db12e3d41bed3" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gec1b7c03f9da909bef5db12e3d41bed3">tbb::parallel_reduce</a> (const Range &range, Body &body, const simple_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g18a19157e6245992fc00ca0adeb7dd37"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g18a19157e6245992fc00ca0adeb7dd37" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g18a19157e6245992fc00ca0adeb7dd37">tbb::parallel_reduce</a> (const Range &range, Body &body, const auto_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc61e73fcc36c92d79a217fc355ff4a6b"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gc61e73fcc36c92d79a217fc355ff4a6b" args="(const Range &range, Body &body, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc61e73fcc36c92d79a217fc355ff4a6b">tbb::parallel_reduce</a> (const Range &range, Body &body, affinity_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g45cb00c42a18e334bbde8b7535afe460"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g45cb00c42a18e334bbde8b7535afe460" args="(const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g45cb00c42a18e334bbde8b7535afe460">tbb::parallel_reduce</a> (const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c1ea1d7c61b3c225e92c70d669a53a5"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g1c1ea1d7c61b3c225e92c70d669a53a5" args="(const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g1c1ea1d7c61b3c225e92c70d669a53a5">tbb::parallel_reduce</a> (const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd9ac3a3811060314695f33b703c6e11b"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gd9ac3a3811060314695f33b703c6e11b" args="(const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gd9ac3a3811060314695f33b703c6e11b">tbb::parallel_reduce</a> (const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9412e09fb01fcad8c018ea9cffb28ef"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gc9412e09fb01fcad8c018ea9cffb28ef" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc9412e09fb01fcad8c018ea9cffb28ef">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gaddffeec0e892ac3d6fc7fc2053e1eca"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gaddffeec0e892ac3d6fc7fc2053e1eca" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gaddffeec0e892ac3d6fc7fc2053e1eca">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb175401f0729e40dd2c5860a17c14385"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gb175401f0729e40dd2c5860a17c14385" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gb175401f0729e40dd2c5860a17c14385">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb7f1f1828ae2b330ce05b8513a495154"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gb7f1f1828ae2b330ce05b8513a495154" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gb7f1f1828ae2b330ce05b8513a495154">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gfbc0cc2026d87f11a96bcd62788f5bb5"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gfbc0cc2026d87f11a96bcd62788f5bb5" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gfbc0cc2026d87f11a96bcd62788f5bb5">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g630c90a399937d9d4ae70ff883186dfd"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g630c90a399937d9d4ae70ff883186dfd" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g630c90a399937d9d4ae70ff883186dfd">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g496bd7eadb3b97495ccb5655ef90319e"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g496bd7eadb3b97495ccb5655ef90319e" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)" -->
-template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g496bd7eadb3b97495ccb5655ef90319e">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_scan</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_scan_body_req.html">parallel_scan Body</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ged143f31dd3d96ded02ab3db915b91c7"></a><!-- doxytag: member="algorithms::parallel_scan" ref="ged143f31dd3d96ded02ab3db915b91c7" args="(const Range &range, Body &body)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">tbb::parallel_scan</a> (const Range &range, Body &body)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with default partitioner. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9fac8870b2e6365fb337014404529df"></a><!-- doxytag: member="algorithms::parallel_scan" ref="gc9fac8870b2e6365fb337014404529df" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc9fac8870b2e6365fb337014404529df">tbb::parallel_scan</a> (const Range &range, Body &body, const simple_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00156.html">simple_partitioner</a>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g62fde400a37bbca1a2fddc8e3d22f556"></a><!-- doxytag: member="algorithms::parallel_scan" ref="g62fde400a37bbca1a2fddc8e3d22f556" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
-template<typename Range, typename Body> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb::parallel_scan</a> (const Range &range, Body &body, const auto_partitioner &partitioner)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
-<tr><td colspan="2"><br><h2>parallel_sort</h2></td></tr>
-<tr><td colspan="2">See also requirements on <a class="el" href="parallel_sort_iter_req.html">iterators for parallel_sort</a>. <br><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2">template<typename RandomAccessIterator, typename Compare> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">tbb::parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) using the given comparator.  <a href="#g49edcf9447cd91a9527a3f8e8512b7aa"></a><br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g16c3eb77d0e530834c51ce3857f01012"></a><!-- doxytag: member="algorithms::parallel_sort" ref="g16c3eb77d0e530834c51ce3857f01012" args="(RandomAccessIterator begin, RandomAccessIterator end)" -->
-template<typename RandomAccessIterator> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#g16c3eb77d0e530834c51ce3857f01012">tbb::parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) with a default comparator <code>std::less<RandomAccessIterator></code>. <br></td></tr>
-<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc7576f82fdedc8a701a6c17ad9415926"></a><!-- doxytag: member="algorithms::parallel_sort" ref="gc7576f82fdedc8a701a6c17ad9415926" args="(T *begin, T *end)" -->
-template<typename T> </td></tr>
-<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00228.html#gc7576f82fdedc8a701a6c17ad9415926">tbb::parallel_sort</a> (T *begin, T *end)</td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in the range <code></code>[begin,end) with a default comparator <code>std::less<T></code>. <br></td></tr>
-</table>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="g49edcf9447cd91a9527a3f8e8512b7aa"></a><!-- doxytag: member="tbb::parallel_sort" ref="g49edcf9447cd91a9527a3f8e8512b7aa" args="(RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)" -->
-<div class="memitem">
-<div class="memproto">
-<div class="memtemplate">
-template<typename RandomAccessIterator, typename Compare> </div>
-      <table class="memname">
-        <tr>
-          <td class="memname">void tbb::parallel_sort           </td>
-          <td>(</td>
-          <td class="paramtype">RandomAccessIterator </td>
-          <td class="paramname"> <em>begin</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">RandomAccessIterator </td>
-          <td class="paramname"> <em>end</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Compare & </td>
-          <td class="paramname"> <em>comp</em></td><td> </td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td width="100%"></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Sorts the data in [begin,end) using the given comparator. 
-<p>
-The compare function object is used for all comparisons between elements during sorting. The compare object must define a bool operator() function. 
-</div>
-</div><p>
-<hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00229.html b/doc/html/a00229.html
index 4147d05..af07ca4 100644
--- a/doc/html/a00229.html
+++ b/doc/html/a00229.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>Containers</title>
+<title>tbb Namespace Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -9,33 +9,680 @@
   <ul>
     <li><a href="index.html"><span>Main Page</span></a></li>
     <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li id="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
     <li><a href="annotated.html"><span>Classes</span></a></li>
     <li><a href="files.html"><span>Files</span></a></li>
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
-<h1>Containers</h1><table border="0" cellpadding="0" cellspacing="0">
+<div class="tabs">
+  <ul>
+    <li><a href="namespaces.html"><span>Namespace List</span></a></li>
+    <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
+  </ul></div>
+<h1>tbb Namespace Reference</h1>The namespace tbb contains all components of the library.  
+<a href="#_details">More...</a>
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html">tbb::combinable< T ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html">aligned_space</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Block of space aligned sufficiently to construct an array T with N elements.  <a href="a00116.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html">atomic</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Primary template for atomic.  <a href="a00117.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00118.html">atomic< void * ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Specialization for <a class="el" href="a00118.html">atomic<void*></a>, for sake of not allowing arithmetic or operator->.  <a href="a00118.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html">blocked_range</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00122.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html">blocked_range2d</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A 2-dimensional range that models the Range concept.  <a href="a00123.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html">blocked_range3d</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A 3-dimensional range that models the Range concept.  <a href="a00124.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html">cache_aligned_allocator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00125.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00126.html">cache_aligned_allocator< void ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00126.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html">combinable</a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Thread-local storage with optional reduction.  <a href="a00128.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00174.html">tbb_hash_compare</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Unordered map from Key to T.  <a href="a00130.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">hash_compare - default argument  <a href="a00174.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html">concurrent_hash_map</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe non-blocking concurrent queue.  <a href="a00134.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Unordered map from Key to T.  <a href="a00130.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html">concurrent_bounded_queue</a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe blocking concurrent bounded queue.  <a href="a00129.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td></tr>
-
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe blocking concurrent bounded queue.  <a href="a00135.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html">concurrent_vector</a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Concurrent vector container.  <a href="a00136.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00138.html">enumerable_thread_specific</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The thread local class template.  <a href="a00138.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>flattened2d</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html">mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around the platform's native reader-writer lock.  <a href="a00142.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html">null_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A mutex which does nothing.  <a href="a00144.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html">null_rw_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A rw mutex which does nothing.  <a href="a00146.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00148.html">parallel_do_feeder</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class the user supplied algorithm body uses to add new tasks.  <a href="a00148.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html">pre_scan_tag</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the initial scan is being performed.  <a href="a00151.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html">final_scan_tag</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the final scan is being performed.  <a href="a00140.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html">parallel_while</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a stream, with optional addition of more work.  <a href="a00149.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html">simple_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner.  <a href="a00160.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html">auto_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <a href="a00120.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html">affinity_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An affinity partitioner.  <a href="a00115.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html">filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00139.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html">thread_bound_filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline served by a user thread.  <a href="a00175.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html">pipeline</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00150.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html">queuing_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <a href="a00152.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html">queuing_rw_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Reader-writer lock with local-only spinning.  <a href="a00154.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html">recursive_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Mutex that allows recursive mutex acquisition.  <a href="a00156.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html">scalable_allocator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00158.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">scalable_allocator< void ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00159.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">spin_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A lock that occupies a single byte.  <a href="a00161.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">spin_rw_mutex_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <a href="a00163.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html">task_group_context</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00167.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html">task</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00166.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html">empty_task</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00137.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html">task_list</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00168.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>task_handle</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>task_group</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>missing_wait</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><b>structured_task_group</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html">task_scheduler_init</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00169.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html">tbb_allocator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00170.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">tbb_allocator< void ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00171.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html">zero_allocator</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00179.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html">zero_allocator< void, Allocator ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00180.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00121.html">bad_last_alloc</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Exception for concurrent containers.  <a href="a00121.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html">tbb_exception</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.  <a href="a00172.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html">captured_exception</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">This class is used by TBB to propagate information about unhandled exceptions into the root thread.  <a href="a00127.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00141.html">movable_exception</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.  <a href="a00141.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html">split</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Dummy type that distinguishes splitting constructor from copy constructor.  <a href="a00165.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html">tick_count</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00176.html#_details">More...</a><br></td></tr>
+<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00232.html">strict_ppl</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">For internal use only. <br></td></tr>
+
+<p>
+<tr><td colspan="2"><br><h2>parallel_do</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="parallel_do_body_req.html">parallel_do Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3383e2703977012b6f384d673410f1f7"></a><!-- doxytag: member="tbb::parallel_do" ref="g3383e2703977012b6f384d673410f1f7" args="(Iterator first, Iterator last, const Body &body)" -->
+template<typename Iterator, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2617dc9b88b3285a7212599d49f74228"></a><!-- doxytag: member="tbb::parallel_do" ref="g2617dc9b88b3285a7212599d49f74228" args="(Iterator first, Iterator last, const Body &body, task_group_context &context)" -->
+template<typename Iterator, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g2617dc9b88b3285a7212599d49f74228">parallel_do</a> (Iterator first, Iterator last, const Body &body, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_for</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_for_body_req.html">parallel_for Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g68cc046ef72c42ce205fccbc435a0d81"></a><!-- doxytag: member="tbb::parallel_for" ref="g68cc046ef72c42ce205fccbc435a0d81" args="(const Range &range, const Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a> (const Range &range, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g13cac5dd55c7533bccea43a51c33d0e5"></a><!-- doxytag: member="tbb::parallel_for" ref="g13cac5dd55c7533bccea43a51c33d0e5" args="(const Range &range, const Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g13cac5dd55c7533bccea43a51c33d0e5">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga7ac75d532389b55b9247f3fdb0b00d1"></a><!-- doxytag: member="tbb::parallel_for" ref="ga7ac75d532389b55b9247f3fdb0b00d1" args="(const Range &range, const Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#ga7ac75d532389b55b9247f3fdb0b00d1">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g9cd1b210ceb1c040f30e390b4a21bde8"></a><!-- doxytag: member="tbb::parallel_for" ref="g9cd1b210ceb1c040f30e390b4a21bde8" args="(const Range &range, const Body &body, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g9cd1b210ceb1c040f30e390b4a21bde8">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2d317a5e0078cd193125439fed60dfdc"></a><!-- doxytag: member="tbb::parallel_for" ref="g2d317a5e0078cd193125439fed60dfdc" args="(const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g2d317a5e0078cd193125439fed60dfdc">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c0700e3f85e83a788ff3ede88ebb7e9"></a><!-- doxytag: member="tbb::parallel_for" ref="g1c0700e3f85e83a788ff3ede88ebb7e9" args="(const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1c0700e3f85e83a788ff3ede88ebb7e9">parallel_for</a> (const Range &range, const Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g04b4696b67370c01353ff5974c8f1196"></a><!-- doxytag: member="tbb::parallel_for" ref="g04b4696b67370c01353ff5974c8f1196" args="(const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g04b4696b67370c01353ff5974c8f1196">parallel_for</a> (const Range &range, const Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_for_each</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbcb40499f038fd82deca88366b404790"></a><!-- doxytag: member="tbb::parallel_for_each" ref="gbcb40499f038fd82deca88366b404790" args="(InputIterator first, InputIterator last, Function f, task_group_context &context)" -->
+template<typename InputIterator, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gbcb40499f038fd82deca88366b404790">parallel_for_each</a> (InputIterator first, InputIterator last, Function f, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls function f for all items from [first, last) interval using user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g85a58ff0853f129adb6f9e4355326ccc"></a><!-- doxytag: member="tbb::parallel_for_each" ref="g85a58ff0853f129adb6f9e4355326ccc" args="(InputIterator first, InputIterator last, Function f)" -->
+template<typename InputIterator, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g85a58ff0853f129adb6f9e4355326ccc">parallel_for_each</a> (InputIterator first, InputIterator last, Function f)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Uses default context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_invoke</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbaadafdb93d290acec86e07fc8909c29"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gbaadafdb93d290acec86e07fc8909c29" args="(F0 f0, F1 f1, tbb::task_group_context &context)" -->
+template<typename F0, typename F1> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a> (F0 f0, F1 f1, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Executes a list of tasks in parallel and waits for all tasks to complete. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3cbf43007d0caeb4a2470265f50b25df"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3cbf43007d0caeb4a2470265f50b25df" args="(F0 f0, F1 f1, F2 f2, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g063924a497ba64c49351e80e39bd2c17"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g063924a497ba64c49351e80e39bd2c17" args="(F0 f0, F1 f1, F2 f2, F3 f3, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2ca8b49b9b36515247e45ffd9c0c11cf"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g2ca8b49b9b36515247e45ffd9c0c11cf" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g559685c3c13e103c6d570efef419c2b9"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g559685c3c13e103c6d570efef419c2b9" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd979d007cc4026c34691a4b38edd36af"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gd979d007cc4026c34691a4b38edd36af" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd01a5d8f4902387d9081352e1edd1632"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gd01a5d8f4902387d9081352e1edd1632" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0a66bfc0ac0691dfa71d230f5c8c3e96"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g0a66bfc0ac0691dfa71d230f5c8c3e96" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7182f6b5c88469cfc2b7c2ebbbd4a28c"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g7182f6b5c88469cfc2b7c2ebbbd4a28c" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb999ec5f8b7f0b68b9752f11ad39ab08"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gb999ec5f8b7f0b68b9752f11ad39ab08" args="(F0 f0, F1 f1)" -->
+template<typename F0, typename F1> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd" args="(F0 f0, F1 f1, F2 f2)" -->
+template<typename F0, typename F1, typename F2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g89c0569d95abd182f80acc38d0dbe2d4"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g89c0569d95abd182f80acc38d0dbe2d4" args="(F0 f0, F1 f1, F2 f2, F3 f3)" -->
+template<typename F0, typename F1, typename F2, typename F3> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3ef71e9441745fe708e66a0b817bebc7"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3ef71e9441745fe708e66a0b817bebc7" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g78fa19efd1a7cf7ffd1c23251c80b31d"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g78fa19efd1a7cf7ffd1c23251c80b31d" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gab2e69dbef9b3f0e658cf4b8e574f552"></a><!-- doxytag: member="tbb::parallel_invoke" ref="gab2e69dbef9b3f0e658cf4b8e574f552" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g262f0347e5690bb692b6dc26e26b9ebe"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g262f0347e5690bb692b6dc26e26b9ebe" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g06a090fbd0eaaccf20e2409a2a222733"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g06a090fbd0eaaccf20e2409a2a222733" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3330e3c33053875705e19e29eda37627"></a><!-- doxytag: member="tbb::parallel_invoke" ref="g3330e3c33053875705e19e29eda37627" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)</td></tr>
+
+<tr><td colspan="2"><br><h2>parallel_reduce</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_reduce_body_req.html">parallel_reduce Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1b3d59c5eb62683c5754db6970392fa3"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g1b3d59c5eb62683c5754db6970392fa3" args="(const Range &range, Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a> (const Range &range, Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gec1b7c03f9da909bef5db12e3d41bed3"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gec1b7c03f9da909bef5db12e3d41bed3" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gec1b7c03f9da909bef5db12e3d41bed3">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g18a19157e6245992fc00ca0adeb7dd37"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g18a19157e6245992fc00ca0adeb7dd37" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g18a19157e6245992fc00ca0adeb7dd37">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc61e73fcc36c92d79a217fc355ff4a6b"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gc61e73fcc36c92d79a217fc355ff4a6b" args="(const Range &range, Body &body, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc61e73fcc36c92d79a217fc355ff4a6b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g45cb00c42a18e334bbde8b7535afe460"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g45cb00c42a18e334bbde8b7535afe460" args="(const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g45cb00c42a18e334bbde8b7535afe460">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c1ea1d7c61b3c225e92c70d669a53a5"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g1c1ea1d7c61b3c225e92c70d669a53a5" args="(const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1c1ea1d7c61b3c225e92c70d669a53a5">parallel_reduce</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd9ac3a3811060314695f33b703c6e11b"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gd9ac3a3811060314695f33b703c6e11b" args="(const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gd9ac3a3811060314695f33b703c6e11b">parallel_reduce</a> (const Range &range, Body &body, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9412e09fb01fcad8c018ea9cffb28ef"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gc9412e09fb01fcad8c018ea9cffb28ef" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc9412e09fb01fcad8c018ea9cffb28ef">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gaddffeec0e892ac3d6fc7fc2053e1eca"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gaddffeec0e892ac3d6fc7fc2053e1eca" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gaddffeec0e892ac3d6fc7fc2053e1eca">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb175401f0729e40dd2c5860a17c14385"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gb175401f0729e40dd2c5860a17c14385" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gb175401f0729e40dd2c5860a17c14385">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb7f1f1828ae2b330ce05b8513a495154"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gb7f1f1828ae2b330ce05b8513a495154" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gb7f1f1828ae2b330ce05b8513a495154">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gfbc0cc2026d87f11a96bcd62788f5bb5"></a><!-- doxytag: member="tbb::parallel_reduce" ref="gfbc0cc2026d87f11a96bcd62788f5bb5" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gfbc0cc2026d87f11a96bcd62788f5bb5">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g630c90a399937d9d4ae70ff883186dfd"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g630c90a399937d9d4ae70ff883186dfd" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g630c90a399937d9d4ae70ff883186dfd">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g496bd7eadb3b97495ccb5655ef90319e"></a><!-- doxytag: member="tbb::parallel_reduce" ref="g496bd7eadb3b97495ccb5655ef90319e" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g496bd7eadb3b97495ccb5655ef90319e">parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, <a class="el" href="a00115.html">affinity_partitioner</a> &partitioner, <a class="el" href="a00167.html">task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_scan</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_scan_body_req.html">parallel_scan Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ged143f31dd3d96ded02ab3db915b91c7"></a><!-- doxytag: member="tbb::parallel_scan" ref="ged143f31dd3d96ded02ab3db915b91c7" args="(const Range &range, Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a> (const Range &range, Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9fac8870b2e6365fb337014404529df"></a><!-- doxytag: member="tbb::parallel_scan" ref="gc9fac8870b2e6365fb337014404529df" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc9fac8870b2e6365fb337014404529df">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00160.html">simple_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g62fde400a37bbca1a2fddc8e3d22f556"></a><!-- doxytag: member="tbb::parallel_scan" ref="g62fde400a37bbca1a2fddc8e3d22f556" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g62fde400a37bbca1a2fddc8e3d22f556">parallel_scan</a> (const Range &range, Body &body, const <a class="el" href="a00120.html">auto_partitioner</a> &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_sort</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="parallel_sort_iter_req.html">iterators for parallel_sort</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename RandomAccessIterator, typename Compare> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) using the given comparator.  <a href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g16c3eb77d0e530834c51ce3857f01012"></a><!-- doxytag: member="tbb::parallel_sort" ref="g16c3eb77d0e530834c51ce3857f01012" args="(RandomAccessIterator begin, RandomAccessIterator end)" -->
+template<typename RandomAccessIterator> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g16c3eb77d0e530834c51ce3857f01012">parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) with a default comparator <code>std::less<RandomAccessIterator></code>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc7576f82fdedc8a701a6c17ad9415926"></a><!-- doxytag: member="tbb::parallel_sort" ref="gc7576f82fdedc8a701a6c17ad9415926" args="(T *begin, T *end)" -->
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc7576f82fdedc8a701a6c17ad9415926">parallel_sort</a> (T *begin, T *end)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in the range <code></code>[begin,end) with a default comparator <code>std::less<T></code>. <br></td></tr>
+<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fdc2b067a243747d4c3dfe6f3d28476"></a><!-- doxytag: member="tbb::spin_rw_mutex" ref="7fdc2b067a243747d4c3dfe6f3d28476" args="" -->
+typedef <a class="el" href="a00163.html">spin_rw_mutex_v3</a> </td><td class="memItemRight" valign="bottom"><b>spin_rw_mutex</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3d457eb737199125df5ab0cf2f44094"></a><!-- doxytag: member="tbb::stack_size_type" ref="a3d457eb737199125df5ab0cf2f44094" args="" -->
+typedef std::size_t </td><td class="memItemRight" valign="bottom"><b>stack_size_type</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ceb89493291d4b03ce5f062fbaac0653"></a><!-- doxytag: member="tbb::task_scheduler_observer" ref="ceb89493291d4b03ce5f062fbaac0653" args="" -->
+typedef internal::task_scheduler_observer_v3 </td><td class="memItemRight" valign="bottom"><b>task_scheduler_observer</b></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed375248ff6019a70ca0f9da528e5d0b"></a><!-- doxytag: member="tbb::assertion_handler_type" ref="ed375248ff6019a70ca0f9da528e5d0b" args="(const char *filename, int line, const char *expression, const char *comment)" -->
+typedef void(*) </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> (const char *filename, int line, const char *expression, const char *comment)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Type for an assertion handler. <br></td></tr>
+<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> { <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>, 
+<a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>, 
+<a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Specifies memory fencing.  <a href="a00229.html#a8686246bb5d3664bd07563749970fef">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> { <b>ets_key_per_instance</b>, 
+<b>ets_no_key</b>
+ }</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">enum for selecting between single key and key-per-instance versions <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><b>task_group_status</b> { <b>not_complete</b>, 
+<b>complete</b>, 
+<b>canceled</b>
+ }</td></tr>
+
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e067bc86f20023cf3034f2ac310927b"></a><!-- doxytag: member="tbb::__TBB_DECL_ATOMIC" ref="2e067bc86f20023cf3034f2ac310927b" args="(__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) __TBB_DECL_ATOMIC_ALT(unsigned" -->
+ </td><td class="memItemRight" valign="bottom"><b>__TBB_DECL_ATOMIC</b> (__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) __TBB_DECL_ATOMIC_ALT(unsigned</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad165cf61abbe349d413df2589679add"></a><!-- doxytag: member="tbb::__TBB_DECL_ATOMIC_ALT" ref="ad165cf61abbe349d413df2589679add" args="(int, ptrdiff_t) __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) __TBB_DECL_ATOMIC(wchar_t) template< typename T > st [...]
+size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#ad165cf61abbe349d413df2589679add">__TBB_DECL_ATOMIC_ALT</a> (int, ptrdiff_t) __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) __TBB_DECL_ATOMIC(wchar_t) template< typename T > struct <a class="el" href="a00117.html">atomic</a>< T * ></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Specialization for atomic<T*> with arithmetic and operator->. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="7af9509624a62ea848afe775f892ed12"></a><!-- doxytag: member="tbb::operator==" ref="7af9509624a62ea848afe775f892ed12" args="(const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00125.html">cache_aligned_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="426abbf5243087148f5e3767e68c286b"></a><!-- doxytag: member="tbb::operator!=" ref="426abbf5243087148f5e3767e68c286b" args="(const cache_aligned_allocator< T > &, const cache_aligned_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00125.html">cache_aligned_allocator</a>< T > &, const <a class="el" href="a00125.html">cache_aligned_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="2babc190640003767a3049a4d3c5ee35"></a><!-- doxytag: member="tbb::tbb_hasher" ref="2babc190640003767a3049a4d3c5ee35" args="(const T &t)" -->
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a> (const T &t)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Hasher functions. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3835d3fac75c3963cbfc312c67ddbba3"></a><!-- doxytag: member="tbb::tbb_hasher" ref="3835d3fac75c3963cbfc312c67ddbba3" args="(P *ptr)" -->
+template<typename P> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (P *ptr)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="057a50bf70efdeabd5756f8698015b0f"></a><!-- doxytag: member="tbb::tbb_hasher" ref="057a50bf70efdeabd5756f8698015b0f" args="(const std::basic_string< E, S, A > &s)" -->
+template<typename E, typename S, typename A> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (const std::basic_string< E, S, A > &s)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="77bb4a96964d4d9cb058a9791bac9b0d"></a><!-- doxytag: member="tbb::tbb_hasher" ref="77bb4a96964d4d9cb058a9791bac9b0d" args="(const std::pair< F, S > &p)" -->
+template<typename F, typename S> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static size_t </td><td class="memTemplItemRight" valign="bottom"><b>tbb_hasher</b> (const std::pair< F, S > &p)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f3609fc523a99c101572fdc68f918d66"></a><!-- doxytag: member="tbb::operator==" ref="f3609fc523a99c101572fdc68f918d66" args="(const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)" -->
+template<typename Key, typename T, typename HashCompare, typename A1, typename A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="2da30ff86b9a39722f45bc35e1c6934d"></a><!-- doxytag: member="tbb::operator!=" ref="2da30ff86b9a39722f45bc35e1c6934d" args="(const concurrent_hash_map< Key, T, HashCompare, A1 > &a, const concurrent_hash_map< Key, T, HashCompare, A2 > &b)" -->
+template<typename Key, typename T, typename HashCompare, typename A1, typename A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A1 > &a, const <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="817c20df80fe1a933a8557eb76113e24"></a><!-- doxytag: member="tbb::swap" ref="817c20df80fe1a933a8557eb76113e24" args="(concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)" -->
+template<typename Key, typename T, typename HashCompare, typename A> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &a, <a class="el" href="a00130.html">concurrent_hash_map</a>< Key, T, HashCompare, A > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="11419db87ac98110907dda08a24f0949"></a><!-- doxytag: member="tbb::operator==" ref="11419db87ac98110907dda08a24f0949" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="aa9e09f2e9154ffd6658fad8355fb491"></a><!-- doxytag: member="tbb::operator!=" ref="aa9e09f2e9154ffd6658fad8355fb491" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="33267dd805415351956d45b4b5347190"></a><!-- doxytag: member="tbb::operator<" ref="33267dd805415351956d45b4b5347190" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator<</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="14e2968ab20cb714bef1f0352fc152f0"></a><!-- doxytag: member="tbb::operator>" ref="14e2968ab20cb714bef1f0352fc152f0" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator></b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="0042a36a670a397fb52e713edbaecd0e"></a><!-- doxytag: member="tbb::operator<=" ref="0042a36a670a397fb52e713edbaecd0e" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator<=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f70eb1d931473b69ba4bcf93af8baa33"></a><!-- doxytag: member="tbb::operator>=" ref="f70eb1d931473b69ba4bcf93af8baa33" args="(const concurrent_vector< T, A1 > &a, const concurrent_vector< T, A2 > &b)" -->
+template<typename T, class A1, class A2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator>=</b> (const <a class="el" href="a00136.html">concurrent_vector</a>< T, A1 > &a, const <a class="el" href="a00136.html">concurrent_vector</a>< T, A2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4a3897ea8d8a48e885d764bd7d370d50"></a><!-- doxytag: member="tbb::swap" ref="4a3897ea8d8a48e885d764bd7d370d50" args="(concurrent_vector< T, A > &a, concurrent_vector< T, A > &b)" -->
+template<typename T, class A> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00136.html">concurrent_vector</a>< T, A > &a, <a class="el" href="a00136.html">concurrent_vector</a>< T, A > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="cac990ecc7b1d2088bf5d047801d63a5"></a><!-- doxytag: member="tbb::flatten2d" ref="cac990ecc7b1d2088bf5d047801d63a5" args="(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e)" -->
+template<typename Container> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">flattened2d< Container > </td><td class="memTemplItemRight" valign="bottom"><b>flatten2d</b> (const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b327db9f1ccb9bdfcdbacbf07fac6d10"></a><!-- doxytag: member="tbb::flatten2d" ref="b327db9f1ccb9bdfcdbacbf07fac6d10" args="(const Container &c)" -->
+template<typename Container> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">flattened2d< Container > </td><td class="memTemplItemRight" valign="bottom"><b>flatten2d</b> (const Container &c)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="906ebb461ecb0446989739fd0399e4b8"></a><!-- doxytag: member="tbb::operator==" ref="906ebb461ecb0446989739fd0399e4b8" args="(const scalable_allocator< T > &, const scalable_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00158.html">scalable_allocator</a>< T > &, const <a class="el" href="a00158.html">scalable_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a92757aca0a69082eb8dc223eb257433"></a><!-- doxytag: member="tbb::operator!=" ref="a92757aca0a69082eb8dc223eb257433" args="(const scalable_allocator< T > &, const scalable_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00158.html">scalable_allocator</a>< T > &, const <a class="el" href="a00158.html">scalable_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e2f5baabe173fbf48e94fb9058f1b41"></a><!-- doxytag: member="tbb::is_current_task_group_canceling" ref="7e2f5baabe173fbf48e94fb9058f1b41" args="()" -->
+bool </td><td class="memItemRight" valign="bottom"><b>is_current_task_group_canceling</b> ()</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3bb9a8b837a9b7c4b5107caf01e81329"></a><!-- doxytag: member="tbb::make_task" ref="3bb9a8b837a9b7c4b5107caf01e81329" args="(const F &f)" -->
+template<class F> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">task_handle< F > </td><td class="memTemplItemRight" valign="bottom"><b>make_task</b> (const F &f)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="c8a46d6c0fe474eb399d0d09c27a4685"></a><!-- doxytag: member="tbb::operator==" ref="c8a46d6c0fe474eb399d0d09c27a4685" args="(const tbb_allocator< T > &, const tbb_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00170.html">tbb_allocator</a>< T > &, const <a class="el" href="a00170.html">tbb_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3d9665c21c894f06f1614947103dc9d6"></a><!-- doxytag: member="tbb::operator!=" ref="3d9665c21c894f06f1614947103dc9d6" args="(const tbb_allocator< T > &, const tbb_allocator< U > &)" -->
+template<typename T, typename U> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00170.html">tbb_allocator</a>< T > &, const <a class="el" href="a00170.html">tbb_allocator</a>< U > &)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b64fb7e52f0049b5a103cbb6fb5814f0"></a><!-- doxytag: member="tbb::operator==" ref="b64fb7e52f0049b5a103cbb6fb5814f0" args="(const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)" -->
+template<typename T1, template< typename X1 > class B1, typename T2, template< typename X2 > class B2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="a00179.html">zero_allocator</a>< T1, B1 > &a, const <a class="el" href="a00179.html">zero_allocator</a>< T2, B2 > &b)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ae43b5151d0220fe3ade0b447cd64f0d"></a><!-- doxytag: member="tbb::operator!=" ref="ae43b5151d0220fe3ade0b447cd64f0d" args="(const zero_allocator< T1, B1 > &a, const zero_allocator< T2, B2 > &b)" -->
+template<typename T1, template< typename X1 > class B1, typename T2, template< typename X2 > class B2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="a00179.html">zero_allocator</a>< T1, B1 > &a, const <a class="el" href="a00179.html">zero_allocator</a>< T2, B2 > &b)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="823fa1c15dd829d1d9167157450ddcd9"></a><!-- doxytag: member="tbb::set_assertion_handler" ref="823fa1c15dd829d1d9167157450ddcd9" args="(assertion_handler_type new_handler)" -->
+<a class="el" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a> (<a class="el" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Set assertion handler and return previous value of it. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a> (const char *filename, int line, const char *expression, const char *comment)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Process an assertion failure.  <a href="#3d1252787be39b4aef311f1cadaff9e8"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">The function returns the interface version of the TBB shared library being used.  <a href="#a6858b22e90041c9c4669674ff39b056"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a42aa5dbcf06ba86c71efb73d8311c3"></a><!-- doxytag: member="tbb::operator-" ref="6a42aa5dbcf06ba86c71efb73d8311c3" args="(const tick_count &t1, const tick_count &t0)" -->
+<a class="el" href="a00177.html">tick_count::interval_t</a> </td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="a00176.html">tick_count</a> &t1, const <a class="el" href="a00176.html">tick_count</a> &t0)</td></tr>
+
+<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6902d551186a654ffbf88582d4a0bdfa"></a><!-- doxytag: member="tbb::hash_multiplier" ref="6902d551186a654ffbf88582d4a0bdfa" args="" -->
+static const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a> = sizeof(size_t)==4? 2654435769U : 11400714819323198485ULL</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash multiplier. <br></td></tr>
 </table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The namespace tbb contains all components of the library. <hr><h2>Enumeration Type Documentation</h2>
+<a class="anchor" name="a8686246bb5d3664bd07563749970fef"></a><!-- doxytag: member="tbb::memory_semantics" ref="a8686246bb5d3664bd07563749970fef" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef">tbb::memory_semantics</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Specifies memory fencing. 
+<p>
+<dl compact><dt><b>Enumerator: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c"></a><!-- doxytag: member="__TBB_full_fence" ref="a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c" args="" -->__TBB_full_fence</em> </td><td>
+For internal use only. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7"></a><!-- doxytag: member="acquire" ref="a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7" args="" -->acquire</em> </td><td>
+Acquire fence. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70"></a><!-- doxytag: member="release" ref="a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70" args="" -->release</em> </td><td>
+Release fence. </td></tr>
+</table>
+</dl>
+
+</div>
+</div><p>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="3d1252787be39b4aef311f1cadaff9e8"></a><!-- doxytag: member="tbb::assertion_failure" ref="3d1252787be39b4aef311f1cadaff9e8" args="(const char *filename, int line, const char *expression, const char *comment)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void __TBB_EXPORTED_FUNC tbb::assertion_failure           </td>
+          <td>(</td>
+          <td class="paramtype">const char * </td>
+          <td class="paramname"> <em>filename</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int </td>
+          <td class="paramname"> <em>line</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char * </td>
+          <td class="paramname"> <em>expression</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char * </td>
+          <td class="paramname"> <em>comment</em></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Process an assertion failure. 
+<p>
+Normally called from __TBB_ASSERT macro. If assertion handler is null, print message for assertion failure and abort. Otherwise call the assertion handler. 
+</div>
+</div><p>
+<a class="anchor" name="a6858b22e90041c9c4669674ff39b056"></a><!-- doxytag: member="tbb::TBB_runtime_interface_version" ref="a6858b22e90041c9c4669674ff39b056" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int __TBB_EXPORTED_FUNC tbb::TBB_runtime_interface_version           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The function returns the interface version of the TBB shared library being used. 
+<p>
+The version it returns is determined at runtime, not at compile/link time. So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. 
+</div>
+</div><p>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00232.html b/doc/html/a00232.html
index b4981c7..5b2f1bd 100644
--- a/doc/html/a00232.html
+++ b/doc/html/a00232.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>Timing</title>
+<title>tbb::strict_ppl Namespace Reference</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -9,19 +9,48 @@
   <ul>
     <li><a href="index.html"><span>Main Page</span></a></li>
     <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li id="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
     <li><a href="annotated.html"><span>Classes</span></a></li>
     <li><a href="files.html"><span>Files</span></a></li>
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
-<h1>Timing</h1><table border="0" cellpadding="0" cellspacing="0">
+<div class="tabs">
+  <ul>
+    <li><a href="namespaces.html"><span>Namespace List</span></a></li>
+    <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
+  </ul></div>
+<div class="nav">
+<a class="el" href="a00229.html">tbb</a>::<a class="el" href="a00232.html">strict_ppl</a></div>
+<h1>tbb::strict_ppl Namespace Reference</h1>For internal use only.  
+<a href="#_details">More...</a>
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html">tbb::tick_count</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html">concurrent_queue</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe non-blocking concurrent queue.  <a href="a00134.html#_details">More...</a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="15c764c70c8a32e7a4b8c291d0cc8dde"></a><!-- doxytag: member="tbb::strict_ppl::parallel_for" ref="15c764c70c8a32e7a4b8c291d0cc8dde" args="(Index first, Index last, Index step, const Function &f)" -->
+template<typename Index, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00232.html#15c764c70c8a32e7a4b8c291d0cc8dde">parallel_for</a> (Index first, Index last, Index step, const Function &f)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range of integers with a step provided. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="fb5925ad98ec9608139661cfd2b9b88f"></a><!-- doxytag: member="tbb::strict_ppl::parallel_for" ref="fb5925ad98ec9608139661cfd2b9b88f" args="(Index first, Index last, Index step, const Function &f, tbb::task_group_context &context)" -->
+template<typename Index, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_for</b> (Index first, Index last, Index step, const Function &f, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="490399525b1e690ec31d6db964c6b272"></a><!-- doxytag: member="tbb::strict_ppl::parallel_for" ref="490399525b1e690ec31d6db964c6b272" args="(Index first, Index last, const Function &f)" -->
+template<typename Index, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00232.html#490399525b1e690ec31d6db964c6b272">parallel_for</a> (Index first, Index last, const Function &f)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range of integers with a default step value. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="bda0b331c88a836cb756fff0f661d609"></a><!-- doxytag: member="tbb::strict_ppl::parallel_for" ref="bda0b331c88a836cb756fff0f661d609" args="(Index first, Index last, const Function &f, tbb::task_group_context &context)" -->
+template<typename Index, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>parallel_for</b> (Index first, Index last, const Function &f, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00172.html#_details">More...</a><br></td></tr>
 </table>
-<hr>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+For internal use only. <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
 <p></p>
diff --git a/doc/html/a00233.html b/doc/html/a00233.html
index 5011be4..ccf2f4c 100644
--- a/doc/html/a00233.html
+++ b/doc/html/a00233.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>Task Scheduling</title>
+<title>Algorithms</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -14,25 +14,325 @@
     <li><a href="files.html"><span>Files</span></a></li>
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
-<h1>Task Scheduling</h1><table border="0" cellpadding="0" cellspacing="0">
+<h1>Algorithms</h1><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">tbb::task_group_context</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html">tbb::blocked_range< Value ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00163.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html">tbb::task</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A range over which to iterate.  <a href="a00122.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00123.html">tbb::blocked_range2d< RowValue, ColValue ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00162.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html">tbb::empty_task</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A 2-dimensional range that models the Range concept.  <a href="a00123.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00137.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html">tbb::task_list</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A 3-dimensional range that models the Range concept.  <a href="a00124.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00151.html">tbb::pre_scan_tag</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00164.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the initial scan is being performed.  <a href="a00151.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00140.html">tbb::final_scan_tag</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00165.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to indicate that the final scan is being performed.  <a href="a00140.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a stream, with optional addition of more work.  <a href="a00149.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00160.html">tbb::simple_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A simple partitioner.  <a href="a00160.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html">tbb::auto_partitioner</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">An auto partitioner.  <a href="a00120.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00139.html">tbb::filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline.  <a href="a00139.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A stage in a pipeline served by a user thread.  <a href="a00175.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html">tbb::pipeline</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A processing pipeling that applies filters to items.  <a href="a00150.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html">tbb::split</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Dummy type that distinguishes splitting constructor from copy constructor.  <a href="a00165.html#_details">More...</a><br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_do</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="parallel_do_body_req.html">parallel_do Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3383e2703977012b6f384d673410f1f7"></a><!-- doxytag: member="algorithms::parallel_do" ref="g3383e2703977012b6f384d673410f1f7" args="(Iterator first, Iterator last, const Body &body)" -->
+template<typename Iterator, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (Iterator first, Iterator last, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2617dc9b88b3285a7212599d49f74228"></a><!-- doxytag: member="algorithms::parallel_do" ref="g2617dc9b88b3285a7212599d49f74228" args="(Iterator first, Iterator last, const Body &body, task_group_context &context)" -->
+template<typename Iterator, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g2617dc9b88b3285a7212599d49f74228">tbb::parallel_do</a> (Iterator first, Iterator last, const Body &body, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over a range, with optional addition of more work and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_for</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_for_body_req.html">parallel_for Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g68cc046ef72c42ce205fccbc435a0d81"></a><!-- doxytag: member="algorithms::parallel_for" ref="g68cc046ef72c42ce205fccbc435a0d81" args="(const Range &range, const Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">tbb::parallel_for</a> (const Range &range, const Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g13cac5dd55c7533bccea43a51c33d0e5"></a><!-- doxytag: member="algorithms::parallel_for" ref="g13cac5dd55c7533bccea43a51c33d0e5" args="(const Range &range, const Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g13cac5dd55c7533bccea43a51c33d0e5">tbb::parallel_for</a> (const Range &range, const Body &body, const simple_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ga7ac75d532389b55b9247f3fdb0b00d1"></a><!-- doxytag: member="algorithms::parallel_for" ref="ga7ac75d532389b55b9247f3fdb0b00d1" args="(const Range &range, const Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#ga7ac75d532389b55b9247f3fdb0b00d1">tbb::parallel_for</a> (const Range &range, const Body &body, const auto_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g9cd1b210ceb1c040f30e390b4a21bde8"></a><!-- doxytag: member="algorithms::parallel_for" ref="g9cd1b210ceb1c040f30e390b4a21bde8" args="(const Range &range, const Body &body, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g9cd1b210ceb1c040f30e390b4a21bde8">tbb::parallel_for</a> (const Range &range, const Body &body, affinity_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2d317a5e0078cd193125439fed60dfdc"></a><!-- doxytag: member="algorithms::parallel_for" ref="g2d317a5e0078cd193125439fed60dfdc" args="(const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g2d317a5e0078cd193125439fed60dfdc">tbb::parallel_for</a> (const Range &range, const Body &body, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c0700e3f85e83a788ff3ede88ebb7e9"></a><!-- doxytag: member="algorithms::parallel_for" ref="g1c0700e3f85e83a788ff3ede88ebb7e9" args="(const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1c0700e3f85e83a788ff3ede88ebb7e9">tbb::parallel_for</a> (const Range &range, const Body &body, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g04b4696b67370c01353ff5974c8f1196"></a><!-- doxytag: member="algorithms::parallel_for" ref="g04b4696b67370c01353ff5974c8f1196" args="(const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g04b4696b67370c01353ff5974c8f1196">tbb::parallel_for</a> (const Range &range, const Body &body, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration over range with <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_for_each</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbcb40499f038fd82deca88366b404790"></a><!-- doxytag: member="algorithms::parallel_for_each" ref="gbcb40499f038fd82deca88366b404790" args="(InputIterator first, InputIterator last, Function f, task_group_context &context)" -->
+template<typename InputIterator, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gbcb40499f038fd82deca88366b404790">tbb::parallel_for_each</a> (InputIterator first, InputIterator last, Function f, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls function f for all items from [first, last) interval using user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g85a58ff0853f129adb6f9e4355326ccc"></a><!-- doxytag: member="algorithms::parallel_for_each" ref="g85a58ff0853f129adb6f9e4355326ccc" args="(InputIterator first, InputIterator last, Function f)" -->
+template<typename InputIterator, typename Function> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Function </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g85a58ff0853f129adb6f9e4355326ccc">tbb::parallel_for_each</a> (InputIterator first, InputIterator last, Function f)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Uses default context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_invoke</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gbaadafdb93d290acec86e07fc8909c29"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gbaadafdb93d290acec86e07fc8909c29" args="(F0 f0, F1 f1, tbb::task_group_context &context)" -->
+template<typename F0, typename F1> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">tbb::parallel_invoke</a> (F0 f0, F1 f1, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Executes a list of tasks in parallel and waits for all tasks to complete. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3cbf43007d0caeb4a2470265f50b25df"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3cbf43007d0caeb4a2470265f50b25df" args="(F0 f0, F1 f1, F2 f2, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g063924a497ba64c49351e80e39bd2c17"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g063924a497ba64c49351e80e39bd2c17" args="(F0 f0, F1 f1, F2 f2, F3 f3, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g2ca8b49b9b36515247e45ffd9c0c11cf"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g2ca8b49b9b36515247e45ffd9c0c11cf" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g559685c3c13e103c6d570efef419c2b9"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g559685c3c13e103c6d570efef419c2b9" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd979d007cc4026c34691a4b38edd36af"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gd979d007cc4026c34691a4b38edd36af" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd01a5d8f4902387d9081352e1edd1632"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gd01a5d8f4902387d9081352e1edd1632" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g0a66bfc0ac0691dfa71d230f5c8c3e96"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g0a66bfc0ac0691dfa71d230f5c8c3e96" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7182f6b5c88469cfc2b7c2ebbbd4a28c"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g7182f6b5c88469cfc2b7c2ebbbd4a28c" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, tbb::task_group_context &context)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="el" href="a00167.html">tbb::task_group_context</a> &context)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb999ec5f8b7f0b68b9752f11ad39ab08"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gb999ec5f8b7f0b68b9752f11ad39ab08" args="(F0 f0, F1 f1)" -->
+template<typename F0, typename F1> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gb3783b5fbb1fdb4d2a6b3b4c6be8d4dd" args="(F0 f0, F1 f1, F2 f2)" -->
+template<typename F0, typename F1, typename F2> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g89c0569d95abd182f80acc38d0dbe2d4"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g89c0569d95abd182f80acc38d0dbe2d4" args="(F0 f0, F1 f1, F2 f2, F3 f3)" -->
+template<typename F0, typename F1, typename F2, typename F3> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3ef71e9441745fe708e66a0b817bebc7"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3ef71e9441745fe708e66a0b817bebc7" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g78fa19efd1a7cf7ffd1c23251c80b31d"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g78fa19efd1a7cf7ffd1c23251c80b31d" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gab2e69dbef9b3f0e658cf4b8e574f552"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="gab2e69dbef9b3f0e658cf4b8e574f552" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g262f0347e5690bb692b6dc26e26b9ebe"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g262f0347e5690bb692b6dc26e26b9ebe" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g06a090fbd0eaaccf20e2409a2a222733"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g06a090fbd0eaaccf20e2409a2a222733" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8)</td></tr>
+
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g3330e3c33053875705e19e29eda37627"></a><!-- doxytag: member="algorithms::parallel_invoke" ref="g3330e3c33053875705e19e29eda37627" args="(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)" -->
+template<typename F0, typename F1, typename F2, typename F3, typename F4, typename F5, typename F6, typename F7, typename F8, typename F9> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>tbb::parallel_invoke</b> (F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9)</td></tr>
+
+<tr><td colspan="2"><br><h2>parallel_reduce</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_reduce_body_req.html">parallel_reduce Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1b3d59c5eb62683c5754db6970392fa3"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g1b3d59c5eb62683c5754db6970392fa3" args="(const Range &range, Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">tbb::parallel_reduce</a> (const Range &range, Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gec1b7c03f9da909bef5db12e3d41bed3"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gec1b7c03f9da909bef5db12e3d41bed3" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gec1b7c03f9da909bef5db12e3d41bed3">tbb::parallel_reduce</a> (const Range &range, Body &body, const simple_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g18a19157e6245992fc00ca0adeb7dd37"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g18a19157e6245992fc00ca0adeb7dd37" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g18a19157e6245992fc00ca0adeb7dd37">tbb::parallel_reduce</a> (const Range &range, Body &body, const auto_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc61e73fcc36c92d79a217fc355ff4a6b"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gc61e73fcc36c92d79a217fc355ff4a6b" args="(const Range &range, Body &body, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc61e73fcc36c92d79a217fc355ff4a6b">tbb::parallel_reduce</a> (const Range &range, Body &body, affinity_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g45cb00c42a18e334bbde8b7535afe460"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g45cb00c42a18e334bbde8b7535afe460" args="(const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g45cb00c42a18e334bbde8b7535afe460">tbb::parallel_reduce</a> (const Range &range, Body &body, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g1c1ea1d7c61b3c225e92c70d669a53a5"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g1c1ea1d7c61b3c225e92c70d669a53a5" args="(const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g1c1ea1d7c61b3c225e92c70d669a53a5">tbb::parallel_reduce</a> (const Range &range, Body &body, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gd9ac3a3811060314695f33b703c6e11b"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gd9ac3a3811060314695f33b703c6e11b" args="(const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gd9ac3a3811060314695f33b703c6e11b">tbb::parallel_reduce</a> (const Range &range, Body &body, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9412e09fb01fcad8c018ea9cffb28ef"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gc9412e09fb01fcad8c018ea9cffb28ef" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc9412e09fb01fcad8c018ea9cffb28ef">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gaddffeec0e892ac3d6fc7fc2053e1eca"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gaddffeec0e892ac3d6fc7fc2053e1eca" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gaddffeec0e892ac3d6fc7fc2053e1eca">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb175401f0729e40dd2c5860a17c14385"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gb175401f0729e40dd2c5860a17c14385" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gb175401f0729e40dd2c5860a17c14385">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gb7f1f1828ae2b330ce05b8513a495154"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gb7f1f1828ae2b330ce05b8513a495154" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gb7f1f1828ae2b330ce05b8513a495154">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction and <a class="el" href="a00115.html">affinity_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gfbc0cc2026d87f11a96bcd62788f5bb5"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="gfbc0cc2026d87f11a96bcd62788f5bb5" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gfbc0cc2026d87f11a96bcd62788f5bb5">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const simple_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, simple partitioner and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g630c90a399937d9d4ae70ff883186dfd"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g630c90a399937d9d4ae70ff883186dfd" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g630c90a399937d9d4ae70ff883186dfd">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, const auto_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00120.html">auto_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g496bd7eadb3b97495ccb5655ef90319e"></a><!-- doxytag: member="algorithms::parallel_reduce" ref="g496bd7eadb3b97495ccb5655ef90319e" args="(const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)" -->
+template<typename Range, typename Value, typename RealBody, typename Reduction> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Value </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g496bd7eadb3b97495ccb5655ef90319e">tbb::parallel_reduce</a> (const Range &range, const Value &identity, const RealBody &real_body, const Reduction &reduction, affinity_partitioner &partitioner, task_group_context &context)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel iteration with reduction, <a class="el" href="a00115.html">affinity_partitioner</a> and user-supplied context. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_scan</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="range_req.html">Range</a> and <a class="el" href="parallel_scan_body_req.html">parallel_scan Body</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ged143f31dd3d96ded02ab3db915b91c7"></a><!-- doxytag: member="algorithms::parallel_scan" ref="ged143f31dd3d96ded02ab3db915b91c7" args="(const Range &range, Body &body)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">tbb::parallel_scan</a> (const Range &range, Body &body)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with default partitioner. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc9fac8870b2e6365fb337014404529df"></a><!-- doxytag: member="algorithms::parallel_scan" ref="gc9fac8870b2e6365fb337014404529df" args="(const Range &range, Body &body, const simple_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc9fac8870b2e6365fb337014404529df">tbb::parallel_scan</a> (const Range &range, Body &body, const simple_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00160.html">simple_partitioner</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g62fde400a37bbca1a2fddc8e3d22f556"></a><!-- doxytag: member="algorithms::parallel_scan" ref="g62fde400a37bbca1a2fddc8e3d22f556" args="(const Range &range, Body &body, const auto_partitioner &partitioner)" -->
+template<typename Range, typename Body> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb::parallel_scan</a> (const Range &range, Body &body, const auto_partitioner &partitioner)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Parallel prefix with <a class="el" href="a00120.html">auto_partitioner</a>. <br></td></tr>
+<tr><td colspan="2"><br><h2>parallel_sort</h2></td></tr>
+<tr><td colspan="2">See also requirements on <a class="el" href="parallel_sort_iter_req.html">iterators for parallel_sort</a>. <br><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template<typename RandomAccessIterator, typename Compare> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">tbb::parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) using the given comparator.  <a href="#g49edcf9447cd91a9527a3f8e8512b7aa"></a><br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g16c3eb77d0e530834c51ce3857f01012"></a><!-- doxytag: member="algorithms::parallel_sort" ref="g16c3eb77d0e530834c51ce3857f01012" args="(RandomAccessIterator begin, RandomAccessIterator end)" -->
+template<typename RandomAccessIterator> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#g16c3eb77d0e530834c51ce3857f01012">tbb::parallel_sort</a> (RandomAccessIterator begin, RandomAccessIterator end)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in [begin,end) with a default comparator <code>std::less<RandomAccessIterator></code>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="gc7576f82fdedc8a701a6c17ad9415926"></a><!-- doxytag: member="algorithms::parallel_sort" ref="gc7576f82fdedc8a701a6c17ad9415926" args="(T *begin, T *end)" -->
+template<typename T> </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00233.html#gc7576f82fdedc8a701a6c17ad9415926">tbb::parallel_sort</a> (T *begin, T *end)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the data in the range <code></code>[begin,end) with a default comparator <code>std::less<T></code>. <br></td></tr>
 </table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="g49edcf9447cd91a9527a3f8e8512b7aa"></a><!-- doxytag: member="tbb::parallel_sort" ref="g49edcf9447cd91a9527a3f8e8512b7aa" args="(RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template<typename RandomAccessIterator, typename Compare> </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">void tbb::parallel_sort           </td>
+          <td>(</td>
+          <td class="paramtype">RandomAccessIterator </td>
+          <td class="paramname"> <em>begin</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">RandomAccessIterator </td>
+          <td class="paramname"> <em>end</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const Compare & </td>
+          <td class="paramname"> <em>comp</em></td><td> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Sorts the data in [begin,end) using the given comparator. 
+<p>
+The compare function object is used for all comparisons between elements during sorting. The compare object must define a bool operator() function. 
+</div>
+</div><p>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00234.html b/doc/html/a00234.html
index 01dca2c..4147d05 100644
--- a/doc/html/a00234.html
+++ b/doc/html/a00234.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>_concurrent_queue_internal.h Source File</title>
+<title>Containers</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -11,882 +11,32 @@
     <li><a href="modules.html"><span>Modules</span></a></li>
     <li><a href="namespaces.html"><span>Namespaces</span></a></li>
     <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>_concurrent_queue_internal.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_concurrent_queue_internal_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_queue_internal_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include "spin_mutex.h"</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include "tbb_exception.h"</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include <iterator></span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include <new></span>
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="keyword">namespace </span>tbb {
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span>
-<a name="l00037"></a>00037 <span class="comment">// forward declaration</span>
-<a name="l00038"></a>00038 <span class="keyword">namespace </span>strict_ppl {
-<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_queue;
-<a name="l00040"></a>00040 }
-<a name="l00041"></a>00041 
-<a name="l00042"></a>00042 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_bounded_queue;
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="keyword">namespace </span>deprecated {
-<a name="l00045"></a>00045 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_queue;
-<a name="l00046"></a>00046 }
-<a name="l00047"></a>00047 <span class="preprocessor">#endif</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span>
-<a name="l00051"></a>00051 <span class="keyword">namespace </span>strict_ppl {
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053 <span class="keyword">namespace </span>internal {
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="keyword">using namespace </span>tbb::internal;
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057 <span class="keyword">typedef</span> size_t ticket;
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059 <span class="keyword">static</span> <span class="keywordtype">void</span>* invalid_page;
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>micro_queue ;
-<a name="l00062"></a>00062 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>micro_queue_pop_finalizer ;
-<a name="l00063"></a>00063 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>concurrent_queue_base_v3;
-<a name="l00064"></a>00064 
-<a name="l00066"></a>00066 
-<a name="l00069"></a>00069 <span class="keyword">struct </span>concurrent_queue_rep_base : no_copy {
-<a name="l00070"></a>00070     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue;
-<a name="l00071"></a>00071     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_base_v3;
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="keyword">protected</span>:
-<a name="l00075"></a>00075     <span class="keyword">static</span> <span class="keyword">const</span> size_t phi = 3;
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077 <span class="keyword">public</span>:
-<a name="l00078"></a>00078     <span class="comment">// must be power of 2</span>
-<a name="l00079"></a>00079     <span class="keyword">static</span> <span class="keyword">const</span> size_t n_queue = 8;
-<a name="l00080"></a>00080 
-<a name="l00082"></a>00082     <span class="keyword">struct </span>page {
-<a name="l00083"></a>00083         page* next;
-<a name="l00084"></a>00084         uintptr_t mask; 
-<a name="l00085"></a>00085     };
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087     atomic<ticket> head_counter;
-<a name="l00088"></a>00088     <span class="keywordtype">char</span> pad1[NFS_MaxLineSize-<span class="keyword">sizeof</span>(atomic<ticket>)];
-<a name="l00089"></a>00089     atomic<ticket> tail_counter;
-<a name="l00090"></a>00090     <span class="keywordtype">char</span> pad2[NFS_MaxLineSize-<span class="keyword">sizeof</span>(atomic<ticket>)];
-<a name="l00091"></a>00091 
-<a name="l00093"></a>00093     size_t items_per_page;
-<a name="l00094"></a>00094 
-<a name="l00096"></a>00096     size_t item_size;
-<a name="l00097"></a>00097 
-<a name="l00099"></a>00099     atomic<size_t> n_invalid_entries;
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101     <span class="keywordtype">char</span> pad3[NFS_MaxLineSize-<span class="keyword">sizeof</span>(size_t)-<span class="keyword">sizeof</span>(size_t)-<span class="keyword">sizeof</span>(atomic<size_t>)];
-<a name="l00102"></a>00102 } ;
-<a name="l00103"></a>00103 
-<a name="l00105"></a>00105 
-<a name="l00108"></a>00108 <span class="keyword">class </span>concurrent_queue_page_allocator
-<a name="l00109"></a>00109 {
-<a name="l00110"></a>00110     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue ;
-<a name="l00111"></a>00111     <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer ;
-<a name="l00112"></a>00112 <span class="keyword">protected</span>:
-<a name="l00113"></a>00113     <span class="keyword">virtual</span> ~concurrent_queue_page_allocator() {}
-<a name="l00114"></a>00114 <span class="keyword">private</span>:
-<a name="l00115"></a>00115     <span class="keyword">virtual</span> concurrent_queue_rep_base::page* allocate_page() = 0;
-<a name="l00116"></a>00116     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( concurrent_queue_rep_base::page* p ) = 0;
-<a name="l00117"></a>00117 } ;
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="comment">// unary minus operator applied to unsigned type, result still unsigned</span>
-<a name="l00121"></a>00121 <span class="preprocessor">#pragma warning( push )</span>
-<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable: 4146 )</span>
-<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span>
-<a name="l00126"></a>00126 
-<a name="l00128"></a>00128 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00129"></a>00129 <span class="keyword">class </span>micro_queue : no_copy {
-<a name="l00130"></a>00130     <span class="keyword">typedef</span> concurrent_queue_rep_base::page page;
-<a name="l00131"></a>00131 
-<a name="l00133"></a>00133     <span class="keyword">class </span>destroyer: no_copy {
-<a name="l00134"></a>00134         T& my_value;
-<a name="l00135"></a>00135     <span class="keyword">public</span>:
-<a name="l00136"></a>00136         destroyer( T& value ) : my_value(value) {}
-<a name="l00137"></a>00137         ~destroyer() {my_value.~T();}          
-<a name="l00138"></a>00138     };
-<a name="l00139"></a>00139 
-<a name="l00140"></a>00140     T& get_ref( page& page, size_t index ) {
-<a name="l00141"></a>00141         <span class="keywordflow">return</span> static_cast<T*>(static_cast<void*>(&page+1))[index];
-<a name="l00142"></a>00142     }
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144     <span class="keywordtype">void</span> copy_item( page& dst, size_t index, <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) {
-<a name="l00145"></a>00145         <span class="keyword">new</span>( &get_ref(dst,index) ) T(*static_cast<const T*>(src)); 
-<a name="l00146"></a>00146     }
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148     <span class="keywordtype">void</span> copy_item( page& dst, size_t dindex, <span class="keyword">const</span> page& src, size_t sindex ) {
-<a name="l00149"></a>00149         <span class="keyword">new</span>( &get_ref(dst,dindex) ) T( static_cast<const T*>(static_cast<const void*>(&src+1))[sindex] );
-<a name="l00150"></a>00150     }
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152     <span class="keywordtype">void</span> assign_and_destroy_item( <span class="keywordtype">void</span>* dst, page& src, size_t index ) {
-<a name="l00153"></a>00153         T& from = get_ref(src,index);
-<a name="l00154"></a>00154         destroyer d(from);
-<a name="l00155"></a>00155         *static_cast<T*>(dst) = from;
-<a name="l00156"></a>00156     }
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <span class="keywordtype">void</span> spin_wait_until_my_turn( atomic<ticket>& counter, ticket k, concurrent_queue_rep_base& rb ) <span class="keyword">const </span>;
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160 <span class="keyword">public</span>:
-<a name="l00161"></a>00161     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer<T>;
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163     atomic<page*> head_page;
-<a name="l00164"></a>00164     atomic<ticket> head_counter;
-<a name="l00165"></a>00165 
-<a name="l00166"></a>00166     atomic<page*> tail_page;
-<a name="l00167"></a>00167     atomic<ticket> tail_counter;
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169     spin_mutex page_mutex;
-<a name="l00170"></a>00170     
-<a name="l00171"></a>00171     <span class="keywordtype">void</span> push( <span class="keyword">const</span> <span class="keywordtype">void</span>* item, ticket k, concurrent_queue_base_v3<T>& base ) ;
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173     <span class="keywordtype">bool</span> pop( <span class="keywordtype">void</span>* dst, ticket k, concurrent_queue_base_v3<T>& base ) ;
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175     micro_queue& assign( <span class="keyword">const</span> micro_queue& src, concurrent_queue_base_v3<T>& base ) ;
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177     page* make_copy( concurrent_queue_base_v3<T>& base, <span class="keyword">const</span> page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) ;
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179     <span class="keywordtype">void</span> make_invalid( ticket k ) ;
-<a name="l00180"></a>00180 };
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00183"></a>00183 <span class="keywordtype">void</span> micro_queue<T>::spin_wait_until_my_turn( atomic<ticket>& counter, ticket k, concurrent_queue_rep_base& rb )<span class="keyword"> const </span>{
-<a name="l00184"></a>00184     atomic_backoff backoff;
-<a name="l00185"></a>00185     <span class="keywordflow">do</span> {
-<a name="l00186"></a>00186         backoff.pause();
-<a name="l00187"></a>00187         <span class="keywordflow">if</span>( counter&0x1 ) {
-<a name="l00188"></a>00188             ++rb.n_invalid_entries;
-<a name="l00189"></a>00189             throw_bad_last_alloc_exception_v4();
-<a name="l00190"></a>00190         }
-<a name="l00191"></a>00191     } <span class="keywordflow">while</span>( counter!=k ) ;
-<a name="l00192"></a>00192 }
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00195"></a>00195 <span class="keywordtype">void</span> micro_queue<T>::push( <span class="keyword">const</span> <span class="keywordtype">void</span>* item, ticket k, concurrent_queue_base_v3<T>& base ) {
-<a name="l00196"></a>00196     k &= -concurrent_queue_rep_base::n_queue;
-<a name="l00197"></a>00197     page* p = NULL;
-<a name="l00198"></a>00198     size_t index = k/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
-<a name="l00199"></a>00199     <span class="keywordflow">if</span>( !index ) {
-<a name="l00200"></a>00200         <span class="keywordflow">try</span> {
-<a name="l00201"></a>00201             concurrent_queue_page_allocator& pa = base;
-<a name="l00202"></a>00202             p = pa.allocate_page();
-<a name="l00203"></a>00203         } <span class="keywordflow">catch</span> (...) {
-<a name="l00204"></a>00204             ++base.my_rep->n_invalid_entries;
-<a name="l00205"></a>00205             make_invalid( k );
-<a name="l00206"></a>00206         }
-<a name="l00207"></a>00207         p->mask = 0;
-<a name="l00208"></a>00208         p->next = NULL;
-<a name="l00209"></a>00209     }
-<a name="l00210"></a>00210     
-<a name="l00211"></a>00211     <span class="keywordflow">if</span>( tail_counter!=k ) spin_wait_until_my_turn( tail_counter, k, *base.my_rep );
-<a name="l00212"></a>00212         
-<a name="l00213"></a>00213     <span class="keywordflow">if</span>( p ) {
-<a name="l00214"></a>00214         spin_mutex::scoped_lock lock( page_mutex );
-<a name="l00215"></a>00215         <span class="keywordflow">if</span>( page* q = tail_page )
-<a name="l00216"></a>00216             q->next = p;
-<a name="l00217"></a>00217         <span class="keywordflow">else</span>
-<a name="l00218"></a>00218             head_page = p; 
-<a name="l00219"></a>00219         tail_page = p;
-<a name="l00220"></a>00220     } <span class="keywordflow">else</span> {
-<a name="l00221"></a>00221         p = tail_page;
-<a name="l00222"></a>00222     }
-<a name="l00223"></a>00223    
-<a name="l00224"></a>00224     <span class="keywordflow">try</span> {
-<a name="l00225"></a>00225         copy_item( *p, index, item );
-<a name="l00226"></a>00226         <span class="comment">// If no exception was thrown, mark item as present.</span>
-<a name="l00227"></a>00227         p->mask |= uintptr_t(1)<<index;
-<a name="l00228"></a>00228         tail_counter += concurrent_queue_rep_base::n_queue; 
-<a name="l00229"></a>00229     } <span class="keywordflow">catch</span> (...) {
-<a name="l00230"></a>00230         ++base.my_rep->n_invalid_entries;
-<a name="l00231"></a>00231         tail_counter += concurrent_queue_rep_base::n_queue; 
-<a name="l00232"></a>00232         <span class="keywordflow">throw</span>;
-<a name="l00233"></a>00233     }
-<a name="l00234"></a>00234 }
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00237"></a>00237 <span class="keywordtype">bool</span> micro_queue<T>::pop( <span class="keywordtype">void</span>* dst, ticket k, concurrent_queue_base_v3<T>& base ) {
-<a name="l00238"></a>00238     k &= -concurrent_queue_rep_base::n_queue;
-<a name="l00239"></a>00239     <span class="keywordflow">if</span>( head_counter!=k ) spin_wait_until_eq( head_counter, k );
-<a name="l00240"></a>00240     <span class="keywordflow">if</span>( tail_counter==k ) spin_wait_while_eq( tail_counter, k );
-<a name="l00241"></a>00241     page& p = *head_page;
-<a name="l00242"></a>00242     __TBB_ASSERT( &p, NULL );
-<a name="l00243"></a>00243     size_t index = k/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
-<a name="l00244"></a>00244     <span class="keywordtype">bool</span> success = <span class="keyword">false</span>; 
-<a name="l00245"></a>00245     {
-<a name="l00246"></a>00246         micro_queue_pop_finalizer<T> finalizer( *<span class="keyword">this</span>, base, k+concurrent_queue_rep_base::n_queue, index==base.my_rep->items_per_page-1 ? &p : NULL ); 
-<a name="l00247"></a>00247         <span class="keywordflow">if</span>( p.mask & uintptr_t(1)<<index ) {
-<a name="l00248"></a>00248             success = <span class="keyword">true</span>;
-<a name="l00249"></a>00249             assign_and_destroy_item( dst, p, index );
-<a name="l00250"></a>00250         } <span class="keywordflow">else</span> {
-<a name="l00251"></a>00251             --base.my_rep->n_invalid_entries;
-<a name="l00252"></a>00252         }
-<a name="l00253"></a>00253     }
-<a name="l00254"></a>00254     <span class="keywordflow">return</span> success;
-<a name="l00255"></a>00255 }
-<a name="l00256"></a>00256 
-<a name="l00257"></a>00257 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00258"></a>00258 micro_queue<T>& micro_queue<T>::assign( <span class="keyword">const</span> micro_queue<T>& src, concurrent_queue_base_v3<T>& base ) {
-<a name="l00259"></a>00259     head_counter = src.head_counter;
-<a name="l00260"></a>00260     tail_counter = src.tail_counter;
-<a name="l00261"></a>00261     page_mutex   = src.page_mutex;
-<a name="l00262"></a>00262 
-<a name="l00263"></a>00263     <span class="keyword">const</span> page* srcp = src.head_page;
-<a name="l00264"></a>00264     <span class="keywordflow">if</span>( srcp ) {
-<a name="l00265"></a>00265         ticket g_index = head_counter;
-<a name="l00266"></a>00266         <span class="keywordflow">try</span> {
-<a name="l00267"></a>00267             size_t n_items  = (tail_counter-head_counter)/concurrent_queue_rep_base::n_queue;
-<a name="l00268"></a>00268             size_t index = head_counter/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
-<a name="l00269"></a>00269             size_t end_in_first_page = (index+n_items<base.my_rep->items_per_page)?(index+n_items):base.my_rep->items_per_page;
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271             head_page = make_copy( base, srcp, index, end_in_first_page, g_index );
-<a name="l00272"></a>00272             page* cur_page = head_page;
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274             <span class="keywordflow">if</span>( srcp != src.tail_page ) {
-<a name="l00275"></a>00275                 <span class="keywordflow">for</span>( srcp = srcp->next; srcp!=src.tail_page; srcp=srcp->next ) {
-<a name="l00276"></a>00276                     cur_page->next = make_copy( base, srcp, 0, base.my_rep->items_per_page, g_index );
-<a name="l00277"></a>00277                     cur_page = cur_page->next;
-<a name="l00278"></a>00278                 }
-<a name="l00279"></a>00279 
-<a name="l00280"></a>00280                 __TBB_ASSERT( srcp==src.tail_page, NULL );
-<a name="l00281"></a>00281                 size_t last_index = tail_counter/concurrent_queue_rep_base::n_queue & (base.my_rep->items_per_page-1);
-<a name="l00282"></a>00282                 <span class="keywordflow">if</span>( last_index==0 ) last_index = base.my_rep->items_per_page;
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284                 cur_page->next = make_copy( base, srcp, 0, last_index, g_index );
-<a name="l00285"></a>00285                 cur_page = cur_page->next;
-<a name="l00286"></a>00286             }
-<a name="l00287"></a>00287             tail_page = cur_page;
-<a name="l00288"></a>00288         } <span class="keywordflow">catch</span> (...) {
-<a name="l00289"></a>00289             make_invalid( g_index );
-<a name="l00290"></a>00290         }
-<a name="l00291"></a>00291     } <span class="keywordflow">else</span> {
-<a name="l00292"></a>00292         head_page = tail_page = NULL;
-<a name="l00293"></a>00293     }
-<a name="l00294"></a>00294     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00295"></a>00295 }
-<a name="l00296"></a>00296 
-<a name="l00297"></a>00297 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00298"></a>00298 <span class="keywordtype">void</span> micro_queue<T>::make_invalid( ticket k ) {
-<a name="l00299"></a>00299     <span class="keyword">static</span> page dummy = {static_cast<page*>((<span class="keywordtype">void</span>*)1), 0};
-<a name="l00300"></a>00300     <span class="comment">// mark it so that no more pushes are allowed.</span>
-<a name="l00301"></a>00301     invalid_page = &dummy;
-<a name="l00302"></a>00302     {
-<a name="l00303"></a>00303         spin_mutex::scoped_lock lock( page_mutex );
-<a name="l00304"></a>00304         tail_counter = k+concurrent_queue_rep_base::n_queue+1;
-<a name="l00305"></a>00305         <span class="keywordflow">if</span>( page* q = tail_page )
-<a name="l00306"></a>00306             q->next = static_cast<page*>(invalid_page);
-<a name="l00307"></a>00307         <span class="keywordflow">else</span>
-<a name="l00308"></a>00308             head_page = static_cast<page*>(invalid_page); 
-<a name="l00309"></a>00309         tail_page = static_cast<page*>(invalid_page);
-<a name="l00310"></a>00310     }
-<a name="l00311"></a>00311     <span class="keywordflow">throw</span>;
-<a name="l00312"></a>00312 }
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00315"></a>00315 concurrent_queue_rep_base::page* micro_queue<T>::make_copy( concurrent_queue_base_v3<T>& base, <span class="keyword">const</span> concurrent_queue_rep_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) {
-<a name="l00316"></a>00316     concurrent_queue_page_allocator& pa = base;
-<a name="l00317"></a>00317     page* new_page = pa.allocate_page();
-<a name="l00318"></a>00318     new_page->next = NULL;
-<a name="l00319"></a>00319     new_page->mask = src_page->mask;
-<a name="l00320"></a>00320     <span class="keywordflow">for</span>( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index )
-<a name="l00321"></a>00321         <span class="keywordflow">if</span>( new_page->mask & uintptr_t(1)<<begin_in_page )
-<a name="l00322"></a>00322             copy_item( *new_page, begin_in_page, *src_page, begin_in_page );
-<a name="l00323"></a>00323     <span class="keywordflow">return</span> new_page;
-<a name="l00324"></a>00324 }
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00327"></a>00327 <span class="keyword">class </span>micro_queue_pop_finalizer: no_copy {
-<a name="l00328"></a>00328     <span class="keyword">typedef</span> concurrent_queue_rep_base::page page;
-<a name="l00329"></a>00329     ticket my_ticket;
-<a name="l00330"></a>00330     micro_queue<T>& my_queue;
-<a name="l00331"></a>00331     page* my_page; 
-<a name="l00332"></a>00332     concurrent_queue_page_allocator& allocator;
-<a name="l00333"></a>00333 <span class="keyword">public</span>:
-<a name="l00334"></a>00334     micro_queue_pop_finalizer( micro_queue<T>& queue, concurrent_queue_base_v3<T>& b, ticket k, page* p ) :
-<a name="l00335"></a>00335         my_ticket(k), my_queue(queue), my_page(p), allocator(b)
-<a name="l00336"></a>00336     {}
-<a name="l00337"></a>00337     ~micro_queue_pop_finalizer() ;
-<a name="l00338"></a>00338 };
-<a name="l00339"></a>00339 
-<a name="l00340"></a>00340 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00341"></a>00341 micro_queue_pop_finalizer<T>::~micro_queue_pop_finalizer() {
-<a name="l00342"></a>00342     page* p = my_page;
-<a name="l00343"></a>00343     <span class="keywordflow">if</span>( p ) {
-<a name="l00344"></a>00344         spin_mutex::scoped_lock lock( my_queue.page_mutex );
-<a name="l00345"></a>00345         page* q = p->next;
-<a name="l00346"></a>00346         my_queue.head_page = q;
-<a name="l00347"></a>00347         <span class="keywordflow">if</span>( !q ) {
-<a name="l00348"></a>00348             my_queue.tail_page = NULL;
-<a name="l00349"></a>00349         }
-<a name="l00350"></a>00350     }
-<a name="l00351"></a>00351     my_queue.head_counter = my_ticket;
-<a name="l00352"></a>00352     <span class="keywordflow">if</span>( p ) {
-<a name="l00353"></a>00353         allocator.deallocate_page( p );
-<a name="l00354"></a>00354     }
-<a name="l00355"></a>00355 }
-<a name="l00356"></a>00356 
-<a name="l00357"></a>00357 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00358"></a>00358 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>
-<a name="l00359"></a>00359 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4146 is back</span>
-<a name="l00360"></a>00360 <span class="preprocessor"></span>
-<a name="l00361"></a>00361 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>concurrent_queue_iterator_rep ;
-<a name="l00362"></a>00362 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00363"></a>00363 
-<a name="l00365"></a>00365 
-<a name="l00368"></a>00368 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00369"></a>00369 <span class="keyword">struct </span>concurrent_queue_rep : <span class="keyword">public</span> concurrent_queue_rep_base {
-<a name="l00370"></a>00370     micro_queue<T> array[n_queue];
-<a name="l00371"></a>00371 
-<a name="l00373"></a>00373     <span class="keyword">static</span> size_t index( ticket k ) {
-<a name="l00374"></a>00374         <span class="keywordflow">return</span> k*phi%n_queue;
-<a name="l00375"></a>00375     }
-<a name="l00376"></a>00376 
-<a name="l00377"></a>00377     micro_queue<T>& choose( ticket k ) {
-<a name="l00378"></a>00378         <span class="comment">// The formula here approximates LRU in a cache-oblivious way.</span>
-<a name="l00379"></a>00379         <span class="keywordflow">return</span> array[index(k)];
-<a name="l00380"></a>00380     }
-<a name="l00381"></a>00381 };
-<a name="l00382"></a>00382 
-<a name="l00384"></a>00384 
-<a name="l00388"></a>00388 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00389"></a>00389 <span class="keyword">class </span>concurrent_queue_base_v3: <span class="keyword">public</span> concurrent_queue_page_allocator {
-<a name="l00391"></a>00391     concurrent_queue_rep<T>* my_rep;
-<a name="l00392"></a>00392 
-<a name="l00393"></a>00393     <span class="keyword">friend</span> <span class="keyword">struct </span>concurrent_queue_rep<T>;
-<a name="l00394"></a>00394     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue<T>;
-<a name="l00395"></a>00395     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep<T>;
-<a name="l00396"></a>00396     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_base_v3<T>;
-<a name="l00397"></a>00397 
-<a name="l00398"></a>00398 <span class="keyword">protected</span>:
-<a name="l00399"></a>00399     <span class="keyword">typedef</span> <span class="keyword">typename</span> concurrent_queue_rep<T>::page page;
-<a name="l00400"></a>00400 
-<a name="l00401"></a>00401 <span class="keyword">private</span>:
-<a name="l00402"></a>00402     <span class="comment">/* override */</span> <span class="keyword">virtual</span> page *allocate_page() {
-<a name="l00403"></a>00403         concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00404"></a>00404         size_t n = <span class="keyword">sizeof</span>(page) + r.items_per_page*r.item_size;
-<a name="l00405"></a>00405         <span class="keywordflow">return</span> reinterpret_cast<page*>(allocate_block ( n ));
-<a name="l00406"></a>00406     }
-<a name="l00407"></a>00407 
-<a name="l00408"></a>00408     <span class="comment">/* override */</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( concurrent_queue_rep_base::page *p ) {
-<a name="l00409"></a>00409         concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00410"></a>00410         size_t n = <span class="keyword">sizeof</span>(page) + r.items_per_page*r.item_size;
-<a name="l00411"></a>00411         deallocate_block( reinterpret_cast<void*>(p), n );
-<a name="l00412"></a>00412     }
-<a name="l00413"></a>00413 
-<a name="l00415"></a>00415     <span class="keyword">virtual</span> <span class="keywordtype">void</span> *allocate_block( size_t n ) = 0;
-<a name="l00416"></a>00416 
-<a name="l00418"></a>00418     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_block( <span class="keywordtype">void</span> *p, size_t n ) = 0;
-<a name="l00419"></a>00419 
-<a name="l00420"></a>00420 <span class="keyword">protected</span>:
-<a name="l00421"></a>00421     concurrent_queue_base_v3( size_t item_size ) ;
-<a name="l00422"></a>00422 
-<a name="l00423"></a>00423     <span class="comment">/* override */</span> <span class="keyword">virtual</span> ~concurrent_queue_base_v3() {
-<a name="l00424"></a>00424         size_t nq = my_rep->n_queue;
-<a name="l00425"></a>00425         <span class="keywordflow">for</span>( size_t i=0; i<nq; i++ )
-<a name="l00426"></a>00426             __TBB_ASSERT( my_rep->array[i].tail_page==NULL, <span class="stringliteral">"pages were not freed properly"</span> );
-<a name="l00427"></a>00427         cache_aligned_allocator<concurrent_queue_rep<T> >().deallocate(my_rep,1);
-<a name="l00428"></a>00428     }
-<a name="l00429"></a>00429 
-<a name="l00431"></a>00431     <span class="keywordtype">void</span> internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) {
-<a name="l00432"></a>00432         concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00433"></a>00433         ticket k = r.tail_counter++;
-<a name="l00434"></a>00434         r.choose(k).push( src, k, *<span class="keyword">this</span> );
-<a name="l00435"></a>00435     }
-<a name="l00436"></a>00436 
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439     <span class="keywordtype">bool</span> internal_try_pop( <span class="keywordtype">void</span>* dst ) ;
-<a name="l00440"></a>00440 
-<a name="l00442"></a>00442     size_t internal_size() <span class="keyword">const </span>;
-<a name="l00443"></a>00443 
-<a name="l00445"></a>00445     <span class="keywordtype">bool</span> internal_empty() <span class="keyword">const </span>;
-<a name="l00446"></a>00446 
-<a name="l00448"></a>00448     <span class="comment">/* note that the name may be misleading, but it remains so due to a historical accident. */</span>
-<a name="l00449"></a>00449     <span class="keywordtype">void</span> internal_finish_clear() ;
-<a name="l00450"></a>00450 
-<a name="l00452"></a>00452     <span class="keywordtype">void</span> internal_throw_exception()<span class="keyword"> const </span>{
-<a name="l00453"></a>00453         <span class="keywordflow">throw</span> std::bad_alloc();
-<a name="l00454"></a>00454     }
-<a name="l00455"></a>00455 
-<a name="l00457"></a>00457     <span class="keywordtype">void</span> assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) ;
-<a name="l00458"></a>00458 };
-<a name="l00459"></a>00459 
-<a name="l00460"></a>00460 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00461"></a>00461 concurrent_queue_base_v3<T>::concurrent_queue_base_v3( size_t item_size ) {
-<a name="l00462"></a>00462     my_rep = cache_aligned_allocator<concurrent_queue_rep<T> >().allocate(1);
-<a name="l00463"></a>00463     __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, <span class="stringliteral">"alignment error"</span> );
-<a name="l00464"></a>00464     __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, <span class="stringliteral">"alignment error"</span> );
-<a name="l00465"></a>00465     __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, <span class="stringliteral">"alignment error"</span> );
-<a name="l00466"></a>00466     __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, <span class="stringliteral">"alignment error"</span> );
-<a name="l00467"></a>00467     memset(my_rep,0,<span class="keyword">sizeof</span>(concurrent_queue_rep<T>));
-<a name="l00468"></a>00468     my_rep->item_size = item_size;
-<a name="l00469"></a>00469     my_rep->items_per_page = item_size<=8 ? 32 :
-<a name="l00470"></a>00470                              item_size<=16 ? 16 : 
-<a name="l00471"></a>00471                              item_size<=32 ? 8 :
-<a name="l00472"></a>00472                              item_size<=64 ? 4 :
-<a name="l00473"></a>00473                              item_size<=128 ? 2 :
-<a name="l00474"></a>00474                              1;
-<a name="l00475"></a>00475 }
-<a name="l00476"></a>00476 
-<a name="l00477"></a>00477 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00478"></a>00478 <span class="keywordtype">bool</span> concurrent_queue_base_v3<T>::internal_try_pop( <span class="keywordtype">void</span>* dst ) {
-<a name="l00479"></a>00479     concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00480"></a>00480     ticket k;
-<a name="l00481"></a>00481     <span class="keywordflow">do</span> {
-<a name="l00482"></a>00482         k = r.head_counter;
-<a name="l00483"></a>00483         <span class="keywordflow">for</span>(;;) {
-<a name="l00484"></a>00484             <span class="keywordflow">if</span>( r.tail_counter<=k ) {
-<a name="l00485"></a>00485                 <span class="comment">// Queue is empty </span>
-<a name="l00486"></a>00486                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00487"></a>00487             }
-<a name="l00488"></a>00488             <span class="comment">// Queue had item with ticket k when we looked.  Attempt to get that item.</span>
-<a name="l00489"></a>00489             ticket tk=k;
-<a name="l00490"></a>00490 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
-<a name="l00491"></a>00491 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00492"></a>00492 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4267)</span>
-<a name="l00493"></a>00493 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00494"></a>00494 <span class="preprocessor"></span>            k = r.head_counter.compare_and_swap( tk+1, tk );
-<a name="l00495"></a>00495 <span class="preprocessor">#if defined(_MSC_VER) && defined(_Wp64)</span>
-<a name="l00496"></a>00496 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00497"></a>00497 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00498"></a>00498 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( k==tk )
-<a name="l00499"></a>00499                 <span class="keywordflow">break</span>;
-<a name="l00500"></a>00500             <span class="comment">// Another thread snatched the item, retry.</span>
-<a name="l00501"></a>00501         }
-<a name="l00502"></a>00502     } <span class="keywordflow">while</span>( !r.choose( k ).pop( dst, k, *<span class="keyword">this</span> ) );
-<a name="l00503"></a>00503     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00504"></a>00504 }
-<a name="l00505"></a>00505 
-<a name="l00506"></a>00506 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00507"></a>00507 size_t concurrent_queue_base_v3<T>::internal_size()<span class="keyword"> const </span>{
-<a name="l00508"></a>00508     concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00509"></a>00509     __TBB_ASSERT( <span class="keyword">sizeof</span>(ptrdiff_t)<=<span class="keyword">sizeof</span>(size_t), NULL );
-<a name="l00510"></a>00510     ticket hc = r.head_counter;
-<a name="l00511"></a>00511     size_t nie = r.n_invalid_entries;
-<a name="l00512"></a>00512     ticket tc = r.tail_counter;
-<a name="l00513"></a>00513     __TBB_ASSERT( hc!=tc || !nie, NULL );
-<a name="l00514"></a>00514     ptrdiff_t sz = tc-hc-nie;
-<a name="l00515"></a>00515     <span class="keywordflow">return</span> sz<0 ? 0 :  size_t(sz);
-<a name="l00516"></a>00516 }
-<a name="l00517"></a>00517 
-<a name="l00518"></a>00518 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00519"></a>00519 <span class="keywordtype">bool</span> concurrent_queue_base_v3<T>::internal_empty()<span class="keyword"> const </span>{
-<a name="l00520"></a>00520     concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00521"></a>00521     ticket tc = r.tail_counter;
-<a name="l00522"></a>00522     ticket hc = r.head_counter;
-<a name="l00523"></a>00523     <span class="comment">// if tc!=r.tail_counter, the queue was not empty at some point between the two reads.</span>
-<a name="l00524"></a>00524     <span class="keywordflow">return</span> tc==r.tail_counter && tc==hc+r.n_invalid_entries ;
-<a name="l00525"></a>00525 }
-<a name="l00526"></a>00526 
-<a name="l00527"></a>00527 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00528"></a>00528 <span class="keywordtype">void</span> concurrent_queue_base_v3<T>::internal_finish_clear() {
-<a name="l00529"></a>00529     concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00530"></a>00530     size_t nq = r.n_queue;
-<a name="l00531"></a>00531     <span class="keywordflow">for</span>( size_t i=0; i<nq; ++i ) {
-<a name="l00532"></a>00532         page* tp = r.array[i].tail_page;
-<a name="l00533"></a>00533         __TBB_ASSERT( r.array[i].head_page==tp, <span class="stringliteral">"at most one page should remain"</span> );
-<a name="l00534"></a>00534         <span class="keywordflow">if</span>( tp!=NULL) {
-<a name="l00535"></a>00535             <span class="keywordflow">if</span>( tp!=invalid_page ) deallocate_page( tp );
-<a name="l00536"></a>00536             r.array[i].tail_page = NULL;
-<a name="l00537"></a>00537         }
-<a name="l00538"></a>00538     }
-<a name="l00539"></a>00539 }
-<a name="l00540"></a>00540 
-<a name="l00541"></a>00541 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00542"></a>00542 <span class="keywordtype">void</span> concurrent_queue_base_v3<T>::assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) {
-<a name="l00543"></a>00543     concurrent_queue_rep<T>& r = *my_rep;
-<a name="l00544"></a>00544     r.items_per_page = src.my_rep->items_per_page;
-<a name="l00545"></a>00545 
-<a name="l00546"></a>00546     <span class="comment">// copy concurrent_queue_rep.</span>
-<a name="l00547"></a>00547     r.head_counter = src.my_rep->head_counter;
-<a name="l00548"></a>00548     r.tail_counter = src.my_rep->tail_counter;
-<a name="l00549"></a>00549     r.n_invalid_entries = src.my_rep->n_invalid_entries;
-<a name="l00550"></a>00550 
-<a name="l00551"></a>00551     <span class="comment">// copy micro_queues</span>
-<a name="l00552"></a>00552     <span class="keywordflow">for</span>( size_t i = 0; i<r.n_queue; ++i )
-<a name="l00553"></a>00553         r.array[i].assign( src.my_rep->array[i], *<span class="keyword">this</span>);
-<a name="l00554"></a>00554 
-<a name="l00555"></a>00555     __TBB_ASSERT( r.head_counter==src.my_rep->head_counter && r.tail_counter==src.my_rep->tail_counter, 
-<a name="l00556"></a>00556             <span class="stringliteral">"the source concurrent queue should not be concurrently modified."</span> );
-<a name="l00557"></a>00557 }
-<a name="l00558"></a>00558 
-<a name="l00559"></a>00559 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">class </span>concurrent_queue_iterator;
-<a name="l00560"></a>00560 
-<a name="l00561"></a>00561 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00562"></a>00562 <span class="keyword">class </span>concurrent_queue_iterator_rep: no_assign {
-<a name="l00563"></a>00563 <span class="keyword">public</span>:
-<a name="l00564"></a>00564     ticket head_counter;
-<a name="l00565"></a>00565     <span class="keyword">const</span> concurrent_queue_base_v3<T>& my_queue;
-<a name="l00566"></a>00566     <span class="keyword">typename</span> concurrent_queue_base_v3<T>::page* array[concurrent_queue_rep<T>::n_queue];
-<a name="l00567"></a>00567     concurrent_queue_iterator_rep( <span class="keyword">const</span> concurrent_queue_base_v3<T>& queue ) :
-<a name="l00568"></a>00568         head_counter(queue.my_rep->head_counter),
-<a name="l00569"></a>00569         my_queue(queue)
-<a name="l00570"></a>00570     {
-<a name="l00571"></a>00571         <span class="keywordflow">for</span>( size_t k=0; k<concurrent_queue_rep<T>::n_queue; ++k )
-<a name="l00572"></a>00572             array[k] = queue.my_rep->array[k].head_page;
-<a name="l00573"></a>00573     }
-<a name="l00574"></a>00574 
-<a name="l00576"></a>00576     <span class="keywordtype">bool</span> get_item( <span class="keywordtype">void</span>*& item, size_t k ) ;
-<a name="l00577"></a>00577 };
-<a name="l00578"></a>00578 
-<a name="l00579"></a>00579 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00580"></a>00580 <span class="keywordtype">bool</span> concurrent_queue_iterator_rep<T>::get_item( <span class="keywordtype">void</span>*& item, size_t k ) {
-<a name="l00581"></a>00581     <span class="keywordflow">if</span>( k==my_queue.my_rep->tail_counter ) {
-<a name="l00582"></a>00582         item = NULL;
-<a name="l00583"></a>00583         <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00584"></a>00584     } <span class="keywordflow">else</span> {
-<a name="l00585"></a>00585         <span class="keyword">typename</span> concurrent_queue_base_v3<T>::page* p = array[concurrent_queue_rep<T>::index(k)];
-<a name="l00586"></a>00586         __TBB_ASSERT(p,NULL);
-<a name="l00587"></a>00587         size_t i = k/concurrent_queue_rep<T>::n_queue & (my_queue.my_rep->items_per_page-1);
-<a name="l00588"></a>00588         item = static_cast<unsigned char*>(static_cast<void*>(p+1)) + my_queue.my_rep->item_size*i;
-<a name="l00589"></a>00589         <span class="keywordflow">return</span> (p->mask & uintptr_t(1)<<i)!=0;
-<a name="l00590"></a>00590     }
-<a name="l00591"></a>00591 }
-<a name="l00592"></a>00592 
-<a name="l00594"></a>00594 
-<a name="l00595"></a>00595 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00596"></a>00596 <span class="keyword">class </span>concurrent_queue_iterator_base_v3 : no_assign {
-<a name="l00598"></a>00598 
-<a name="l00599"></a>00599     concurrent_queue_iterator_rep<Value>* my_rep;
-<a name="l00600"></a>00600 
-<a name="l00601"></a>00601     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00602"></a>00602     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00603"></a>00603 
-<a name="l00604"></a>00604     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00605"></a>00605     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00606"></a>00606 <span class="keyword">protected</span>:
-<a name="l00608"></a>00608     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610 <span class="keyword">public</span>:
-<a name="l00612"></a>00612     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
-<a name="l00613"></a>00613 
-<a name="l00615"></a>00615     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-<a name="l00616"></a>00616         assign(i);
-<a name="l00617"></a>00617     }
-<a name="l00618"></a>00618 
-<a name="l00620"></a>00620     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) ;
-<a name="l00621"></a>00621 
-<a name="l00622"></a>00622 <span class="keyword">protected</span>:
-<a name="l00624"></a>00624     <span class="keywordtype">void</span> assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) ;
-<a name="l00625"></a>00625 
-<a name="l00627"></a>00627     <span class="keywordtype">void</span> advance() ;
-<a name="l00628"></a>00628 
-<a name="l00630"></a>00630     ~concurrent_queue_iterator_base_v3() {
-<a name="l00631"></a>00631         cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
-<a name="l00632"></a>00632         my_rep = NULL;
-<a name="l00633"></a>00633     }
-<a name="l00634"></a>00634 };
-<a name="l00635"></a>00635 
-<a name="l00636"></a>00636 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00637"></a>00637 concurrent_queue_iterator_base_v3<Value>::concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) {
-<a name="l00638"></a>00638     my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
-<a name="l00639"></a>00639     <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>(queue);
-<a name="l00640"></a>00640     size_t k = my_rep->head_counter;
-<a name="l00641"></a>00641     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
-<a name="l00642"></a>00642 }
-<a name="l00643"></a>00643 
-<a name="l00644"></a>00644 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00645"></a>00645 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) {
-<a name="l00646"></a>00646     <span class="keywordflow">if</span>( my_rep!=other.my_rep ) {
-<a name="l00647"></a>00647         <span class="keywordflow">if</span>( my_rep ) {
-<a name="l00648"></a>00648             cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
-<a name="l00649"></a>00649             my_rep = NULL;
-<a name="l00650"></a>00650         }
-<a name="l00651"></a>00651         <span class="keywordflow">if</span>( other.my_rep ) {
-<a name="l00652"></a>00652             my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
-<a name="l00653"></a>00653             <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>( *other.my_rep );
-<a name="l00654"></a>00654         }
-<a name="l00655"></a>00655     }
-<a name="l00656"></a>00656     my_item = other.my_item;
-<a name="l00657"></a>00657 }
-<a name="l00658"></a>00658 
-<a name="l00659"></a>00659 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00660"></a>00660 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::advance() {
-<a name="l00661"></a>00661     __TBB_ASSERT( my_item, <span class="stringliteral">"attempt to increment iterator past end of queue"</span> );  
-<a name="l00662"></a>00662     size_t k = my_rep->head_counter;
-<a name="l00663"></a>00663     <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue = my_rep->my_queue;
-<a name="l00664"></a>00664 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00665"></a>00665 <span class="preprocessor"></span>    <span class="keywordtype">void</span>* tmp;
-<a name="l00666"></a>00666     my_rep->get_item(tmp,k);
-<a name="l00667"></a>00667     __TBB_ASSERT( my_item==tmp, NULL );
-<a name="l00668"></a>00668 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00669"></a>00669     size_t i = k/concurrent_queue_rep<Value>::n_queue & (queue.my_rep->items_per_page-1);
-<a name="l00670"></a>00670     <span class="keywordflow">if</span>( i==queue.my_rep->items_per_page-1 ) {
-<a name="l00671"></a>00671         <span class="keyword">typename</span> concurrent_queue_base_v3<Value>::page*& root = my_rep->array[concurrent_queue_rep<Value>::index(k)];
-<a name="l00672"></a>00672         root = root->next;
-<a name="l00673"></a>00673     }
-<a name="l00674"></a>00674     <span class="comment">// advance k</span>
-<a name="l00675"></a>00675     my_rep->head_counter = ++k;
-<a name="l00676"></a>00676     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
-<a name="l00677"></a>00677 }
-<a name="l00678"></a>00678 
-<a name="l00679"></a>00679 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00680"></a>00680 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> concurrent_queue_iterator_base_v3<const T>& add_constness( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<T>& q )
-<a name="l00681"></a>00681 {
-<a name="l00682"></a>00682     <span class="keywordflow">return</span> *reinterpret_cast<const concurrent_queue_iterator_base_v3<const T> *>(&q) ;
-<a name="l00683"></a>00683 }
-<a name="l00684"></a>00684 
-<a name="l00686"></a>00686 
-<a name="l00688"></a>00688 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00689"></a>00689 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base_v3<Value>,
-<a name="l00690"></a>00690         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
-<a name="l00691"></a>00691 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
-<a name="l00692"></a>00692 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00693"></a>00693     <span class="keyword">friend</span> class ::tbb::strict_ppl::concurrent_queue;
-<a name="l00694"></a>00694 <span class="preprocessor">#else</span>
-<a name="l00695"></a>00695 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00696"></a>00696 <span class="preprocessor">#endif </span>
-<a name="l00698"></a>00698 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3<Value>& queue ) :</span>
-<a name="l00699"></a>00699 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3<Value>(queue)
-<a name="l00700"></a>00700     {
-<a name="l00701"></a>00701     }
-<a name="l00702"></a>00702 
-<a name="l00703"></a>00703 <span class="keyword">public</span>:
-<a name="l00704"></a>00704     concurrent_queue_iterator() {}
-<a name="l00705"></a>00705 
-<a name="l00707"></a>00707     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,Value>& other ) :
-<a name="l00708"></a>00708         concurrent_queue_iterator_base_v3<Value>(other)
-<a name="l00709"></a>00709     {
-<a name="l00710"></a>00710     }
-<a name="l00711"></a>00711 
-<a name="l00712"></a>00712     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00713"></a>00713     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,T>& other ) :
-<a name="l00714"></a>00714         concurrent_queue_iterator_base_v3<Value>(add_constness(other))
-<a name="l00715"></a>00715     {
-<a name="l00716"></a>00716     }
-<a name="l00717"></a>00717 
-<a name="l00719"></a>00719     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
-<a name="l00720"></a>00720         assign(other);
-<a name="l00721"></a>00721         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00722"></a>00722     }
-<a name="l00723"></a>00723 
-<a name="l00725"></a>00725     Value& operator*()<span class="keyword"> const </span>{
-<a name="l00726"></a>00726         <span class="keywordflow">return</span> *static_cast<Value*>(this->my_item);
-<a name="l00727"></a>00727     }
-<a name="l00728"></a>00728 
-<a name="l00729"></a>00729     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00730"></a>00730 
-<a name="l00732"></a>00732     concurrent_queue_iterator& operator++() {
-<a name="l00733"></a>00733         this->advance();
-<a name="l00734"></a>00734         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00735"></a>00735     }
-<a name="l00736"></a>00736 
-<a name="l00738"></a>00738     Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00739"></a>00739         Value* result = &operator*();
-<a name="l00740"></a>00740         operator++();
-<a name="l00741"></a>00741         <span class="keywordflow">return</span> result;
-<a name="l00742"></a>00742     }
-<a name="l00743"></a>00743 }; <span class="comment">// concurrent_queue_iterator</span>
-<a name="l00744"></a>00744 
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00747"></a>00747 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00748"></a>00748     <span class="keywordflow">return</span> i.my_item==j.my_item;
-<a name="l00749"></a>00749 }
-<a name="l00750"></a>00750 
-<a name="l00751"></a>00751 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00752"></a>00752 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00753"></a>00753     <span class="keywordflow">return</span> i.my_item!=j.my_item;
-<a name="l00754"></a>00754 }
-<a name="l00755"></a>00755 
-<a name="l00756"></a>00756 } <span class="comment">// namespace internal</span>
-<a name="l00757"></a>00757 
-<a name="l00758"></a>00758 } <span class="comment">// namespace strict_ppl</span>
-<a name="l00759"></a>00759 
-<a name="l00761"></a>00761 <span class="keyword">namespace </span>internal {
-<a name="l00762"></a>00762 
-<a name="l00763"></a>00763 <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00764"></a>00764 <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00765"></a>00765 <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00766"></a>00766 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">class </span>concurrent_queue_iterator;
-<a name="l00767"></a>00767 
-<a name="l00769"></a>00769 
-<a name="l00771"></a>00771 <span class="keyword">class </span>concurrent_queue_base_v3: no_copy {
-<a name="l00773"></a>00773     concurrent_queue_rep* my_rep;
-<a name="l00774"></a>00774 
-<a name="l00775"></a>00775     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00776"></a>00776     <span class="keyword">friend</span> <span class="keyword">struct </span>micro_queue;
-<a name="l00777"></a>00777     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer;
-<a name="l00778"></a>00778     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00779"></a>00779     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00780"></a>00780 <span class="keyword">protected</span>:
-<a name="l00782"></a>00782     <span class="keyword">struct </span>page {
-<a name="l00783"></a>00783         page* next;
-<a name="l00784"></a>00784         uintptr_t mask; 
-<a name="l00785"></a>00785     };
-<a name="l00786"></a>00786 
-<a name="l00788"></a>00788     ptrdiff_t my_capacity;
-<a name="l00789"></a>00789    
-<a name="l00791"></a>00791     size_t items_per_page;
-<a name="l00792"></a>00792 
-<a name="l00794"></a>00794     size_t item_size;
-<a name="l00795"></a>00795 
-<a name="l00796"></a>00796 <span class="keyword">private</span>:
-<a name="l00797"></a>00797     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_item( page& dst, size_t index, <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) = 0;
-<a name="l00798"></a>00798     <span class="keyword">virtual</span> <span class="keywordtype">void</span> assign_and_destroy_item( <span class="keywordtype">void</span>* dst, page& src, size_t index ) = 0;
-<a name="l00799"></a>00799 <span class="keyword">protected</span>:
-<a name="l00800"></a>00800     __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
-<a name="l00801"></a>00801     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
-<a name="l00802"></a>00802 
-<a name="l00804"></a>00804     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00805"></a>00805 
-<a name="l00807"></a>00807     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_pop( <span class="keywordtype">void</span>* dst );
-<a name="l00808"></a>00808 
-<a name="l00810"></a>00810     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_push_if_not_full( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00811"></a>00811 
-<a name="l00813"></a>00813 
-<a name="l00814"></a>00814     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_pop_if_present( <span class="keywordtype">void</span>* dst );
-<a name="l00815"></a>00815 
-<a name="l00817"></a>00817     ptrdiff_t __TBB_EXPORTED_METHOD internal_size() <span class="keyword">const</span>;
-<a name="l00818"></a>00818 
-<a name="l00820"></a>00820     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_empty() <span class="keyword">const</span>;
-<a name="l00821"></a>00821 
-<a name="l00823"></a>00823     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
-<a name="l00824"></a>00824 
-<a name="l00826"></a>00826     <span class="keyword">virtual</span> page *allocate_page() = 0;
-<a name="l00827"></a>00827 
-<a name="l00829"></a>00829     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) = 0;
-<a name="l00830"></a>00830 
-<a name="l00832"></a>00832     <span class="comment">/* note that the name may be misleading, but it remains so due to a historical accident. */</span>
-<a name="l00833"></a>00833     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_finish_clear() ;
-<a name="l00834"></a>00834 
-<a name="l00836"></a>00836     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception() <span class="keyword">const</span>;
-<a name="l00837"></a>00837 
-<a name="l00839"></a>00839     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) ;
-<a name="l00840"></a>00840 
-<a name="l00841"></a>00841 <span class="keyword">private</span>:
-<a name="l00842"></a>00842     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_page_item( page& dst, size_t dindex, <span class="keyword">const</span> page& src, size_t sindex ) = 0;
-<a name="l00843"></a>00843 };
-<a name="l00844"></a>00844 
-<a name="l00846"></a>00846 
-<a name="l00847"></a>00847 <span class="keyword">class </span>concurrent_queue_iterator_base_v3 {
-<a name="l00849"></a>00849 
-<a name="l00850"></a>00850     concurrent_queue_iterator_rep* my_rep;
-<a name="l00851"></a>00851 
-<a name="l00852"></a>00852     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00853"></a>00853     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00854"></a>00854 
-<a name="l00855"></a>00855     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00856"></a>00856     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00857"></a>00857 <span class="keyword">protected</span>:
-<a name="l00859"></a>00859     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
-<a name="l00860"></a>00860 
-<a name="l00862"></a>00862     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
-<a name="l00863"></a>00863 
-<a name="l00865"></a>00865     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-<a name="l00866"></a>00866         assign(i);
-<a name="l00867"></a>00867     }
-<a name="l00868"></a>00868 
-<a name="l00870"></a>00870     __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3& queue );
-<a name="l00871"></a>00871 
-<a name="l00873"></a>00873     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i );
-<a name="l00874"></a>00874 
-<a name="l00876"></a>00876     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD advance();
-<a name="l00877"></a>00877 
-<a name="l00879"></a>00879     __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
-<a name="l00880"></a>00880 };
-<a name="l00881"></a>00881 
-<a name="l00882"></a>00882 <span class="keyword">typedef</span> concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
-<a name="l00883"></a>00883 
-<a name="l00885"></a>00885 
-<a name="l00887"></a>00887 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00888"></a>00888 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base,
-<a name="l00889"></a>00889         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
-<a name="l00890"></a>00890 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00891"></a>00891 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00892"></a>00892     <span class="keyword">friend</span> class ::tbb::concurrent_bounded_queue;
-<a name="l00893"></a>00893 
-<a name="l00894"></a>00894     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00895"></a>00895     <span class="keyword">friend</span> class ::tbb::deprecated::concurrent_queue;
-<a name="l00896"></a>00896 <span class="preprocessor">#else</span>
-<a name="l00897"></a>00897 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00898"></a>00898 <span class="preprocessor">#endif </span>
-<a name="l00900"></a>00900 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) :</span>
-<a name="l00901"></a>00901 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3(queue)
-<a name="l00902"></a>00902     {
-<a name="l00903"></a>00903     }
-<a name="l00904"></a>00904 
-<a name="l00905"></a>00905 <span class="keyword">public</span>:
-<a name="l00906"></a>00906     concurrent_queue_iterator() {}
-<a name="l00907"></a>00907 
-<a name="l00910"></a>00910     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00911"></a>00911         concurrent_queue_iterator_base_v3(other)
-<a name="l00912"></a>00912     {}
-<a name="l00913"></a>00913 
-<a name="l00915"></a>00915     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
-<a name="l00916"></a>00916         assign(other);
-<a name="l00917"></a>00917         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00918"></a>00918     }
-<a name="l00919"></a>00919 
-<a name="l00921"></a>00921     Value& operator*()<span class="keyword"> const </span>{
-<a name="l00922"></a>00922         <span class="keywordflow">return</span> *static_cast<Value*>(my_item);
-<a name="l00923"></a>00923     }
-<a name="l00924"></a>00924 
-<a name="l00925"></a>00925     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00926"></a>00926 
-<a name="l00928"></a>00928     concurrent_queue_iterator& operator++() {
-<a name="l00929"></a>00929         advance();
-<a name="l00930"></a>00930         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00931"></a>00931     }
-<a name="l00932"></a>00932 
-<a name="l00934"></a>00934     Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00935"></a>00935         Value* result = &operator*();
-<a name="l00936"></a>00936         operator++();
-<a name="l00937"></a>00937         <span class="keywordflow">return</span> result;
-<a name="l00938"></a>00938     }
-<a name="l00939"></a>00939 }; <span class="comment">// concurrent_queue_iterator</span>
-<a name="l00940"></a>00940 
-<a name="l00941"></a>00941 
-<a name="l00942"></a>00942 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00943"></a>00943 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00944"></a>00944     <span class="keywordflow">return</span> i.my_item==j.my_item;
-<a name="l00945"></a>00945 }
-<a name="l00946"></a>00946 
-<a name="l00947"></a>00947 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00948"></a>00948 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00949"></a>00949     <span class="keywordflow">return</span> i.my_item!=j.my_item;
-<a name="l00950"></a>00950 }
-<a name="l00951"></a>00951 
-<a name="l00952"></a>00952 } <span class="comment">// namespace internal;</span>
-<a name="l00953"></a>00953 
-<a name="l00955"></a>00955 
-<a name="l00956"></a>00956 } <span class="comment">// namespace tbb</span>
-<a name="l00957"></a>00957 
-<a name="l00958"></a>00958 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_internal_H */</span>
-</pre></div><hr>
+<h1>Containers</h1><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00128.html">tbb::combinable< T ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Thread-local storage with optional reduction.  <a href="a00128.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00130.html">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Unordered map from Key to T.  <a href="a00130.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00134.html">tbb::strict_ppl::concurrent_queue< T, A ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe non-blocking concurrent queue.  <a href="a00134.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html">tbb::concurrent_bounded_queue< T, A ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe blocking concurrent bounded queue.  <a href="a00129.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00135.html">tbb::deprecated::concurrent_queue< T, A ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A high-performance thread-safe blocking concurrent bounded queue.  <a href="a00135.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00136.html">tbb::concurrent_vector< T, A ></a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Concurrent vector container.  <a href="a00136.html#_details">More...</a><br></td></tr>
+</table>
+<hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
 <p></p>
diff --git a/doc/html/a00230.html b/doc/html/a00235.html
similarity index 84%
rename from doc/html/a00230.html
rename to doc/html/a00235.html
index b531267..6e23d97 100644
--- a/doc/html/a00230.html
+++ b/doc/html/a00235.html
@@ -26,40 +26,42 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00126.html">tbb::cache_aligned_allocator< void ></a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00126.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00154.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00158.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00155.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00159.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00166.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00170.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00167.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00171.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00175.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.  <a href="a00179.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00176.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.  <a href="a00180.html#_details">More...</a><br></td></tr>
 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (void *ptr)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (void *ptr)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (void *ptr, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (void *ptr, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (void **memptr, size_t alignment, size_t size)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (void **memptr, size_t alignment, size_t size)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (void *ptr, size_t size, size_t alignment)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void *__TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (void *ptr, size_t size, size_t alignment)</td></tr>
 
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (void *ptr)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (void *ptr)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t __TBB_EXPORTED_FUNC </td><td class="memItemRight" valign="bottom"><a class="el" href="a00235.html#g0965ce1b4b7835f92869c7fd867265f7">scalable_msize</a> (void *ptr)</td></tr>
 
 </table>
 <hr><h2>Function Documentation</h2>
@@ -216,6 +218,26 @@ The "free" analogue to discard a previously allocated piece of memory.
 The "malloc" analogue to allocate block of memory of size bytes. 
 </div>
 </div><p>
+<a class="anchor" name="g0965ce1b4b7835f92869c7fd867265f7"></a><!-- doxytag: member="scalable_allocator.h::scalable_msize" ref="g0965ce1b4b7835f92869c7fd867265f7" args="(void *ptr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">size_t __TBB_EXPORTED_FUNC scalable_msize           </td>
+          <td>(</td>
+          <td class="paramtype">void * </td>
+          <td class="paramname"> <em>ptr</em>          </td>
+          <td> ) </td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The analogue of _msize/malloc_size/malloc_usable_size. Returns the usable size of a memory block previously allocated by scalable_*, or 0 (zero) if ptr does not point to such a block. 
+</div>
+</div><p>
 <a class="anchor" name="g05dcec987480bb2c82ecdead6a085899"></a><!-- doxytag: member="scalable_allocator.h::scalable_posix_memalign" ref="g05dcec987480bb2c82ecdead6a085899" args="(void **memptr, size_t alignment, size_t size)" -->
 <div class="memitem">
 <div class="memproto">
diff --git a/doc/html/a00231.html b/doc/html/a00236.html
similarity index 70%
rename from doc/html/a00231.html
rename to doc/html/a00236.html
index e31b197..288916d 100644
--- a/doc/html/a00231.html
+++ b/doc/html/a00236.html
@@ -23,21 +23,27 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html">tbb::mutex</a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around the platform's native reader-writer lock.  <a href="a00142.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00148.html">tbb::queuing_mutex</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00144.html">tbb::null_mutex</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <a href="a00148.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A mutex which does nothing.  <a href="a00144.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Reader-writer lock with local-only spinning.  <a href="a00150.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html">tbb::recursive_mutex</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A rw mutex which does nothing.  <a href="a00146.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00152.html">tbb::queuing_mutex</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Mutex that allows recursive mutex acquisition.  <a href="a00152.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html">tbb::spin_mutex</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Queuing lock with local-only spinning.  <a href="a00152.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A lock that occupies a single byte.  <a href="a00157.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Reader-writer lock with local-only spinning.  <a href="a00154.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html">tbb::recursive_mutex</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <a href="a00159.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Mutex that allows recursive mutex acquisition.  <a href="a00156.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">tbb::spin_mutex</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A lock that occupies a single byte.  <a href="a00161.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Fast, unfair, spinning reader-writer lock with backoff and writer-preference.  <a href="a00163.html#_details">More...</a><br></td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/a00232.html b/doc/html/a00237.html
similarity index 92%
copy from doc/html/a00232.html
copy to doc/html/a00237.html
index b4981c7..9f15f5e 100644
--- a/doc/html/a00232.html
+++ b/doc/html/a00237.html
@@ -17,9 +17,9 @@
 <h1>Timing</h1><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00172.html">tbb::tick_count</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00176.html">tbb::tick_count</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00172.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Absolute timestamp.  <a href="a00176.html#_details">More...</a><br></td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/a00233.html b/doc/html/a00238.html
similarity index 83%
copy from doc/html/a00233.html
copy to doc/html/a00238.html
index 5011be4..cb17f55 100644
--- a/doc/html/a00233.html
+++ b/doc/html/a00238.html
@@ -17,21 +17,21 @@
 <h1>Task Scheduling</h1><table border="0" cellpadding="0" cellspacing="0">
 <tr><td></td></tr>
 <tr><td colspan="2"><br><h2>Classes</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00163.html">tbb::task_group_context</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00167.html">tbb::task_group_context</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00163.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html">tbb::task</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Used to form groups of tasks.  <a href="a00167.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00166.html">tbb::task</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00162.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Base class for user-defined tasks.  <a href="a00166.html#_details">More...</a><br></td></tr>
 <tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00137.html">tbb::empty_task</a></td></tr>
 
 <tr><td class="mdescLeft"> </td><td class="mdescRight">task that does nothing. Useful for synchronization.  <a href="a00137.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00164.html">tbb::task_list</a></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html">tbb::task_list</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00164.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A list of children.  <a href="a00168.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td></tr>
 
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00165.html#_details">More...</a><br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing reference to tbb scheduler.  <a href="a00169.html#_details">More...</a><br></td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/a00234.html b/doc/html/a00239.html
similarity index 80%
copy from doc/html/a00234.html
copy to doc/html/a00239.html
index 01dca2c..f46461b 100644
--- a/doc/html/a00234.html
+++ b/doc/html/a00239.html
@@ -51,24 +51,24 @@
 <a name="l00030"></a>00030 <span class="preprocessor">#include <iterator></span>
 <a name="l00031"></a>00031 <span class="preprocessor">#include <new></span>
 <a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="keyword">namespace </span>tbb {
+<a name="l00033"></a><a class="code" href="a00229.html">00033</a> <span class="keyword">namespace </span>tbb {
 <a name="l00034"></a>00034 
 <a name="l00035"></a>00035 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
 <a name="l00036"></a>00036 <span class="preprocessor"></span>
 <a name="l00037"></a>00037 <span class="comment">// forward declaration</span>
-<a name="l00038"></a>00038 <span class="keyword">namespace </span>strict_ppl {
-<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_queue;
+<a name="l00038"></a><a class="code" href="a00232.html">00038</a> <span class="keyword">namespace </span>strict_ppl {
+<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span><a class="code" href="a00134.html">concurrent_queue</a>;
 <a name="l00040"></a>00040 }
 <a name="l00041"></a>00041 
-<a name="l00042"></a>00042 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_bounded_queue;
+<a name="l00042"></a>00042 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span><a class="code" href="a00129.html">concurrent_bounded_queue</a>;
 <a name="l00043"></a>00043 
 <a name="l00044"></a>00044 <span class="keyword">namespace </span>deprecated {
-<a name="l00045"></a>00045 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span>concurrent_queue;
+<a name="l00045"></a>00045 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> A> <span class="keyword">class </span><a class="code" href="a00134.html">concurrent_queue</a>;
 <a name="l00046"></a>00046 }
 <a name="l00047"></a>00047 <span class="preprocessor">#endif</span>
 <a name="l00048"></a>00048 <span class="preprocessor"></span>
-<a name="l00051"></a>00051 <span class="keyword">namespace </span>strict_ppl {
-<a name="l00052"></a>00052 
+<a name="l00050"></a>00050 <span class="keyword">namespace </span>strict_ppl {
+<a name="l00051"></a>00051 
 <a name="l00053"></a>00053 <span class="keyword">namespace </span>internal {
 <a name="l00054"></a>00054 
 <a name="l00055"></a>00055 <span class="keyword">using namespace </span>tbb::internal;
@@ -591,301 +591,307 @@
 <a name="l00608"></a>00608     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
 <a name="l00609"></a>00609 
 <a name="l00610"></a>00610 <span class="keyword">public</span>:
-<a name="l00612"></a>00612     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
-<a name="l00613"></a>00613 
-<a name="l00615"></a>00615     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-<a name="l00616"></a>00616         assign(i);
-<a name="l00617"></a>00617     }
+<a name="l00612"></a>00612     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {
+<a name="l00613"></a>00613 <span class="preprocessor">#if __GNUC__==4&&__GNUC_MINOR__==3</span>
+<a name="l00614"></a>00614 <span class="preprocessor"></span>        <span class="comment">// to get around a possible gcc 4.3 bug</span>
+<a name="l00615"></a>00615         __asm__ __volatile__(<span class="stringliteral">""</span>: : :<span class="stringliteral">"memory"</span>);
+<a name="l00616"></a>00616 <span class="preprocessor">#endif</span>
+<a name="l00617"></a>00617 <span class="preprocessor"></span>    }
 <a name="l00618"></a>00618 
-<a name="l00620"></a>00620     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) ;
-<a name="l00621"></a>00621 
-<a name="l00622"></a>00622 <span class="keyword">protected</span>:
-<a name="l00624"></a>00624     <span class="keywordtype">void</span> assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) ;
-<a name="l00625"></a>00625 
-<a name="l00627"></a>00627     <span class="keywordtype">void</span> advance() ;
-<a name="l00628"></a>00628 
-<a name="l00630"></a>00630     ~concurrent_queue_iterator_base_v3() {
-<a name="l00631"></a>00631         cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
-<a name="l00632"></a>00632         my_rep = NULL;
-<a name="l00633"></a>00633     }
-<a name="l00634"></a>00634 };
-<a name="l00635"></a>00635 
-<a name="l00636"></a>00636 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00637"></a>00637 concurrent_queue_iterator_base_v3<Value>::concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) {
-<a name="l00638"></a>00638     my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
-<a name="l00639"></a>00639     <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>(queue);
-<a name="l00640"></a>00640     size_t k = my_rep->head_counter;
-<a name="l00641"></a>00641     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
-<a name="l00642"></a>00642 }
-<a name="l00643"></a>00643 
-<a name="l00644"></a>00644 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00645"></a>00645 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) {
-<a name="l00646"></a>00646     <span class="keywordflow">if</span>( my_rep!=other.my_rep ) {
-<a name="l00647"></a>00647         <span class="keywordflow">if</span>( my_rep ) {
-<a name="l00648"></a>00648             cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
-<a name="l00649"></a>00649             my_rep = NULL;
-<a name="l00650"></a>00650         }
-<a name="l00651"></a>00651         <span class="keywordflow">if</span>( other.my_rep ) {
-<a name="l00652"></a>00652             my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
-<a name="l00653"></a>00653             <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>( *other.my_rep );
-<a name="l00654"></a>00654         }
-<a name="l00655"></a>00655     }
-<a name="l00656"></a>00656     my_item = other.my_item;
-<a name="l00657"></a>00657 }
-<a name="l00658"></a>00658 
-<a name="l00659"></a>00659 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00660"></a>00660 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::advance() {
-<a name="l00661"></a>00661     __TBB_ASSERT( my_item, <span class="stringliteral">"attempt to increment iterator past end of queue"</span> );  
-<a name="l00662"></a>00662     size_t k = my_rep->head_counter;
-<a name="l00663"></a>00663     <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue = my_rep->my_queue;
-<a name="l00664"></a>00664 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00665"></a>00665 <span class="preprocessor"></span>    <span class="keywordtype">void</span>* tmp;
-<a name="l00666"></a>00666     my_rep->get_item(tmp,k);
-<a name="l00667"></a>00667     __TBB_ASSERT( my_item==tmp, NULL );
-<a name="l00668"></a>00668 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00669"></a>00669     size_t i = k/concurrent_queue_rep<Value>::n_queue & (queue.my_rep->items_per_page-1);
-<a name="l00670"></a>00670     <span class="keywordflow">if</span>( i==queue.my_rep->items_per_page-1 ) {
-<a name="l00671"></a>00671         <span class="keyword">typename</span> concurrent_queue_base_v3<Value>::page*& root = my_rep->array[concurrent_queue_rep<Value>::index(k)];
-<a name="l00672"></a>00672         root = root->next;
-<a name="l00673"></a>00673     }
-<a name="l00674"></a>00674     <span class="comment">// advance k</span>
-<a name="l00675"></a>00675     my_rep->head_counter = ++k;
-<a name="l00676"></a>00676     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
-<a name="l00677"></a>00677 }
-<a name="l00678"></a>00678 
-<a name="l00679"></a>00679 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00680"></a>00680 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> concurrent_queue_iterator_base_v3<const T>& add_constness( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<T>& q )
-<a name="l00681"></a>00681 {
-<a name="l00682"></a>00682     <span class="keywordflow">return</span> *reinterpret_cast<const concurrent_queue_iterator_base_v3<const T> *>(&q) ;
-<a name="l00683"></a>00683 }
-<a name="l00684"></a>00684 
-<a name="l00686"></a>00686 
-<a name="l00688"></a>00688 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00689"></a>00689 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base_v3<Value>,
-<a name="l00690"></a>00690         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
-<a name="l00691"></a>00691 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
-<a name="l00692"></a>00692 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00693"></a>00693     <span class="keyword">friend</span> class ::tbb::strict_ppl::concurrent_queue;
-<a name="l00694"></a>00694 <span class="preprocessor">#else</span>
-<a name="l00695"></a>00695 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00696"></a>00696 <span class="preprocessor">#endif </span>
-<a name="l00698"></a>00698 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3<Value>& queue ) :</span>
-<a name="l00699"></a>00699 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3<Value>(queue)
-<a name="l00700"></a>00700     {
-<a name="l00701"></a>00701     }
-<a name="l00702"></a>00702 
-<a name="l00703"></a>00703 <span class="keyword">public</span>:
-<a name="l00704"></a>00704     concurrent_queue_iterator() {}
-<a name="l00705"></a>00705 
-<a name="l00707"></a>00707     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,Value>& other ) :
-<a name="l00708"></a>00708         concurrent_queue_iterator_base_v3<Value>(other)
-<a name="l00709"></a>00709     {
-<a name="l00710"></a>00710     }
-<a name="l00711"></a>00711 
-<a name="l00712"></a>00712     <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00713"></a>00713     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,T>& other ) :
-<a name="l00714"></a>00714         concurrent_queue_iterator_base_v3<Value>(add_constness(other))
-<a name="l00715"></a>00715     {
-<a name="l00716"></a>00716     }
-<a name="l00717"></a>00717 
-<a name="l00719"></a>00719     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
-<a name="l00720"></a>00720         assign(other);
-<a name="l00721"></a>00721         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00722"></a>00722     }
-<a name="l00723"></a>00723 
-<a name="l00725"></a>00725     Value& operator*()<span class="keyword"> const </span>{
-<a name="l00726"></a>00726         <span class="keywordflow">return</span> *static_cast<Value*>(this->my_item);
+<a name="l00620"></a>00620     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
+<a name="l00621"></a>00621         assign(i);
+<a name="l00622"></a>00622     }
+<a name="l00623"></a>00623 
+<a name="l00625"></a>00625     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) ;
+<a name="l00626"></a>00626 
+<a name="l00627"></a>00627 <span class="keyword">protected</span>:
+<a name="l00629"></a>00629     <span class="keywordtype">void</span> assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) ;
+<a name="l00630"></a>00630 
+<a name="l00632"></a>00632     <span class="keywordtype">void</span> advance() ;
+<a name="l00633"></a>00633 
+<a name="l00635"></a>00635     ~concurrent_queue_iterator_base_v3() {
+<a name="l00636"></a>00636         cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
+<a name="l00637"></a>00637         my_rep = NULL;
+<a name="l00638"></a>00638     }
+<a name="l00639"></a>00639 };
+<a name="l00640"></a>00640 
+<a name="l00641"></a>00641 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
+<a name="l00642"></a>00642 concurrent_queue_iterator_base_v3<Value>::concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue ) {
+<a name="l00643"></a>00643     my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
+<a name="l00644"></a>00644     <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>(queue);
+<a name="l00645"></a>00645     size_t k = my_rep->head_counter;
+<a name="l00646"></a>00646     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
+<a name="l00647"></a>00647 }
+<a name="l00648"></a>00648 
+<a name="l00649"></a>00649 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
+<a name="l00650"></a>00650 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<Value>& other ) {
+<a name="l00651"></a>00651     <span class="keywordflow">if</span>( my_rep!=other.my_rep ) {
+<a name="l00652"></a>00652         <span class="keywordflow">if</span>( my_rep ) {
+<a name="l00653"></a>00653             cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().deallocate(my_rep, 1);
+<a name="l00654"></a>00654             my_rep = NULL;
+<a name="l00655"></a>00655         }
+<a name="l00656"></a>00656         <span class="keywordflow">if</span>( other.my_rep ) {
+<a name="l00657"></a>00657             my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep<Value> >().allocate(1);
+<a name="l00658"></a>00658             <span class="keyword">new</span>( my_rep ) concurrent_queue_iterator_rep<Value>( *other.my_rep );
+<a name="l00659"></a>00659         }
+<a name="l00660"></a>00660     }
+<a name="l00661"></a>00661     my_item = other.my_item;
+<a name="l00662"></a>00662 }
+<a name="l00663"></a>00663 
+<a name="l00664"></a>00664 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
+<a name="l00665"></a>00665 <span class="keywordtype">void</span> concurrent_queue_iterator_base_v3<Value>::advance() {
+<a name="l00666"></a>00666     __TBB_ASSERT( my_item, <span class="stringliteral">"attempt to increment iterator past end of queue"</span> );  
+<a name="l00667"></a>00667     size_t k = my_rep->head_counter;
+<a name="l00668"></a>00668     <span class="keyword">const</span> concurrent_queue_base_v3<Value>& queue = my_rep->my_queue;
+<a name="l00669"></a>00669 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00670"></a>00670 <span class="preprocessor"></span>    <span class="keywordtype">void</span>* tmp;
+<a name="l00671"></a>00671     my_rep->get_item(tmp,k);
+<a name="l00672"></a>00672     __TBB_ASSERT( my_item==tmp, NULL );
+<a name="l00673"></a>00673 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00674"></a>00674     size_t i = k/concurrent_queue_rep<Value>::n_queue & (queue.my_rep->items_per_page-1);
+<a name="l00675"></a>00675     <span class="keywordflow">if</span>( i==queue.my_rep->items_per_page-1 ) {
+<a name="l00676"></a>00676         <span class="keyword">typename</span> concurrent_queue_base_v3<Value>::page*& root = my_rep->array[concurrent_queue_rep<Value>::index(k)];
+<a name="l00677"></a>00677         root = root->next;
+<a name="l00678"></a>00678     }
+<a name="l00679"></a>00679     <span class="comment">// advance k</span>
+<a name="l00680"></a>00680     my_rep->head_counter = ++k;
+<a name="l00681"></a>00681     <span class="keywordflow">if</span>( !my_rep->get_item(my_item, k) ) advance();
+<a name="l00682"></a>00682 }
+<a name="l00683"></a>00683 
+<a name="l00684"></a>00684 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00685"></a>00685 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> concurrent_queue_iterator_base_v3<const T>& add_constness( <span class="keyword">const</span> concurrent_queue_iterator_base_v3<T>& q )
+<a name="l00686"></a>00686 {
+<a name="l00687"></a>00687     <span class="keywordflow">return</span> *reinterpret_cast<const concurrent_queue_iterator_base_v3<const T> *>(&q) ;
+<a name="l00688"></a>00688 }
+<a name="l00689"></a>00689 
+<a name="l00691"></a>00691 
+<a name="l00693"></a>00693 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00694"></a>00694 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base_v3<Value>,
+<a name="l00695"></a>00695         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
+<a name="l00696"></a>00696 <span class="preprocessor">#if !__TBB_TEMPLATE_FRIENDS_BROKEN</span>
+<a name="l00697"></a>00697 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00698"></a>00698     <span class="keyword">friend</span> class ::tbb::strict_ppl::concurrent_queue;
+<a name="l00699"></a>00699 <span class="preprocessor">#else</span>
+<a name="l00700"></a>00700 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
+<a name="l00701"></a>00701 <span class="preprocessor">#endif </span>
+<a name="l00703"></a>00703 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3<Value>& queue ) :</span>
+<a name="l00704"></a>00704 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3<Value>(queue)
+<a name="l00705"></a>00705     {
+<a name="l00706"></a>00706     }
+<a name="l00707"></a>00707 
+<a name="l00708"></a>00708 <span class="keyword">public</span>:
+<a name="l00709"></a>00709     concurrent_queue_iterator() {}
+<a name="l00710"></a>00710 
+<a name="l00712"></a>00712     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,Value>& other ) :
+<a name="l00713"></a>00713         concurrent_queue_iterator_base_v3<Value>(other)
+<a name="l00714"></a>00714     {
+<a name="l00715"></a>00715     }
+<a name="l00716"></a>00716 
+<a name="l00717"></a>00717     <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00718"></a>00718     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,T>& other ) :
+<a name="l00719"></a>00719         concurrent_queue_iterator_base_v3<Value>(add_constness(other))
+<a name="l00720"></a>00720     {
+<a name="l00721"></a>00721     }
+<a name="l00722"></a>00722 
+<a name="l00724"></a>00724     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
+<a name="l00725"></a>00725         assign(other);
+<a name="l00726"></a>00726         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 <a name="l00727"></a>00727     }
 <a name="l00728"></a>00728 
-<a name="l00729"></a>00729     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00730"></a>00730 
-<a name="l00732"></a>00732     concurrent_queue_iterator& operator++() {
-<a name="l00733"></a>00733         this->advance();
-<a name="l00734"></a>00734         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00735"></a>00735     }
-<a name="l00736"></a>00736 
-<a name="l00738"></a>00738     Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00739"></a>00739         Value* result = &operator*();
-<a name="l00740"></a>00740         operator++();
-<a name="l00741"></a>00741         <span class="keywordflow">return</span> result;
-<a name="l00742"></a>00742     }
-<a name="l00743"></a>00743 }; <span class="comment">// concurrent_queue_iterator</span>
-<a name="l00744"></a>00744 
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00747"></a>00747 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00748"></a>00748     <span class="keywordflow">return</span> i.my_item==j.my_item;
-<a name="l00749"></a>00749 }
+<a name="l00730"></a>00730     Value& operator*()<span class="keyword"> const </span>{
+<a name="l00731"></a>00731         <span class="keywordflow">return</span> *static_cast<Value*>(this->my_item);
+<a name="l00732"></a>00732     }
+<a name="l00733"></a>00733 
+<a name="l00734"></a>00734     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00735"></a>00735 
+<a name="l00737"></a>00737     concurrent_queue_iterator& operator++() {
+<a name="l00738"></a>00738         this->advance();
+<a name="l00739"></a>00739         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00740"></a>00740     }
+<a name="l00741"></a>00741 
+<a name="l00743"></a>00743     Value* operator++(<span class="keywordtype">int</span>) {
+<a name="l00744"></a>00744         Value* result = &operator*();
+<a name="l00745"></a>00745         operator++();
+<a name="l00746"></a>00746         <span class="keywordflow">return</span> result;
+<a name="l00747"></a>00747     }
+<a name="l00748"></a>00748 }; <span class="comment">// concurrent_queue_iterator</span>
+<a name="l00749"></a>00749 
 <a name="l00750"></a>00750 
 <a name="l00751"></a>00751 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00752"></a>00752 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00753"></a>00753     <span class="keywordflow">return</span> i.my_item!=j.my_item;
+<a name="l00752"></a>00752 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
+<a name="l00753"></a>00753     <span class="keywordflow">return</span> i.my_item==j.my_item;
 <a name="l00754"></a>00754 }
 <a name="l00755"></a>00755 
-<a name="l00756"></a>00756 } <span class="comment">// namespace internal</span>
-<a name="l00757"></a>00757 
-<a name="l00758"></a>00758 } <span class="comment">// namespace strict_ppl</span>
-<a name="l00759"></a>00759 
-<a name="l00761"></a>00761 <span class="keyword">namespace </span>internal {
+<a name="l00756"></a>00756 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00757"></a>00757 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
+<a name="l00758"></a>00758     <span class="keywordflow">return</span> i.my_item!=j.my_item;
+<a name="l00759"></a>00759 }
+<a name="l00760"></a>00760 
+<a name="l00761"></a>00761 } <span class="comment">// namespace internal</span>
 <a name="l00762"></a>00762 
-<a name="l00763"></a>00763 <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00764"></a>00764 <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00765"></a>00765 <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00766"></a>00766 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">class </span>concurrent_queue_iterator;
-<a name="l00767"></a>00767 
+<a name="l00764"></a>00764 
+<a name="l00765"></a>00765 } <span class="comment">// namespace strict_ppl</span>
+<a name="l00766"></a>00766 
+<a name="l00768"></a>00768 <span class="keyword">namespace </span>internal {
 <a name="l00769"></a>00769 
-<a name="l00771"></a>00771 <span class="keyword">class </span>concurrent_queue_base_v3: no_copy {
-<a name="l00773"></a>00773     concurrent_queue_rep* my_rep;
+<a name="l00770"></a>00770 <span class="keyword">class </span>concurrent_queue_rep;
+<a name="l00771"></a>00771 <span class="keyword">class </span>concurrent_queue_iterator_rep;
+<a name="l00772"></a>00772 <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
+<a name="l00773"></a>00773 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value> <span class="keyword">class </span>concurrent_queue_iterator;
 <a name="l00774"></a>00774 
-<a name="l00775"></a>00775     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_rep;
-<a name="l00776"></a>00776     <span class="keyword">friend</span> <span class="keyword">struct </span>micro_queue;
-<a name="l00777"></a>00777     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer;
-<a name="l00778"></a>00778     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep;
-<a name="l00779"></a>00779     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
-<a name="l00780"></a>00780 <span class="keyword">protected</span>:
-<a name="l00782"></a>00782     <span class="keyword">struct </span>page {
-<a name="l00783"></a>00783         page* next;
-<a name="l00784"></a>00784         uintptr_t mask; 
-<a name="l00785"></a>00785     };
-<a name="l00786"></a>00786 
-<a name="l00788"></a>00788     ptrdiff_t my_capacity;
-<a name="l00789"></a>00789    
-<a name="l00791"></a>00791     size_t items_per_page;
-<a name="l00792"></a>00792 
-<a name="l00794"></a>00794     size_t item_size;
-<a name="l00795"></a>00795 
-<a name="l00796"></a>00796 <span class="keyword">private</span>:
-<a name="l00797"></a>00797     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_item( page& dst, size_t index, <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) = 0;
-<a name="l00798"></a>00798     <span class="keyword">virtual</span> <span class="keywordtype">void</span> assign_and_destroy_item( <span class="keywordtype">void</span>* dst, page& src, size_t index ) = 0;
-<a name="l00799"></a>00799 <span class="keyword">protected</span>:
-<a name="l00800"></a>00800     __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
-<a name="l00801"></a>00801     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
+<a name="l00776"></a>00776 
+<a name="l00778"></a>00778 <span class="keyword">class </span>concurrent_queue_base_v3: no_copy {
+<a name="l00780"></a>00780     concurrent_queue_rep* my_rep;
+<a name="l00781"></a>00781 
+<a name="l00782"></a>00782     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_rep;
+<a name="l00783"></a>00783     <span class="keyword">friend</span> <span class="keyword">struct </span>micro_queue;
+<a name="l00784"></a>00784     <span class="keyword">friend</span> <span class="keyword">class </span>micro_queue_pop_finalizer;
+<a name="l00785"></a>00785     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_rep;
+<a name="l00786"></a>00786     <span class="keyword">friend</span> <span class="keyword">class </span>concurrent_queue_iterator_base_v3;
+<a name="l00787"></a>00787 <span class="keyword">protected</span>:
+<a name="l00789"></a>00789     <span class="keyword">struct </span>page {
+<a name="l00790"></a>00790         page* next;
+<a name="l00791"></a>00791         uintptr_t mask; 
+<a name="l00792"></a>00792     };
+<a name="l00793"></a>00793 
+<a name="l00795"></a>00795     ptrdiff_t my_capacity;
+<a name="l00796"></a>00796    
+<a name="l00798"></a>00798     size_t items_per_page;
+<a name="l00799"></a>00799 
+<a name="l00801"></a>00801     size_t item_size;
 <a name="l00802"></a>00802 
-<a name="l00804"></a>00804     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00805"></a>00805 
-<a name="l00807"></a>00807     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_pop( <span class="keywordtype">void</span>* dst );
-<a name="l00808"></a>00808 
-<a name="l00810"></a>00810     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_push_if_not_full( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00811"></a>00811 
-<a name="l00813"></a>00813 
-<a name="l00814"></a>00814     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_pop_if_present( <span class="keywordtype">void</span>* dst );
+<a name="l00803"></a>00803 <span class="keyword">private</span>:
+<a name="l00804"></a>00804     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_item( page& dst, size_t index, <span class="keyword">const</span> <span class="keywordtype">void</span>* src ) = 0;
+<a name="l00805"></a>00805     <span class="keyword">virtual</span> <span class="keywordtype">void</span> assign_and_destroy_item( <span class="keywordtype">void</span>* dst, page& src, size_t index ) = 0;
+<a name="l00806"></a>00806 <span class="keyword">protected</span>:
+<a name="l00807"></a>00807     __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size );
+<a name="l00808"></a>00808     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3();
+<a name="l00809"></a>00809 
+<a name="l00811"></a>00811     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_push( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+<a name="l00812"></a>00812 
+<a name="l00814"></a>00814     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_pop( <span class="keywordtype">void</span>* dst );
 <a name="l00815"></a>00815 
-<a name="l00817"></a>00817     ptrdiff_t __TBB_EXPORTED_METHOD internal_size() <span class="keyword">const</span>;
+<a name="l00817"></a>00817     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_push_if_not_full( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
 <a name="l00818"></a>00818 
-<a name="l00820"></a>00820     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_empty() <span class="keyword">const</span>;
-<a name="l00821"></a>00821 
-<a name="l00823"></a>00823     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
-<a name="l00824"></a>00824 
-<a name="l00826"></a>00826     <span class="keyword">virtual</span> page *allocate_page() = 0;
-<a name="l00827"></a>00827 
-<a name="l00829"></a>00829     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) = 0;
-<a name="l00830"></a>00830 
-<a name="l00832"></a>00832     <span class="comment">/* note that the name may be misleading, but it remains so due to a historical accident. */</span>
-<a name="l00833"></a>00833     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_finish_clear() ;
+<a name="l00820"></a>00820 
+<a name="l00821"></a>00821     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_pop_if_present( <span class="keywordtype">void</span>* dst );
+<a name="l00822"></a>00822 
+<a name="l00824"></a>00824     ptrdiff_t __TBB_EXPORTED_METHOD internal_size() <span class="keyword">const</span>;
+<a name="l00825"></a>00825 
+<a name="l00827"></a>00827     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_empty() <span class="keyword">const</span>;
+<a name="l00828"></a>00828 
+<a name="l00830"></a>00830     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size );
+<a name="l00831"></a>00831 
+<a name="l00833"></a>00833     <span class="keyword">virtual</span> page *allocate_page() = 0;
 <a name="l00834"></a>00834 
-<a name="l00836"></a>00836     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception() <span class="keyword">const</span>;
+<a name="l00836"></a>00836     <span class="keyword">virtual</span> <span class="keywordtype">void</span> deallocate_page( page *p ) = 0;
 <a name="l00837"></a>00837 
-<a name="l00839"></a>00839     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) ;
-<a name="l00840"></a>00840 
-<a name="l00841"></a>00841 <span class="keyword">private</span>:
-<a name="l00842"></a>00842     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_page_item( page& dst, size_t dindex, <span class="keyword">const</span> page& src, size_t sindex ) = 0;
-<a name="l00843"></a>00843 };
+<a name="l00839"></a>00839     <span class="comment">/* note that the name may be misleading, but it remains so due to a historical accident. */</span>
+<a name="l00840"></a>00840     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_finish_clear() ;
+<a name="l00841"></a>00841 
+<a name="l00843"></a>00843     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception() <span class="keyword">const</span>;
 <a name="l00844"></a>00844 
-<a name="l00846"></a>00846 
-<a name="l00847"></a>00847 <span class="keyword">class </span>concurrent_queue_iterator_base_v3 {
-<a name="l00849"></a>00849 
-<a name="l00850"></a>00850     concurrent_queue_iterator_rep* my_rep;
+<a name="l00846"></a>00846     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_base_v3& src ) ;
+<a name="l00847"></a>00847 
+<a name="l00848"></a>00848 <span class="keyword">private</span>:
+<a name="l00849"></a>00849     <span class="keyword">virtual</span> <span class="keywordtype">void</span> copy_page_item( page& dst, size_t dindex, <span class="keyword">const</span> page& src, size_t sindex ) = 0;
+<a name="l00850"></a>00850 };
 <a name="l00851"></a>00851 
-<a name="l00852"></a>00852     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00853"></a>00853     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00854"></a>00854 
-<a name="l00855"></a>00855     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00856"></a>00856     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
-<a name="l00857"></a>00857 <span class="keyword">protected</span>:
-<a name="l00859"></a>00859     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
-<a name="l00860"></a>00860 
-<a name="l00862"></a>00862     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
-<a name="l00863"></a>00863 
-<a name="l00865"></a>00865     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
-<a name="l00866"></a>00866         assign(i);
-<a name="l00867"></a>00867     }
-<a name="l00868"></a>00868 
-<a name="l00870"></a>00870     __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3& queue );
-<a name="l00871"></a>00871 
-<a name="l00873"></a>00873     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i );
-<a name="l00874"></a>00874 
-<a name="l00876"></a>00876     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD advance();
-<a name="l00877"></a>00877 
-<a name="l00879"></a>00879     __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
-<a name="l00880"></a>00880 };
+<a name="l00853"></a>00853 
+<a name="l00854"></a>00854 <span class="keyword">class </span>concurrent_queue_iterator_base_v3 {
+<a name="l00856"></a>00856 
+<a name="l00857"></a>00857     concurrent_queue_iterator_rep* my_rep;
+<a name="l00858"></a>00858 
+<a name="l00859"></a>00859     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00860"></a>00860     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
+<a name="l00861"></a>00861 
+<a name="l00862"></a>00862     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00863"></a>00863     <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j );
+<a name="l00864"></a>00864 <span class="keyword">protected</span>:
+<a name="l00866"></a>00866     <span class="keyword">mutable</span> <span class="keywordtype">void</span>* my_item;
+<a name="l00867"></a>00867 
+<a name="l00869"></a>00869     concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
+<a name="l00870"></a>00870 
+<a name="l00872"></a>00872     concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
+<a name="l00873"></a>00873         assign(i);
+<a name="l00874"></a>00874     }
+<a name="l00875"></a>00875 
+<a name="l00877"></a>00877     __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( <span class="keyword">const</span> concurrent_queue_base_v3& queue );
+<a name="l00878"></a>00878 
+<a name="l00880"></a>00880     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD assign( <span class="keyword">const</span> concurrent_queue_iterator_base_v3& i );
 <a name="l00881"></a>00881 
-<a name="l00882"></a>00882 <span class="keyword">typedef</span> concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
-<a name="l00883"></a>00883 
-<a name="l00885"></a>00885 
-<a name="l00887"></a>00887 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00888"></a>00888 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base,
-<a name="l00889"></a>00889         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
-<a name="l00890"></a>00890 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00891"></a>00891 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00892"></a>00892     <span class="keyword">friend</span> class ::tbb::concurrent_bounded_queue;
-<a name="l00893"></a>00893 
-<a name="l00894"></a>00894     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00895"></a>00895     <span class="keyword">friend</span> class ::tbb::deprecated::concurrent_queue;
-<a name="l00896"></a>00896 <span class="preprocessor">#else</span>
-<a name="l00897"></a>00897 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00898"></a>00898 <span class="preprocessor">#endif </span>
-<a name="l00900"></a>00900 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) :</span>
-<a name="l00901"></a>00901 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3(queue)
-<a name="l00902"></a>00902     {
-<a name="l00903"></a>00903     }
-<a name="l00904"></a>00904 
-<a name="l00905"></a>00905 <span class="keyword">public</span>:
-<a name="l00906"></a>00906     concurrent_queue_iterator() {}
-<a name="l00907"></a>00907 
-<a name="l00910"></a>00910     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00911"></a>00911         concurrent_queue_iterator_base_v3(other)
-<a name="l00912"></a>00912     {}
-<a name="l00913"></a>00913 
-<a name="l00915"></a>00915     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
-<a name="l00916"></a>00916         assign(other);
-<a name="l00917"></a>00917         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00918"></a>00918     }
-<a name="l00919"></a>00919 
-<a name="l00921"></a>00921     Value& operator*()<span class="keyword"> const </span>{
-<a name="l00922"></a>00922         <span class="keywordflow">return</span> *static_cast<Value*>(my_item);
-<a name="l00923"></a>00923     }
-<a name="l00924"></a>00924 
-<a name="l00925"></a>00925     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00883"></a>00883     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD advance();
+<a name="l00884"></a>00884 
+<a name="l00886"></a>00886     __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3();
+<a name="l00887"></a>00887 };
+<a name="l00888"></a>00888 
+<a name="l00889"></a>00889 <span class="keyword">typedef</span> concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base;
+<a name="l00890"></a>00890 
+<a name="l00892"></a>00892 
+<a name="l00894"></a>00894 <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00895"></a>00895 <span class="keyword">class </span>concurrent_queue_iterator: <span class="keyword">public</span> concurrent_queue_iterator_base,
+<a name="l00896"></a>00896         <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value> {
+<a name="l00897"></a>00897 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+<a name="l00898"></a>00898 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00899"></a>00899     <span class="keyword">friend</span> class ::tbb::concurrent_bounded_queue;
+<a name="l00900"></a>00900 
+<a name="l00901"></a>00901     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00902"></a>00902     <span class="keyword">friend</span> class ::tbb::deprecated::concurrent_queue;
+<a name="l00903"></a>00903 <span class="preprocessor">#else</span>
+<a name="l00904"></a>00904 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
+<a name="l00905"></a>00905 <span class="preprocessor">#endif </span>
+<a name="l00907"></a>00907 <span class="preprocessor">    concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) :</span>
+<a name="l00908"></a>00908 <span class="preprocessor"></span>        concurrent_queue_iterator_base_v3(queue)
+<a name="l00909"></a>00909     {
+<a name="l00910"></a>00910     }
+<a name="l00911"></a>00911 
+<a name="l00912"></a>00912 <span class="keyword">public</span>:
+<a name="l00913"></a>00913     concurrent_queue_iterator() {}
+<a name="l00914"></a>00914 
+<a name="l00917"></a>00917     concurrent_queue_iterator( <span class="keyword">const</span> concurrent_queue_iterator<Container,typename Container::value_type>& other ) :
+<a name="l00918"></a>00918         concurrent_queue_iterator_base_v3(other)
+<a name="l00919"></a>00919     {}
+<a name="l00920"></a>00920 
+<a name="l00922"></a>00922     concurrent_queue_iterator& operator=( <span class="keyword">const</span> concurrent_queue_iterator& other ) {
+<a name="l00923"></a>00923         assign(other);
+<a name="l00924"></a>00924         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00925"></a>00925     }
 <a name="l00926"></a>00926 
-<a name="l00928"></a>00928     concurrent_queue_iterator& operator++() {
-<a name="l00929"></a>00929         advance();
-<a name="l00930"></a>00930         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00931"></a>00931     }
-<a name="l00932"></a>00932 
-<a name="l00934"></a>00934     Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00935"></a>00935         Value* result = &operator*();
-<a name="l00936"></a>00936         operator++();
-<a name="l00937"></a>00937         <span class="keywordflow">return</span> result;
+<a name="l00928"></a>00928     Value& operator*()<span class="keyword"> const </span>{
+<a name="l00929"></a>00929         <span class="keywordflow">return</span> *static_cast<Value*>(my_item);
+<a name="l00930"></a>00930     }
+<a name="l00931"></a>00931 
+<a name="l00932"></a>00932     Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00933"></a>00933 
+<a name="l00935"></a>00935     concurrent_queue_iterator& operator++() {
+<a name="l00936"></a>00936         advance();
+<a name="l00937"></a>00937         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 <a name="l00938"></a>00938     }
-<a name="l00939"></a>00939 }; <span class="comment">// concurrent_queue_iterator</span>
-<a name="l00940"></a>00940 
-<a name="l00941"></a>00941 
-<a name="l00942"></a>00942 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00943"></a>00943 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00944"></a>00944     <span class="keywordflow">return</span> i.my_item==j.my_item;
-<a name="l00945"></a>00945 }
-<a name="l00946"></a>00946 
-<a name="l00947"></a>00947 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00948"></a>00948 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
-<a name="l00949"></a>00949     <span class="keywordflow">return</span> i.my_item!=j.my_item;
-<a name="l00950"></a>00950 }
-<a name="l00951"></a>00951 
-<a name="l00952"></a>00952 } <span class="comment">// namespace internal;</span>
+<a name="l00939"></a>00939 
+<a name="l00941"></a>00941     Value* operator++(<span class="keywordtype">int</span>) {
+<a name="l00942"></a>00942         Value* result = &operator*();
+<a name="l00943"></a>00943         operator++();
+<a name="l00944"></a>00944         <span class="keywordflow">return</span> result;
+<a name="l00945"></a>00945     }
+<a name="l00946"></a>00946 }; <span class="comment">// concurrent_queue_iterator</span>
+<a name="l00947"></a>00947 
+<a name="l00948"></a>00948 
+<a name="l00949"></a>00949 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00950"></a>00950 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
+<a name="l00951"></a>00951     <span class="keywordflow">return</span> i.my_item==j.my_item;
+<a name="l00952"></a>00952 }
 <a name="l00953"></a>00953 
-<a name="l00955"></a>00955 
-<a name="l00956"></a>00956 } <span class="comment">// namespace tbb</span>
-<a name="l00957"></a>00957 
-<a name="l00958"></a>00958 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_internal_H */</span>
+<a name="l00954"></a>00954 <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00955"></a>00955 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> concurrent_queue_iterator<C,T>& i, <span class="keyword">const</span> concurrent_queue_iterator<C,U>& j ) {
+<a name="l00956"></a>00956     <span class="keywordflow">return</span> i.my_item!=j.my_item;
+<a name="l00957"></a>00957 }
+<a name="l00958"></a>00958 
+<a name="l00959"></a>00959 } <span class="comment">// namespace internal;</span>
+<a name="l00960"></a>00960 
+<a name="l00962"></a>00962 
+<a name="l00963"></a>00963 } <span class="comment">// namespace tbb</span>
+<a name="l00964"></a>00964 
+<a name="l00965"></a>00965 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_queue_internal_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00250.html b/doc/html/a00255.html
similarity index 100%
rename from doc/html/a00250.html
rename to doc/html/a00255.html
diff --git a/doc/html/a00252.html b/doc/html/a00257.html
similarity index 98%
rename from doc/html/a00252.html
rename to doc/html/a00257.html
index b9a1a61..4dfd438 100644
--- a/doc/html/a00252.html
+++ b/doc/html/a00257.html
@@ -45,7 +45,7 @@
 <a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
 <a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_machine.h"</span>
 <a name="l00026"></a>00026 
-<a name="l00027"></a><a class="code" href="a00224.html">00027</a> <span class="keyword">namespace </span>tbb {
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
 <a name="l00028"></a>00028 
 <a name="l00030"></a>00030 
 <a name="l00032"></a>00032 <span class="keyword">template</span><<span class="keyword">typename</span> T,size_t N>
diff --git a/doc/html/a00253.html b/doc/html/a00258.html
similarity index 96%
rename from doc/html/a00253.html
rename to doc/html/a00258.html
index 8c37ab4..bbc0541 100644
--- a/doc/html/a00253.html
+++ b/doc/html/a00258.html
@@ -61,10 +61,10 @@
 <a name="l00040"></a>00040 <span class="preprocessor"></span>
 <a name="l00041"></a>00041 <span class="keyword">namespace </span>tbb {
 <a name="l00042"></a>00042 
-<a name="l00044"></a><a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef">00044</a> <span class="keyword">enum</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> {
-<a name="l00046"></a>00046     <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>,
-<a name="l00048"></a>00048     <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>,
-<a name="l00050"></a>00050     <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>
+<a name="l00044"></a><a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef">00044</a> <span class="keyword">enum</span> <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef">memory_semantics</a> {
+<a name="l00046"></a>00046     <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>,
+<a name="l00048"></a>00048     <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>,
+<a name="l00050"></a>00050     <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>
 <a name="l00051"></a>00051 };
 <a name="l00052"></a>00052 
 <a name="l00054"></a>00054 <span class="keyword">namespace </span>internal {
@@ -139,18 +139,18 @@
 <a name="l00123"></a>00123 <span class="preprocessor">    };</span>
 <a name="l00124"></a>00124 <span class="preprocessor"></span>
 <a name="l00125"></a>00125 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00126"></a>00126 <span class="preprocessor"></span>__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00127"></a>00127 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00128"></a>00128 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00129"></a>00129 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
-<a name="l00130"></a>00130 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00131"></a>00131 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00132"></a>00132 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00133"></a>00133 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
-<a name="l00134"></a>00134 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00135"></a>00135 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00136"></a>00136 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
-<a name="l00137"></a>00137 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
+<a name="l00126"></a>00126 <span class="preprocessor"></span>__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
+<a name="l00127"></a>00127 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
+<a name="l00128"></a>00128 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
+<a name="l00129"></a>00129 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">__TBB_full_fence</a>)
+<a name="l00130"></a>00130 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
+<a name="l00131"></a>00131 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
+<a name="l00132"></a>00132 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
+<a name="l00133"></a>00133 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>)
+<a name="l00134"></a>00134 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
+<a name="l00135"></a>00135 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
+<a name="l00136"></a>00136 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
+<a name="l00137"></a>00137 __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,<a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>)
 <a name="l00138"></a>00138 <span class="preprocessor">#else</span>
 <a name="l00139"></a>00139 <span class="preprocessor"></span>__TBB_DECL_ATOMIC_PRIMITIVES(1)
 <a name="l00140"></a>00140 __TBB_DECL_ATOMIC_PRIMITIVES(2)
@@ -343,8 +343,8 @@
 <a name="l00338"></a>00338 <span class="preprocessor">        T operator=( U rhs ) {return store_with_release(T(rhs));}  \</span>
 <a name="l00339"></a>00339 <span class="preprocessor">        atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;}  \</span>
 <a name="l00340"></a>00340 <span class="preprocessor">    };</span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span><a class="code" href="a00224.html#ad165cf61abbe349d413df2589679add">__TBB_DECL_ATOMIC_ALT</a>(<span class="keywordtype">unsigned</span>,size_t)
-<a name="l00342"></a><a class="code" href="a00224.html#ad165cf61abbe349d413df2589679add">00342</a> __TBB_DECL_ATOMIC_ALT(<span class="keywordtype">int</span>,ptrdiff_t)
+<a name="l00341"></a>00341 <span class="preprocessor"></span><a class="code" href="a00229.html#ad165cf61abbe349d413df2589679add">__TBB_DECL_ATOMIC_ALT</a>(<span class="keywordtype">unsigned</span>,size_t)
+<a name="l00342"></a><a class="code" href="a00229.html#ad165cf61abbe349d413df2589679add">00342</a> __TBB_DECL_ATOMIC_ALT(<span class="keywordtype">int</span>,ptrdiff_t)
 <a name="l00343"></a>00343 <span class="preprocessor">#else</span>
 <a name="l00344"></a>00344 <span class="preprocessor"></span>__TBB_DECL_ATOMIC(<span class="keywordtype">unsigned</span>)
 <a name="l00345"></a>00345 __TBB_DECL_ATOMIC(<span class="keywordtype">int</span>)
diff --git a/doc/html/a00261.html b/doc/html/a00261.html
deleted file mode 100644
index 93a01ab..0000000
--- a/doc/html/a00261.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>blocked_range.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>blocked_range.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_blocked_range_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
-<a name="l00027"></a>00027 
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
-<a name="l00040"></a><a class="code" href="a00122.html">00040</a> <span class="keyword">class </span><a class="code" href="a00122.html">blocked_range</a> {
-<a name="l00041"></a>00041 <span class="keyword">public</span>:
-<a name="l00043"></a>00043 
-<a name="l00045"></a><a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">00045</a>     <span class="keyword">typedef</span> Value <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a>;
-<a name="l00046"></a>00046 
-<a name="l00048"></a><a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">00048</a>     <span class="keyword">typedef</span> std::size_t <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>;
-<a name="l00049"></a>00049 
-<a name="l00051"></a>00051 
-<a name="l00052"></a><a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">00052</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>() : my_begin(), my_end() {}
-<a name="l00053"></a>00053 
-<a name="l00055"></a><a class="code" href="a00122.html#14795a36ead1414b4371dbe1a4656359">00055</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>( Value begin_, Value end_, <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> grainsize_=1 ) : 
-<a name="l00056"></a>00056         my_end(end_), my_begin(begin_), my_grainsize(grainsize_) 
-<a name="l00057"></a>00057     {
-<a name="l00058"></a>00058         __TBB_ASSERT( my_grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
-<a name="l00059"></a>00059     }
-<a name="l00060"></a>00060 
-<a name="l00062"></a><a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">00062</a>     <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
-<a name="l00063"></a>00063 
-<a name="l00065"></a><a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">00065</a>     <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
-<a name="l00066"></a>00066 
-<a name="l00068"></a>00068 
-<a name="l00069"></a><a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">00069</a>     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()<span class="keyword"> const </span>{
-<a name="l00070"></a>00070         __TBB_ASSERT( !(<a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<<a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>()), <span class="stringliteral">"size() unspecified if end()<begin()"</span> );
-<a name="l00071"></a>00071         <span class="keywordflow">return</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>(my_end-my_begin);
-<a name="l00072"></a>00072     }
-<a name="l00073"></a>00073 
-<a name="l00075"></a><a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">00075</a>     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00078"></a>00078     <span class="comment">// Methods that implement Range concept</span>
-<a name="l00079"></a>00079     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00080"></a>00080 
-<a name="l00082"></a><a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">00082</a>     <span class="keywordtype">bool</span> <a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !(my_begin<my_end);}
-<a name="l00083"></a>00083 
-<a name="l00085"></a>00085 
-<a name="l00086"></a><a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">00086</a>     <span class="keywordtype">bool</span> <a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize<<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>();}
-<a name="l00087"></a>00087 
-<a name="l00089"></a>00089 
-<a name="l00091"></a><a class="code" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">00091</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>( <a class="code" href="a00122.html">blocked_range</a>& r, <a class="code" href="a00161.html">split</a> ) : 
-<a name="l00092"></a>00092         my_end(r.my_end),
-<a name="l00093"></a>00093         my_begin(do_split(r)),
-<a name="l00094"></a>00094         my_grainsize(r.my_grainsize)
-<a name="l00095"></a>00095     {}
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097 <span class="keyword">private</span>:
-<a name="l00099"></a>00099     Value my_end;
-<a name="l00100"></a>00100     Value my_begin;
-<a name="l00101"></a>00101     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> my_grainsize;
-<a name="l00102"></a>00102 
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105     <span class="keyword">static</span> Value do_split( <a class="code" href="a00122.html">blocked_range</a>& r ) {
-<a name="l00106"></a>00106         __TBB_ASSERT( r.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>(), <span class="stringliteral">"cannot split blocked_range that is not divisible"</span> );
-<a name="l00107"></a>00107         Value middle = r.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> + (r.<a class="code" href="a00122.html#1ec95c8988b50064dd603998b16f3930">my_end</a>-r.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a>)/2u;
-<a name="l00108"></a>00108         r.<a class="code" href="a00122.html#1ec95c8988b50064dd603998b16f3930">my_end</a> = middle;
-<a name="l00109"></a>00109         <span class="keywordflow">return</span> middle;
-<a name="l00110"></a>00110     }
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue>
-<a name="l00113"></a>00113     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range2d;
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue, <span class="keyword">typename</span> PageValue>
-<a name="l00116"></a>00116     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range3d;
-<a name="l00117"></a>00117 };
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 } <span class="comment">// namespace tbb </span>
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00262.html b/doc/html/a00262.html
deleted file mode 100644
index ac3628b..0000000
--- a/doc/html/a00262.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>blocked_range2d.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>blocked_range2d.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_blocked_range2d_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range2d_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "blocked_range.h"</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
-<a name="l00028"></a>00028 
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue=RowValue>
-<a name="l00032"></a><a class="code" href="a00123.html">00032</a> <span class="keyword">class </span><a class="code" href="a00123.html">blocked_range2d</a> {
-<a name="l00033"></a>00033 <span class="keyword">public</span>:
-<a name="l00035"></a><a class="code" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00122.html">blocked_range<RowValue></a> <a class="code" href="a00122.html">row_range_type</a>;
-<a name="l00036"></a>00036     <span class="keyword">typedef</span> <a class="code" href="a00122.html">blocked_range<ColValue></a> <a class="code" href="a00122.html">col_range_type</a>;
-<a name="l00037"></a>00037  
-<a name="l00038"></a>00038 <span class="keyword">private</span>:
-<a name="l00039"></a>00039     <a class="code" href="a00122.html">row_range_type</a> my_rows;
-<a name="l00040"></a>00040     <a class="code" href="a00122.html">col_range_type</a> my_cols;
-<a name="l00041"></a>00041 
-<a name="l00042"></a>00042 <span class="keyword">public</span>:
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044     <a class="code" href="a00123.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end, <span class="keyword">typename</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize,
-<a name="l00045"></a>00045                      ColValue col_begin, ColValue col_end, <span class="keyword">typename</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize ) : 
-<a name="l00046"></a>00046         my_rows(row_begin,row_end,row_grainsize),
-<a name="l00047"></a>00047         my_cols(col_begin,col_end,col_grainsize)
-<a name="l00048"></a>00048     {
-<a name="l00049"></a>00049     }
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051     <a class="code" href="a00123.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end,
-<a name="l00052"></a>00052                      ColValue col_begin, ColValue col_end ) : 
-<a name="l00053"></a>00053         my_rows(row_begin,row_end),
-<a name="l00054"></a>00054         my_cols(col_begin,col_end)
-<a name="l00055"></a>00055     {
-<a name="l00056"></a>00056     }
-<a name="l00057"></a>00057 
-<a name="l00059"></a><a class="code" href="a00123.html#d144cb2d88cef553420311aca8667a44">00059</a>     <span class="keywordtype">bool</span> <a class="code" href="a00123.html#d144cb2d88cef553420311aca8667a44">empty</a>()<span class="keyword"> const </span>{
-<a name="l00060"></a>00060         <span class="comment">// Yes, it is a logical OR here, not AND.</span>
-<a name="l00061"></a>00061         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_cols.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>();
-<a name="l00062"></a>00062     }
-<a name="l00063"></a>00063 
-<a name="l00065"></a><a class="code" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a>()<span class="keyword"> const </span>{
-<a name="l00066"></a>00066         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_cols.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>();
-<a name="l00067"></a>00067     }
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069     <a class="code" href="a00123.html">blocked_range2d</a>( <a class="code" href="a00123.html">blocked_range2d</a>& r, <a class="code" href="a00161.html">split</a> ) : 
-<a name="l00070"></a>00070         my_rows(r.my_rows),
-<a name="l00071"></a>00071         my_cols(r.my_cols)
-<a name="l00072"></a>00072     {
-<a name="l00073"></a>00073         <span class="keywordflow">if</span>( my_rows.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_cols.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_cols.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
-<a name="l00074"></a>00074             my_cols.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00123.html#9837bbaabc5836741fde79512ea1131d">my_cols</a>);
-<a name="l00075"></a>00075         } <span class="keywordflow">else</span> {
-<a name="l00076"></a>00076             my_rows.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00123.html#4be7c7b39da256afe9c67be735b6f788">my_rows</a>);
-<a name="l00077"></a>00077         }
-<a name="l00078"></a>00078     }
-<a name="l00079"></a>00079 
-<a name="l00081"></a><a class="code" href="a00123.html#f496e7348a82652fba581203477cc07c">00081</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">row_range_type</a>& <a class="code" href="a00123.html#f496e7348a82652fba581203477cc07c">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
-<a name="l00082"></a>00082 
-<a name="l00084"></a><a class="code" href="a00123.html#392a46759af2c884957115771affa7f4">00084</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">col_range_type</a>& <a class="code" href="a00123.html#392a46759af2c884957115771affa7f4">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
-<a name="l00085"></a>00085 };
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087 } <span class="comment">// namespace tbb </span>
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range2d_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00266.html b/doc/html/a00266.html
index 4889a96..761a180 100644
--- a/doc/html/a00266.html
+++ b/doc/html/a00266.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>combinable.h Source File</title>
+<title>blocked_range.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>combinable.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>blocked_range.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,52 +39,83 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_combinable_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_combinable_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_blocked_range_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb/enumerable_thread_specific.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb/cache_aligned_allocator.h"</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033     <span class="keyword">template</span> <<span class="keyword">typename</span> T>
-<a name="l00034"></a><a class="code" href="a00128.html">00034</a>         <span class="keyword">class </span><a class="code" href="a00128.html">combinable</a> {
-<a name="l00035"></a>00035     <span class="keyword">private</span>:
-<a name="l00036"></a>00036         <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00125.html">tbb::cache_aligned_allocator<T></a> <a class="code" href="a00125.html">my_alloc</a>;
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 
+<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
+<a name="l00027"></a>00027 
 <a name="l00037"></a>00037 
-<a name="l00038"></a>00038         <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00138.html">tbb::enumerable_thread_specific<T, my_alloc, ets_no_key></a> <a class="code" href="a00138.html">my_ets_type</a>;
-<a name="l00039"></a>00039         <a class="code" href="a00138.html">my_ets_type</a> my_ets; 
-<a name="l00040"></a>00040  
-<a name="l00041"></a>00041     <span class="keyword">public</span>:
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043         <a class="code" href="a00128.html">combinable</a>() { }
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045         <span class="keyword">template</span> <<span class="keyword">typename</span> finit>
-<a name="l00046"></a>00046         <a class="code" href="a00128.html">combinable</a>( finit _finit) : my_ets(_finit) { }
-<a name="l00047"></a>00047 
-<a name="l00049"></a><a class="code" href="a00128.html#2c87e79ae98588a5780f708773388843">00049</a>         <a class="code" href="a00128.html#2c87e79ae98588a5780f708773388843">~combinable</a>() { 
-<a name="l00050"></a>00050         }
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039 <span class="keyword">template</span><<span class="keyword">typename</span> Value>
+<a name="l00040"></a><a class="code" href="a00122.html">00040</a> <span class="keyword">class </span><a class="code" href="a00122.html">blocked_range</a> {
+<a name="l00041"></a>00041 <span class="keyword">public</span>:
+<a name="l00043"></a>00043 
+<a name="l00045"></a><a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">00045</a>     <span class="keyword">typedef</span> Value <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a>;
+<a name="l00046"></a>00046 
+<a name="l00048"></a><a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">00048</a>     <span class="keyword">typedef</span> std::size_t <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>;
+<a name="l00049"></a>00049 
 <a name="l00051"></a>00051 
-<a name="l00052"></a>00052         <a class="code" href="a00128.html">combinable</a>(<span class="keyword">const</span> <a class="code" href="a00128.html">combinable</a>& other) : my_ets(other.my_ets) { }
+<a name="l00052"></a><a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">00052</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>() : my_begin(), my_end() {}
 <a name="l00053"></a>00053 
-<a name="l00054"></a>00054         combinable & operator=( <span class="keyword">const</span> combinable & other) { my_ets = other.my_ets; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         <span class="keywordtype">void</span> clear() { my_ets.<a class="code" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>(); }
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         T& local() { <span class="keywordflow">return</span> my_ets.<a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(); }
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060         T& local(<span class="keywordtype">bool</span> & exists) { <span class="keywordflow">return</span> my_ets.<a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(exists); }
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062         <span class="keyword">template</span>< <span class="keyword">typename</span> FCombine>
-<a name="l00063"></a>00063         T combine(FCombine fcombine) { <span class="keywordflow">return</span> my_ets.<a class="code" href="a00138.html#dd6b27d9c98297220b08732d9087a5a8">combine</a>(fcombine); }
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         <span class="keyword">template</span><<span class="keyword">typename</span> FCombine>
-<a name="l00066"></a>00066         <span class="keywordtype">void</span> combine_each(FCombine fcombine) { my_ets.<a class="code" href="a00138.html#4abce9638ef2693d813d820af59bb6e2">combine_each</a>(fcombine); }
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068     };
-<a name="l00069"></a>00069 } <span class="comment">// namespace tbb</span>
-<a name="l00070"></a>00070 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_combinable_H */</span>
+<a name="l00055"></a><a class="code" href="a00122.html#14795a36ead1414b4371dbe1a4656359">00055</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>( Value begin_, Value end_, <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> grainsize_=1 ) : 
+<a name="l00056"></a>00056         my_end(end_), my_begin(begin_), my_grainsize(grainsize_) 
+<a name="l00057"></a>00057     {
+<a name="l00058"></a>00058         __TBB_ASSERT( my_grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
+<a name="l00059"></a>00059     }
+<a name="l00060"></a>00060 
+<a name="l00062"></a><a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">00062</a>     <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
+<a name="l00063"></a>00063 
+<a name="l00065"></a><a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">00065</a>     <a class="code" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">const_iterator</a> <a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
+<a name="l00066"></a>00066 
+<a name="l00068"></a>00068 
+<a name="l00069"></a><a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">00069</a>     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()<span class="keyword"> const </span>{
+<a name="l00070"></a>00070         __TBB_ASSERT( !(<a class="code" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">end</a>()<<a class="code" href="a00122.html#18d2258400756ac1446dac7676b18df3">begin</a>()), <span class="stringliteral">"size() unspecified if end()<begin()"</span> );
+<a name="l00071"></a>00071         <span class="keywordflow">return</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a>(my_end-my_begin);
+<a name="l00072"></a>00072     }
+<a name="l00073"></a>00073 
+<a name="l00075"></a><a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">00075</a>     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> <a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00078"></a>00078     <span class="comment">// Methods that implement Range concept</span>
+<a name="l00079"></a>00079     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00080"></a>00080 
+<a name="l00082"></a><a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">00082</a>     <span class="keywordtype">bool</span> <a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !(my_begin<my_end);}
+<a name="l00083"></a>00083 
+<a name="l00085"></a>00085 
+<a name="l00086"></a><a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">00086</a>     <span class="keywordtype">bool</span> <a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize<<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>();}
+<a name="l00087"></a>00087 
+<a name="l00089"></a>00089 
+<a name="l00091"></a><a class="code" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">00091</a>     <a class="code" href="a00122.html#94607755c5110d199202234d58d022ac">blocked_range</a>( <a class="code" href="a00122.html">blocked_range</a>& r, <a class="code" href="a00165.html">split</a> ) : 
+<a name="l00092"></a>00092         my_end(r.my_end),
+<a name="l00093"></a>00093         my_begin(do_split(r)),
+<a name="l00094"></a>00094         my_grainsize(r.my_grainsize)
+<a name="l00095"></a>00095     {}
+<a name="l00096"></a>00096 
+<a name="l00097"></a>00097 <span class="keyword">private</span>:
+<a name="l00099"></a>00099     Value my_end;
+<a name="l00100"></a>00100     Value my_begin;
+<a name="l00101"></a>00101     <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">size_type</a> my_grainsize;
+<a name="l00102"></a>00102 
+<a name="l00104"></a>00104 
+<a name="l00105"></a>00105     <span class="keyword">static</span> Value do_split( <a class="code" href="a00122.html">blocked_range</a>& r ) {
+<a name="l00106"></a>00106         __TBB_ASSERT( r.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>(), <span class="stringliteral">"cannot split blocked_range that is not divisible"</span> );
+<a name="l00107"></a>00107         Value middle = r.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> + (r.<a class="code" href="a00122.html#1ec95c8988b50064dd603998b16f3930">my_end</a>-r.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a>)/2u;
+<a name="l00108"></a>00108         r.<a class="code" href="a00122.html#1ec95c8988b50064dd603998b16f3930">my_end</a> = middle;
+<a name="l00109"></a>00109         <span class="keywordflow">return</span> middle;
+<a name="l00110"></a>00110     }
+<a name="l00111"></a>00111 
+<a name="l00112"></a>00112     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue>
+<a name="l00113"></a>00113     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range2d;
+<a name="l00114"></a>00114 
+<a name="l00115"></a>00115     <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue, <span class="keyword">typename</span> PageValue>
+<a name="l00116"></a>00116     <span class="keyword">friend</span> <span class="keyword">class </span>blocked_range3d;
+<a name="l00117"></a>00117 };
+<a name="l00118"></a>00118 
+<a name="l00119"></a>00119 } <span class="comment">// namespace tbb </span>
+<a name="l00120"></a>00120 
+<a name="l00121"></a>00121 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00267.html b/doc/html/a00267.html
index f8d3682..95121be 100644
--- a/doc/html/a00267.html
+++ b/doc/html/a00267.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>concurrent_hash_map.h Source File</title>
+<title>blocked_range2d.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>concurrent_hash_map.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>blocked_range2d.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,1055 +39,69 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_concurrent_hash_map_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_hash_map_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_blocked_range2d_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_blocked_range2d_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include <stdexcept></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <iterator></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <utility></span>      <span class="comment">// Need std::pair</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include <cstring></span>      <span class="comment">// Need std::memset</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include <string></span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include "tbb_allocator.h"</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include "spin_rw_mutex.h"</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include "aligned_space.h"</span>
-<a name="l00035"></a>00035 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include <typeinfo></span>
-<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 <span class="keyword">namespace </span>tbb {
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">struct </span>tbb_hash_compare;
-<a name="l00042"></a>00042 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare = tbb_hash_compare<Key>, <span class="keyword">typename</span> A = tbb_allocator<std::pair<Key, T> > >
-<a name="l00043"></a>00043 <span class="keyword">class </span>concurrent_hash_map;
-<a name="l00044"></a>00044 
-<a name="l00046"></a>00046 <span class="keyword">namespace </span>internal {
-<a name="l00048"></a>00048     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00050"></a>00050     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3( <span class="keywordtype">void</span>* dst, <span class="keywordtype">void</span>* src );
-<a name="l00051"></a>00051 
-<a name="l00053"></a>00053     <span class="keyword">typedef</span> size_t hashcode_t;
-<a name="l00055"></a>00055     <span class="keyword">class </span>hash_map_base {
-<a name="l00056"></a>00056     <span class="keyword">public</span>:
-<a name="l00058"></a>00058         <span class="keyword">typedef</span> size_t size_type;
-<a name="l00060"></a>00060         <span class="keyword">typedef</span> size_t hashcode_t;
-<a name="l00062"></a>00062         <span class="keyword">typedef</span> size_t segment_index_t;
-<a name="l00064"></a>00064         <span class="keyword">struct </span>node_base : no_copy {
-<a name="l00066"></a>00066             <span class="keyword">typedef</span> spin_rw_mutex mutex_t;
-<a name="l00068"></a>00068             <span class="keyword">typedef</span> mutex_t::scoped_lock scoped_t;
-<a name="l00070"></a>00070             node_base *next;
-<a name="l00071"></a>00071             mutex_t mutex;
-<a name="l00072"></a>00072         };
-<a name="l00074"></a>00074 <span class="preprocessor">#       define __TBB_rehash_req reinterpret_cast<node_base*>(1)</span>
-<a name="l00076"></a>00076 <span class="preprocessor">#       define __TBB_empty_rehashed reinterpret_cast<node_base*>(0)</span>
-<a name="l00078"></a>00078 <span class="preprocessor">        struct bucket : no_copy {</span>
-<a name="l00080"></a>00080 <span class="preprocessor">            typedef spin_rw_mutex mutex_t;</span>
-<a name="l00082"></a>00082 <span class="preprocessor">            typedef mutex_t::scoped_lock scoped_t;</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span>            mutex_t mutex;
-<a name="l00084"></a>00084             node_base *node_list;
-<a name="l00085"></a>00085         };
-<a name="l00087"></a>00087         <span class="keyword">static</span> size_type <span class="keyword">const</span> embedded_block = 1;
-<a name="l00089"></a>00089         <span class="keyword">static</span> size_type <span class="keyword">const</span> embedded_buckets = 1<<embedded_block;
-<a name="l00091"></a>00091         <span class="keyword">static</span> size_type <span class="keyword">const</span> first_block = 8; <span class="comment">//including embedded_block. perfect with bucket size 16, so the allocations are power of 4096</span>
-<a name="l00093"></a>00093 <span class="comment"></span>        <span class="keyword">static</span> size_type <span class="keyword">const</span> pointers_per_table = <span class="keyword">sizeof</span>(segment_index_t) * 8; <span class="comment">// one segment per bit</span>
-<a name="l00095"></a>00095 <span class="comment"></span>        <span class="keyword">typedef</span> bucket *segment_ptr_t;
-<a name="l00097"></a>00097         <span class="keyword">typedef</span> segment_ptr_t segments_table_t[pointers_per_table];
-<a name="l00099"></a>00099         atomic<hashcode_t> my_mask;
-<a name="l00101"></a>00101         segments_table_t my_table;
-<a name="l00103"></a>00103         atomic<size_type> my_size; <span class="comment">// It must be in separate cache line from my_mask due to performance effects</span>
-<a name="l00105"></a>00105 <span class="comment"></span>        bucket my_embedded_segment[embedded_buckets];
-<a name="l00106"></a>00106 
-<a name="l00108"></a>00108         hash_map_base() {
-<a name="l00109"></a>00109             std::memset( <span class="keyword">this</span>, 0, pointers_per_table*<span class="keyword">sizeof</span>(segment_ptr_t) <span class="comment">// 32*4=128   or 64*8=512</span>
-<a name="l00110"></a>00110                 + <span class="keyword">sizeof</span>(my_size) + <span class="keyword">sizeof</span>(my_mask)  <span class="comment">// 4+4 or 8+8</span>
-<a name="l00111"></a>00111                 + embedded_buckets*<span class="keyword">sizeof</span>(bucket) ); <span class="comment">// n*8 or n*16</span>
-<a name="l00112"></a>00112             <span class="keywordflow">for</span>( size_type i = 0; i < embedded_block; i++ ) <span class="comment">// fill the table</span>
-<a name="l00113"></a>00113                 my_table[i] = my_embedded_segment + segment_base(i);
-<a name="l00114"></a>00114             my_mask = embedded_buckets - 1;
-<a name="l00115"></a>00115             __TBB_ASSERT( embedded_block <= first_block, <span class="stringliteral">"The first block number must include embedded blocks"</span>);
-<a name="l00116"></a>00116         }
-<a name="l00117"></a>00117 
-<a name="l00119"></a>00119         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
-<a name="l00120"></a>00120             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
-<a name="l00121"></a>00121         }
-<a name="l00122"></a>00122 
-<a name="l00124"></a>00124         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
-<a name="l00125"></a>00125             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
-<a name="l00126"></a>00126         }
-<a name="l00127"></a>00127 
-<a name="l00129"></a>00129         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
-<a name="l00130"></a>00130             <span class="keywordflow">return</span> size_type(1)<<k; <span class="comment">// fake value for k==0</span>
-<a name="l00131"></a>00131         }
-<a name="l00132"></a>00132         
-<a name="l00134"></a>00134         <span class="keyword">static</span> <span class="keywordtype">bool</span> is_valid( <span class="keywordtype">void</span> *ptr ) {
-<a name="l00135"></a>00135             <span class="keywordflow">return</span> ptr > reinterpret_cast<void*>(1);
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137 
-<a name="l00139"></a>00139         <span class="keyword">static</span> <span class="keywordtype">void</span> init_buckets( segment_ptr_t ptr, size_type sz, <span class="keywordtype">bool</span> is_initial ) {
-<a name="l00140"></a>00140             <span class="keywordflow">if</span>( is_initial ) std::memset(ptr, 0, sz*<span class="keyword">sizeof</span>(bucket) );
-<a name="l00141"></a>00141             <span class="keywordflow">else</span> <span class="keywordflow">for</span>(size_type i = 0; i < sz; i++, ptr++) {
-<a name="l00142"></a>00142                     *reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
-<a name="l00143"></a>00143                     ptr->node_list = __TBB_rehash_req;
-<a name="l00144"></a>00144                 }
-<a name="l00145"></a>00145         }
-<a name="l00146"></a>00146         
-<a name="l00148"></a>00148         <span class="keyword">static</span> <span class="keywordtype">void</span> add_to_bucket( bucket *b, node_base *n ) {
-<a name="l00149"></a>00149             n->next = b->node_list;
-<a name="l00150"></a>00150             b->node_list = n; <span class="comment">// its under lock and flag is set</span>
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152 
-<a name="l00154"></a>00154         <span class="keyword">struct </span>enable_segment_failsafe {
-<a name="l00155"></a>00155             segment_ptr_t *my_segment_ptr;
-<a name="l00156"></a>00156             enable_segment_failsafe(segments_table_t &table, segment_index_t k) : my_segment_ptr(&table[k]) {}
-<a name="l00157"></a>00157             ~enable_segment_failsafe() {
-<a name="l00158"></a>00158                 <span class="keywordflow">if</span>( my_segment_ptr ) *my_segment_ptr = 0; <span class="comment">// indicate no allocation in progress</span>
-<a name="l00159"></a>00159             }
-<a name="l00160"></a>00160         };
-<a name="l00161"></a>00161 
-<a name="l00163"></a>00163         <span class="keywordtype">void</span> enable_segment( segment_index_t k, <span class="keywordtype">bool</span> is_initial = <span class="keyword">false</span> ) {
-<a name="l00164"></a>00164             __TBB_ASSERT( k, <span class="stringliteral">"Zero segment must be embedded"</span> );
-<a name="l00165"></a>00165             enable_segment_failsafe watchdog( my_table, k );
-<a name="l00166"></a>00166             cache_aligned_allocator<bucket> alloc;
-<a name="l00167"></a>00167             size_type sz;
-<a name="l00168"></a>00168             __TBB_ASSERT( !is_valid(my_table[k]), <span class="stringliteral">"Wrong concurrent assignment"</span>);
-<a name="l00169"></a>00169             <span class="keywordflow">if</span>( k >= first_block ) {
-<a name="l00170"></a>00170                 sz = segment_size( k );
-<a name="l00171"></a>00171                 segment_ptr_t ptr = alloc.allocate( sz );
-<a name="l00172"></a>00172                 init_buckets( ptr, sz, is_initial );
-<a name="l00173"></a>00173 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00174"></a>00174 <span class="preprocessor"></span>                itt_store_pointer_with_release_v3( my_table + k, ptr );
-<a name="l00175"></a>00175 <span class="preprocessor">#else</span>
-<a name="l00176"></a>00176 <span class="preprocessor"></span>                my_table[k] = ptr;<span class="comment">// my_mask has release fence</span>
-<a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
-<a name="l00178"></a>00178 <span class="preprocessor"></span>                sz <<= 1;<span class="comment">// double it to get entire capacity of the container</span>
-<a name="l00179"></a>00179             } <span class="keywordflow">else</span> { <span class="comment">// the first block</span>
-<a name="l00180"></a>00180                 __TBB_ASSERT( k == embedded_block, <span class="stringliteral">"Wrong segment index"</span> );
-<a name="l00181"></a>00181                 sz = segment_size( first_block );
-<a name="l00182"></a>00182                 segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets );
-<a name="l00183"></a>00183                 init_buckets( ptr, sz - embedded_buckets, is_initial );
-<a name="l00184"></a>00184                 ptr -= segment_base(embedded_block);
-<a name="l00185"></a>00185                 <span class="keywordflow">for</span>(segment_index_t i = embedded_block; i < first_block; i++) <span class="comment">// calc the offsets</span>
-<a name="l00186"></a>00186 #<span class="keywordflow">if</span> TBB_USE_THREADING_TOOLS
-<a name="l00187"></a>00187                     itt_store_pointer_with_release_v3( my_table + i, ptr + segment_base(i) );
-<a name="l00188"></a>00188 <span class="preprocessor">#else</span>
-<a name="l00189"></a>00189 <span class="preprocessor"></span>                    my_table[i] = ptr + segment_base(i);
-<a name="l00190"></a>00190 <span class="preprocessor">#endif</span>
-<a name="l00191"></a>00191 <span class="preprocessor"></span>            }
-<a name="l00192"></a>00192 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00193"></a>00193 <span class="preprocessor"></span>            itt_store_pointer_with_release_v3( &my_mask, (<span class="keywordtype">void</span>*)(sz-1) );
-<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
-<a name="l00195"></a>00195 <span class="preprocessor"></span>            my_mask = sz - 1;
-<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
-<a name="l00197"></a>00197 <span class="preprocessor"></span>            watchdog.my_segment_ptr = 0;
-<a name="l00198"></a>00198         }
-<a name="l00199"></a>00199 
-<a name="l00201"></a>00201         bucket *get_bucket( hashcode_t h ) <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="comment">// TODO: add throw() everywhere?</span>
-<a name="l00202"></a>00202             segment_index_t s = segment_index_of( h );
-<a name="l00203"></a>00203             h -= segment_base(s);
-<a name="l00204"></a>00204             segment_ptr_t seg = my_table[s];
-<a name="l00205"></a>00205             __TBB_ASSERT( is_valid(seg), <span class="stringliteral">"hashcode must be cut by valid mask for allocated segments"</span> );
-<a name="l00206"></a>00206             <span class="keywordflow">return</span> &seg[h];
-<a name="l00207"></a>00207         }
-<a name="l00208"></a>00208 
-<a name="l00210"></a>00210         <span class="comment">// Splitting into two functions should help inlining</span>
-<a name="l00211"></a>00211         <span class="keyword">inline</span> <span class="keywordtype">bool</span> check_mask_race( <span class="keyword">const</span> hashcode_t h, hashcode_t &m )<span class="keyword"> const </span>{
-<a name="l00212"></a>00212             hashcode_t m_now, m_old = m;
-<a name="l00213"></a>00213 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span>            m_now = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
-<a name="l00215"></a>00215 <span class="preprocessor">#else</span>
-<a name="l00216"></a>00216 <span class="preprocessor"></span>            m_now = my_mask;
-<a name="l00217"></a>00217 <span class="preprocessor">#endif</span>
-<a name="l00218"></a>00218 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( m_old != m_now )
-<a name="l00219"></a>00219                 <span class="keywordflow">return</span> check_rehashing_collision( h, m_old, m = m_now );
-<a name="l00220"></a>00220             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00221"></a>00221         }
-<a name="l00222"></a>00222 
-<a name="l00224"></a>00224         <span class="keywordtype">bool</span> check_rehashing_collision( <span class="keyword">const</span> hashcode_t h, hashcode_t m_old, hashcode_t m )<span class="keyword"> const </span>{
-<a name="l00225"></a>00225             __TBB_ASSERT(m_old != m, NULL); <span class="comment">// TODO?: m arg could be optimized out by passing h = h&m</span>
-<a name="l00226"></a>00226             <span class="keywordflow">if</span>( (h & m_old) != (h & m) ) { <span class="comment">// mask changed for this hashcode, rare event</span>
-<a name="l00227"></a>00227                 <span class="comment">// condition above proves that 'h' has some other bits set beside 'm_old'</span>
-<a name="l00228"></a>00228                 <span class="comment">// find next applicable mask after m_old    //TODO: look at bsl instruction</span>
-<a name="l00229"></a>00229                 <span class="keywordflow">for</span>( ++m_old; !(h & m_old); m_old <<= 1 ); <span class="comment">// at maximum few rounds depending on the first block size</span>
-<a name="l00230"></a>00230                 m_old = (m_old<<1) - 1; <span class="comment">// get full mask from a bit</span>
-<a name="l00231"></a>00231                 __TBB_ASSERT((m_old&(m_old+1))==0 && m_old <= m, NULL);
-<a name="l00232"></a>00232                 <span class="comment">// check whether it is rehashing/ed</span>
-<a name="l00233"></a>00233                 <span class="keywordflow">if</span>( __TBB_load_with_acquire(get_bucket( h & m_old )->node_list) != __TBB_rehash_req )
-<a name="l00234"></a>00234                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00235"></a>00235             }
-<a name="l00236"></a>00236             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00237"></a>00237         }
-<a name="l00238"></a>00238 
-<a name="l00240"></a>00240         segment_index_t insert_new_node( bucket *b, node_base *n, hashcode_t mask ) {
-<a name="l00241"></a>00241             size_type sz = ++my_size; <span class="comment">// prefix form is to enforce allocation after the first item inserted</span>
-<a name="l00242"></a>00242             add_to_bucket( b, n );
-<a name="l00243"></a>00243             <span class="comment">// check load factor</span>
-<a name="l00244"></a>00244             <span class="keywordflow">if</span>( sz >= mask ) { <span class="comment">// TODO: add custom load_factor </span>
-<a name="l00245"></a>00245                 segment_index_t new_seg = segment_index_of( mask+1 );
-<a name="l00246"></a>00246                 __TBB_ASSERT( is_valid(my_table[new_seg-1]), <span class="stringliteral">"new allocations must not publish new mask until segment has allocated"</span>);
-<a name="l00247"></a>00247                 <span class="keywordflow">if</span>( !my_table[new_seg] && __TBB_CompareAndSwapW(&my_table[new_seg], 1, 0) == 0 )
-<a name="l00248"></a>00248                     <span class="keywordflow">return</span> new_seg; <span class="comment">// The value must be processed</span>
-<a name="l00249"></a>00249             }
-<a name="l00250"></a>00250             <span class="keywordflow">return</span> 0;
-<a name="l00251"></a>00251         }
-<a name="l00252"></a>00252 
-<a name="l00254"></a>00254         <span class="keywordtype">void</span> reserve(size_type buckets) {
-<a name="l00255"></a>00255             <span class="keywordflow">if</span>( !buckets-- ) <span class="keywordflow">return</span>;
-<a name="l00256"></a>00256             <span class="keywordtype">bool</span> is_initial = !my_size;
-<a name="l00257"></a>00257             <span class="keywordflow">for</span>( size_type m = my_mask; buckets > m; m = my_mask )
-<a name="l00258"></a>00258                 enable_segment( segment_index_of( m+1 ), is_initial );
-<a name="l00259"></a>00259         }
-<a name="l00261"></a>00261         <span class="keywordtype">void</span> internal_swap(hash_map_base &table) {
-<a name="l00262"></a>00262             std::swap(this->my_mask, table.my_mask);
-<a name="l00263"></a>00263             std::swap(this->my_size, table.my_size);
-<a name="l00264"></a>00264             <span class="keywordflow">for</span>(size_type i = 0; i < embedded_buckets; i++)
-<a name="l00265"></a>00265                 std::swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list);
-<a name="l00266"></a>00266             <span class="keywordflow">for</span>(size_type i = embedded_block; i < pointers_per_table; i++)
-<a name="l00267"></a>00267                 std::swap(this->my_table[i], table.my_table[i]);
-<a name="l00268"></a>00268         }
-<a name="l00269"></a>00269     };
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00272"></a>00272     <span class="keyword">class </span>hash_map_range;
-<a name="l00273"></a>00273 
-<a name="l00275"></a>00275 
-<a name="l00277"></a>00277     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00278"></a>00278     <span class="keyword">class </span>hash_map_iterator
-<a name="l00279"></a>00279         : <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value>
-<a name="l00280"></a>00280     {
-<a name="l00281"></a>00281         <span class="keyword">typedef</span> Container map_type;
-<a name="l00282"></a>00282         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::node node;
-<a name="l00283"></a>00283         <span class="keyword">typedef</span> hash_map_base::node_base node_base;
-<a name="l00284"></a>00284         <span class="keyword">typedef</span> hash_map_base::bucket bucket;
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00287"></a>00287         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00290"></a>00290         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00293"></a>00293         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
-<a name="l00294"></a>00294     
-<a name="l00295"></a>00295         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00296"></a>00296         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00299"></a>00299         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
-<a name="l00300"></a>00300 
-<a name="l00301"></a>00301         <span class="keywordtype">void</span> advance_to_next_bucket() { <span class="comment">// TODO?: refactor to iterator_base class</span>
-<a name="l00302"></a>00302             size_t k = my_index+1;
-<a name="l00303"></a>00303             <span class="keywordflow">while</span>( my_bucket && k <= my_map->my_mask ) {
-<a name="l00304"></a>00304                 <span class="comment">// Following test uses 2's-complement wizardry</span>
-<a name="l00305"></a>00305                 <span class="keywordflow">if</span>( k& (k-2) ) <span class="comment">// not the begining of a segment</span>
-<a name="l00306"></a>00306                     ++my_bucket;
-<a name="l00307"></a>00307                 <span class="keywordflow">else</span> my_bucket = my_map->get_bucket( k );
-<a name="l00308"></a>00308                 my_node = static_cast<node*>( my_bucket->node_list );
-<a name="l00309"></a>00309                 <span class="keywordflow">if</span>( hash_map_base::is_valid(my_node) ) {
-<a name="l00310"></a>00310                     my_index = k; <span class="keywordflow">return</span>;
-<a name="l00311"></a>00311                 }
-<a name="l00312"></a>00312                 ++k;
-<a name="l00313"></a>00313             }
-<a name="l00314"></a>00314             my_bucket = 0; my_node = 0; my_index = k; <span class="comment">// the end</span>
-<a name="l00315"></a>00315         }
-<a name="l00316"></a>00316 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l00318"></a>00318         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00130.html">tbb::concurrent_hash_map</a>;
-<a name="l00319"></a>00319 <span class="preprocessor">#else</span>
-<a name="l00320"></a>00320 <span class="preprocessor"></span>    <span class="keyword">public</span>: <span class="comment">// workaround</span>
-<a name="l00321"></a>00321 <span class="preprocessor">#endif</span>
-<a name="l00323"></a>00323 <span class="preprocessor">        const Container *my_map;</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span>
-<a name="l00326"></a>00326         size_t my_index;
-<a name="l00327"></a>00327 
-<a name="l00329"></a>00329         <span class="keyword">const</span> bucket *my_bucket;
-<a name="l00330"></a>00330 
-<a name="l00332"></a>00332         node *my_node;
-<a name="l00333"></a>00333 
-<a name="l00334"></a>00334         hash_map_iterator( <span class="keyword">const</span> Container &map, size_t index, <span class="keyword">const</span> bucket *b, node_base *n );
-<a name="l00335"></a>00335 
-<a name="l00336"></a>00336     <span class="keyword">public</span>:
-<a name="l00338"></a>00338         hash_map_iterator() {}
-<a name="l00339"></a>00339         hash_map_iterator( <span class="keyword">const</span> hash_map_iterator<Container,typename Container::value_type> &other ) :
-<a name="l00340"></a>00340             my_map(other.my_map),
-<a name="l00341"></a>00341             my_index(other.my_index),
-<a name="l00342"></a>00342             my_bucket(other.my_bucket),
-<a name="l00343"></a>00343             my_node(other.my_node)
-<a name="l00344"></a>00344         {}
-<a name="l00345"></a>00345         Value& operator*()<span class="keyword"> const </span>{
-<a name="l00346"></a>00346             __TBB_ASSERT( hash_map_base::is_valid(my_node), <span class="stringliteral">"iterator uninitialized or at end of container?"</span> );
-<a name="l00347"></a>00347             <span class="keywordflow">return</span> my_node->item;
-<a name="l00348"></a>00348         }
-<a name="l00349"></a>00349         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00350"></a>00350         hash_map_iterator& operator++();
-<a name="l00351"></a>00351         
-<a name="l00353"></a>00353         Value* operator++(<span class="keywordtype">int</span>) {
-<a name="l00354"></a>00354             Value* result = &operator*();
-<a name="l00355"></a>00355             operator++();
-<a name="l00356"></a>00356             <span class="keywordflow">return</span> result;
-<a name="l00357"></a>00357         }
-<a name="l00358"></a>00358     };
-<a name="l00359"></a>00359 
-<a name="l00360"></a>00360     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00361"></a>00361     hash_map_iterator<Container,Value>::hash_map_iterator( <span class="keyword">const</span> Container &map, size_t index, <span class="keyword">const</span> bucket *b, node_base *n ) :
-<a name="l00362"></a>00362         my_map(&map),
-<a name="l00363"></a>00363         my_index(index),
-<a name="l00364"></a>00364         my_bucket(b),
-<a name="l00365"></a>00365         my_node( static_cast<node*>(n) )
-<a name="l00366"></a>00366     {
-<a name="l00367"></a>00367         <span class="keywordflow">if</span>( b && !hash_map_base::is_valid(n) )
-<a name="l00368"></a>00368             advance_to_next_bucket();
-<a name="l00369"></a>00369     }
-<a name="l00370"></a>00370 
-<a name="l00371"></a>00371     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00372"></a>00372     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
-<a name="l00373"></a>00373         my_node = static_cast<node*>( my_node->next );
-<a name="l00374"></a>00374         <span class="keywordflow">if</span>( !my_node ) advance_to_next_bucket();
-<a name="l00375"></a>00375         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00376"></a>00376     }
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00379"></a>00379     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> hash_map_iterator<Container,T>& i, <span class="keyword">const</span> hash_map_iterator<Container,U>& j ) {
-<a name="l00380"></a>00380         <span class="keywordflow">return</span> i.my_node == j.my_node && i.my_map == j.my_map;
-<a name="l00381"></a>00381     }
-<a name="l00382"></a>00382 
-<a name="l00383"></a>00383     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00384"></a>00384     <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> hash_map_iterator<Container,T>& i, <span class="keyword">const</span> hash_map_iterator<Container,U>& j ) {
-<a name="l00385"></a>00385         <span class="keywordflow">return</span> i.my_node != j.my_node || i.my_map != j.my_map;
-<a name="l00386"></a>00386     }
-<a name="l00387"></a>00387 
-<a name="l00389"></a>00389 
-<a name="l00390"></a>00390     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00391"></a>00391     <span class="keyword">class </span>hash_map_range {
-<a name="l00392"></a>00392         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::map_type map_type;
-<a name="l00393"></a>00393         Iterator my_begin;
-<a name="l00394"></a>00394         Iterator my_end;
-<a name="l00395"></a>00395         <span class="keyword">mutable</span> Iterator my_midpoint;
-<a name="l00396"></a>00396         size_t my_grainsize;
-<a name="l00398"></a>00398         <span class="keywordtype">void</span> set_midpoint() <span class="keyword">const</span>;
-<a name="l00399"></a>00399         <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">friend</span> <span class="keyword">class </span>hash_map_range;
-<a name="l00400"></a>00400     <span class="keyword">public</span>:
-<a name="l00402"></a>00402         <span class="keyword">typedef</span> std::size_t size_type;
-<a name="l00403"></a>00403         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::value_type value_type;
-<a name="l00404"></a>00404         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::reference reference;
-<a name="l00405"></a>00405         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::difference_type difference_type;
-<a name="l00406"></a>00406         <span class="keyword">typedef</span> Iterator iterator;
-<a name="l00407"></a>00407 
-<a name="l00409"></a>00409         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin==my_end;}
-<a name="l00410"></a>00410 
-<a name="l00412"></a>00412         <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
-<a name="l00413"></a>00413             <span class="keywordflow">return</span> my_midpoint!=my_end;
-<a name="l00414"></a>00414         }
-<a name="l00416"></a>00416         hash_map_range( hash_map_range& r, split ) : 
-<a name="l00417"></a>00417             my_end(r.my_end),
-<a name="l00418"></a>00418             my_grainsize(r.my_grainsize)
-<a name="l00419"></a>00419         {
-<a name="l00420"></a>00420             r.my_end = my_begin = r.my_midpoint;
-<a name="l00421"></a>00421             __TBB_ASSERT( !empty(), <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
-<a name="l00422"></a>00422             __TBB_ASSERT( !r.empty(), <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
-<a name="l00423"></a>00423             set_midpoint();
-<a name="l00424"></a>00424             r.set_midpoint();
-<a name="l00425"></a>00425         }
-<a name="l00427"></a>00427         <span class="keyword">template</span><<span class="keyword">typename</span> U>
-<a name="l00428"></a>00428         hash_map_range( hash_map_range<U>& r) : 
-<a name="l00429"></a>00429             my_begin(r.my_begin),
-<a name="l00430"></a>00430             my_end(r.my_end),
-<a name="l00431"></a>00431             my_midpoint(r.my_midpoint),
-<a name="l00432"></a>00432             my_grainsize(r.my_grainsize)
-<a name="l00433"></a>00433         {}
-<a name="l00434"></a>00434 <span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00436"></a>00436 <span class="preprocessor">        hash_map_range( const Iterator& begin_, const Iterator& end_, size_type grainsize = 1 ) : </span>
-<a name="l00437"></a>00437 <span class="preprocessor"></span>            my_begin(begin_), 
-<a name="l00438"></a>00438             my_end(end_),
-<a name="l00439"></a>00439             my_grainsize(grainsize)
-<a name="l00440"></a>00440         {
-<a name="l00441"></a>00441             <span class="keywordflow">if</span>(!my_end.my_index && !my_end.my_bucket) <span class="comment">// end</span>
-<a name="l00442"></a>00442                 my_end.my_index = my_end.my_map->my_mask + 1;
-<a name="l00443"></a>00443             set_midpoint();
-<a name="l00444"></a>00444             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
-<a name="l00445"></a>00445         }
-<a name="l00446"></a>00446 <span class="preprocessor">#endif</span>
-<a name="l00448"></a>00448 <span class="preprocessor">        hash_map_range( const map_type &map, size_type grainsize = 1 ) : </span>
-<a name="l00449"></a>00449 <span class="preprocessor"></span>            my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list ) ),
-<a name="l00450"></a>00450             my_end( Iterator( map, map.my_mask + 1, 0, 0 ) ),
-<a name="l00451"></a>00451             my_grainsize( grainsize )
-<a name="l00452"></a>00452         {
-<a name="l00453"></a>00453             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
-<a name="l00454"></a>00454             set_midpoint();
-<a name="l00455"></a>00455         }
-<a name="l00456"></a>00456         <span class="keyword">const</span> Iterator& begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
-<a name="l00457"></a>00457         <span class="keyword">const</span> Iterator& end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
-<a name="l00459"></a>00459         size_type grainsize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
-<a name="l00460"></a>00460     };
-<a name="l00461"></a>00461 
-<a name="l00462"></a>00462     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
-<a name="l00463"></a>00463     <span class="keywordtype">void</span> hash_map_range<Iterator>::set_midpoint()<span class="keyword"> const </span>{
-<a name="l00464"></a>00464         <span class="comment">// Split by groups of nodes</span>
-<a name="l00465"></a>00465         size_t m = my_end.my_index-my_begin.my_index;
-<a name="l00466"></a>00466         <span class="keywordflow">if</span>( m > my_grainsize ) {
-<a name="l00467"></a>00467             m = my_begin.my_index + m/2u;
-<a name="l00468"></a>00468             hash_map_base::bucket *b = my_begin.my_map->get_bucket(m);
-<a name="l00469"></a>00469             my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list);
-<a name="l00470"></a>00470         } <span class="keywordflow">else</span> {
-<a name="l00471"></a>00471             my_midpoint = my_end;
-<a name="l00472"></a>00472         }
-<a name="l00473"></a>00473         __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index,
-<a name="l00474"></a>00474             <span class="stringliteral">"my_begin is after my_midpoint"</span> );
-<a name="l00475"></a>00475         __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index,
-<a name="l00476"></a>00476             <span class="stringliteral">"my_midpoint is after my_end"</span> );
-<a name="l00477"></a>00477         __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end,
-<a name="l00478"></a>00478             <span class="stringliteral">"[my_begin, my_midpoint) range should not be empty"</span> );
-<a name="l00479"></a>00479     }
-<a name="l00480"></a>00480 } <span class="comment">// namespace internal</span>
-<a name="l00482"></a>00482 <span class="comment"></span>
-<a name="l00484"></a><a class="code" href="a00224.html#6902d551186a654ffbf88582d4a0bdfa">00484</a> <span class="keyword">static</span> <span class="keyword">const</span> size_t <a class="code" href="a00224.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a> = <span class="keyword">sizeof</span>(size_t)==4? 2654435769U : 11400714819323198485ULL;
-<a name="l00486"></a>00486 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00487"></a><a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">00487</a> <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> T& t ) {
-<a name="l00488"></a>00488     <span class="keywordflow">return</span> static_cast<size_t>( t ) * hash_multiplier;
-<a name="l00489"></a>00489 }
-<a name="l00490"></a>00490 <span class="keyword">template</span><<span class="keyword">typename</span> P>
-<a name="l00491"></a>00491 <span class="keyword">inline</span> <span class="keyword">static</span> size_t tbb_hasher( P* ptr ) {
-<a name="l00492"></a>00492     size_t <span class="keyword">const</span> h = reinterpret_cast<size_t>( ptr );
-<a name="l00493"></a>00493     <span class="keywordflow">return</span> (h >> 3) ^ h;
-<a name="l00494"></a>00494 }
-<a name="l00495"></a>00495 <span class="keyword">template</span><<span class="keyword">typename</span> E, <span class="keyword">typename</span> S, <span class="keyword">typename</span> A>
-<a name="l00496"></a>00496 <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> std::basic_string<E,S,A>& s ) {
-<a name="l00497"></a>00497     size_t h = 0;
-<a name="l00498"></a>00498     <span class="keywordflow">for</span>( <span class="keyword">const</span> E* c = s.c_str(); *c; c++ )
-<a name="l00499"></a>00499         h = static_cast<size_t>(*c) ^ (h * hash_multiplier);
-<a name="l00500"></a>00500     <span class="keywordflow">return</span> h;
-<a name="l00501"></a>00501 }
-<a name="l00502"></a>00502 <span class="keyword">template</span><<span class="keyword">typename</span> F, <span class="keyword">typename</span> S>
-<a name="l00503"></a>00503 <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> std::pair<F,S>& p ) {
-<a name="l00504"></a>00504     <span class="keywordflow">return</span> <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(p.first) ^ <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(p.second);
-<a name="l00505"></a>00505 }
-<a name="l00506"></a>00506 
-<a name="l00508"></a>00508 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00509"></a><a class="code" href="a00170.html">00509</a> <span class="keyword">struct </span><a class="code" href="a00170.html">tbb_hash_compare</a> {
-<a name="l00510"></a>00510     <span class="keyword">static</span> size_t hash( <span class="keyword">const</span> T& t ) { <span class="keywordflow">return</span> <a class="code" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(t); }
-<a name="l00511"></a>00511     <span class="keyword">static</span> <span class="keywordtype">bool</span> equal( <span class="keyword">const</span> T& a, <span class="keyword">const</span> T& b ) { <span class="keywordflow">return</span> a == b; }
-<a name="l00512"></a>00512 };
-<a name="l00513"></a>00513 
-<a name="l00515"></a>00515 
-<a name="l00543"></a>00543 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> Allocator>
-<a name="l00544"></a><a class="code" href="a00130.html">00544</a> <span class="keyword">class </span><a class="code" href="a00130.html">concurrent_hash_map</a> : <span class="keyword">protected</span> internal::hash_map_base {
-<a name="l00545"></a>00545     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00546"></a>00546     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
-<a name="l00547"></a>00547 
-<a name="l00548"></a>00548     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00549"></a>00549     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
-<a name="l00550"></a>00550 
-<a name="l00551"></a>00551 <span class="keyword">public</span>:
-<a name="l00552"></a>00552     <span class="keyword">typedef</span> Key key_type;
-<a name="l00553"></a>00553     <span class="keyword">typedef</span> T mapped_type;
-<a name="l00554"></a>00554     <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
-<a name="l00555"></a>00555     <span class="keyword">typedef</span> internal::hash_map_base::size_type size_type;
-<a name="l00556"></a>00556     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00557"></a>00557     <span class="keyword">typedef</span> value_type *pointer;
-<a name="l00558"></a>00558     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type *const_pointer;
-<a name="l00559"></a>00559     <span class="keyword">typedef</span> value_type &reference;
-<a name="l00560"></a>00560     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type &const_reference;
-<a name="l00561"></a>00561     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,value_type> iterator;
-<a name="l00562"></a>00562     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,const value_type> const_iterator;
-<a name="l00563"></a>00563     <span class="keyword">typedef</span> internal::hash_map_range<iterator> range_type;
-<a name="l00564"></a>00564     <span class="keyword">typedef</span> internal::hash_map_range<const_iterator> const_range_type;
-<a name="l00565"></a>00565     <span class="keyword">typedef</span> Allocator allocator_type;
-<a name="l00566"></a>00566 
-<a name="l00567"></a>00567 <span class="keyword">protected</span>:
-<a name="l00568"></a>00568     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00133.html">const_accessor</a>;
-<a name="l00569"></a>00569     <span class="keyword">struct </span>node;
-<a name="l00570"></a>00570     <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind<node>::other node_allocator_type;
-<a name="l00571"></a>00571     node_allocator_type my_allocator;
-<a name="l00572"></a>00572     HashCompare my_hash_compare;
-<a name="l00573"></a>00573 
-<a name="l00574"></a>00574     <span class="keyword">struct </span>node : <span class="keyword">public</span> node_base {
-<a name="l00575"></a>00575         value_type item;
-<a name="l00576"></a>00576         node( <span class="keyword">const</span> Key &key ) : item(key, T()) {}
-<a name="l00577"></a>00577         node( <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T &t ) : item(key, t) {}
-<a name="l00578"></a>00578         <span class="comment">// exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17</span>
-<a name="l00579"></a>00579         <span class="keywordtype">void</span> *operator new( size_t <span class="comment">/*size*/</span>, node_allocator_type &a ) {
-<a name="l00580"></a>00580             <span class="keywordtype">void</span> *ptr = a.allocate(1);
-<a name="l00581"></a>00581             <span class="keywordflow">if</span>(!ptr) <span class="keywordflow">throw</span> std::bad_alloc();
-<a name="l00582"></a>00582             <span class="keywordflow">return</span> ptr;
-<a name="l00583"></a>00583         }
-<a name="l00584"></a>00584         <span class="comment">// match placement-new form above to be called if exception thrown in constructor</span>
-<a name="l00585"></a>00585         <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span> *ptr, node_allocator_type &a ) {<span class="keywordflow">return</span> a.deallocate(static_cast<node*>(ptr),1); }
-<a name="l00586"></a>00586     };
-<a name="l00587"></a>00587 
-<a name="l00588"></a>00588     <span class="keywordtype">void</span> delete_node( node_base *n ) {
-<a name="l00589"></a>00589         my_allocator.destroy( static_cast<node*>(n) );
-<a name="l00590"></a>00590         my_allocator.deallocate( static_cast<node*>(n), 1);
-<a name="l00591"></a>00591     }
-<a name="l00592"></a>00592 
-<a name="l00593"></a>00593     node *search_bucket( <span class="keyword">const</span> key_type &key, bucket *b )<span class="keyword"> const </span>{
-<a name="l00594"></a>00594         node *n = static_cast<node*>( b->node_list );
-<a name="l00595"></a>00595         <span class="keywordflow">while</span>( is_valid(n) && !my_hash_compare.equal(key, n->item.first) )
-<a name="l00596"></a>00596             n = static_cast<node*>( n->next );
-<a name="l00597"></a>00597         __TBB_ASSERT(n != __TBB_rehash_req, <span class="stringliteral">"Search can be executed only for rehashed bucket"</span>);
-<a name="l00598"></a>00598         <span class="keywordflow">return</span> n;
-<a name="l00599"></a>00599     }
-<a name="l00600"></a>00600 
-<a name="l00602"></a><a class="code" href="a00132.html">00602</a>     <span class="keyword">class </span><a class="code" href="a00132.html">bucket_accessor</a> : <span class="keyword">public</span> bucket::scoped_t {
-<a name="l00603"></a>00603         <span class="keywordtype">bool</span> my_is_writer; <span class="comment">// TODO: use it from base type</span>
-<a name="l00604"></a>00604         bucket *my_b;
-<a name="l00605"></a>00605     <span class="keyword">public</span>:
-<a name="l00606"></a>00606         <a class="code" href="a00132.html">bucket_accessor</a>( <a class="code" href="a00130.html">concurrent_hash_map</a> *base, <span class="keyword">const</span> hashcode_t h, <span class="keywordtype">bool</span> writer = <span class="keyword">false</span> ) { <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( base, h, writer ); }
-<a name="l00608"></a><a class="code" href="a00132.html#7b75959ce5a971b05cfefcbc1d09a022">00608</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00130.html">concurrent_hash_map</a> *base, <span class="keyword">const</span> hashcode_t h, <span class="keywordtype">bool</span> writer = <span class="keyword">false</span> ) {
-<a name="l00609"></a>00609             my_b = base->get_bucket( h );
-<a name="l00610"></a>00610 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00611"></a>00611 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( itt_load_pointer_with_acquire_v3(&my_b->node_list) == __TBB_rehash_req
-<a name="l00612"></a>00612 #<span class="keywordflow">else</span>
-<a name="l00613"></a>00613             <span class="keywordflow">if</span>( __TBB_load_with_acquire(my_b->node_list) == __TBB_rehash_req
-<a name="l00614"></a>00614 #endif
-<a name="l00615"></a>00615                 && try_acquire( my_b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> ) )
-<a name="l00616"></a>00616             {
-<a name="l00617"></a>00617                 <span class="keywordflow">if</span>( my_b->node_list == __TBB_rehash_req ) base-><a class="code" href="a00130.html#f2fe44bde2158a2f2a315c6457ebd030">rehash_bucket</a>( my_b, h ); <span class="comment">//recursive rehashing</span>
-<a name="l00618"></a>00618                 my_is_writer = <span class="keyword">true</span>;
-<a name="l00619"></a>00619             }
-<a name="l00620"></a>00620             <span class="keywordflow">else</span> bucket::scoped_t::acquire( my_b->mutex, <span class="comment">/*write=*/</span>my_is_writer = writer );
-<a name="l00621"></a>00621             __TBB_ASSERT( my_b->node_list != __TBB_rehash_req, NULL);
-<a name="l00622"></a>00622         }
-<a name="l00624"></a><a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">00624</a>         <span class="keywordtype">bool</span> is_writer() { <span class="keywordflow">return</span> my_is_writer; }
-<a name="l00626"></a><a class="code" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">00626</a>         bucket *operator() () { <span class="keywordflow">return</span> my_b; }
-<a name="l00627"></a>00627         <span class="comment">// TODO: optimize out</span>
-<a name="l00628"></a>00628         <span class="keywordtype">bool</span> upgrade_to_writer() { my_is_writer = <span class="keyword">true</span>; <span class="keywordflow">return</span> bucket::scoped_t::upgrade_to_writer(); }
-<a name="l00629"></a>00629     };
-<a name="l00630"></a>00630 
-<a name="l00631"></a>00631     <span class="comment">// TODO refactor to hash_base</span>
-<a name="l00632"></a>00632     <span class="keywordtype">void</span> rehash_bucket( bucket *b_new, <span class="keyword">const</span> hashcode_t h ) {
-<a name="l00633"></a>00633         __TBB_ASSERT( *(intptr_t*)(&b_new->mutex), <span class="stringliteral">"b_new must be locked (for write)"</span>);
-<a name="l00634"></a>00634         __TBB_ASSERT( h > 1, <span class="stringliteral">"The lowermost buckets can't be rehashed"</span> );
-<a name="l00635"></a>00635         __TBB_store_with_release(b_new->node_list, __TBB_empty_rehashed); <span class="comment">// mark rehashed</span>
-<a name="l00636"></a>00636         hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; <span class="comment">// get parent mask from the topmost bit</span>
-<a name="l00637"></a>00637 
-<a name="l00638"></a>00638         bucket_accessor b_old( <span class="keyword">this</span>, h & mask );
-<a name="l00639"></a>00639 
-<a name="l00640"></a>00640         mask = (mask<<1) | 1; <span class="comment">// get full mask for new bucket</span>
-<a name="l00641"></a>00641         __TBB_ASSERT( (mask&(mask+1))==0 && (h & mask) == h, NULL );
-<a name="l00642"></a>00642     restart:
-<a name="l00643"></a>00643         <span class="keywordflow">for</span>( node_base **p = &b_old()->node_list, *n = __TBB_load_with_acquire(*p); is_valid(n); n = *p ) {
-<a name="l00644"></a>00644             hashcode_t c = my_hash_compare.hash( static_cast<node*>(n)->item.first );
-<a name="l00645"></a>00645             <span class="keywordflow">if</span>( (c & mask) == h ) {
-<a name="l00646"></a>00646                 <span class="keywordflow">if</span>( !b_old.is_writer() )
-<a name="l00647"></a>00647                     <span class="keywordflow">if</span>( !b_old.upgrade_to_writer() ) {
-<a name="l00648"></a>00648                         <span class="keywordflow">goto</span> restart; <span class="comment">// node ptr can be invalid due to concurrent erase</span>
-<a name="l00649"></a>00649                     }
-<a name="l00650"></a>00650                 *p = n->next; <span class="comment">// exclude from b_old</span>
-<a name="l00651"></a>00651                 add_to_bucket( b_new, n );
-<a name="l00652"></a>00652             } <span class="keywordflow">else</span> p = &n->next; <span class="comment">// iterate to next item</span>
-<a name="l00653"></a>00653         }
-<a name="l00654"></a>00654     }
-<a name="l00655"></a>00655 
-<a name="l00656"></a>00656 <span class="keyword">public</span>:
-<a name="l00657"></a>00657     
-<a name="l00658"></a>00658     <span class="keyword">class </span>accessor;
-<a name="l00660"></a><a class="code" href="a00133.html">00660</a>     <span class="keyword">class </span><a class="code" href="a00133.html">const_accessor</a> {
-<a name="l00661"></a>00661         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00130.html">concurrent_hash_map</a><Key,T,HashCompare,Allocator>;
-<a name="l00662"></a>00662         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00131.html">accessor</a>;
-<a name="l00663"></a>00663         <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00131.html">accessor</a> & ) <span class="keyword">const</span>; <span class="comment">// Deny access</span>
-<a name="l00664"></a>00664         <a class="code" href="a00133.html">const_accessor</a>( <span class="keyword">const</span> <a class="code" href="a00131.html">accessor</a> & );       <span class="comment">// Deny access</span>
-<a name="l00665"></a>00665     <span class="keyword">public</span>:
-<a name="l00667"></a><a class="code" href="a00133.html#b5de4197079009b1cfd8bdeb594c6428">00667</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">typename</span> concurrent_hash_map::value_type value_type;
-<a name="l00668"></a>00668 
-<a name="l00670"></a><a class="code" href="a00133.html#e55c7c3f0acd7fd823a07957e71a7462">00670</a>         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_node;}
-<a name="l00671"></a>00671 
-<a name="l00673"></a><a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">00673</a>         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
-<a name="l00674"></a>00674             <span class="keywordflow">if</span>( my_node ) {
-<a name="l00675"></a>00675                 my_lock.release();
-<a name="l00676"></a>00676                 my_node = 0;
-<a name="l00677"></a>00677             }
-<a name="l00678"></a>00678         }
-<a name="l00679"></a>00679 
-<a name="l00681"></a><a class="code" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">00681</a>         const_reference operator*()<span class="keyword"> const </span>{
-<a name="l00682"></a>00682             __TBB_ASSERT( my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
-<a name="l00683"></a>00683             <span class="keywordflow">return</span> my_node->item;
-<a name="l00684"></a>00684         }
-<a name="l00685"></a>00685 
-<a name="l00687"></a><a class="code" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">00687</a>         const_pointer operator->()<span class="keyword"> const </span>{
-<a name="l00688"></a>00688             <span class="keywordflow">return</span> &operator*();
-<a name="l00689"></a>00689         }
-<a name="l00690"></a>00690 
-<a name="l00692"></a><a class="code" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">00692</a>         <a class="code" href="a00133.html">const_accessor</a>() : my_node(NULL) {}
-<a name="l00693"></a>00693 
-<a name="l00695"></a><a class="code" href="a00133.html#e002771760f510e06c03e0a198286172">00695</a>         ~<a class="code" href="a00133.html">const_accessor</a>() {
-<a name="l00696"></a>00696             my_node = NULL; <span class="comment">// my_lock.release() is called in scoped_lock destructor</span>
-<a name="l00697"></a>00697         }
-<a name="l00698"></a>00698     <span class="keyword">private</span>:
-<a name="l00699"></a>00699         node *my_node;
-<a name="l00700"></a>00700         <span class="keyword">typename</span> node::scoped_t my_lock;
-<a name="l00701"></a>00701         hashcode_t my_hash;
-<a name="l00702"></a>00702     };
-<a name="l00703"></a>00703 
-<a name="l00705"></a><a class="code" href="a00131.html">00705</a>     <span class="keyword">class </span><a class="code" href="a00131.html">accessor</a>: <span class="keyword">public</span> <a class="code" href="a00133.html">const_accessor</a> {
-<a name="l00706"></a>00706     <span class="keyword">public</span>:
-<a name="l00708"></a><a class="code" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">00708</a>         <span class="keyword">typedef</span> <span class="keyword">typename</span> concurrent_hash_map::value_type value_type;
-<a name="l00709"></a>00709 
-<a name="l00711"></a><a class="code" href="a00131.html#03a091f7355a3c0c03f839893695f372">00711</a>         reference operator*()<span class="keyword"> const </span>{
-<a name="l00712"></a>00712             __TBB_ASSERT( this->my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
-<a name="l00713"></a>00713             <span class="keywordflow">return</span> this->my_node->item;
-<a name="l00714"></a>00714         }
-<a name="l00715"></a>00715 
-<a name="l00717"></a><a class="code" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">00717</a>         pointer operator->()<span class="keyword"> const </span>{
-<a name="l00718"></a>00718             <span class="keywordflow">return</span> &operator*();
-<a name="l00719"></a>00719         }
-<a name="l00720"></a>00720     };
-<a name="l00721"></a>00721 
-<a name="l00723"></a><a class="code" href="a00130.html#342582ba05d9fb893ed80875d2b7a42f">00723</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00724"></a>00724         : my_allocator(a)
-<a name="l00725"></a>00725     {}
-<a name="l00726"></a>00726 
-<a name="l00728"></a><a class="code" href="a00130.html#bc50f7bca65d0c27cbf5c31d2fa63eac">00728</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& table, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00729"></a>00729         : my_allocator(a)
-<a name="l00730"></a>00730     {
-<a name="l00731"></a>00731         internal_copy(table);
-<a name="l00732"></a>00732     }
-<a name="l00733"></a>00733 
-<a name="l00735"></a>00735     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00736"></a><a class="code" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">00736</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00737"></a>00737         : my_allocator(a)
-<a name="l00738"></a>00738     {
-<a name="l00739"></a>00739         reserve( std::distance(first, last) ); <span class="comment">// TODO: load_factor?</span>
-<a name="l00740"></a>00740         internal_copy(first, last);
-<a name="l00741"></a>00741     }
-<a name="l00742"></a>00742 
-<a name="l00744"></a><a class="code" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">00744</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& table ) {
-<a name="l00745"></a>00745         <span class="keywordflow">if</span>( <span class="keyword">this</span>!=&table ) {
-<a name="l00746"></a>00746             clear();
-<a name="l00747"></a>00747             internal_copy(table);
-<a name="l00748"></a>00748         } 
-<a name="l00749"></a>00749         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00750"></a>00750     }
-<a name="l00751"></a>00751 
-<a name="l00752"></a>00752 
-<a name="l00754"></a>00754     <span class="keywordtype">void</span> clear();
-<a name="l00755"></a>00755 
-<a name="l00757"></a><a class="code" href="a00130.html#5e96649f71f68f3b6bf3b1eee6b441a7">00757</a>     ~<a class="code" href="a00130.html">concurrent_hash_map</a>() { clear(); }
-<a name="l00758"></a>00758 
-<a name="l00759"></a>00759     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00760"></a>00760     <span class="comment">// Parallel algorithm support</span>
-<a name="l00761"></a>00761     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00762"></a>00762     range_type range( size_type grainsize=1 ) {
-<a name="l00763"></a>00763         <span class="keywordflow">return</span> range_type( *<span class="keyword">this</span>, grainsize );
-<a name="l00764"></a>00764     }
-<a name="l00765"></a>00765     const_range_type range( size_type grainsize=1 )<span class="keyword"> const </span>{
-<a name="l00766"></a>00766         <span class="keywordflow">return</span> const_range_type( *<span class="keyword">this</span>, grainsize );
-<a name="l00767"></a>00767     }
-<a name="l00768"></a>00768 
-<a name="l00769"></a>00769     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00770"></a>00770     <span class="comment">// STL support - not thread-safe methods</span>
-<a name="l00771"></a>00771     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00772"></a>00772     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0,my_embedded_segment,my_embedded_segment->node_list);}
-<a name="l00773"></a>00773     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0,0,0);}
-<a name="l00774"></a>00774     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0,my_embedded_segment,my_embedded_segment->node_list);}
-<a name="l00775"></a>00775     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0,0,0);}
-<a name="l00776"></a>00776     std::pair<iterator, iterator> equal_range( <span class="keyword">const</span> Key& key ) { <span class="keywordflow">return</span> internal_equal_range(key, end()); }
-<a name="l00777"></a>00777     std::pair<const_iterator, const_iterator> equal_range( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> internal_equal_range(key, end()); }
-<a name="l00778"></a>00778     
-<a name="l00780"></a><a class="code" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">00780</a>     size_type size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_size; }
-<a name="l00781"></a>00781 
-<a name="l00783"></a><a class="code" href="a00130.html#3e5d085375320cd3f34faeedc5bba8f6">00783</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_size == 0; }
-<a name="l00784"></a>00784 
-<a name="l00786"></a><a class="code" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">00786</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(node);}
-<a name="l00787"></a>00787 
-<a name="l00789"></a><a class="code" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">00789</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
-<a name="l00790"></a>00790 
-<a name="l00792"></a>00792     <span class="keywordtype">void</span> swap(<a class="code" href="a00130.html">concurrent_hash_map</a> &table);
-<a name="l00793"></a>00793 
-<a name="l00794"></a>00794     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00795"></a>00795     <span class="comment">// concurrent map operations</span>
-<a name="l00796"></a>00796     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00797"></a>00797 
-<a name="l00799"></a><a class="code" href="a00130.html#a3e97a1f3cb66e81a2336b013ef1ae7d">00799</a>     size_type count( <span class="keyword">const</span> Key &key )<span class="keyword"> const </span>{
-<a name="l00800"></a>00800         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, NULL, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00801"></a>00801     }
-<a name="l00802"></a>00802 
-<a name="l00804"></a>00804 
-<a name="l00805"></a><a class="code" href="a00130.html#9fa1ca60af4ef761a100617b27718585">00805</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> Key &key )<span class="keyword"> const </span>{
-<a name="l00806"></a>00806         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00807"></a>00807         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00808"></a>00808     }
-<a name="l00809"></a>00809 
-<a name="l00811"></a>00811 
-<a name="l00812"></a><a class="code" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">00812</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> Key &key ) {
-<a name="l00813"></a>00813         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00814"></a>00814         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l00815"></a>00815     }
-<a name="l00816"></a>00816         
-<a name="l00818"></a>00818 
-<a name="l00819"></a><a class="code" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">00819</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> Key &key ) {
-<a name="l00820"></a>00820         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00821"></a>00821         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00822"></a>00822     }
-<a name="l00823"></a>00823 
-<a name="l00825"></a>00825 
-<a name="l00826"></a><a class="code" href="a00130.html#8ea81ff7fea044f859273b354c91c185">00826</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> Key &key ) {
-<a name="l00827"></a>00827         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00828"></a>00828         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l00829"></a>00829     }
-<a name="l00830"></a>00830 
-<a name="l00832"></a>00832 
-<a name="l00833"></a><a class="code" href="a00130.html#68a46a26bd4308c1780d021ca7e8fc15">00833</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> value_type &value ) {
-<a name="l00834"></a>00834         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00835"></a>00835         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00836"></a>00836     }
-<a name="l00837"></a>00837 
-<a name="l00839"></a>00839 
-<a name="l00840"></a><a class="code" href="a00130.html#7bd4dcf6ea74a32299fd57d8d7fc7ed8">00840</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> value_type &value ) {
-<a name="l00841"></a>00841         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
-<a name="l00842"></a>00842         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l00843"></a>00843     }
-<a name="l00844"></a>00844 
-<a name="l00846"></a>00846 
-<a name="l00847"></a><a class="code" href="a00130.html#3034a308bc839695a5714a107380c4b9">00847</a>     <span class="keywordtype">bool</span> insert( <span class="keyword">const</span> value_type &value ) {
-<a name="l00848"></a>00848         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, NULL, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
-<a name="l00849"></a>00849     }
-<a name="l00850"></a>00850 
-<a name="l00852"></a>00852     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00853"></a><a class="code" href="a00130.html#7b42dba04d71e1367f0d542087906178">00853</a>     <span class="keywordtype">void</span> insert(I first, I last) {
-<a name="l00854"></a>00854         <span class="keywordflow">for</span>(; first != last; ++first)
-<a name="l00855"></a>00855             insert( *first );
-<a name="l00856"></a>00856     }
-<a name="l00857"></a>00857 
-<a name="l00859"></a>00859 
-<a name="l00860"></a>00860     <span class="keywordtype">bool</span> erase( <span class="keyword">const</span> Key& key );
-<a name="l00861"></a>00861 
-<a name="l00863"></a>00863 
-<a name="l00864"></a><a class="code" href="a00130.html#fc64086f9f518cef8c368c9429d0064e">00864</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00133.html">const_accessor</a>& item_accessor ) {
-<a name="l00865"></a>00865         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">true</span> );
-<a name="l00866"></a>00866     }
-<a name="l00867"></a>00867 
-<a name="l00869"></a>00869 
-<a name="l00870"></a><a class="code" href="a00130.html#b65abfa291da566617dd58dfb349630a">00870</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00131.html">accessor</a>& item_accessor ) {
-<a name="l00871"></a>00871         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">false</span> );
-<a name="l00872"></a>00872     }
-<a name="l00873"></a>00873 
-<a name="l00874"></a>00874 <span class="keyword">protected</span>:
-<a name="l00876"></a>00876     <span class="keywordtype">bool</span> lookup( <span class="keywordtype">bool</span> op_insert, <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T *t, const_accessor *result, <span class="keywordtype">bool</span> write );
-<a name="l00877"></a>00877 
-<a name="l00879"></a>00879     <span class="keywordtype">bool</span> exclude( const_accessor &item_accessor, <span class="keywordtype">bool</span> readonly );
-<a name="l00880"></a>00880 
-<a name="l00882"></a>00882     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00883"></a>00883     std::pair<I, I> internal_equal_range( <span class="keyword">const</span> Key& key, I end ) <span class="keyword">const</span>;
-<a name="l00884"></a>00884 
-<a name="l00886"></a>00886     <span class="keywordtype">void</span> internal_copy( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& source );
-<a name="l00887"></a>00887 
-<a name="l00888"></a>00888     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00889"></a>00889     <span class="keywordtype">void</span> internal_copy(I first, I last);
-<a name="l00890"></a>00890 
-<a name="l00892"></a><a class="code" href="a00130.html#2f1ca7e8319c464349a9de304b6dbf4a">00892</a>     const_pointer find( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
-<a name="l00893"></a>00893         hashcode_t h = my_hash_compare.hash( key );
-<a name="l00894"></a>00894         hashcode_t m = my_mask;
-<a name="l00895"></a>00895     restart:
-<a name="l00896"></a>00896         __TBB_ASSERT((m&(m+1))==0, NULL);
-<a name="l00897"></a>00897         bucket *b = get_bucket( h & m );
-<a name="l00898"></a>00898         <span class="keywordflow">if</span>( b->node_list == __TBB_rehash_req ) {
-<a name="l00899"></a>00899             bucket::scoped_t lock;
-<a name="l00900"></a>00900             <span class="keywordflow">if</span>( lock.try_acquire( b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> ) && b->node_list == __TBB_rehash_req )
-<a name="l00901"></a>00901                 const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->rehash_bucket( b, h & m ); <span class="comment">//recursive rehashing</span>
-<a name="l00902"></a>00902             <span class="keywordflow">else</span> internal::spin_wait_while_eq( b->node_list, __TBB_rehash_req ); <span class="comment">//TODO: rework for fast find?</span>
-<a name="l00903"></a>00903         }
-<a name="l00904"></a>00904         node *n = search_bucket( key, b );
-<a name="l00905"></a>00905         <span class="keywordflow">if</span>( check_mask_race( h, m ) )
-<a name="l00906"></a>00906             <span class="keywordflow">goto</span> restart;
-<a name="l00907"></a>00907         <span class="keywordflow">if</span>( n )
-<a name="l00908"></a>00908             <span class="keywordflow">return</span> &n->item;
-<a name="l00909"></a>00909         <span class="keywordflow">return</span> 0;
-<a name="l00910"></a>00910     }
-<a name="l00911"></a>00911 };
-<a name="l00912"></a>00912 
-<a name="l00913"></a>00913 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00914"></a>00914 <span class="preprocessor"></span>    <span class="comment">// Suppress "conditional expression is constant" warning.</span>
-<a name="l00915"></a>00915 <span class="preprocessor">    #pragma warning( push )</span>
-<a name="l00916"></a>00916 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( disable: 4127 )</span>
-<a name="l00917"></a>00917 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00918"></a>00918 <span class="preprocessor"></span>
-<a name="l00919"></a>00919 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l00920"></a><a class="code" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">00920</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::lookup</a>( <span class="keywordtype">bool</span> op_insert, <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T *t, <a class="code" href="a00133.html">const_accessor</a> *result, <span class="keywordtype">bool</span> write ) {
-<a name="l00921"></a>00921     __TBB_ASSERT( !result || !result-><a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>, NULL );
-<a name="l00922"></a>00922     segment_index_t grow_segment;
-<a name="l00923"></a>00923     <span class="keywordtype">bool</span> return_value;
-<a name="l00924"></a>00924     node *n, *tmp_n = 0;
-<a name="l00925"></a>00925     hashcode_t <span class="keyword">const</span> h = my_hash_compare.hash( key );
-<a name="l00926"></a>00926 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00927"></a>00927 <span class="preprocessor"></span>    hashcode_t m = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
-<a name="l00928"></a>00928 <span class="preprocessor">#else</span>
-<a name="l00929"></a>00929 <span class="preprocessor"></span>    hashcode_t m = my_mask;
-<a name="l00930"></a>00930 <span class="preprocessor">#endif</span>
-<a name="l00931"></a>00931 <span class="preprocessor"></span>    restart:
-<a name="l00932"></a>00932     {<span class="comment">//lock scope</span>
-<a name="l00933"></a>00933         __TBB_ASSERT((m&(m+1))==0, NULL);
-<a name="l00934"></a>00934         return_value = <span class="keyword">false</span>;
-<a name="l00935"></a>00935         <span class="comment">// get bucket</span>
-<a name="l00936"></a>00936         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m );
-<a name="l00937"></a>00937 
-<a name="l00938"></a>00938         <span class="comment">// find a node</span>
-<a name="l00939"></a>00939         n = search_bucket( key, b() );
-<a name="l00940"></a>00940         <span class="keywordflow">if</span>( op_insert ) {
-<a name="l00941"></a>00941             <span class="comment">// [opt] insert a key</span>
-<a name="l00942"></a>00942             <span class="keywordflow">if</span>( !is_valid(n) ) {
-<a name="l00943"></a>00943                 <span class="keywordflow">if</span>( !tmp_n ) {
-<a name="l00944"></a>00944                     <span class="keywordflow">if</span>(t) tmp_n = <span class="keyword">new</span>( my_allocator ) node(key, *t);
-<a name="l00945"></a>00945                     <span class="keywordflow">else</span>  tmp_n = <span class="keyword">new</span>( my_allocator ) node(key);
-<a name="l00946"></a>00946                 }
-<a name="l00947"></a>00947                 <span class="keywordflow">if</span>( !b.<a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a>() && !b.<a class="code" href="a00132.html#32b2b1c83ca85859bc5276022821152d">upgrade_to_writer</a>() ) { <span class="comment">// TODO: improved insertion</span>
-<a name="l00948"></a>00948                     <span class="comment">// Rerun search_list, in case another thread inserted the item during the upgrade.</span>
-<a name="l00949"></a>00949                     n = search_bucket( key, b() );
-<a name="l00950"></a>00950                     <span class="keywordflow">if</span>( is_valid(n) ) { <span class="comment">// unfortunately, it did</span>
-<a name="l00951"></a>00951                         b.downgrade_to_reader();
-<a name="l00952"></a>00952                         <span class="keywordflow">goto</span> exists;
-<a name="l00953"></a>00953                     }
-<a name="l00954"></a>00954                 }
-<a name="l00955"></a>00955                 <span class="keywordflow">if</span>( check_mask_race(h, m) )
-<a name="l00956"></a>00956                     <span class="keywordflow">goto</span> restart; <span class="comment">// b.release() is done in ~b().</span>
-<a name="l00957"></a>00957                 <span class="comment">// insert and set flag to grow the container</span>
-<a name="l00958"></a>00958                 grow_segment = insert_new_node( b(), n = tmp_n, m );
-<a name="l00959"></a>00959                 tmp_n = 0;
-<a name="l00960"></a>00960                 return_value = <span class="keyword">true</span>;
-<a name="l00961"></a>00961             } <span class="keywordflow">else</span> {
-<a name="l00962"></a>00962     exists:     grow_segment = 0;
-<a name="l00963"></a>00963             }
-<a name="l00964"></a>00964         } <span class="keywordflow">else</span> { <span class="comment">// find or count</span>
-<a name="l00965"></a>00965             <span class="keywordflow">if</span>( !n ) {
-<a name="l00966"></a>00966                 <span class="keywordflow">if</span>( check_mask_race( h, m ) )
-<a name="l00967"></a>00967                     <span class="keywordflow">goto</span> restart; <span class="comment">// b.release() is done in ~b(). TODO: replace by continue</span>
-<a name="l00968"></a>00968                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00969"></a>00969             }
-<a name="l00970"></a>00970             return_value = <span class="keyword">true</span>;
-<a name="l00971"></a>00971             grow_segment = 0;
-<a name="l00972"></a>00972         }
-<a name="l00973"></a>00973         <span class="keywordflow">if</span>( !result ) <span class="keywordflow">goto</span> check_growth;
-<a name="l00974"></a>00974         <span class="comment">// TODO: the following seems as generic/regular operation</span>
-<a name="l00975"></a>00975         <span class="comment">// acquire the item</span>
-<a name="l00976"></a>00976         <span class="keywordflow">if</span>( !result-><a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.try_acquire( n->mutex, write ) ) {
-<a name="l00977"></a>00977             <span class="comment">// we are unlucky, prepare for longer wait</span>
-<a name="l00978"></a>00978             <a class="code" href="a00119.html">internal::atomic_backoff</a> trials;
-<a name="l00979"></a>00979             <span class="keywordflow">do</span> {
-<a name="l00980"></a>00980                 <span class="keywordflow">if</span>( !trials.bounded_pause() ) {
-<a name="l00981"></a>00981                     <span class="comment">// the wait takes really long, restart the operation</span>
-<a name="l00982"></a>00982                     b.release();
-<a name="l00983"></a>00983                     __TBB_Yield();
-<a name="l00984"></a>00984                     m = my_mask;
-<a name="l00985"></a>00985                     <span class="keywordflow">goto</span> restart;
-<a name="l00986"></a>00986                 }
-<a name="l00987"></a>00987             } <span class="keywordflow">while</span>( !result-><a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.try_acquire( n->mutex, write ) );
-<a name="l00988"></a>00988         }
-<a name="l00989"></a>00989     }<span class="comment">//lock scope</span>
-<a name="l00990"></a>00990     result-><a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a> = n;
-<a name="l00991"></a>00991     result-><a class="code" href="a00133.html#4ba27b783fcaaab0bab90e60b8c8a614">my_hash</a> = h;
-<a name="l00992"></a>00992 check_growth:
-<a name="l00993"></a>00993     <span class="comment">// [opt] grow the container</span>
-<a name="l00994"></a>00994     <span class="keywordflow">if</span>( grow_segment )
-<a name="l00995"></a>00995         enable_segment( grow_segment );
-<a name="l00996"></a>00996     <span class="keywordflow">if</span>( tmp_n ) <span class="comment">// if op_insert only</span>
-<a name="l00997"></a>00997         delete_node( tmp_n );
-<a name="l00998"></a>00998     <span class="keywordflow">return</span> return_value;
-<a name="l00999"></a>00999 }
-<a name="l01000"></a>01000 
-<a name="l01001"></a>01001 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01002"></a>01002 <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l01003"></a><a class="code" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">01003</a> std::pair<I, I> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_equal_range</a>( <span class="keyword">const</span> Key& key, I end )<span class="keyword"> const </span>{
-<a name="l01004"></a>01004     hashcode_t h = my_hash_compare.hash( key );
-<a name="l01005"></a>01005     hashcode_t m = my_mask;
-<a name="l01006"></a>01006     __TBB_ASSERT((m&(m+1))==0, NULL);
-<a name="l01007"></a>01007     h &= m;
-<a name="l01008"></a>01008     bucket *b = get_bucket( h );
-<a name="l01009"></a>01009     <span class="keywordflow">while</span>( b->node_list == __TBB_rehash_req ) {
-<a name="l01010"></a>01010         m = ( 1u<<__TBB_Log2( h ) ) - 1; <span class="comment">// get parent mask from the topmost bit</span>
-<a name="l01011"></a>01011         b = get_bucket( h &= m );
-<a name="l01012"></a>01012     }
-<a name="l01013"></a>01013     node *n = search_bucket( key, b );
-<a name="l01014"></a>01014     <span class="keywordflow">if</span>( !n )
-<a name="l01015"></a>01015         <span class="keywordflow">return</span> std::make_pair(end, end);
-<a name="l01016"></a>01016     iterator lower(*<span class="keyword">this</span>, h, b, n), upper(lower);
-<a name="l01017"></a>01017     <span class="keywordflow">return</span> std::make_pair(lower, ++upper);
-<a name="l01018"></a>01018 }
-<a name="l01019"></a>01019 
-<a name="l01020"></a>01020 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01021"></a><a class="code" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">01021</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::exclude</a>( <a class="code" href="a00133.html">const_accessor</a> &item_accessor, <span class="keywordtype">bool</span> readonly ) {
-<a name="l01022"></a>01022     __TBB_ASSERT( item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>, NULL );
-<a name="l01023"></a>01023     node_base *<span class="keyword">const</span> n = item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>;
-<a name="l01024"></a>01024     item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a> = NULL; <span class="comment">// we ought release accessor anyway</span>
-<a name="l01025"></a>01025     hashcode_t <span class="keyword">const</span> h = item_accessor.<a class="code" href="a00133.html#4ba27b783fcaaab0bab90e60b8c8a614">my_hash</a>;
-<a name="l01026"></a>01026     hashcode_t m = my_mask;
-<a name="l01027"></a>01027     <span class="keywordflow">do</span> {
-<a name="l01028"></a>01028         <span class="comment">// get bucket</span>
-<a name="l01029"></a>01029         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m, <span class="comment">/*writer=*/</span><span class="keyword">true</span> );
-<a name="l01030"></a>01030         node_base **p = &b()->node_list;
-<a name="l01031"></a>01031         <span class="keywordflow">while</span>( *p && *p != n )
-<a name="l01032"></a>01032             p = &(*p)->next;
-<a name="l01033"></a>01033         <span class="keywordflow">if</span>( !*p ) { <span class="comment">// someone else was the first</span>
-<a name="l01034"></a>01034             <span class="keywordflow">if</span>( check_mask_race( h, m ) )
-<a name="l01035"></a>01035                 <span class="keywordflow">continue</span>;
-<a name="l01036"></a>01036             item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.release();
-<a name="l01037"></a>01037             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01038"></a>01038         }
-<a name="l01039"></a>01039         __TBB_ASSERT( *p == n, NULL );
-<a name="l01040"></a>01040         *p = n->next; <span class="comment">// remove from container</span>
-<a name="l01041"></a>01041         my_size--;
-<a name="l01042"></a>01042         <span class="keywordflow">break</span>;
-<a name="l01043"></a>01043     } <span class="keywordflow">while</span>(<span class="keyword">true</span>);
-<a name="l01044"></a>01044     <span class="keywordflow">if</span>( readonly ) <span class="comment">// need to get exclusive lock</span>
-<a name="l01045"></a>01045         item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.upgrade_to_writer(); <span class="comment">// return value means nothing here</span>
-<a name="l01046"></a>01046     item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.release();
-<a name="l01047"></a>01047     delete_node( n ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
-<a name="l01048"></a>01048     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l01049"></a>01049 }
-<a name="l01050"></a>01050 
-<a name="l01051"></a>01051 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01052"></a><a class="code" href="a00130.html#58df7a1e4373c55eb4c2fa9dc69516b1">01052</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::erase</a>( <span class="keyword">const</span> Key &key ) {
-<a name="l01053"></a>01053     node_base *n;
-<a name="l01054"></a>01054     hashcode_t <span class="keyword">const</span> h = my_hash_compare.hash( key );
-<a name="l01055"></a>01055     hashcode_t m = my_mask;
-<a name="l01056"></a>01056     {<span class="comment">//lock scope</span>
-<a name="l01057"></a>01057     restart:
-<a name="l01058"></a>01058         <span class="comment">// get bucket</span>
-<a name="l01059"></a>01059         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m );
-<a name="l01060"></a>01060     search:
-<a name="l01061"></a>01061         node_base **p = &b()->node_list;
-<a name="l01062"></a>01062         n = *p;
-<a name="l01063"></a>01063         <span class="keywordflow">while</span>( is_valid(n) && !my_hash_compare.equal(key, static_cast<node*>(n)->item.first ) ) {
-<a name="l01064"></a>01064             p = &n->next;
-<a name="l01065"></a>01065             n = *p;
-<a name="l01066"></a>01066         }
-<a name="l01067"></a>01067         <span class="keywordflow">if</span>( !n ) { <span class="comment">// not found, but mask could be changed</span>
-<a name="l01068"></a>01068             <span class="keywordflow">if</span>( check_mask_race( h, m ) )
-<a name="l01069"></a>01069                 <span class="keywordflow">goto</span> restart;
-<a name="l01070"></a>01070             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01071"></a>01071         }
-<a name="l01072"></a>01072         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( !b.<a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a>() && !b.<a class="code" href="a00132.html#32b2b1c83ca85859bc5276022821152d">upgrade_to_writer</a>() ) {
-<a name="l01073"></a>01073             <span class="keywordflow">if</span>( check_mask_race( h, m ) ) <span class="comment">// contended upgrade, check mask</span>
-<a name="l01074"></a>01074                 <span class="keywordflow">goto</span> restart;
-<a name="l01075"></a>01075             <span class="keywordflow">goto</span> search;
-<a name="l01076"></a>01076         }
-<a name="l01077"></a>01077         *p = n->next;
-<a name="l01078"></a>01078         my_size--;
-<a name="l01079"></a>01079     }
-<a name="l01080"></a>01080     {
-<a name="l01081"></a>01081         <span class="keyword">typename</span> node::scoped_t item_locker( n->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
-<a name="l01082"></a>01082     }
-<a name="l01083"></a>01083     <span class="comment">// note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!</span>
-<a name="l01084"></a>01084     delete_node( n ); <span class="comment">// Only one thread can delete it due to write lock on the bucket</span>
-<a name="l01085"></a>01085     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l01086"></a>01086 }
-<a name="l01087"></a>01087 
-<a name="l01088"></a>01088 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01089"></a>01089 <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::swap</a>(<a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A></a> &table) {
-<a name="l01090"></a>01090     std::swap(this->my_allocator, table.<a class="code" href="a00130.html#964dbe9bfcb2ac0157f8b77f252f951b">my_allocator</a>);
-<a name="l01091"></a>01091     std::swap(this->my_hash_compare, table.<a class="code" href="a00130.html#1d13c1f34b3826f9235b82ea90818169">my_hash_compare</a>);
-<a name="l01092"></a>01092     internal_swap(table);
-<a name="l01093"></a>01093 }
-<a name="l01094"></a>01094 
-<a name="l01095"></a>01095 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01096"></a><a class="code" href="a00130.html#36bcd50fd5383f3682032323b2d74333">01096</a> <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::clear</a>() {
-<a name="l01097"></a>01097     hashcode_t m = my_mask;
-<a name="l01098"></a>01098     __TBB_ASSERT((m&(m+1))==0, NULL);
-<a name="l01099"></a>01099 <span class="preprocessor">#if TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l01100"></a>01100 <span class="preprocessor"></span><span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l01101"></a>01101 <span class="preprocessor"></span>    <span class="keywordtype">int</span> <a class="code" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">size</a> = int(my_size), buckets = int(m)+1, empty_buckets = 0, overpopulated_buckets = 0; <span class="comment">// usage statistics</span>
-<a name="l01102"></a>01102     <span class="keyword">static</span> <span class="keywordtype">bool</span> reported = <span class="keyword">false</span>;
-<a name="l01103"></a>01103 <span class="preprocessor">#endif</span>
-<a name="l01104"></a>01104 <span class="preprocessor"></span>    <span class="comment">// check consistency</span>
-<a name="l01105"></a>01105     <span class="keywordflow">for</span>( segment_index_t b = 0; b <= m; b++ ) {
-<a name="l01106"></a>01106         node_base *n = get_bucket(b)->node_list;
-<a name="l01107"></a>01107 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l01108"></a>01108 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( n == __TBB_empty_rehashed ) empty_buckets++;
-<a name="l01109"></a>01109         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( n == __TBB_rehash_req ) buckets--;
-<a name="l01110"></a>01110         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( n->next ) overpopulated_buckets++;
-<a name="l01111"></a>01111 #endif
-<a name="l01112"></a>01112         <span class="keywordflow">for</span>(; is_valid(n); n = n->next ) {
-<a name="l01113"></a>01113             hashcode_t h = my_hash_compare.hash( static_cast<node*>(n)->item.first );
-<a name="l01114"></a>01114             h &= m;
-<a name="l01115"></a>01115             __TBB_ASSERT( h == b || get_bucket(h)->node_list == __TBB_rehash_req, <span class="stringliteral">"Rehashing is not finished until serial stage due to concurrent or terminated operation"</span> );
-<a name="l01116"></a>01116         }
-<a name="l01117"></a>01117     }
-<a name="l01118"></a>01118 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l01119"></a>01119 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( buckets > size) empty_buckets -= buckets - size;
-<a name="l01120"></a>01120     <span class="keywordflow">else</span> overpopulated_buckets -= size - buckets; <span class="comment">// TODO: load_factor?</span>
-<a name="l01121"></a>01121     <span class="keywordflow">if</span>( !reported && buckets >= 512 && ( 2*empty_buckets >= size || 2*overpopulated_buckets > size ) ) {
-<a name="l01122"></a>01122         internal::runtime_warning(
-<a name="l01123"></a>01123             <span class="stringliteral">"Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d  Empties: %d  Overlaps: %d"</span>,
-<a name="l01124"></a>01124             <span class="keyword">typeid</span>(*this).name(), size, empty_buckets, overpopulated_buckets );
-<a name="l01125"></a>01125         reported = <span class="keyword">true</span>;
-<a name="l01126"></a>01126     }
-<a name="l01127"></a>01127 <span class="preprocessor">#endif</span>
-<a name="l01128"></a>01128 <span class="preprocessor"></span><span class="preprocessor">#endif//TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS</span>
-<a name="l01129"></a>01129 <span class="preprocessor"></span>    my_size = 0;
-<a name="l01130"></a>01130     segment_index_t s = segment_index_of( m );
-<a name="l01131"></a>01131     __TBB_ASSERT( s+1 == pointers_per_table || !my_table[s+1], <span class="stringliteral">"wrong mask or concurrent grow"</span> );
-<a name="l01132"></a>01132     <a class="code" href="a00125.html">cache_aligned_allocator<bucket></a> alloc;
-<a name="l01133"></a>01133     <span class="keywordflow">do</span> {
-<a name="l01134"></a>01134         __TBB_ASSERT( is_valid( my_table[s] ), <span class="stringliteral">"wrong mask or concurrent grow"</span> );
-<a name="l01135"></a>01135         segment_ptr_t buckets = my_table[s];
-<a name="l01136"></a>01136         size_type sz = segment_size( s ? s : 1 );
-<a name="l01137"></a>01137         <span class="keywordflow">for</span>( segment_index_t i = 0; i < sz; i++ )
-<a name="l01138"></a>01138             <span class="keywordflow">for</span>( node_base *n = buckets[i].node_list; is_valid(n); n = buckets[i].node_list ) {
-<a name="l01139"></a>01139                 buckets[i].node_list = n->next;
-<a name="l01140"></a>01140                 delete_node( n );
-<a name="l01141"></a>01141             }
-<a name="l01142"></a>01142         <span class="keywordflow">if</span>( s >= first_block) <span class="comment">// the first segment or the next</span>
-<a name="l01143"></a>01143             alloc.<a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( buckets, sz );
-<a name="l01144"></a>01144         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( s == embedded_block && embedded_block != first_block )
-<a name="l01145"></a>01145             alloc.<a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( buckets, segment_size(first_block)-embedded_buckets );
-<a name="l01146"></a>01146         <span class="keywordflow">if</span>( s >= embedded_block ) my_table[s] = 0;
-<a name="l01147"></a>01147     } <span class="keywordflow">while</span>(s-- > 0);
-<a name="l01148"></a>01148     my_mask = embedded_buckets - 1;
-<a name="l01149"></a>01149 }
-<a name="l01150"></a>01150 
-<a name="l01151"></a>01151 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01152"></a><a class="code" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">01152</a> <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_copy</a>( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& source ) {
-<a name="l01153"></a>01153     reserve( source.my_size ); <span class="comment">// TODO: load_factor?</span>
-<a name="l01154"></a>01154     <span class="keywordflow">if</span>( my_mask == source.my_mask ) { <span class="comment">// optimized version</span>
-<a name="l01155"></a>01155         <span class="keywordflow">for</span>( const_iterator it = source.<a class="code" href="a00130.html#dfb7ab010b46fc194673256479c2ea48">begin</a>(), end = source.<a class="code" href="a00130.html#7e2dd7c8b3d37a93ba551e4de33bb73d">end</a>(); it != end; ++it ) {
-<a name="l01156"></a>01156             bucket *b = get_bucket( it.my_index );
-<a name="l01157"></a>01157             __TBB_ASSERT( b->node_list != __TBB_rehash_req, <span class="stringliteral">"Invalid bucket in destination table"</span>);
-<a name="l01158"></a>01158             node *n = <span class="keyword">new</span>( my_allocator ) node(it->first, it->second);
-<a name="l01159"></a>01159             add_to_bucket( b, n );
-<a name="l01160"></a>01160             ++my_size; <span class="comment">// TODO: replace by non-atomic op</span>
-<a name="l01161"></a>01161         }
-<a name="l01162"></a>01162     } <span class="keywordflow">else</span> <a class="code" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">internal_copy</a>( source.<a class="code" href="a00130.html#dfb7ab010b46fc194673256479c2ea48">begin</a>(), source.<a class="code" href="a00130.html#7e2dd7c8b3d37a93ba551e4de33bb73d">end</a>() );
-<a name="l01163"></a>01163 }
-<a name="l01164"></a>01164 
-<a name="l01165"></a>01165 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01166"></a>01166 <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l01167"></a>01167 <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_copy</a>(I first, I last) {
-<a name="l01168"></a>01168     hashcode_t m = my_mask;
-<a name="l01169"></a>01169     <span class="keywordflow">for</span>(; first != last; ++first) {
-<a name="l01170"></a>01170         hashcode_t h = my_hash_compare.hash( first->first );
-<a name="l01171"></a>01171         bucket *b = get_bucket( h & m );
-<a name="l01172"></a>01172         __TBB_ASSERT( b->node_list != __TBB_rehash_req, <span class="stringliteral">"Invalid bucket in destination table"</span>);
-<a name="l01173"></a>01173         node *n = <span class="keyword">new</span>( my_allocator ) node(first->first, first->second);
-<a name="l01174"></a>01174         add_to_bucket( b, n );
-<a name="l01175"></a>01175         ++my_size; <span class="comment">// TODO: replace by non-atomic op</span>
-<a name="l01176"></a>01176     }
-<a name="l01177"></a>01177 }
-<a name="l01178"></a>01178 
-<a name="l01179"></a>01179 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2>
-<a name="l01180"></a>01180 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A1> &a, <span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A2> &b) {
-<a name="l01181"></a>01181     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01182"></a>01182     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
-<a name="l01183"></a>01183     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
-<a name="l01184"></a>01184     <span class="keywordflow">for</span>(; i != i_end; ++i) {
-<a name="l01185"></a>01185         j = b.equal_range(i->first).first;
-<a name="l01186"></a>01186         <span class="keywordflow">if</span>( j == j_end || !(i->second == j->second) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l01187"></a>01187     }
-<a name="l01188"></a>01188     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l01189"></a>01189 }
-<a name="l01190"></a>01190 
-<a name="l01191"></a>01191 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2>
-<a name="l01192"></a>01192 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A1> &a, <span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A2> &b)
-<a name="l01193"></a>01193 {    <span class="keywordflow">return</span> !(a == b); }
-<a name="l01194"></a>01194 
-<a name="l01195"></a>01195 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
-<a name="l01196"></a>01196 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash_map<Key, T, HashCompare, A> &b)
-<a name="l01197"></a>01197 {    a.swap( b ); }
-<a name="l01198"></a>01198 
-<a name="l01199"></a>01199 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l01200"></a>01200 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( pop )</span>
-<a name="l01201"></a>01201 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4127 is back</span>
-<a name="l01202"></a>01202 <span class="preprocessor"></span>
-<a name="l01203"></a>01203 } <span class="comment">// namespace tbb</span>
-<a name="l01204"></a>01204 
-<a name="l01205"></a>01205 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_hash_map_H */</span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "blocked_range.h"</span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
+<a name="l00028"></a>00028 
+<a name="l00030"></a>00030 
+<a name="l00031"></a>00031 <span class="keyword">template</span><<span class="keyword">typename</span> RowValue, <span class="keyword">typename</span> ColValue=RowValue>
+<a name="l00032"></a><a class="code" href="a00123.html">00032</a> <span class="keyword">class </span><a class="code" href="a00123.html">blocked_range2d</a> {
+<a name="l00033"></a>00033 <span class="keyword">public</span>:
+<a name="l00035"></a><a class="code" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">00035</a>     <span class="keyword">typedef</span> <a class="code" href="a00122.html">blocked_range<RowValue></a> <a class="code" href="a00122.html">row_range_type</a>;
+<a name="l00036"></a>00036     <span class="keyword">typedef</span> <a class="code" href="a00122.html">blocked_range<ColValue></a> <a class="code" href="a00122.html">col_range_type</a>;
+<a name="l00037"></a>00037  
+<a name="l00038"></a>00038 <span class="keyword">private</span>:
+<a name="l00039"></a>00039     <a class="code" href="a00122.html">row_range_type</a> my_rows;
+<a name="l00040"></a>00040     <a class="code" href="a00122.html">col_range_type</a> my_cols;
+<a name="l00041"></a>00041 
+<a name="l00042"></a>00042 <span class="keyword">public</span>:
+<a name="l00043"></a>00043 
+<a name="l00044"></a>00044     <a class="code" href="a00123.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end, <span class="keyword">typename</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">row_range_type::size_type</a> row_grainsize,
+<a name="l00045"></a>00045                      ColValue col_begin, ColValue col_end, <span class="keyword">typename</span> <a class="code" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">col_range_type::size_type</a> col_grainsize ) : 
+<a name="l00046"></a>00046         my_rows(row_begin,row_end,row_grainsize),
+<a name="l00047"></a>00047         my_cols(col_begin,col_end,col_grainsize)
+<a name="l00048"></a>00048     {
+<a name="l00049"></a>00049     }
+<a name="l00050"></a>00050 
+<a name="l00051"></a>00051     <a class="code" href="a00123.html">blocked_range2d</a>( RowValue row_begin, RowValue row_end,
+<a name="l00052"></a>00052                      ColValue col_begin, ColValue col_end ) : 
+<a name="l00053"></a>00053         my_rows(row_begin,row_end),
+<a name="l00054"></a>00054         my_cols(col_begin,col_end)
+<a name="l00055"></a>00055     {
+<a name="l00056"></a>00056     }
+<a name="l00057"></a>00057 
+<a name="l00059"></a><a class="code" href="a00123.html#d144cb2d88cef553420311aca8667a44">00059</a>     <span class="keywordtype">bool</span> <a class="code" href="a00123.html#d144cb2d88cef553420311aca8667a44">empty</a>()<span class="keyword"> const </span>{
+<a name="l00060"></a>00060         <span class="comment">// Yes, it is a logical OR here, not AND.</span>
+<a name="l00061"></a>00061         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>() || my_cols.<a class="code" href="a00122.html#8f4f02f530eb3f2e7ea26e06f76aef9d">empty</a>();
+<a name="l00062"></a>00062     }
+<a name="l00063"></a>00063 
+<a name="l00065"></a><a class="code" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">00065</a>     <span class="keywordtype">bool</span> <a class="code" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">is_divisible</a>()<span class="keyword"> const </span>{
+<a name="l00066"></a>00066         <span class="keywordflow">return</span> my_rows.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_cols.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>();
+<a name="l00067"></a>00067     }
+<a name="l00068"></a>00068 
+<a name="l00069"></a>00069     <a class="code" href="a00123.html">blocked_range2d</a>( <a class="code" href="a00123.html">blocked_range2d</a>& r, <a class="code" href="a00165.html">split</a> ) : 
+<a name="l00070"></a>00070         my_rows(r.my_rows),
+<a name="l00071"></a>00071         my_cols(r.my_cols)
+<a name="l00072"></a>00072     {
+<a name="l00073"></a>00073         <span class="keywordflow">if</span>( my_rows.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_cols.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) < my_cols.<a class="code" href="a00122.html#9eaa0b6beff1420f688570bbf6b8c462">size</a>()*double(my_rows.<a class="code" href="a00122.html#fcd2e5b8b6c11fd3f20fc0aa9f11bbc2">grainsize</a>()) ) {
+<a name="l00074"></a>00074             my_cols.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = col_range_type::do_split(r.<a class="code" href="a00123.html#9837bbaabc5836741fde79512ea1131d">my_cols</a>);
+<a name="l00075"></a>00075         } <span class="keywordflow">else</span> {
+<a name="l00076"></a>00076             my_rows.<a class="code" href="a00122.html#e02559f817d8352c7bdf41dfddc53958">my_begin</a> = row_range_type::do_split(r.<a class="code" href="a00123.html#4be7c7b39da256afe9c67be735b6f788">my_rows</a>);
+<a name="l00077"></a>00077         }
+<a name="l00078"></a>00078     }
+<a name="l00079"></a>00079 
+<a name="l00081"></a><a class="code" href="a00123.html#f496e7348a82652fba581203477cc07c">00081</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">row_range_type</a>& <a class="code" href="a00123.html#f496e7348a82652fba581203477cc07c">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_rows;}
+<a name="l00082"></a>00082 
+<a name="l00084"></a><a class="code" href="a00123.html#392a46759af2c884957115771affa7f4">00084</a>     <span class="keyword">const</span> <a class="code" href="a00122.html">col_range_type</a>& <a class="code" href="a00123.html#392a46759af2c884957115771affa7f4">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_cols;}
+<a name="l00085"></a>00085 };
+<a name="l00086"></a>00086 
+<a name="l00087"></a>00087 } <span class="comment">// namespace tbb </span>
+<a name="l00088"></a>00088 
+<a name="l00089"></a>00089 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_blocked_range2d_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00263.html b/doc/html/a00268.html
similarity index 99%
rename from doc/html/a00263.html
rename to doc/html/a00268.html
index e23061d..53dd7e7 100644
--- a/doc/html/a00263.html
+++ b/doc/html/a00268.html
@@ -89,7 +89,7 @@
 <a name="l00072"></a>00072         <span class="keywordflow">return</span>  my_pages.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_rows.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>() || my_cols.<a class="code" href="a00122.html#41a58b703d574b6e1ca155df3576f578">is_divisible</a>();
 <a name="l00073"></a>00073     }
 <a name="l00074"></a>00074 
-<a name="l00075"></a>00075     <a class="code" href="a00124.html">blocked_range3d</a>( <a class="code" href="a00124.html">blocked_range3d</a>& r, <a class="code" href="a00161.html">split</a> ) : 
+<a name="l00075"></a>00075     <a class="code" href="a00124.html">blocked_range3d</a>( <a class="code" href="a00124.html">blocked_range3d</a>& r, <a class="code" href="a00165.html">split</a> ) : 
 <a name="l00076"></a>00076         my_pages(r.my_pages),
 <a name="l00077"></a>00077         my_rows(r.my_rows),
 <a name="l00078"></a>00078         my_cols(r.my_cols)
diff --git a/doc/html/a00264.html b/doc/html/a00269.html
similarity index 67%
rename from doc/html/a00264.html
rename to doc/html/a00269.html
index ec1ffa1..52ec4cc 100644
--- a/doc/html/a00264.html
+++ b/doc/html/a00269.html
@@ -49,89 +49,86 @@
 <a name="l00028"></a>00028 
 <a name="l00030"></a>00030 <span class="keyword">namespace </span>internal {
 <a name="l00032"></a>00032 
-<a name="l00035"></a>00035     <span class="keyword">const</span> size_t NFS_MaxLineSize = 128;
+<a name="l00033"></a>00033     size_t __TBB_EXPORTED_FUNC NFS_GetLineSize();
+<a name="l00034"></a>00034 
 <a name="l00036"></a>00036 
+<a name="l00037"></a>00037     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC NFS_Allocate( size_t n_element, size_t element_size, <span class="keywordtype">void</span>* hint );
 <a name="l00038"></a>00038 
-<a name="l00039"></a>00039     size_t __TBB_EXPORTED_FUNC NFS_GetLineSize();
 <a name="l00040"></a>00040 
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC NFS_Allocate( size_t n_element, size_t element_size, <span class="keywordtype">void</span>* hint );
-<a name="l00044"></a>00044 
-<a name="l00046"></a>00046 
-<a name="l00048"></a>00048     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC NFS_Free( <span class="keywordtype">void</span>* );
-<a name="l00049"></a>00049 }
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</span>
-<a name="l00054"></a>00054 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4100)</span>
-<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span>
-<a name="l00059"></a>00059 
-<a name="l00062"></a>00062 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00063"></a><a class="code" href="a00125.html">00063</a> <span class="keyword">class </span><a class="code" href="a00125.html">cache_aligned_allocator</a> {
-<a name="l00064"></a>00064 <span class="keyword">public</span>:
-<a name="l00065"></a>00065     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
-<a name="l00066"></a>00066     <span class="keyword">typedef</span> value_type* pointer;
-<a name="l00067"></a>00067     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
-<a name="l00068"></a>00068     <span class="keyword">typedef</span> value_type& reference;
-<a name="l00069"></a>00069     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
-<a name="l00070"></a>00070     <span class="keyword">typedef</span> size_t size_type;
-<a name="l00071"></a>00071     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00072"></a>00072     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00073"></a>00073         <span class="keyword">typedef</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a> other;
-<a name="l00074"></a>00074     };
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076     <a class="code" href="a00125.html">cache_aligned_allocator</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00077"></a>00077     <a class="code" href="a00125.html">cache_aligned_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator</a>& ) <span class="keywordflow">throw</span>() {}
-<a name="l00078"></a>00078     <span class="keyword">template</span><<span class="keyword">typename</span> U> <a class="code" href="a00125.html">cache_aligned_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00081"></a>00081     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00082"></a>00082     
-<a name="l00084"></a><a class="code" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">00084</a>     pointer <a class="code" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* hint=0 ) {
-<a name="l00085"></a>00085         <span class="comment">// The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt</span>
-<a name="l00086"></a>00086         <span class="keywordflow">return</span> pointer(internal::NFS_Allocate( n, <span class="keyword">sizeof</span>(value_type), const_cast<void*>(hint) ));
-<a name="l00087"></a>00087     }
-<a name="l00088"></a>00088 
-<a name="l00090"></a><a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">00090</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( pointer p, size_type ) {
-<a name="l00091"></a>00091         internal::NFS_Free(p);
-<a name="l00092"></a>00092     }
-<a name="l00093"></a>00093 
-<a name="l00095"></a><a class="code" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">00095</a>     size_type <a class="code" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">max_size</a>() const throw() {
-<a name="l00096"></a>00096         <span class="keywordflow">return</span> (~size_t(0)-internal::NFS_MaxLineSize)/<span class="keyword">sizeof</span>(value_type);
-<a name="l00097"></a>00097     }
-<a name="l00098"></a>00098 
-<a name="l00100"></a><a class="code" href="a00125.html#958ee8745c86c275bfc9533af565e017">00100</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#958ee8745c86c275bfc9533af565e017">construct</a>( pointer p, <span class="keyword">const</span> value_type& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) value_type(value);}
-<a name="l00101"></a>00101 
-<a name="l00103"></a><a class="code" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">00103</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">destroy</a>( pointer p ) {p->~value_type();}
-<a name="l00104"></a>00104 };
+<a name="l00042"></a>00042     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC NFS_Free( <span class="keywordtype">void</span>* );
+<a name="l00043"></a>00043 }
+<a name="l00045"></a>00045 
+<a name="l00046"></a>00046 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</span>
+<a name="l00048"></a>00048 <span class="preprocessor">    #pragma warning (push)</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4100)</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span>
+<a name="l00053"></a>00053 
+<a name="l00056"></a>00056 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00057"></a><a class="code" href="a00125.html">00057</a> <span class="keyword">class </span><a class="code" href="a00125.html">cache_aligned_allocator</a> {
+<a name="l00058"></a>00058 <span class="keyword">public</span>:
+<a name="l00059"></a>00059     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
+<a name="l00060"></a>00060     <span class="keyword">typedef</span> value_type* pointer;
+<a name="l00061"></a>00061     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
+<a name="l00062"></a>00062     <span class="keyword">typedef</span> value_type& reference;
+<a name="l00063"></a>00063     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
+<a name="l00064"></a>00064     <span class="keyword">typedef</span> size_t size_type;
+<a name="l00065"></a>00065     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00066"></a>00066     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+<a name="l00067"></a>00067         <span class="keyword">typedef</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a> other;
+<a name="l00068"></a>00068     };
+<a name="l00069"></a>00069 
+<a name="l00070"></a>00070     <a class="code" href="a00125.html">cache_aligned_allocator</a>() <span class="keywordflow">throw</span>() {}
+<a name="l00071"></a>00071     <a class="code" href="a00125.html">cache_aligned_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator</a>& ) <span class="keywordflow">throw</span>() {}
+<a name="l00072"></a>00072     <span class="keyword">template</span><<span class="keyword">typename</span> U> <a class="code" href="a00125.html">cache_aligned_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
+<a name="l00073"></a>00073 
+<a name="l00074"></a>00074     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+<a name="l00075"></a>00075     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+<a name="l00076"></a>00076     
+<a name="l00078"></a><a class="code" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">00078</a>     pointer <a class="code" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* hint=0 ) {
+<a name="l00079"></a>00079         <span class="comment">// The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt</span>
+<a name="l00080"></a>00080         <span class="keywordflow">return</span> pointer(internal::NFS_Allocate( n, <span class="keyword">sizeof</span>(value_type), const_cast<void*>(hint) ));
+<a name="l00081"></a>00081     }
+<a name="l00082"></a>00082 
+<a name="l00084"></a><a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">00084</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( pointer p, size_type ) {
+<a name="l00085"></a>00085         internal::NFS_Free(p);
+<a name="l00086"></a>00086     }
+<a name="l00087"></a>00087 
+<a name="l00089"></a><a class="code" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">00089</a>     size_type <a class="code" href="a00125.html#fb23b687b4c0429dab4c7f8017266cf0">max_size</a>() const throw() {
+<a name="l00090"></a>00090         <span class="keywordflow">return</span> (~size_t(0)-internal::NFS_MaxLineSize)/<span class="keyword">sizeof</span>(value_type);
+<a name="l00091"></a>00091     }
+<a name="l00092"></a>00092 
+<a name="l00094"></a><a class="code" href="a00125.html#958ee8745c86c275bfc9533af565e017">00094</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#958ee8745c86c275bfc9533af565e017">construct</a>( pointer p, <span class="keyword">const</span> value_type& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) value_type(value);}
+<a name="l00095"></a>00095 
+<a name="l00097"></a><a class="code" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">00097</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#cd298895a4f1654b5149ec84b591ecb5">destroy</a>( pointer p ) {p->~value_type();}
+<a name="l00098"></a>00098 };
+<a name="l00099"></a>00099 
+<a name="l00100"></a>00100 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
+<a name="l00103"></a>00103 <span class="preprocessor"></span>
 <a name="l00105"></a>00105 
-<a name="l00106"></a>00106 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span>
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112 <span class="keyword">template</span><> 
-<a name="l00113"></a><a class="code" href="a00126.html">00113</a> <span class="keyword">class </span><a class="code" href="a00125.html">cache_aligned_allocator</a><void> {
-<a name="l00114"></a>00114 <span class="keyword">public</span>:
-<a name="l00115"></a>00115     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
-<a name="l00116"></a>00116     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
-<a name="l00117"></a>00117     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
-<a name="l00118"></a>00118     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00119"></a>00119         <span class="keyword">typedef</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a> other;
-<a name="l00120"></a>00120     };
-<a name="l00121"></a>00121 };
+<a name="l00106"></a>00106 <span class="keyword">template</span><> 
+<a name="l00107"></a><a class="code" href="a00126.html">00107</a> <span class="keyword">class </span><a class="code" href="a00125.html">cache_aligned_allocator</a><void> {
+<a name="l00108"></a>00108 <span class="keyword">public</span>:
+<a name="l00109"></a>00109     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
+<a name="l00110"></a>00110     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
+<a name="l00111"></a>00111     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
+<a name="l00112"></a>00112     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
+<a name="l00113"></a>00113         <span class="keyword">typedef</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a> other;
+<a name="l00114"></a>00114     };
+<a name="l00115"></a>00115 };
+<a name="l00116"></a>00116 
+<a name="l00117"></a>00117 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00118"></a>00118 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+<a name="l00119"></a>00119 
+<a name="l00120"></a>00120 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00121"></a>00121 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> cache_aligned_allocator<T>&, <span class="keyword">const</span> cache_aligned_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
 <a name="l00122"></a>00122 
-<a name="l00123"></a>00123 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00124"></a>00124 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00125.html">cache_aligned_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
-<a name="l00125"></a>00125 
-<a name="l00126"></a>00126 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00127"></a>00127 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> cache_aligned_allocator<T>&, <span class="keyword">const</span> cache_aligned_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129 } <span class="comment">// namespace tbb</span>
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_cache_aligned_allocator_H */</span>
+<a name="l00123"></a>00123 } <span class="comment">// namespace tbb</span>
+<a name="l00124"></a>00124 
+<a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_cache_aligned_allocator_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00266.html b/doc/html/a00271.html
similarity index 100%
copy from doc/html/a00266.html
copy to doc/html/a00271.html
diff --git a/doc/html/a00272.html b/doc/html/a00272.html
new file mode 100644
index 0000000..5ce5ba3
--- /dev/null
+++ b/doc/html/a00272.html
@@ -0,0 +1,1143 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>concurrent_hash_map.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="files.html"><span>File List</span></a></li>
+    <li><a href="globals.html"><span>File Members</span></a></li>
+  </ul></div>
+<h1>concurrent_hash_map.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
+<a name="l00003"></a>00003 <span class="comment"></span>
+<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+<a name="l00018"></a>00018 <span class="comment">    writing.</span>
+<a name="l00019"></a>00019 <span class="comment">*/</span>
+<a name="l00020"></a>00020 
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_concurrent_hash_map_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_hash_map_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include <stdexcept></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include <iterator></span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include <utility></span>      <span class="comment">// Need std::pair</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include <cstring></span>      <span class="comment">// Need std::memset</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include <string></span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include "tbb_allocator.h"</span>
+<a name="l00032"></a>00032 <span class="preprocessor">#include "spin_rw_mutex.h"</span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00034"></a>00034 <span class="preprocessor">#include "aligned_space.h"</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include <typeinfo></span>
+<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span>
+<a name="l00039"></a>00039 <span class="keyword">namespace </span>tbb {
+<a name="l00040"></a>00040 
+<a name="l00041"></a>00041 <span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">struct </span>tbb_hash_compare;
+<a name="l00042"></a>00042 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare = tbb_hash_compare<Key>, <span class="keyword">typename</span> A = tbb_allocator<std::pair<Key, T> > >
+<a name="l00043"></a>00043 <span class="keyword">class </span>concurrent_hash_map;
+<a name="l00044"></a>00044 
+<a name="l00046"></a>00046 <span class="keyword">namespace </span>internal {
+<a name="l00048"></a>00048     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+<a name="l00050"></a>00050     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3( <span class="keywordtype">void</span>* dst, <span class="keywordtype">void</span>* src );
+<a name="l00052"></a>00052     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC itt_load_pointer_v3( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+<a name="l00053"></a>00053 
+<a name="l00055"></a>00055     <span class="keyword">typedef</span> size_t hashcode_t;
+<a name="l00057"></a>00057     <span class="keyword">struct </span>hash_map_node_base : no_copy {
+<a name="l00059"></a>00059         <span class="keyword">typedef</span> spin_rw_mutex mutex_t;
+<a name="l00061"></a>00061         <span class="keyword">typedef</span> mutex_t::scoped_lock scoped_t;
+<a name="l00063"></a>00063         hash_map_node_base *next;
+<a name="l00064"></a>00064         mutex_t mutex;
+<a name="l00065"></a>00065     };
+<a name="l00067"></a>00067     <span class="keyword">static</span> hash_map_node_base *<span class="keyword">const</span> rehash_req = reinterpret_cast<hash_map_node_base*>(size_t(3));
+<a name="l00069"></a>00069     <span class="keyword">static</span> hash_map_node_base *<span class="keyword">const</span> empty_rehashed = reinterpret_cast<hash_map_node_base*>(size_t(0));
+<a name="l00071"></a>00071     <span class="keyword">class </span>hash_map_base {
+<a name="l00072"></a>00072     <span class="keyword">public</span>:
+<a name="l00074"></a>00074         <span class="keyword">typedef</span> size_t size_type;
+<a name="l00076"></a>00076         <span class="keyword">typedef</span> size_t hashcode_t;
+<a name="l00078"></a>00078         <span class="keyword">typedef</span> size_t segment_index_t;
+<a name="l00080"></a>00080         <span class="keyword">typedef</span> hash_map_node_base node_base;
+<a name="l00082"></a>00082         <span class="keyword">struct </span>bucket : no_copy {
+<a name="l00084"></a>00084             <span class="keyword">typedef</span> spin_rw_mutex mutex_t;
+<a name="l00086"></a>00086             <span class="keyword">typedef</span> mutex_t::scoped_lock scoped_t;
+<a name="l00087"></a>00087             mutex_t mutex;
+<a name="l00088"></a>00088             node_base *node_list;
+<a name="l00089"></a>00089         };
+<a name="l00091"></a>00091         <span class="keyword">static</span> size_type <span class="keyword">const</span> embedded_block = 1;
+<a name="l00093"></a>00093         <span class="keyword">static</span> size_type <span class="keyword">const</span> embedded_buckets = 1<<embedded_block;
+<a name="l00095"></a>00095         <span class="keyword">static</span> size_type <span class="keyword">const</span> first_block = 8; <span class="comment">//including embedded_block. perfect with bucket size 16, so the allocations are power of 4096</span>
+<a name="l00097"></a>00097 <span class="comment"></span>        <span class="keyword">static</span> size_type <span class="keyword">const</span> pointers_per_table = <span class="keyword">sizeof</span>(segment_index_t) * 8; <span class="comment">// one segment per bit</span>
+<a name="l00099"></a>00099 <span class="comment"></span>        <span class="keyword">typedef</span> bucket *segment_ptr_t;
+<a name="l00101"></a>00101         <span class="keyword">typedef</span> segment_ptr_t segments_table_t[pointers_per_table];
+<a name="l00103"></a>00103         atomic<hashcode_t> my_mask;
+<a name="l00105"></a>00105         segments_table_t my_table;
+<a name="l00107"></a>00107         atomic<size_type> my_size; <span class="comment">// It must be in separate cache line from my_mask due to performance effects</span>
+<a name="l00109"></a>00109 <span class="comment"></span>        bucket my_embedded_segment[embedded_buckets];
+<a name="l00110"></a>00110 
+<a name="l00112"></a>00112         hash_map_base() {
+<a name="l00113"></a>00113             std::memset( <span class="keyword">this</span>, 0, pointers_per_table*<span class="keyword">sizeof</span>(segment_ptr_t) <span class="comment">// 32*4=128   or 64*8=512</span>
+<a name="l00114"></a>00114                 + <span class="keyword">sizeof</span>(my_size) + <span class="keyword">sizeof</span>(my_mask)  <span class="comment">// 4+4 or 8+8</span>
+<a name="l00115"></a>00115                 + embedded_buckets*<span class="keyword">sizeof</span>(bucket) ); <span class="comment">// n*8 or n*16</span>
+<a name="l00116"></a>00116             <span class="keywordflow">for</span>( size_type i = 0; i < embedded_block; i++ ) <span class="comment">// fill the table</span>
+<a name="l00117"></a>00117                 my_table[i] = my_embedded_segment + segment_base(i);
+<a name="l00118"></a>00118             my_mask = embedded_buckets - 1;
+<a name="l00119"></a>00119             __TBB_ASSERT( embedded_block <= first_block, <span class="stringliteral">"The first block number must include embedded blocks"</span>);
+<a name="l00120"></a>00120         }
+<a name="l00121"></a>00121 
+<a name="l00123"></a>00123         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
+<a name="l00124"></a>00124             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
+<a name="l00125"></a>00125         }
+<a name="l00126"></a>00126 
+<a name="l00128"></a>00128         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
+<a name="l00129"></a>00129             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
+<a name="l00130"></a>00130         }
+<a name="l00131"></a>00131 
+<a name="l00133"></a>00133         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
+<a name="l00134"></a>00134             <span class="keywordflow">return</span> size_type(1)<<k; <span class="comment">// fake value for k==0</span>
+<a name="l00135"></a>00135         }
+<a name="l00136"></a>00136         
+<a name="l00138"></a>00138         <span class="keyword">static</span> <span class="keywordtype">bool</span> is_valid( <span class="keywordtype">void</span> *ptr ) {
+<a name="l00139"></a>00139             <span class="keywordflow">return</span> reinterpret_cast<size_t>(ptr) > size_t(63);
+<a name="l00140"></a>00140         }
+<a name="l00141"></a>00141 
+<a name="l00143"></a>00143         <span class="keyword">static</span> <span class="keywordtype">void</span> init_buckets( segment_ptr_t ptr, size_type sz, <span class="keywordtype">bool</span> is_initial ) {
+<a name="l00144"></a>00144             <span class="keywordflow">if</span>( is_initial ) std::memset(ptr, 0, sz*<span class="keyword">sizeof</span>(bucket) );
+<a name="l00145"></a>00145             <span class="keywordflow">else</span> <span class="keywordflow">for</span>(size_type i = 0; i < sz; i++, ptr++) {
+<a name="l00146"></a>00146                     *reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
+<a name="l00147"></a>00147                     ptr->node_list = rehash_req;
+<a name="l00148"></a>00148                 }
+<a name="l00149"></a>00149         }
+<a name="l00150"></a>00150         
+<a name="l00152"></a>00152         <span class="keyword">static</span> <span class="keywordtype">void</span> add_to_bucket( bucket *b, node_base *n ) {
+<a name="l00153"></a>00153             __TBB_ASSERT(b->node_list != rehash_req, NULL);
+<a name="l00154"></a>00154             n->next = b->node_list;
+<a name="l00155"></a>00155             b->node_list = n; <span class="comment">// its under lock and flag is set</span>
+<a name="l00156"></a>00156         }
+<a name="l00157"></a>00157 
+<a name="l00159"></a>00159         <span class="keyword">struct </span>enable_segment_failsafe {
+<a name="l00160"></a>00160             segment_ptr_t *my_segment_ptr;
+<a name="l00161"></a>00161             enable_segment_failsafe(segments_table_t &table, segment_index_t k) : my_segment_ptr(&table[k]) {}
+<a name="l00162"></a>00162             ~enable_segment_failsafe() {
+<a name="l00163"></a>00163                 <span class="keywordflow">if</span>( my_segment_ptr ) *my_segment_ptr = 0; <span class="comment">// indicate no allocation in progress</span>
+<a name="l00164"></a>00164             }
+<a name="l00165"></a>00165         };
+<a name="l00166"></a>00166 
+<a name="l00168"></a>00168         <span class="keywordtype">void</span> enable_segment( segment_index_t k, <span class="keywordtype">bool</span> is_initial = <span class="keyword">false</span> ) {
+<a name="l00169"></a>00169             __TBB_ASSERT( k, <span class="stringliteral">"Zero segment must be embedded"</span> );
+<a name="l00170"></a>00170             enable_segment_failsafe watchdog( my_table, k );
+<a name="l00171"></a>00171             cache_aligned_allocator<bucket> alloc;
+<a name="l00172"></a>00172             size_type sz;
+<a name="l00173"></a>00173             __TBB_ASSERT( !is_valid(my_table[k]), <span class="stringliteral">"Wrong concurrent assignment"</span>);
+<a name="l00174"></a>00174             <span class="keywordflow">if</span>( k >= first_block ) {
+<a name="l00175"></a>00175                 sz = segment_size( k );
+<a name="l00176"></a>00176                 segment_ptr_t ptr = alloc.allocate( sz );
+<a name="l00177"></a>00177                 init_buckets( ptr, sz, is_initial );
+<a name="l00178"></a>00178 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00179"></a>00179 <span class="preprocessor"></span>                <span class="comment">// TODO: actually, fence and notification are unnecessary here and below</span>
+<a name="l00180"></a>00180                 itt_store_pointer_with_release_v3( my_table + k, ptr );
+<a name="l00181"></a>00181 <span class="preprocessor">#else</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>                my_table[k] = ptr;<span class="comment">// my_mask has release fence</span>
+<a name="l00183"></a>00183 <span class="preprocessor">#endif</span>
+<a name="l00184"></a>00184 <span class="preprocessor"></span>                sz <<= 1;<span class="comment">// double it to get entire capacity of the container</span>
+<a name="l00185"></a>00185             } <span class="keywordflow">else</span> { <span class="comment">// the first block</span>
+<a name="l00186"></a>00186                 __TBB_ASSERT( k == embedded_block, <span class="stringliteral">"Wrong segment index"</span> );
+<a name="l00187"></a>00187                 sz = segment_size( first_block );
+<a name="l00188"></a>00188                 segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets );
+<a name="l00189"></a>00189                 init_buckets( ptr, sz - embedded_buckets, is_initial );
+<a name="l00190"></a>00190                 ptr -= segment_base(embedded_block);
+<a name="l00191"></a>00191                 <span class="keywordflow">for</span>(segment_index_t i = embedded_block; i < first_block; i++) <span class="comment">// calc the offsets</span>
+<a name="l00192"></a>00192 #<span class="keywordflow">if</span> TBB_USE_THREADING_TOOLS
+<a name="l00193"></a>00193                     itt_store_pointer_with_release_v3( my_table + i, ptr + segment_base(i) );
+<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
+<a name="l00195"></a>00195 <span class="preprocessor"></span>                    my_table[i] = ptr + segment_base(i);
+<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
+<a name="l00197"></a>00197 <span class="preprocessor"></span>            }
+<a name="l00198"></a>00198 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00199"></a>00199 <span class="preprocessor"></span>            itt_store_pointer_with_release_v3( &my_mask, (<span class="keywordtype">void</span>*)(sz-1) );
+<a name="l00200"></a>00200 <span class="preprocessor">#else</span>
+<a name="l00201"></a>00201 <span class="preprocessor"></span>            my_mask = sz - 1;
+<a name="l00202"></a>00202 <span class="preprocessor">#endif</span>
+<a name="l00203"></a>00203 <span class="preprocessor"></span>            watchdog.my_segment_ptr = 0;
+<a name="l00204"></a>00204         }
+<a name="l00205"></a>00205 
+<a name="l00207"></a>00207         bucket *get_bucket( hashcode_t h ) <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="comment">// TODO: add throw() everywhere?</span>
+<a name="l00208"></a>00208             segment_index_t s = segment_index_of( h );
+<a name="l00209"></a>00209             h -= segment_base(s);
+<a name="l00210"></a>00210             segment_ptr_t seg = my_table[s];
+<a name="l00211"></a>00211             __TBB_ASSERT( is_valid(seg), <span class="stringliteral">"hashcode must be cut by valid mask for allocated segments"</span> );
+<a name="l00212"></a>00212             <span class="keywordflow">return</span> &seg[h];
+<a name="l00213"></a>00213         }
+<a name="l00214"></a>00214 
+<a name="l00216"></a>00216         <span class="comment">// Splitting into two functions should help inlining</span>
+<a name="l00217"></a>00217         <span class="keyword">inline</span> <span class="keywordtype">bool</span> check_mask_race( <span class="keyword">const</span> hashcode_t h, hashcode_t &m )<span class="keyword"> const </span>{
+<a name="l00218"></a>00218             hashcode_t m_now, m_old = m;
+<a name="l00219"></a>00219 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00220"></a>00220 <span class="preprocessor"></span>            m_now = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
+<a name="l00221"></a>00221 <span class="preprocessor">#else</span>
+<a name="l00222"></a>00222 <span class="preprocessor"></span>            m_now = my_mask;
+<a name="l00223"></a>00223 <span class="preprocessor">#endif</span>
+<a name="l00224"></a>00224 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( m_old != m_now )
+<a name="l00225"></a>00225                 <span class="keywordflow">return</span> check_rehashing_collision( h, m_old, m = m_now );
+<a name="l00226"></a>00226             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00227"></a>00227         }
+<a name="l00228"></a>00228 
+<a name="l00230"></a>00230         <span class="keywordtype">bool</span> check_rehashing_collision( <span class="keyword">const</span> hashcode_t h, hashcode_t m_old, hashcode_t m )<span class="keyword"> const </span>{
+<a name="l00231"></a>00231             __TBB_ASSERT(m_old != m, NULL); <span class="comment">// TODO?: m arg could be optimized out by passing h = h&m</span>
+<a name="l00232"></a>00232             <span class="keywordflow">if</span>( (h & m_old) != (h & m) ) { <span class="comment">// mask changed for this hashcode, rare event</span>
+<a name="l00233"></a>00233                 <span class="comment">// condition above proves that 'h' has some other bits set beside 'm_old'</span>
+<a name="l00234"></a>00234                 <span class="comment">// find next applicable mask after m_old    //TODO: look at bsl instruction</span>
+<a name="l00235"></a>00235                 <span class="keywordflow">for</span>( ++m_old; !(h & m_old); m_old <<= 1 ); <span class="comment">// at maximum few rounds depending on the first block size</span>
+<a name="l00236"></a>00236                 m_old = (m_old<<1) - 1; <span class="comment">// get full mask from a bit</span>
+<a name="l00237"></a>00237                 __TBB_ASSERT((m_old&(m_old+1))==0 && m_old <= m, NULL);
+<a name="l00238"></a>00238                 <span class="comment">// check whether it is rehashing/ed</span>
+<a name="l00239"></a>00239 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00240"></a>00240 <span class="preprocessor"></span>                <span class="keywordflow">if</span>( itt_load_pointer_with_acquire_v3(&( get_bucket(h & m_old)->node_list )) != rehash_req )
+<a name="l00241"></a>00241 <span class="preprocessor">#else</span>
+<a name="l00242"></a>00242 <span class="preprocessor"></span>                <span class="keywordflow">if</span>( __TBB_load_with_acquire(get_bucket( h & m_old )->node_list) != rehash_req )
+<a name="l00243"></a>00243 <span class="preprocessor">#endif</span>
+<a name="l00244"></a>00244 <span class="preprocessor"></span>                    <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00245"></a>00245             }
+<a name="l00246"></a>00246             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00247"></a>00247         }
+<a name="l00248"></a>00248 
+<a name="l00250"></a>00250         segment_index_t insert_new_node( bucket *b, node_base *n, hashcode_t mask ) {
+<a name="l00251"></a>00251             size_type sz = ++my_size; <span class="comment">// prefix form is to enforce allocation after the first item inserted</span>
+<a name="l00252"></a>00252             add_to_bucket( b, n );
+<a name="l00253"></a>00253             <span class="comment">// check load factor</span>
+<a name="l00254"></a>00254             <span class="keywordflow">if</span>( sz >= mask ) { <span class="comment">// TODO: add custom load_factor </span>
+<a name="l00255"></a>00255                 segment_index_t new_seg = segment_index_of( mask+1 );
+<a name="l00256"></a>00256                 __TBB_ASSERT( is_valid(my_table[new_seg-1]), <span class="stringliteral">"new allocations must not publish new mask until segment has allocated"</span>);
+<a name="l00257"></a>00257 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00258"></a>00258 <span class="preprocessor"></span>                <span class="keywordflow">if</span>( !itt_load_pointer_v3(my_table+new_seg)
+<a name="l00259"></a>00259 #<span class="keywordflow">else</span>
+<a name="l00260"></a>00260                 <span class="keywordflow">if</span>( !my_table[new_seg]
+<a name="l00261"></a>00261 #endif
+<a name="l00262"></a>00262                   && __TBB_CompareAndSwapW(&my_table[new_seg], 2, 0) == 0 )
+<a name="l00263"></a>00263                     <span class="keywordflow">return</span> new_seg; <span class="comment">// The value must be processed</span>
+<a name="l00264"></a>00264             }
+<a name="l00265"></a>00265             <span class="keywordflow">return</span> 0;
+<a name="l00266"></a>00266         }
+<a name="l00267"></a>00267 
+<a name="l00269"></a>00269         <span class="keywordtype">void</span> reserve(size_type buckets) {
+<a name="l00270"></a>00270             <span class="keywordflow">if</span>( !buckets-- ) <span class="keywordflow">return</span>;
+<a name="l00271"></a>00271             <span class="keywordtype">bool</span> is_initial = !my_size;
+<a name="l00272"></a>00272             <span class="keywordflow">for</span>( size_type m = my_mask; buckets > m; m = my_mask )
+<a name="l00273"></a>00273                 enable_segment( segment_index_of( m+1 ), is_initial );
+<a name="l00274"></a>00274         }
+<a name="l00276"></a>00276         <span class="keywordtype">void</span> internal_swap(hash_map_base &table) {
+<a name="l00277"></a>00277             std::swap(this->my_mask, table.my_mask);
+<a name="l00278"></a>00278             std::swap(this->my_size, table.my_size);
+<a name="l00279"></a>00279             <span class="keywordflow">for</span>(size_type i = 0; i < embedded_buckets; i++)
+<a name="l00280"></a>00280                 std::swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list);
+<a name="l00281"></a>00281             <span class="keywordflow">for</span>(size_type i = embedded_block; i < pointers_per_table; i++)
+<a name="l00282"></a>00282                 std::swap(this->my_table[i], table.my_table[i]);
+<a name="l00283"></a>00283         }
+<a name="l00284"></a>00284     };
+<a name="l00285"></a>00285 
+<a name="l00286"></a>00286     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+<a name="l00287"></a>00287     <span class="keyword">class </span>hash_map_range;
+<a name="l00288"></a>00288 
+<a name="l00290"></a>00290 
+<a name="l00292"></a>00292     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00293"></a>00293     <span class="keyword">class </span>hash_map_iterator
+<a name="l00294"></a>00294         : <span class="keyword">public</span> std::iterator<std::forward_iterator_tag,Value>
+<a name="l00295"></a>00295     {
+<a name="l00296"></a>00296         <span class="keyword">typedef</span> Container map_type;
+<a name="l00297"></a>00297         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::node node;
+<a name="l00298"></a>00298         <span class="keyword">typedef</span> hash_map_base::node_base node_base;
+<a name="l00299"></a>00299         <span class="keyword">typedef</span> hash_map_base::bucket bucket;
+<a name="l00300"></a>00300 
+<a name="l00301"></a>00301         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00302"></a>00302         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
+<a name="l00303"></a>00303 
+<a name="l00304"></a>00304         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00305"></a>00305         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
+<a name="l00306"></a>00306 
+<a name="l00307"></a>00307         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00308"></a>00308         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> hash_map_iterator<C,T>& i, <span class="keyword">const</span> hash_map_iterator<C,U>& j );
+<a name="l00309"></a>00309     
+<a name="l00310"></a>00310         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+<a name="l00311"></a>00311         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
+<a name="l00312"></a>00312 
+<a name="l00313"></a>00313         <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00314"></a>00314         <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
+<a name="l00315"></a>00315 
+<a name="l00316"></a>00316         <span class="keywordtype">void</span> advance_to_next_bucket() { <span class="comment">// TODO?: refactor to iterator_base class</span>
+<a name="l00317"></a>00317             size_t k = my_index+1;
+<a name="l00318"></a>00318             <span class="keywordflow">while</span>( my_bucket && k <= my_map->my_mask ) {
+<a name="l00319"></a>00319                 <span class="comment">// Following test uses 2's-complement wizardry</span>
+<a name="l00320"></a>00320                 <span class="keywordflow">if</span>( k& (k-2) ) <span class="comment">// not the beginning of a segment</span>
+<a name="l00321"></a>00321                     ++my_bucket;
+<a name="l00322"></a>00322                 <span class="keywordflow">else</span> my_bucket = my_map->get_bucket( k );
+<a name="l00323"></a>00323                 my_node = static_cast<node*>( my_bucket->node_list );
+<a name="l00324"></a>00324                 <span class="keywordflow">if</span>( hash_map_base::is_valid(my_node) ) {
+<a name="l00325"></a>00325                     my_index = k; <span class="keywordflow">return</span>;
+<a name="l00326"></a>00326                 }
+<a name="l00327"></a>00327                 ++k;
+<a name="l00328"></a>00328             }
+<a name="l00329"></a>00329             my_bucket = 0; my_node = 0; my_index = k; <span class="comment">// the end</span>
+<a name="l00330"></a>00330         }
+<a name="l00331"></a>00331 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+<a name="l00332"></a>00332 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l00333"></a>00333         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00130.html">tbb::concurrent_hash_map</a>;
+<a name="l00334"></a>00334 <span class="preprocessor">#else</span>
+<a name="l00335"></a>00335 <span class="preprocessor"></span>    <span class="keyword">public</span>: <span class="comment">// workaround</span>
+<a name="l00336"></a>00336 <span class="preprocessor">#endif</span>
+<a name="l00338"></a>00338 <span class="preprocessor">        const Container *my_map;</span>
+<a name="l00339"></a>00339 <span class="preprocessor"></span>
+<a name="l00341"></a>00341         size_t my_index;
+<a name="l00342"></a>00342 
+<a name="l00344"></a>00344         <span class="keyword">const</span> bucket *my_bucket;
+<a name="l00345"></a>00345 
+<a name="l00347"></a>00347         node *my_node;
+<a name="l00348"></a>00348 
+<a name="l00349"></a>00349         hash_map_iterator( <span class="keyword">const</span> Container &map, size_t index, <span class="keyword">const</span> bucket *b, node_base *n );
+<a name="l00350"></a>00350 
+<a name="l00351"></a>00351     <span class="keyword">public</span>:
+<a name="l00353"></a>00353         hash_map_iterator() {}
+<a name="l00354"></a>00354         hash_map_iterator( <span class="keyword">const</span> hash_map_iterator<Container,typename Container::value_type> &other ) :
+<a name="l00355"></a>00355             my_map(other.my_map),
+<a name="l00356"></a>00356             my_index(other.my_index),
+<a name="l00357"></a>00357             my_bucket(other.my_bucket),
+<a name="l00358"></a>00358             my_node(other.my_node)
+<a name="l00359"></a>00359         {}
+<a name="l00360"></a>00360         Value& operator*()<span class="keyword"> const </span>{
+<a name="l00361"></a>00361             __TBB_ASSERT( hash_map_base::is_valid(my_node), <span class="stringliteral">"iterator uninitialized or at end of container?"</span> );
+<a name="l00362"></a>00362             <span class="keywordflow">return</span> my_node->item;
+<a name="l00363"></a>00363         }
+<a name="l00364"></a>00364         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00365"></a>00365         hash_map_iterator& operator++();
+<a name="l00366"></a>00366         
+<a name="l00368"></a>00368         Value* operator++(<span class="keywordtype">int</span>) {
+<a name="l00369"></a>00369             Value* result = &operator*();
+<a name="l00370"></a>00370             operator++();
+<a name="l00371"></a>00371             <span class="keywordflow">return</span> result;
+<a name="l00372"></a>00372         }
+<a name="l00373"></a>00373     };
+<a name="l00374"></a>00374 
+<a name="l00375"></a>00375     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00376"></a>00376     hash_map_iterator<Container,Value>::hash_map_iterator( <span class="keyword">const</span> Container &map, size_t index, <span class="keyword">const</span> bucket *b, node_base *n ) :
+<a name="l00377"></a>00377         my_map(&map),
+<a name="l00378"></a>00378         my_index(index),
+<a name="l00379"></a>00379         my_bucket(b),
+<a name="l00380"></a>00380         my_node( static_cast<node*>(n) )
+<a name="l00381"></a>00381     {
+<a name="l00382"></a>00382         <span class="keywordflow">if</span>( b && !hash_map_base::is_valid(n) )
+<a name="l00383"></a>00383             advance_to_next_bucket();
+<a name="l00384"></a>00384     }
+<a name="l00385"></a>00385 
+<a name="l00386"></a>00386     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00387"></a>00387     hash_map_iterator<Container,Value>& hash_map_iterator<Container,Value>::operator++() {
+<a name="l00388"></a>00388         my_node = static_cast<node*>( my_node->next );
+<a name="l00389"></a>00389         <span class="keywordflow">if</span>( !my_node ) advance_to_next_bucket();
+<a name="l00390"></a>00390         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00391"></a>00391     }
+<a name="l00392"></a>00392 
+<a name="l00393"></a>00393     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00394"></a>00394     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> hash_map_iterator<Container,T>& i, <span class="keyword">const</span> hash_map_iterator<Container,U>& j ) {
+<a name="l00395"></a>00395         <span class="keywordflow">return</span> i.my_node == j.my_node && i.my_map == j.my_map;
+<a name="l00396"></a>00396     }
+<a name="l00397"></a>00397 
+<a name="l00398"></a>00398     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00399"></a>00399     <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> hash_map_iterator<Container,T>& i, <span class="keyword">const</span> hash_map_iterator<Container,U>& j ) {
+<a name="l00400"></a>00400         <span class="keywordflow">return</span> i.my_node != j.my_node || i.my_map != j.my_map;
+<a name="l00401"></a>00401     }
+<a name="l00402"></a>00402 
+<a name="l00404"></a>00404 
+<a name="l00405"></a>00405     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+<a name="l00406"></a>00406     <span class="keyword">class </span>hash_map_range {
+<a name="l00407"></a>00407         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::map_type map_type;
+<a name="l00408"></a>00408         Iterator my_begin;
+<a name="l00409"></a>00409         Iterator my_end;
+<a name="l00410"></a>00410         <span class="keyword">mutable</span> Iterator my_midpoint;
+<a name="l00411"></a>00411         size_t my_grainsize;
+<a name="l00413"></a>00413         <span class="keywordtype">void</span> set_midpoint() <span class="keyword">const</span>;
+<a name="l00414"></a>00414         <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">friend</span> <span class="keyword">class </span>hash_map_range;
+<a name="l00415"></a>00415     <span class="keyword">public</span>:
+<a name="l00417"></a>00417         <span class="keyword">typedef</span> std::size_t size_type;
+<a name="l00418"></a>00418         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::value_type value_type;
+<a name="l00419"></a>00419         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::reference reference;
+<a name="l00420"></a>00420         <span class="keyword">typedef</span> <span class="keyword">typename</span> Iterator::difference_type difference_type;
+<a name="l00421"></a>00421         <span class="keyword">typedef</span> Iterator iterator;
+<a name="l00422"></a>00422 
+<a name="l00424"></a>00424         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin==my_end;}
+<a name="l00425"></a>00425 
+<a name="l00427"></a>00427         <span class="keywordtype">bool</span> is_divisible()<span class="keyword"> const </span>{
+<a name="l00428"></a>00428             <span class="keywordflow">return</span> my_midpoint!=my_end;
+<a name="l00429"></a>00429         }
+<a name="l00431"></a>00431         hash_map_range( hash_map_range& r, split ) : 
+<a name="l00432"></a>00432             my_end(r.my_end),
+<a name="l00433"></a>00433             my_grainsize(r.my_grainsize)
+<a name="l00434"></a>00434         {
+<a name="l00435"></a>00435             r.my_end = my_begin = r.my_midpoint;
+<a name="l00436"></a>00436             __TBB_ASSERT( !empty(), <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
+<a name="l00437"></a>00437             __TBB_ASSERT( !r.empty(), <span class="stringliteral">"Splitting despite the range is not divisible"</span> );
+<a name="l00438"></a>00438             set_midpoint();
+<a name="l00439"></a>00439             r.set_midpoint();
+<a name="l00440"></a>00440         }
+<a name="l00442"></a>00442         <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00443"></a>00443         hash_map_range( hash_map_range<U>& r) : 
+<a name="l00444"></a>00444             my_begin(r.my_begin),
+<a name="l00445"></a>00445             my_end(r.my_end),
+<a name="l00446"></a>00446             my_midpoint(r.my_midpoint),
+<a name="l00447"></a>00447             my_grainsize(r.my_grainsize)
+<a name="l00448"></a>00448         {}
+<a name="l00449"></a>00449 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00451"></a>00451 <span class="preprocessor">        hash_map_range( const Iterator& begin_, const Iterator& end_, size_type grainsize = 1 ) : </span>
+<a name="l00452"></a>00452 <span class="preprocessor"></span>            my_begin(begin_), 
+<a name="l00453"></a>00453             my_end(end_),
+<a name="l00454"></a>00454             my_grainsize(grainsize)
+<a name="l00455"></a>00455         {
+<a name="l00456"></a>00456             <span class="keywordflow">if</span>(!my_end.my_index && !my_end.my_bucket) <span class="comment">// end</span>
+<a name="l00457"></a>00457                 my_end.my_index = my_end.my_map->my_mask + 1;
+<a name="l00458"></a>00458             set_midpoint();
+<a name="l00459"></a>00459             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
+<a name="l00460"></a>00460         }
+<a name="l00461"></a>00461 <span class="preprocessor">#endif</span>
+<a name="l00463"></a>00463 <span class="preprocessor">        hash_map_range( const map_type &map, size_type grainsize = 1 ) : </span>
+<a name="l00464"></a>00464 <span class="preprocessor"></span>            my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list ) ),
+<a name="l00465"></a>00465             my_end( Iterator( map, map.my_mask + 1, 0, 0 ) ),
+<a name="l00466"></a>00466             my_grainsize( grainsize )
+<a name="l00467"></a>00467         {
+<a name="l00468"></a>00468             __TBB_ASSERT( grainsize>0, <span class="stringliteral">"grainsize must be positive"</span> );
+<a name="l00469"></a>00469             set_midpoint();
+<a name="l00470"></a>00470         }
+<a name="l00471"></a>00471         <span class="keyword">const</span> Iterator& begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_begin;}
+<a name="l00472"></a>00472         <span class="keyword">const</span> Iterator& end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_end;}
+<a name="l00474"></a>00474         size_type grainsize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_grainsize;}
+<a name="l00475"></a>00475     };
+<a name="l00476"></a>00476 
+<a name="l00477"></a>00477     <span class="keyword">template</span><<span class="keyword">typename</span> Iterator>
+<a name="l00478"></a>00478     <span class="keywordtype">void</span> hash_map_range<Iterator>::set_midpoint()<span class="keyword"> const </span>{
+<a name="l00479"></a>00479         <span class="comment">// Split by groups of nodes</span>
+<a name="l00480"></a>00480         size_t m = my_end.my_index-my_begin.my_index;
+<a name="l00481"></a>00481         <span class="keywordflow">if</span>( m > my_grainsize ) {
+<a name="l00482"></a>00482             m = my_begin.my_index + m/2u;
+<a name="l00483"></a>00483             hash_map_base::bucket *b = my_begin.my_map->get_bucket(m);
+<a name="l00484"></a>00484             my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list);
+<a name="l00485"></a>00485         } <span class="keywordflow">else</span> {
+<a name="l00486"></a>00486             my_midpoint = my_end;
+<a name="l00487"></a>00487         }
+<a name="l00488"></a>00488         __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index,
+<a name="l00489"></a>00489             <span class="stringliteral">"my_begin is after my_midpoint"</span> );
+<a name="l00490"></a>00490         __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index,
+<a name="l00491"></a>00491             <span class="stringliteral">"my_midpoint is after my_end"</span> );
+<a name="l00492"></a>00492         __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end,
+<a name="l00493"></a>00493             <span class="stringliteral">"[my_begin, my_midpoint) range should not be empty"</span> );
+<a name="l00494"></a>00494     }
+<a name="l00495"></a>00495 } <span class="comment">// namespace internal</span>
+<a name="l00497"></a>00497 <span class="comment"></span>
+<a name="l00499"></a><a class="code" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">00499</a> <span class="keyword">static</span> <span class="keyword">const</span> size_t <a class="code" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a> = <span class="keyword">sizeof</span>(size_t)==4? 2654435769U : 11400714819323198485ULL;
+<a name="l00501"></a>00501 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00502"></a><a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">00502</a> <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> T& t ) {
+<a name="l00503"></a>00503     <span class="keywordflow">return</span> static_cast<size_t>( t ) * <a class="code" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a>;
+<a name="l00504"></a>00504 }
+<a name="l00505"></a>00505 <span class="keyword">template</span><<span class="keyword">typename</span> P>
+<a name="l00506"></a>00506 <span class="keyword">inline</span> <span class="keyword">static</span> size_t tbb_hasher( P* ptr ) {
+<a name="l00507"></a>00507     size_t <span class="keyword">const</span> h = reinterpret_cast<size_t>( ptr );
+<a name="l00508"></a>00508     <span class="keywordflow">return</span> (h >> 3) ^ h;
+<a name="l00509"></a>00509 }
+<a name="l00510"></a>00510 <span class="keyword">template</span><<span class="keyword">typename</span> E, <span class="keyword">typename</span> S, <span class="keyword">typename</span> A>
+<a name="l00511"></a>00511 <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> std::basic_string<E,S,A>& s ) {
+<a name="l00512"></a>00512     size_t h = 0;
+<a name="l00513"></a>00513     <span class="keywordflow">for</span>( <span class="keyword">const</span> E* c = s.c_str(); *c; c++ )
+<a name="l00514"></a>00514         h = static_cast<size_t>(*c) ^ (h * <a class="code" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">hash_multiplier</a>);
+<a name="l00515"></a>00515     <span class="keywordflow">return</span> h;
+<a name="l00516"></a>00516 }
+<a name="l00517"></a>00517 <span class="keyword">template</span><<span class="keyword">typename</span> F, <span class="keyword">typename</span> S>
+<a name="l00518"></a>00518 <span class="keyword">inline</span> <span class="keyword">static</span> size_t <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>( <span class="keyword">const</span> std::pair<F,S>& p ) {
+<a name="l00519"></a>00519     <span class="keywordflow">return</span> <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(p.first) ^ <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(p.second);
+<a name="l00520"></a>00520 }
+<a name="l00521"></a>00521 
+<a name="l00523"></a>00523 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00524"></a><a class="code" href="a00174.html">00524</a> <span class="keyword">struct </span><a class="code" href="a00174.html">tbb_hash_compare</a> {
+<a name="l00525"></a>00525     <span class="keyword">static</span> size_t hash( <span class="keyword">const</span> T& t ) { <span class="keywordflow">return</span> <a class="code" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb_hasher</a>(t); }
+<a name="l00526"></a>00526     <span class="keyword">static</span> <span class="keywordtype">bool</span> equal( <span class="keyword">const</span> T& a, <span class="keyword">const</span> T& b ) { <span class="keywordflow">return</span> a == b; }
+<a name="l00527"></a>00527 };
+<a name="l00528"></a>00528 
+<a name="l00530"></a>00530 
+<a name="l00559"></a>00559 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> Allocator>
+<a name="l00560"></a><a class="code" href="a00130.html">00560</a> <span class="keyword">class </span><a class="code" href="a00130.html">concurrent_hash_map</a> : <span class="keyword">protected</span> internal::hash_map_base {
+<a name="l00561"></a>00561     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00562"></a>00562     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_iterator;
+<a name="l00563"></a>00563 
+<a name="l00564"></a>00564     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00565"></a>00565     <span class="keyword">friend</span> <span class="keyword">class </span>internal::hash_map_range;
+<a name="l00566"></a>00566 
+<a name="l00567"></a>00567 <span class="keyword">public</span>:
+<a name="l00568"></a>00568     <span class="keyword">typedef</span> Key key_type;
+<a name="l00569"></a>00569     <span class="keyword">typedef</span> T mapped_type;
+<a name="l00570"></a>00570     <span class="keyword">typedef</span> std::pair<const Key,T> value_type;
+<a name="l00571"></a>00571     <span class="keyword">typedef</span> internal::hash_map_base::size_type size_type;
+<a name="l00572"></a>00572     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00573"></a>00573     <span class="keyword">typedef</span> value_type *pointer;
+<a name="l00574"></a>00574     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type *const_pointer;
+<a name="l00575"></a>00575     <span class="keyword">typedef</span> value_type &reference;
+<a name="l00576"></a>00576     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type &const_reference;
+<a name="l00577"></a>00577     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,value_type> iterator;
+<a name="l00578"></a>00578     <span class="keyword">typedef</span> internal::hash_map_iterator<concurrent_hash_map,const value_type> const_iterator;
+<a name="l00579"></a>00579     <span class="keyword">typedef</span> internal::hash_map_range<iterator> range_type;
+<a name="l00580"></a>00580     <span class="keyword">typedef</span> internal::hash_map_range<const_iterator> const_range_type;
+<a name="l00581"></a>00581     <span class="keyword">typedef</span> Allocator allocator_type;
+<a name="l00582"></a>00582 
+<a name="l00583"></a>00583 <span class="keyword">protected</span>:
+<a name="l00584"></a>00584     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00133.html">const_accessor</a>;
+<a name="l00585"></a>00585     <span class="keyword">struct </span>node;
+<a name="l00586"></a>00586     <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind<node>::other node_allocator_type;
+<a name="l00587"></a>00587     node_allocator_type my_allocator;
+<a name="l00588"></a>00588     HashCompare my_hash_compare;
+<a name="l00589"></a>00589 
+<a name="l00590"></a>00590     <span class="keyword">struct </span>node : <span class="keyword">public</span> node_base {
+<a name="l00591"></a>00591         value_type item;
+<a name="l00592"></a>00592         node( <span class="keyword">const</span> Key &key ) : item(key, T()) {}
+<a name="l00593"></a>00593         node( <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T &t ) : item(key, t) {}
+<a name="l00594"></a>00594         <span class="comment">// exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17</span>
+<a name="l00595"></a>00595         <span class="keywordtype">void</span> *operator new( size_t <span class="comment">/*size*/</span>, node_allocator_type &a ) {
+<a name="l00596"></a>00596             <span class="keywordtype">void</span> *ptr = a.allocate(1);
+<a name="l00597"></a>00597             <span class="keywordflow">if</span>(!ptr) <span class="keywordflow">throw</span> std::bad_alloc();
+<a name="l00598"></a>00598             <span class="keywordflow">return</span> ptr;
+<a name="l00599"></a>00599         }
+<a name="l00600"></a>00600         <span class="comment">// match placement-new form above to be called if exception thrown in constructor</span>
+<a name="l00601"></a>00601         <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span> *ptr, node_allocator_type &a ) {<span class="keywordflow">return</span> a.deallocate(static_cast<node*>(ptr),1); }
+<a name="l00602"></a>00602     };
+<a name="l00603"></a>00603 
+<a name="l00604"></a>00604     <span class="keywordtype">void</span> delete_node( node_base *n ) {
+<a name="l00605"></a>00605         my_allocator.destroy( static_cast<node*>(n) );
+<a name="l00606"></a>00606         my_allocator.deallocate( static_cast<node*>(n), 1);
+<a name="l00607"></a>00607     }
+<a name="l00608"></a>00608 
+<a name="l00609"></a>00609     node *search_bucket( <span class="keyword">const</span> key_type &key, bucket *b )<span class="keyword"> const </span>{
+<a name="l00610"></a>00610         node *n = static_cast<node*>( b->node_list );
+<a name="l00611"></a>00611         <span class="keywordflow">while</span>( is_valid(n) && !my_hash_compare.equal(key, n->item.first) )
+<a name="l00612"></a>00612             n = static_cast<node*>( n->next );
+<a name="l00613"></a>00613         __TBB_ASSERT(n != internal::rehash_req, <span class="stringliteral">"Search can be executed only for rehashed bucket"</span>);
+<a name="l00614"></a>00614         <span class="keywordflow">return</span> n;
+<a name="l00615"></a>00615     }
+<a name="l00616"></a>00616 
+<a name="l00618"></a><a class="code" href="a00132.html">00618</a>     <span class="keyword">class </span><a class="code" href="a00132.html">bucket_accessor</a> : <span class="keyword">public</span> bucket::scoped_t {
+<a name="l00619"></a>00619         <span class="keywordtype">bool</span> my_is_writer; <span class="comment">// TODO: use it from base type</span>
+<a name="l00620"></a>00620         bucket *my_b;
+<a name="l00621"></a>00621     <span class="keyword">public</span>:
+<a name="l00622"></a>00622         <a class="code" href="a00132.html">bucket_accessor</a>( <a class="code" href="a00130.html">concurrent_hash_map</a> *base, <span class="keyword">const</span> hashcode_t h, <span class="keywordtype">bool</span> writer = <span class="keyword">false</span> ) { <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( base, h, writer ); }
+<a name="l00624"></a><a class="code" href="a00132.html#7b75959ce5a971b05cfefcbc1d09a022">00624</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00130.html">concurrent_hash_map</a> *base, <span class="keyword">const</span> hashcode_t h, <span class="keywordtype">bool</span> writer = <span class="keyword">false</span> ) {
+<a name="l00625"></a>00625             my_b = base->get_bucket( h );
+<a name="l00626"></a>00626 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00627"></a>00627 <span class="preprocessor"></span>            <span class="comment">// TODO: actually, notification is unnecessary here, just hiding double-check</span>
+<a name="l00628"></a>00628             <span class="keywordflow">if</span>( itt_load_pointer_with_acquire_v3(&my_b->node_list) == internal::rehash_req
+<a name="l00629"></a>00629 #<span class="keywordflow">else</span>
+<a name="l00630"></a>00630             <span class="keywordflow">if</span>( __TBB_load_with_acquire(my_b->node_list) == internal::rehash_req
+<a name="l00631"></a>00631 #endif
+<a name="l00632"></a>00632                 && try_acquire( my_b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> ) )
+<a name="l00633"></a>00633             {
+<a name="l00634"></a>00634                 <span class="keywordflow">if</span>( my_b->node_list == internal::rehash_req ) base-><a class="code" href="a00130.html#f2fe44bde2158a2f2a315c6457ebd030">rehash_bucket</a>( my_b, h ); <span class="comment">//recursive rehashing</span>
+<a name="l00635"></a>00635                 my_is_writer = <span class="keyword">true</span>;
+<a name="l00636"></a>00636             }
+<a name="l00637"></a>00637             <span class="keywordflow">else</span> bucket::scoped_t::acquire( my_b->mutex, <span class="comment">/*write=*/</span>my_is_writer = writer );
+<a name="l00638"></a>00638             __TBB_ASSERT( my_b->node_list != internal::rehash_req, NULL);
+<a name="l00639"></a>00639         }
+<a name="l00641"></a><a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">00641</a>         <span class="keywordtype">bool</span> is_writer() { <span class="keywordflow">return</span> my_is_writer; }
+<a name="l00643"></a><a class="code" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">00643</a>         bucket *operator() () { <span class="keywordflow">return</span> my_b; }
+<a name="l00644"></a>00644         <span class="comment">// TODO: optimize out</span>
+<a name="l00645"></a>00645         <span class="keywordtype">bool</span> upgrade_to_writer() { my_is_writer = <span class="keyword">true</span>; <span class="keywordflow">return</span> bucket::scoped_t::upgrade_to_writer(); }
+<a name="l00646"></a>00646     };
+<a name="l00647"></a>00647 
+<a name="l00648"></a>00648     <span class="comment">// TODO refactor to hash_base</span>
+<a name="l00649"></a>00649     <span class="keywordtype">void</span> rehash_bucket( bucket *b_new, <span class="keyword">const</span> hashcode_t h ) {
+<a name="l00650"></a>00650         __TBB_ASSERT( *(intptr_t*)(&b_new->mutex), <span class="stringliteral">"b_new must be locked (for write)"</span>);
+<a name="l00651"></a>00651         __TBB_ASSERT( h > 1, <span class="stringliteral">"The lowermost buckets can't be rehashed"</span> );
+<a name="l00652"></a>00652         __TBB_store_with_release(b_new->node_list, internal::empty_rehashed); <span class="comment">// mark rehashed</span>
+<a name="l00653"></a>00653         hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; <span class="comment">// get parent mask from the topmost bit</span>
+<a name="l00654"></a>00654 
+<a name="l00655"></a>00655         bucket_accessor b_old( <span class="keyword">this</span>, h & mask );
+<a name="l00656"></a>00656 
+<a name="l00657"></a>00657         mask = (mask<<1) | 1; <span class="comment">// get full mask for new bucket</span>
+<a name="l00658"></a>00658         __TBB_ASSERT( (mask&(mask+1))==0 && (h & mask) == h, NULL );
+<a name="l00659"></a>00659     restart:
+<a name="l00660"></a>00660         <span class="keywordflow">for</span>( node_base **p = &b_old()->node_list, *n = __TBB_load_with_acquire(*p); is_valid(n); n = *p ) {
+<a name="l00661"></a>00661             hashcode_t c = my_hash_compare.hash( static_cast<node*>(n)->item.first );
+<a name="l00662"></a>00662             <span class="keywordflow">if</span>( (c & mask) == h ) {
+<a name="l00663"></a>00663                 <span class="keywordflow">if</span>( !b_old.is_writer() )
+<a name="l00664"></a>00664                     <span class="keywordflow">if</span>( !b_old.upgrade_to_writer() ) {
+<a name="l00665"></a>00665                         <span class="keywordflow">goto</span> restart; <span class="comment">// node ptr can be invalid due to concurrent erase</span>
+<a name="l00666"></a>00666                     }
+<a name="l00667"></a>00667                 *p = n->next; <span class="comment">// exclude from b_old</span>
+<a name="l00668"></a>00668                 add_to_bucket( b_new, n );
+<a name="l00669"></a>00669             } <span class="keywordflow">else</span> p = &n->next; <span class="comment">// iterate to next item</span>
+<a name="l00670"></a>00670         }
+<a name="l00671"></a>00671     }
+<a name="l00672"></a>00672 
+<a name="l00673"></a>00673 <span class="keyword">public</span>:
+<a name="l00674"></a>00674     
+<a name="l00675"></a>00675     <span class="keyword">class </span>accessor;
+<a name="l00677"></a><a class="code" href="a00133.html">00677</a>     <span class="keyword">class </span><a class="code" href="a00133.html">const_accessor</a> {
+<a name="l00678"></a>00678         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00130.html">concurrent_hash_map</a><Key,T,HashCompare,Allocator>;
+<a name="l00679"></a>00679         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00131.html">accessor</a>;
+<a name="l00680"></a>00680         <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00131.html">accessor</a> & ) <span class="keyword">const</span>; <span class="comment">// Deny access</span>
+<a name="l00681"></a>00681         <a class="code" href="a00133.html">const_accessor</a>( <span class="keyword">const</span> <a class="code" href="a00131.html">accessor</a> & );       <span class="comment">// Deny access</span>
+<a name="l00682"></a>00682     <span class="keyword">public</span>:
+<a name="l00684"></a><a class="code" href="a00133.html#b5de4197079009b1cfd8bdeb594c6428">00684</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">typename</span> concurrent_hash_map::value_type value_type;
+<a name="l00685"></a>00685 
+<a name="l00687"></a><a class="code" href="a00133.html#e55c7c3f0acd7fd823a07957e71a7462">00687</a>         <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_node;}
+<a name="l00688"></a>00688 
+<a name="l00690"></a><a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">00690</a>         <span class="keywordtype">void</span> <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
+<a name="l00691"></a>00691             <span class="keywordflow">if</span>( my_node ) {
+<a name="l00692"></a>00692                 my_lock.release();
+<a name="l00693"></a>00693                 my_node = 0;
+<a name="l00694"></a>00694             }
+<a name="l00695"></a>00695         }
+<a name="l00696"></a>00696 
+<a name="l00698"></a><a class="code" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">00698</a>         const_reference operator*()<span class="keyword"> const </span>{
+<a name="l00699"></a>00699             __TBB_ASSERT( my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
+<a name="l00700"></a>00700             <span class="keywordflow">return</span> my_node->item;
+<a name="l00701"></a>00701         }
+<a name="l00702"></a>00702 
+<a name="l00704"></a><a class="code" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">00704</a>         const_pointer operator->()<span class="keyword"> const </span>{
+<a name="l00705"></a>00705             <span class="keywordflow">return</span> &operator*();
+<a name="l00706"></a>00706         }
+<a name="l00707"></a>00707 
+<a name="l00709"></a><a class="code" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">00709</a>         <a class="code" href="a00133.html">const_accessor</a>() : my_node(NULL) {}
+<a name="l00710"></a>00710 
+<a name="l00712"></a><a class="code" href="a00133.html#e002771760f510e06c03e0a198286172">00712</a>         ~<a class="code" href="a00133.html">const_accessor</a>() {
+<a name="l00713"></a>00713             my_node = NULL; <span class="comment">// my_lock.release() is called in scoped_lock destructor</span>
+<a name="l00714"></a>00714         }
+<a name="l00715"></a>00715     <span class="keyword">private</span>:
+<a name="l00716"></a>00716         node *my_node;
+<a name="l00717"></a>00717         <span class="keyword">typename</span> node::scoped_t my_lock;
+<a name="l00718"></a>00718         hashcode_t my_hash;
+<a name="l00719"></a>00719     };
+<a name="l00720"></a>00720 
+<a name="l00722"></a><a class="code" href="a00131.html">00722</a>     <span class="keyword">class </span><a class="code" href="a00131.html">accessor</a>: <span class="keyword">public</span> <a class="code" href="a00133.html">const_accessor</a> {
+<a name="l00723"></a>00723     <span class="keyword">public</span>:
+<a name="l00725"></a><a class="code" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">00725</a>         <span class="keyword">typedef</span> <span class="keyword">typename</span> concurrent_hash_map::value_type value_type;
+<a name="l00726"></a>00726 
+<a name="l00728"></a><a class="code" href="a00131.html#03a091f7355a3c0c03f839893695f372">00728</a>         reference operator*()<span class="keyword"> const </span>{
+<a name="l00729"></a>00729             __TBB_ASSERT( this->my_node, <span class="stringliteral">"attempt to dereference empty accessor"</span> );
+<a name="l00730"></a>00730             <span class="keywordflow">return</span> this->my_node->item;
+<a name="l00731"></a>00731         }
+<a name="l00732"></a>00732 
+<a name="l00734"></a><a class="code" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">00734</a>         pointer operator->()<span class="keyword"> const </span>{
+<a name="l00735"></a>00735             <span class="keywordflow">return</span> &operator*();
+<a name="l00736"></a>00736         }
+<a name="l00737"></a>00737     };
+<a name="l00738"></a>00738 
+<a name="l00740"></a><a class="code" href="a00130.html#342582ba05d9fb893ed80875d2b7a42f">00740</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00741"></a>00741         : my_allocator(a)
+<a name="l00742"></a>00742     {}
+<a name="l00743"></a>00743 
+<a name="l00745"></a><a class="code" href="a00130.html#c1bf3c669935aceb1dc0169e3a19e0be">00745</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>(size_type n, <span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00746"></a>00746         : my_allocator(a)
+<a name="l00747"></a>00747     {
+<a name="l00748"></a>00748         reserve( n );
+<a name="l00749"></a>00749     }
+<a name="l00750"></a>00750 
+<a name="l00752"></a><a class="code" href="a00130.html#bc50f7bca65d0c27cbf5c31d2fa63eac">00752</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& table, <span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00753"></a>00753         : my_allocator(a)
+<a name="l00754"></a>00754     {
+<a name="l00755"></a>00755         internal_copy(table);
+<a name="l00756"></a>00756     }
+<a name="l00757"></a>00757 
+<a name="l00759"></a>00759     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00760"></a><a class="code" href="a00130.html#b5132202dff9ee3d619bef6b1d84edea">00760</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00761"></a>00761         : my_allocator(a)
+<a name="l00762"></a>00762     {
+<a name="l00763"></a>00763         reserve( std::distance(first, last) ); <span class="comment">// TODO: load_factor?</span>
+<a name="l00764"></a>00764         internal_copy(first, last);
+<a name="l00765"></a>00765     }
+<a name="l00766"></a>00766 
+<a name="l00768"></a><a class="code" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">00768</a>     <a class="code" href="a00130.html">concurrent_hash_map</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& table ) {
+<a name="l00769"></a>00769         <span class="keywordflow">if</span>( <span class="keyword">this</span>!=&table ) {
+<a name="l00770"></a>00770             clear();
+<a name="l00771"></a>00771             internal_copy(table);
+<a name="l00772"></a>00772         } 
+<a name="l00773"></a>00773         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00774"></a>00774     }
+<a name="l00775"></a>00775 
+<a name="l00776"></a>00776 
+<a name="l00778"></a>00778     <span class="keywordtype">void</span> clear();
+<a name="l00779"></a>00779 
+<a name="l00781"></a><a class="code" href="a00130.html#5e96649f71f68f3b6bf3b1eee6b441a7">00781</a>     ~<a class="code" href="a00130.html">concurrent_hash_map</a>() { clear(); }
+<a name="l00782"></a>00782 
+<a name="l00783"></a>00783     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00784"></a>00784     <span class="comment">// Parallel algorithm support</span>
+<a name="l00785"></a>00785     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00786"></a>00786     range_type range( size_type grainsize=1 ) {
+<a name="l00787"></a>00787         <span class="keywordflow">return</span> range_type( *<span class="keyword">this</span>, grainsize );
+<a name="l00788"></a>00788     }
+<a name="l00789"></a>00789     const_range_type range( size_type grainsize=1 )<span class="keyword"> const </span>{
+<a name="l00790"></a>00790         <span class="keywordflow">return</span> const_range_type( *<span class="keyword">this</span>, grainsize );
+<a name="l00791"></a>00791     }
+<a name="l00792"></a>00792 
+<a name="l00793"></a>00793     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00794"></a>00794     <span class="comment">// STL support - not thread-safe methods</span>
+<a name="l00795"></a>00795     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00796"></a>00796     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0,my_embedded_segment,my_embedded_segment->node_list);}
+<a name="l00797"></a>00797     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0,0,0);}
+<a name="l00798"></a>00798     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0,my_embedded_segment,my_embedded_segment->node_list);}
+<a name="l00799"></a>00799     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0,0,0);}
+<a name="l00800"></a>00800     std::pair<iterator, iterator> equal_range( <span class="keyword">const</span> Key& key ) { <span class="keywordflow">return</span> internal_equal_range(key, end()); }
+<a name="l00801"></a>00801     std::pair<const_iterator, const_iterator> equal_range( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> internal_equal_range(key, end()); }
+<a name="l00802"></a>00802     
+<a name="l00804"></a><a class="code" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">00804</a>     size_type size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_size; }
+<a name="l00805"></a>00805 
+<a name="l00807"></a><a class="code" href="a00130.html#3e5d085375320cd3f34faeedc5bba8f6">00807</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_size == 0; }
+<a name="l00808"></a>00808 
+<a name="l00810"></a><a class="code" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">00810</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(node);}
+<a name="l00811"></a>00811 
+<a name="l00813"></a><a class="code" href="a00130.html#79d1e5c3b975dbd38b43138266fe4c0e">00813</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+<a name="l00814"></a>00814 
+<a name="l00816"></a>00816     <span class="keywordtype">void</span> swap(<a class="code" href="a00130.html">concurrent_hash_map</a> &table);
+<a name="l00817"></a>00817 
+<a name="l00818"></a>00818     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00819"></a>00819     <span class="comment">// concurrent map operations</span>
+<a name="l00820"></a>00820     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00821"></a>00821 
+<a name="l00823"></a><a class="code" href="a00130.html#a3e97a1f3cb66e81a2336b013ef1ae7d">00823</a>     size_type count( <span class="keyword">const</span> Key &key )<span class="keyword"> const </span>{
+<a name="l00824"></a>00824         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, NULL, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00825"></a>00825     }
+<a name="l00826"></a>00826 
+<a name="l00828"></a>00828 
+<a name="l00829"></a><a class="code" href="a00130.html#9fa1ca60af4ef761a100617b27718585">00829</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> Key &key )<span class="keyword"> const </span>{
+<a name="l00830"></a>00830         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00831"></a>00831         <span class="keywordflow">return</span> const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00832"></a>00832     }
+<a name="l00833"></a>00833 
+<a name="l00835"></a>00835 
+<a name="l00836"></a><a class="code" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">00836</a>     <span class="keywordtype">bool</span> find( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> Key &key ) {
+<a name="l00837"></a>00837         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00838"></a>00838         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">false</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+<a name="l00839"></a>00839     }
+<a name="l00840"></a>00840         
+<a name="l00842"></a>00842 
+<a name="l00843"></a><a class="code" href="a00130.html#67d8c254b1666d89267c8a4a33c864f3">00843</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> Key &key ) {
+<a name="l00844"></a>00844         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00845"></a>00845         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00846"></a>00846     }
+<a name="l00847"></a>00847 
+<a name="l00849"></a>00849 
+<a name="l00850"></a><a class="code" href="a00130.html#8ea81ff7fea044f859273b354c91c185">00850</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> Key &key ) {
+<a name="l00851"></a>00851         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00852"></a>00852         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, key, NULL, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+<a name="l00853"></a>00853     }
+<a name="l00854"></a>00854 
+<a name="l00856"></a>00856 
+<a name="l00857"></a><a class="code" href="a00130.html#68a46a26bd4308c1780d021ca7e8fc15">00857</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00133.html">const_accessor</a> &result, <span class="keyword">const</span> value_type &value ) {
+<a name="l00858"></a>00858         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00859"></a>00859         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, &result, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00860"></a>00860     }
+<a name="l00861"></a>00861 
+<a name="l00863"></a>00863 
+<a name="l00864"></a><a class="code" href="a00130.html#7bd4dcf6ea74a32299fd57d8d7fc7ed8">00864</a>     <span class="keywordtype">bool</span> insert( <a class="code" href="a00131.html">accessor</a> &result, <span class="keyword">const</span> value_type &value ) {
+<a name="l00865"></a>00865         result.<a class="code" href="a00133.html#09575d1a2dfeb8cd896c27cdd3770517">release</a>();
+<a name="l00866"></a>00866         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, &result, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+<a name="l00867"></a>00867     }
+<a name="l00868"></a>00868 
+<a name="l00870"></a>00870 
+<a name="l00871"></a><a class="code" href="a00130.html#3034a308bc839695a5714a107380c4b9">00871</a>     <span class="keywordtype">bool</span> insert( <span class="keyword">const</span> value_type &value ) {
+<a name="l00872"></a>00872         <span class="keywordflow">return</span> lookup(<span class="comment">/*insert*/</span><span class="keyword">true</span>, value.first, &value.second, NULL, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00873"></a>00873     }
+<a name="l00874"></a>00874 
+<a name="l00876"></a>00876     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00877"></a><a class="code" href="a00130.html#7b42dba04d71e1367f0d542087906178">00877</a>     <span class="keywordtype">void</span> insert(I first, I last) {
+<a name="l00878"></a>00878         <span class="keywordflow">for</span>(; first != last; ++first)
+<a name="l00879"></a>00879             insert( *first );
+<a name="l00880"></a>00880     }
+<a name="l00881"></a>00881 
+<a name="l00883"></a>00883 
+<a name="l00884"></a>00884     <span class="keywordtype">bool</span> erase( <span class="keyword">const</span> Key& key );
+<a name="l00885"></a>00885 
+<a name="l00887"></a>00887 
+<a name="l00888"></a><a class="code" href="a00130.html#fc64086f9f518cef8c368c9429d0064e">00888</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00133.html">const_accessor</a>& item_accessor ) {
+<a name="l00889"></a>00889         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">true</span> );
+<a name="l00890"></a>00890     }
+<a name="l00891"></a>00891 
+<a name="l00893"></a>00893 
+<a name="l00894"></a><a class="code" href="a00130.html#b65abfa291da566617dd58dfb349630a">00894</a>     <span class="keywordtype">bool</span> erase( <a class="code" href="a00131.html">accessor</a>& item_accessor ) {
+<a name="l00895"></a>00895         <span class="keywordflow">return</span> exclude( item_accessor, <span class="comment">/*readonly=*/</span> <span class="keyword">false</span> );
+<a name="l00896"></a>00896     }
+<a name="l00897"></a>00897 
+<a name="l00898"></a>00898 <span class="keyword">protected</span>:
+<a name="l00900"></a>00900     <span class="keywordtype">bool</span> lookup( <span class="keywordtype">bool</span> op_insert, <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T *t, const_accessor *result, <span class="keywordtype">bool</span> write );
+<a name="l00901"></a>00901 
+<a name="l00903"></a>00903     <span class="keywordtype">bool</span> exclude( const_accessor &item_accessor, <span class="keywordtype">bool</span> readonly );
+<a name="l00904"></a>00904 
+<a name="l00906"></a>00906     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00907"></a>00907     std::pair<I, I> internal_equal_range( <span class="keyword">const</span> Key& key, I end ) <span class="keyword">const</span>;
+<a name="l00908"></a>00908 
+<a name="l00910"></a>00910     <span class="keywordtype">void</span> internal_copy( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& source );
+<a name="l00911"></a>00911 
+<a name="l00912"></a>00912     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00913"></a>00913     <span class="keywordtype">void</span> internal_copy(I first, I last);
+<a name="l00914"></a>00914 
+<a name="l00916"></a>00916 
+<a name="l00918"></a><a class="code" href="a00130.html#f0cdf5930563a49ffe827c520e948e01">00918</a>     const_pointer internal_fast_find( <span class="keyword">const</span> Key& key )<span class="keyword"> const </span>{
+<a name="l00919"></a>00919         hashcode_t h = my_hash_compare.hash( key );
+<a name="l00920"></a>00920 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00921"></a>00921 <span class="preprocessor"></span>        hashcode_t m = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
+<a name="l00922"></a>00922 <span class="preprocessor">#else</span>
+<a name="l00923"></a>00923 <span class="preprocessor"></span>        hashcode_t m = my_mask;
+<a name="l00924"></a>00924 <span class="preprocessor">#endif</span>
+<a name="l00925"></a>00925 <span class="preprocessor"></span>        node *n;
+<a name="l00926"></a>00926     restart:
+<a name="l00927"></a>00927         __TBB_ASSERT((m&(m+1))==0, NULL);
+<a name="l00928"></a>00928         bucket *b = get_bucket( h & m );
+<a name="l00929"></a>00929 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00930"></a>00930 <span class="preprocessor"></span>        <span class="comment">// TODO: actually, notification is unnecessary here, just hiding double-check</span>
+<a name="l00931"></a>00931         <span class="keywordflow">if</span>( itt_load_pointer_with_acquire_v3(&b->node_list) == internal::rehash_req )
+<a name="l00932"></a>00932 <span class="preprocessor">#else</span>
+<a name="l00933"></a>00933 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( __TBB_load_with_acquire(b->node_list) == internal::rehash_req )
+<a name="l00934"></a>00934 <span class="preprocessor">#endif</span>
+<a name="l00935"></a>00935 <span class="preprocessor"></span>        {
+<a name="l00936"></a>00936             bucket::scoped_t lock;
+<a name="l00937"></a>00937             <span class="keywordflow">if</span>( lock.try_acquire( b->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> ) ) {
+<a name="l00938"></a>00938                 <span class="keywordflow">if</span>( b->node_list == internal::rehash_req)
+<a name="l00939"></a>00939                     const_cast<concurrent_hash_map*>(<span class="keyword">this</span>)->rehash_bucket( b, h & m ); <span class="comment">//recursive rehashing</span>
+<a name="l00940"></a>00940             }
+<a name="l00941"></a>00941             <span class="keywordflow">else</span> lock.acquire( b->mutex, <span class="comment">/*write=*/</span><span class="keyword">false</span> );
+<a name="l00942"></a>00942             __TBB_ASSERT(b->node_list!=internal::rehash_req,NULL);
+<a name="l00943"></a>00943         }
+<a name="l00944"></a>00944         n = search_bucket( key, b );
+<a name="l00945"></a>00945         <span class="keywordflow">if</span>( n )
+<a name="l00946"></a>00946             <span class="keywordflow">return</span> &n->item;
+<a name="l00947"></a>00947         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( check_mask_race( h, m ) )
+<a name="l00948"></a>00948             <span class="keywordflow">goto</span> restart;
+<a name="l00949"></a>00949         <span class="keywordflow">return</span> 0;
+<a name="l00950"></a>00950     }
+<a name="l00951"></a>00951 };
+<a name="l00952"></a>00952 
+<a name="l00953"></a>00953 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l00954"></a>00954 <span class="preprocessor"></span>    <span class="comment">// Suppress "conditional expression is constant" warning.</span>
+<a name="l00955"></a>00955 <span class="preprocessor">    #pragma warning( push )</span>
+<a name="l00956"></a>00956 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( disable: 4127 )</span>
+<a name="l00957"></a>00957 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00958"></a>00958 <span class="preprocessor"></span>
+<a name="l00959"></a>00959 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l00960"></a><a class="code" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">00960</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::lookup</a>( <span class="keywordtype">bool</span> op_insert, <span class="keyword">const</span> Key &key, <span class="keyword">const</span> T *t, <a class="code" href="a00133.html">const_accessor</a> *result, <span class="keywordtype">bool</span> write ) {
+<a name="l00961"></a>00961     __TBB_ASSERT( !result || !result-><a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>, NULL );
+<a name="l00962"></a>00962     segment_index_t grow_segment;
+<a name="l00963"></a>00963     <span class="keywordtype">bool</span> return_value;
+<a name="l00964"></a>00964     node *n, *tmp_n = 0;
+<a name="l00965"></a>00965     hashcode_t <span class="keyword">const</span> h = my_hash_compare.hash( key );
+<a name="l00966"></a>00966 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00967"></a>00967 <span class="preprocessor"></span>    hashcode_t m = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
+<a name="l00968"></a>00968 <span class="preprocessor">#else</span>
+<a name="l00969"></a>00969 <span class="preprocessor"></span>    hashcode_t m = my_mask;
+<a name="l00970"></a>00970 <span class="preprocessor">#endif</span>
+<a name="l00971"></a>00971 <span class="preprocessor"></span>    restart:
+<a name="l00972"></a>00972     {<span class="comment">//lock scope</span>
+<a name="l00973"></a>00973         __TBB_ASSERT((m&(m+1))==0, NULL);
+<a name="l00974"></a>00974         return_value = <span class="keyword">false</span>;
+<a name="l00975"></a>00975         <span class="comment">// get bucket</span>
+<a name="l00976"></a>00976         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m );
+<a name="l00977"></a>00977 
+<a name="l00978"></a>00978         <span class="comment">// find a node</span>
+<a name="l00979"></a>00979         n = search_bucket( key, b() );
+<a name="l00980"></a>00980         <span class="keywordflow">if</span>( op_insert ) {
+<a name="l00981"></a>00981             <span class="comment">// [opt] insert a key</span>
+<a name="l00982"></a>00982             <span class="keywordflow">if</span>( !n ) {
+<a name="l00983"></a>00983                 <span class="keywordflow">if</span>( !tmp_n ) {
+<a name="l00984"></a>00984                     <span class="keywordflow">if</span>(t) tmp_n = <span class="keyword">new</span>( my_allocator ) node(key, *t);
+<a name="l00985"></a>00985                     <span class="keywordflow">else</span>  tmp_n = <span class="keyword">new</span>( my_allocator ) node(key);
+<a name="l00986"></a>00986                 }
+<a name="l00987"></a>00987                 <span class="keywordflow">if</span>( !b.<a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a>() && !b.<a class="code" href="a00132.html#32b2b1c83ca85859bc5276022821152d">upgrade_to_writer</a>() ) { <span class="comment">// TODO: improved insertion</span>
+<a name="l00988"></a>00988                     <span class="comment">// Rerun search_list, in case another thread inserted the item during the upgrade.</span>
+<a name="l00989"></a>00989                     n = search_bucket( key, b() );
+<a name="l00990"></a>00990                     <span class="keywordflow">if</span>( is_valid(n) ) { <span class="comment">// unfortunately, it did</span>
+<a name="l00991"></a>00991                         b.downgrade_to_reader();
+<a name="l00992"></a>00992                         <span class="keywordflow">goto</span> exists;
+<a name="l00993"></a>00993                     }
+<a name="l00994"></a>00994                 }
+<a name="l00995"></a>00995                 <span class="keywordflow">if</span>( check_mask_race(h, m) )
+<a name="l00996"></a>00996                     <span class="keywordflow">goto</span> restart; <span class="comment">// b.release() is done in ~b().</span>
+<a name="l00997"></a>00997                 <span class="comment">// insert and set flag to grow the container</span>
+<a name="l00998"></a>00998                 grow_segment = insert_new_node( b(), n = tmp_n, m );
+<a name="l00999"></a>00999                 tmp_n = 0;
+<a name="l01000"></a>01000                 return_value = <span class="keyword">true</span>;
+<a name="l01001"></a>01001             } <span class="keywordflow">else</span> {
+<a name="l01002"></a>01002     exists:     grow_segment = 0;
+<a name="l01003"></a>01003             }
+<a name="l01004"></a>01004         } <span class="keywordflow">else</span> { <span class="comment">// find or count</span>
+<a name="l01005"></a>01005             <span class="keywordflow">if</span>( !n ) {
+<a name="l01006"></a>01006                 <span class="keywordflow">if</span>( check_mask_race( h, m ) )
+<a name="l01007"></a>01007                     <span class="keywordflow">goto</span> restart; <span class="comment">// b.release() is done in ~b(). TODO: replace by continue</span>
+<a name="l01008"></a>01008                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01009"></a>01009             }
+<a name="l01010"></a>01010             return_value = <span class="keyword">true</span>;
+<a name="l01011"></a>01011             grow_segment = 0;
+<a name="l01012"></a>01012         }
+<a name="l01013"></a>01013         <span class="keywordflow">if</span>( !result ) <span class="keywordflow">goto</span> check_growth;
+<a name="l01014"></a>01014         <span class="comment">// TODO: the following seems as generic/regular operation</span>
+<a name="l01015"></a>01015         <span class="comment">// acquire the item</span>
+<a name="l01016"></a>01016         <span class="keywordflow">if</span>( !result-><a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.try_acquire( n->mutex, write ) ) {
+<a name="l01017"></a>01017             <span class="comment">// we are unlucky, prepare for longer wait</span>
+<a name="l01018"></a>01018             <a class="code" href="a00119.html">internal::atomic_backoff</a> trials;
+<a name="l01019"></a>01019             <span class="keywordflow">do</span> {
+<a name="l01020"></a>01020                 <span class="keywordflow">if</span>( !trials.bounded_pause() ) {
+<a name="l01021"></a>01021                     <span class="comment">// the wait takes really long, restart the operation</span>
+<a name="l01022"></a>01022                     b.release();
+<a name="l01023"></a>01023                     __TBB_ASSERT( !op_insert || !return_value, <span class="stringliteral">"Can't acquire new item in locked bucket?"</span> );
+<a name="l01024"></a>01024                     __TBB_Yield();
+<a name="l01025"></a>01025                     m = my_mask;
+<a name="l01026"></a>01026                     <span class="keywordflow">goto</span> restart;
+<a name="l01027"></a>01027                 }
+<a name="l01028"></a>01028             } <span class="keywordflow">while</span>( !result-><a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.try_acquire( n->mutex, write ) );
+<a name="l01029"></a>01029         }
+<a name="l01030"></a>01030     }<span class="comment">//lock scope</span>
+<a name="l01031"></a>01031     result-><a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a> = n;
+<a name="l01032"></a>01032     result-><a class="code" href="a00133.html#4ba27b783fcaaab0bab90e60b8c8a614">my_hash</a> = h;
+<a name="l01033"></a>01033 check_growth:
+<a name="l01034"></a>01034     <span class="comment">// [opt] grow the container</span>
+<a name="l01035"></a>01035     <span class="keywordflow">if</span>( grow_segment )
+<a name="l01036"></a>01036         enable_segment( grow_segment );
+<a name="l01037"></a>01037     <span class="keywordflow">if</span>( tmp_n ) <span class="comment">// if op_insert only</span>
+<a name="l01038"></a>01038         delete_node( tmp_n );
+<a name="l01039"></a>01039     <span class="keywordflow">return</span> return_value;
+<a name="l01040"></a>01040 }
+<a name="l01041"></a>01041 
+<a name="l01042"></a>01042 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01043"></a>01043 <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l01044"></a><a class="code" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">01044</a> std::pair<I, I> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_equal_range</a>( <span class="keyword">const</span> Key& key, I end )<span class="keyword"> const </span>{
+<a name="l01045"></a>01045     hashcode_t h = my_hash_compare.hash( key );
+<a name="l01046"></a>01046     hashcode_t m = my_mask;
+<a name="l01047"></a>01047     __TBB_ASSERT((m&(m+1))==0, NULL);
+<a name="l01048"></a>01048     h &= m;
+<a name="l01049"></a>01049     bucket *b = get_bucket( h );
+<a name="l01050"></a>01050     <span class="keywordflow">while</span>( b->node_list == internal::rehash_req ) {
+<a name="l01051"></a>01051         m = ( 1u<<__TBB_Log2( h ) ) - 1; <span class="comment">// get parent mask from the topmost bit</span>
+<a name="l01052"></a>01052         b = get_bucket( h &= m );
+<a name="l01053"></a>01053     }
+<a name="l01054"></a>01054     node *n = search_bucket( key, b );
+<a name="l01055"></a>01055     <span class="keywordflow">if</span>( !n )
+<a name="l01056"></a>01056         <span class="keywordflow">return</span> std::make_pair(end, end);
+<a name="l01057"></a>01057     iterator lower(*<span class="keyword">this</span>, h, b, n), upper(lower);
+<a name="l01058"></a>01058     <span class="keywordflow">return</span> std::make_pair(lower, ++upper);
+<a name="l01059"></a>01059 }
+<a name="l01060"></a>01060 
+<a name="l01061"></a>01061 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01062"></a><a class="code" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">01062</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::exclude</a>( <a class="code" href="a00133.html">const_accessor</a> &item_accessor, <span class="keywordtype">bool</span> readonly ) {
+<a name="l01063"></a>01063     __TBB_ASSERT( item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>, NULL );
+<a name="l01064"></a>01064     node_base *<span class="keyword">const</span> n = item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a>;
+<a name="l01065"></a>01065     item_accessor.<a class="code" href="a00133.html#91d596be4465efc2ac2ffd0450b47ca2">my_node</a> = NULL; <span class="comment">// we ought release accessor anyway</span>
+<a name="l01066"></a>01066     hashcode_t <span class="keyword">const</span> h = item_accessor.<a class="code" href="a00133.html#4ba27b783fcaaab0bab90e60b8c8a614">my_hash</a>;
+<a name="l01067"></a>01067     hashcode_t m = my_mask;
+<a name="l01068"></a>01068     <span class="keywordflow">do</span> {
+<a name="l01069"></a>01069         <span class="comment">// get bucket</span>
+<a name="l01070"></a>01070         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m, <span class="comment">/*writer=*/</span><span class="keyword">true</span> );
+<a name="l01071"></a>01071         node_base **p = &b()->node_list;
+<a name="l01072"></a>01072         <span class="keywordflow">while</span>( *p && *p != n )
+<a name="l01073"></a>01073             p = &(*p)->next;
+<a name="l01074"></a>01074         <span class="keywordflow">if</span>( !*p ) { <span class="comment">// someone else was the first</span>
+<a name="l01075"></a>01075             <span class="keywordflow">if</span>( check_mask_race( h, m ) )
+<a name="l01076"></a>01076                 <span class="keywordflow">continue</span>;
+<a name="l01077"></a>01077             item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.release();
+<a name="l01078"></a>01078             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01079"></a>01079         }
+<a name="l01080"></a>01080         __TBB_ASSERT( *p == n, NULL );
+<a name="l01081"></a>01081         *p = n->next; <span class="comment">// remove from container</span>
+<a name="l01082"></a>01082         my_size--;
+<a name="l01083"></a>01083         <span class="keywordflow">break</span>;
+<a name="l01084"></a>01084     } <span class="keywordflow">while</span>(<span class="keyword">true</span>);
+<a name="l01085"></a>01085     <span class="keywordflow">if</span>( readonly ) <span class="comment">// need to get exclusive lock</span>
+<a name="l01086"></a>01086         item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.upgrade_to_writer(); <span class="comment">// return value means nothing here</span>
+<a name="l01087"></a>01087     item_accessor.<a class="code" href="a00133.html#cd19753c8520dd7641f5fc132141fde2">my_lock</a>.release();
+<a name="l01088"></a>01088     delete_node( n ); <span class="comment">// Only one thread can delete it due to write lock on the chain_mutex</span>
+<a name="l01089"></a>01089     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l01090"></a>01090 }
+<a name="l01091"></a>01091 
+<a name="l01092"></a>01092 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01093"></a><a class="code" href="a00130.html#58df7a1e4373c55eb4c2fa9dc69516b1">01093</a> <span class="keywordtype">bool</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::erase</a>( <span class="keyword">const</span> Key &key ) {
+<a name="l01094"></a>01094     node_base *n;
+<a name="l01095"></a>01095     hashcode_t <span class="keyword">const</span> h = my_hash_compare.hash( key );
+<a name="l01096"></a>01096     hashcode_t m = my_mask;
+<a name="l01097"></a>01097 restart:
+<a name="l01098"></a>01098     {<span class="comment">//lock scope</span>
+<a name="l01099"></a>01099         <span class="comment">// get bucket</span>
+<a name="l01100"></a>01100         <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, h & m );
+<a name="l01101"></a>01101     search:
+<a name="l01102"></a>01102         node_base **p = &b()->node_list;
+<a name="l01103"></a>01103         n = *p;
+<a name="l01104"></a>01104         <span class="keywordflow">while</span>( is_valid(n) && !my_hash_compare.equal(key, static_cast<node*>(n)->item.first ) ) {
+<a name="l01105"></a>01105             p = &n->next;
+<a name="l01106"></a>01106             n = *p;
+<a name="l01107"></a>01107         }
+<a name="l01108"></a>01108         <span class="keywordflow">if</span>( !n ) { <span class="comment">// not found, but mask could be changed</span>
+<a name="l01109"></a>01109             <span class="keywordflow">if</span>( check_mask_race( h, m ) )
+<a name="l01110"></a>01110                 <span class="keywordflow">goto</span> restart;
+<a name="l01111"></a>01111             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01112"></a>01112         }
+<a name="l01113"></a>01113         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( !b.<a class="code" href="a00132.html#adf8e405df5787351fe816c42042b9ec">is_writer</a>() && !b.<a class="code" href="a00132.html#32b2b1c83ca85859bc5276022821152d">upgrade_to_writer</a>() ) {
+<a name="l01114"></a>01114             <span class="keywordflow">if</span>( check_mask_race( h, m ) ) <span class="comment">// contended upgrade, check mask</span>
+<a name="l01115"></a>01115                 <span class="keywordflow">goto</span> restart;
+<a name="l01116"></a>01116             <span class="keywordflow">goto</span> search;
+<a name="l01117"></a>01117         }
+<a name="l01118"></a>01118         *p = n->next;
+<a name="l01119"></a>01119         my_size--;
+<a name="l01120"></a>01120     }
+<a name="l01121"></a>01121     {
+<a name="l01122"></a>01122         <span class="keyword">typename</span> node::scoped_t item_locker( n->mutex, <span class="comment">/*write=*/</span><span class="keyword">true</span> );
+<a name="l01123"></a>01123     }
+<a name="l01124"></a>01124     <span class="comment">// note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor!</span>
+<a name="l01125"></a>01125     delete_node( n ); <span class="comment">// Only one thread can delete it due to write lock on the bucket</span>
+<a name="l01126"></a>01126     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l01127"></a>01127 }
+<a name="l01128"></a>01128 
+<a name="l01129"></a>01129 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01130"></a>01130 <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::swap</a>(<a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A></a> &table) {
+<a name="l01131"></a>01131     std::swap(this->my_allocator, table.<a class="code" href="a00130.html#964dbe9bfcb2ac0157f8b77f252f951b">my_allocator</a>);
+<a name="l01132"></a>01132     std::swap(this->my_hash_compare, table.<a class="code" href="a00130.html#1d13c1f34b3826f9235b82ea90818169">my_hash_compare</a>);
+<a name="l01133"></a>01133     internal_swap(table);
+<a name="l01134"></a>01134 }
+<a name="l01135"></a>01135 
+<a name="l01136"></a>01136 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01137"></a><a class="code" href="a00130.html#36bcd50fd5383f3682032323b2d74333">01137</a> <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::clear</a>() {
+<a name="l01138"></a>01138     hashcode_t m = my_mask;
+<a name="l01139"></a>01139     __TBB_ASSERT((m&(m+1))==0, NULL);
+<a name="l01140"></a>01140 <span class="preprocessor">#if TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l01141"></a>01141 <span class="preprocessor"></span><span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l01142"></a>01142 <span class="preprocessor"></span>    <span class="keywordtype">int</span> <a class="code" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">size</a> = int(my_size), buckets = int(m)+1, empty_buckets = 0, overpopulated_buckets = 0; <span class="comment">// usage statistics</span>
+<a name="l01143"></a>01143     <span class="keyword">static</span> <span class="keywordtype">bool</span> reported = <span class="keyword">false</span>;
+<a name="l01144"></a>01144 <span class="preprocessor">#endif</span>
+<a name="l01145"></a>01145 <span class="preprocessor"></span>    <span class="comment">// check consistency</span>
+<a name="l01146"></a>01146     <span class="keywordflow">for</span>( segment_index_t b = 0; b <= m; b++ ) {
+<a name="l01147"></a>01147         node_base *n = get_bucket(b)->node_list;
+<a name="l01148"></a>01148 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l01149"></a>01149 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( n == internal::empty_rehashed ) empty_buckets++;
+<a name="l01150"></a>01150         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( n == internal::rehash_req ) buckets--;
+<a name="l01151"></a>01151         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( n->next ) overpopulated_buckets++;
+<a name="l01152"></a>01152 #endif
+<a name="l01153"></a>01153         <span class="keywordflow">for</span>(; is_valid(n); n = n->next ) {
+<a name="l01154"></a>01154             hashcode_t h = my_hash_compare.hash( static_cast<node*>(n)->item.first );
+<a name="l01155"></a>01155             h &= m;
+<a name="l01156"></a>01156             __TBB_ASSERT( h == b || get_bucket(h)->node_list == internal::rehash_req, <span class="stringliteral">"Rehashing is not finished until serial stage due to concurrent or unexpectedly terminated operation"</span> );
+<a name="l01157"></a>01157         }
+<a name="l01158"></a>01158     }
+<a name="l01159"></a>01159 <span class="preprocessor">#if TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l01160"></a>01160 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( buckets > size) empty_buckets -= buckets - size;
+<a name="l01161"></a>01161     <span class="keywordflow">else</span> overpopulated_buckets -= size - buckets; <span class="comment">// TODO: load_factor?</span>
+<a name="l01162"></a>01162     <span class="keywordflow">if</span>( !reported && buckets >= 512 && ( 2*empty_buckets >= size || 2*overpopulated_buckets > size ) ) {
+<a name="l01163"></a>01163         internal::runtime_warning(
+<a name="l01164"></a>01164             <span class="stringliteral">"Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d  Empties: %d  Overlaps: %d"</span>,
+<a name="l01165"></a>01165             <span class="keyword">typeid</span>(*this).name(), size, empty_buckets, overpopulated_buckets );
+<a name="l01166"></a>01166         reported = <span class="keyword">true</span>;
+<a name="l01167"></a>01167     }
+<a name="l01168"></a>01168 <span class="preprocessor">#endif</span>
+<a name="l01169"></a>01169 <span class="preprocessor"></span><span class="preprocessor">#endif//TBB_USE_DEBUG || TBB_USE_PERFORMANCE_WARNINGS</span>
+<a name="l01170"></a>01170 <span class="preprocessor"></span>    my_size = 0;
+<a name="l01171"></a>01171     segment_index_t s = segment_index_of( m );
+<a name="l01172"></a>01172     __TBB_ASSERT( s+1 == pointers_per_table || !my_table[s+1], <span class="stringliteral">"wrong mask or concurrent grow"</span> );
+<a name="l01173"></a>01173     <a class="code" href="a00125.html">cache_aligned_allocator<bucket></a> alloc;
+<a name="l01174"></a>01174     <span class="keywordflow">do</span> {
+<a name="l01175"></a>01175         __TBB_ASSERT( is_valid( my_table[s] ), <span class="stringliteral">"wrong mask or concurrent grow"</span> );
+<a name="l01176"></a>01176         segment_ptr_t buckets = my_table[s];
+<a name="l01177"></a>01177         size_type sz = segment_size( s ? s : 1 );
+<a name="l01178"></a>01178         <span class="keywordflow">for</span>( segment_index_t i = 0; i < sz; i++ )
+<a name="l01179"></a>01179             <span class="keywordflow">for</span>( node_base *n = buckets[i].node_list; is_valid(n); n = buckets[i].node_list ) {
+<a name="l01180"></a>01180                 buckets[i].node_list = n->next;
+<a name="l01181"></a>01181                 delete_node( n );
+<a name="l01182"></a>01182             }
+<a name="l01183"></a>01183         <span class="keywordflow">if</span>( s >= first_block) <span class="comment">// the first segment or the next</span>
+<a name="l01184"></a>01184             alloc.<a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( buckets, sz );
+<a name="l01185"></a>01185         <span class="keywordflow">else</span> <span class="keywordflow">if</span>( s == embedded_block && embedded_block != first_block )
+<a name="l01186"></a>01186             alloc.<a class="code" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">deallocate</a>( buckets, segment_size(first_block)-embedded_buckets );
+<a name="l01187"></a>01187         <span class="keywordflow">if</span>( s >= embedded_block ) my_table[s] = 0;
+<a name="l01188"></a>01188     } <span class="keywordflow">while</span>(s-- > 0);
+<a name="l01189"></a>01189     my_mask = embedded_buckets - 1;
+<a name="l01190"></a>01190 }
+<a name="l01191"></a>01191 
+<a name="l01192"></a>01192 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01193"></a><a class="code" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">01193</a> <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_copy</a>( <span class="keyword">const</span> <a class="code" href="a00130.html">concurrent_hash_map</a>& source ) {
+<a name="l01194"></a>01194     reserve( source.my_size ); <span class="comment">// TODO: load_factor?</span>
+<a name="l01195"></a>01195     hashcode_t mask = source.my_mask;
+<a name="l01196"></a>01196     <span class="keywordflow">if</span>( my_mask == mask ) { <span class="comment">// optimized version</span>
+<a name="l01197"></a>01197         bucket *dst = 0, *src = 0;
+<a name="l01198"></a>01198         <span class="keywordflow">for</span>( hashcode_t k = 0; k <= mask; k++ ) {
+<a name="l01199"></a>01199             <span class="keywordflow">if</span>( k & (k-2) ) ++dst,src++; <span class="comment">// not the beginning of a segment</span>
+<a name="l01200"></a>01200             <span class="keywordflow">else</span> { dst = get_bucket( k ); src = source.get_bucket( k ); }
+<a name="l01201"></a>01201             __TBB_ASSERT( dst->node_list != internal::rehash_req, <span class="stringliteral">"Invalid bucket in destination table"</span>);
+<a name="l01202"></a>01202             node *n = static_cast<node*>( src->node_list );
+<a name="l01203"></a>01203             <span class="keywordflow">if</span>( n == internal::rehash_req ) { <span class="comment">// source is not rehashed, items are in previous buckets</span>
+<a name="l01204"></a>01204                 <a class="code" href="a00132.html">bucket_accessor</a> b( <span class="keyword">this</span>, k );
+<a name="l01205"></a>01205                 rehash_bucket( b(), k ); <span class="comment">// TODO: use without synchronization</span>
+<a name="l01206"></a>01206             } <span class="keywordflow">else</span> <span class="keywordflow">for</span>(; n; n = static_cast<node*>( n->next ) ) {
+<a name="l01207"></a>01207                 add_to_bucket( dst, <span class="keyword">new</span>( my_allocator ) node(n->item.first, n->item.second) );
+<a name="l01208"></a>01208                 ++my_size; <span class="comment">// TODO: replace by non-atomic op</span>
+<a name="l01209"></a>01209             }
+<a name="l01210"></a>01210         }
+<a name="l01211"></a>01211     } <span class="keywordflow">else</span> <a class="code" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">internal_copy</a>( source.<a class="code" href="a00130.html#dfb7ab010b46fc194673256479c2ea48">begin</a>(), source.<a class="code" href="a00130.html#7e2dd7c8b3d37a93ba551e4de33bb73d">end</a>() );
+<a name="l01212"></a>01212 }
+<a name="l01213"></a>01213 
+<a name="l01214"></a>01214 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01215"></a>01215 <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l01216"></a>01216 <span class="keywordtype">void</span> <a class="code" href="a00130.html">concurrent_hash_map<Key,T,HashCompare,A>::internal_copy</a>(I first, I last) {
+<a name="l01217"></a>01217     hashcode_t m = my_mask;
+<a name="l01218"></a>01218     <span class="keywordflow">for</span>(; first != last; ++first) {
+<a name="l01219"></a>01219         hashcode_t h = my_hash_compare.hash( first->first );
+<a name="l01220"></a>01220         bucket *b = get_bucket( h & m );
+<a name="l01221"></a>01221         __TBB_ASSERT( b->node_list != internal::rehash_req, <span class="stringliteral">"Invalid bucket in destination table"</span>);
+<a name="l01222"></a>01222         node *n = <span class="keyword">new</span>( my_allocator ) node(first->first, first->second);
+<a name="l01223"></a>01223         add_to_bucket( b, n );
+<a name="l01224"></a>01224         ++my_size; <span class="comment">// TODO: replace by non-atomic op</span>
+<a name="l01225"></a>01225     }
+<a name="l01226"></a>01226 }
+<a name="l01227"></a>01227 
+<a name="l01228"></a>01228 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2>
+<a name="l01229"></a>01229 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A1> &a, <span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A2> &b) {
+<a name="l01230"></a>01230     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01231"></a>01231     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A1>::const_iterator i(a.begin()), i_end(a.end());
+<a name="l01232"></a>01232     <span class="keyword">typename</span> concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
+<a name="l01233"></a>01233     <span class="keywordflow">for</span>(; i != i_end; ++i) {
+<a name="l01234"></a>01234         j = b.equal_range(i->first).first;
+<a name="l01235"></a>01235         <span class="keywordflow">if</span>( j == j_end || !(i->second == j->second) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01236"></a>01236     }
+<a name="l01237"></a>01237     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l01238"></a>01238 }
+<a name="l01239"></a>01239 
+<a name="l01240"></a>01240 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A1, <span class="keyword">typename</span> A2>
+<a name="l01241"></a>01241 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A1> &a, <span class="keyword">const</span> concurrent_hash_map<Key, T, HashCompare, A2> &b)
+<a name="l01242"></a>01242 {    <span class="keywordflow">return</span> !(a == b); }
+<a name="l01243"></a>01243 
+<a name="l01244"></a>01244 <span class="keyword">template</span><<span class="keyword">typename</span> Key, <span class="keyword">typename</span> T, <span class="keyword">typename</span> HashCompare, <span class="keyword">typename</span> A>
+<a name="l01245"></a>01245 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash_map<Key, T, HashCompare, A> &b)
+<a name="l01246"></a>01246 {    a.swap( b ); }
+<a name="l01247"></a>01247 
+<a name="l01248"></a>01248 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l01249"></a>01249 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( pop )</span>
+<a name="l01250"></a>01250 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4127 is back</span>
+<a name="l01251"></a>01251 <span class="preprocessor"></span>
+<a name="l01252"></a>01252 } <span class="comment">// namespace tbb</span>
+<a name="l01253"></a>01253 
+<a name="l01254"></a>01254 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_hash_map_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00277.html b/doc/html/a00277.html
deleted file mode 100644
index f0fae97..0000000
--- a/doc/html/a00277.html
+++ /dev/null
@@ -1,875 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>concurrent_vector.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>concurrent_vector.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_concurrent_vector_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_vector_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <algorithm></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <iterator></span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include <limits></span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include <new></span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include <cstring></span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include "blocked_range.h"</span>
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
-<a name="l00038"></a>00038 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4267)</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span>
-<a name="l00042"></a>00042 <span class="keyword">namespace </span>tbb {
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> >
-<a name="l00045"></a>00045 <span class="keyword">class </span>concurrent_vector;
-<a name="l00046"></a>00046 
-<a name="l00048"></a>00048 <span class="preprocessor">#define __TBB_BAD_ALLOC reinterpret_cast<void*>(size_t(63))</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span>
-<a name="l00051"></a>00051 <span class="keyword">namespace </span>internal {
-<a name="l00052"></a>00052 
-<a name="l00054"></a>00054     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC itt_load_pointer_v3( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
-<a name="l00055"></a>00055 
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058     <span class="keyword">class </span>concurrent_vector_base_v3 {
-<a name="l00059"></a>00059     <span class="keyword">protected</span>:
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         <span class="comment">// Basic types declarations</span>
-<a name="l00062"></a>00062         <span class="keyword">typedef</span> size_t segment_index_t;
-<a name="l00063"></a>00063         <span class="keyword">typedef</span> size_t size_type;
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         <span class="comment">// Using enumerations due to Mac linking problems of static const variables</span>
-<a name="l00066"></a>00066         <span class="keyword">enum</span> {
-<a name="l00067"></a>00067             <span class="comment">// Size constants</span>
-<a name="l00068"></a>00068             default_initial_segments = 1, <span class="comment">// 2 initial items</span>
-<a name="l00070"></a>00070 <span class="comment"></span>            pointers_per_short_table = 3, <span class="comment">// to fit into 8 words of entire structure</span>
-<a name="l00071"></a>00071             pointers_per_long_table = <span class="keyword">sizeof</span>(segment_index_t) * 8 <span class="comment">// one segment per bit</span>
-<a name="l00072"></a>00072         };
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074         <span class="comment">// Segment pointer. Can be zero-initialized</span>
-<a name="l00075"></a>00075         <span class="keyword">struct </span>segment_t {
-<a name="l00076"></a>00076             <span class="keywordtype">void</span>* array;
-<a name="l00077"></a>00077 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span>            ~segment_t() {
-<a name="l00079"></a>00079                 __TBB_ASSERT( array <= __TBB_BAD_ALLOC, <span class="stringliteral">"should have been freed by clear"</span> );
-<a name="l00080"></a>00080             }
-<a name="l00081"></a>00081 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00082"></a>00082         };
-<a name="l00083"></a>00083  
-<a name="l00084"></a>00084         <span class="comment">// Data fields</span>
-<a name="l00085"></a>00085 
-<a name="l00087"></a>00087         <span class="keywordtype">void</span>* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t);
-<a name="l00088"></a>00088 
-<a name="l00090"></a>00090         atomic<size_type> my_first_block;
-<a name="l00091"></a>00091 
-<a name="l00093"></a>00093         atomic<size_type> my_early_size;
-<a name="l00094"></a>00094 
-<a name="l00096"></a>00096         atomic<segment_t*> my_segment;
-<a name="l00097"></a>00097 
-<a name="l00099"></a>00099         segment_t my_storage[pointers_per_short_table];
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         <span class="comment">// Methods</span>
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103         concurrent_vector_base_v3() {
-<a name="l00104"></a>00104             my_early_size = 0;
-<a name="l00105"></a>00105             my_first_block = 0; <span class="comment">// here is not default_initial_segments</span>
-<a name="l00106"></a>00106             <span class="keywordflow">for</span>( segment_index_t i = 0; i < pointers_per_short_table; i++)
-<a name="l00107"></a>00107                 my_storage[i].array = NULL;
-<a name="l00108"></a>00108             my_segment = my_storage;
-<a name="l00109"></a>00109         }
-<a name="l00110"></a>00110         __TBB_EXPORTED_METHOD ~concurrent_vector_base_v3();
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
-<a name="l00113"></a>00113             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
-<a name="l00114"></a>00114         }
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
-<a name="l00117"></a>00117             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
-<a name="l00118"></a>00118         }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         <span class="keyword">static</span> <span class="keyword">inline</span> segment_index_t segment_base_index_of( segment_index_t &index ) {
-<a name="l00121"></a>00121             segment_index_t k = segment_index_of( index );
-<a name="l00122"></a>00122             index -= segment_base(k);
-<a name="l00123"></a>00123             <span class="keywordflow">return</span> k;
-<a name="l00124"></a>00124         }
-<a name="l00125"></a>00125 
-<a name="l00126"></a>00126         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
-<a name="l00127"></a>00127             <span class="keywordflow">return</span> segment_index_t(1)<<k; <span class="comment">// fake value for k==0</span>
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129 
-<a name="l00131"></a>00131         <span class="keyword">typedef</span> void (__TBB_EXPORTED_FUNC *internal_array_op1)(<span class="keywordtype">void</span>* begin, size_type n );
-<a name="l00132"></a>00132 
-<a name="l00134"></a>00134         <span class="keyword">typedef</span> void (__TBB_EXPORTED_FUNC *internal_array_op2)(<span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
-<a name="l00135"></a>00135 
-<a name="l00137"></a>00137         <span class="keyword">struct </span>internal_segments_table {
-<a name="l00138"></a>00138             segment_index_t first_block;
-<a name="l00139"></a>00139             <span class="keywordtype">void</span>* table[pointers_per_long_table];
-<a name="l00140"></a>00140         };
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_reserve( size_type n, size_type element_size, size_type max_size );
-<a name="l00143"></a>00143         size_type __TBB_EXPORTED_METHOD internal_capacity() <span class="keyword">const</span>;
-<a name="l00144"></a>00144         <span class="keywordtype">void</span> internal_grow( size_type start, size_type finish, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
-<a name="l00145"></a>00145         size_type __TBB_EXPORTED_METHOD internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
-<a name="l00146"></a>00146         <span class="keywordtype">void</span>* __TBB_EXPORTED_METHOD internal_push_back( size_type element_size, size_type& index );
-<a name="l00147"></a>00147         segment_index_t __TBB_EXPORTED_METHOD internal_clear( internal_array_op1 destroy );
-<a name="l00148"></a>00148         <span class="keywordtype">void</span>* __TBB_EXPORTED_METHOD internal_compact( size_type element_size, <span class="keywordtype">void</span> *table, internal_array_op1 destroy, internal_array_op2 copy );
-<a name="l00149"></a>00149         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_copy( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy );
-<a name="l00150"></a>00150         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_assign( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size,
-<a name="l00151"></a>00151                               internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy );
-<a name="l00152"></a>00152         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception(size_type) <span class="keyword">const</span>;
-<a name="l00153"></a>00153         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_swap(concurrent_vector_base_v3& v);
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_resize( size_type n, size_type element_size, size_type max_size, <span class="keyword">const</span> <span class="keywordtype">void</span> *src,
-<a name="l00156"></a>00156                                                     internal_array_op1 destroy, internal_array_op2 init );
-<a name="l00157"></a>00157         size_type __TBB_EXPORTED_METHOD internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
-<a name="l00158"></a>00158 
-<a name="l00160"></a>00160         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
-<a name="l00161"></a>00161 <span class="keyword">private</span>:
-<a name="l00163"></a>00163         <span class="keyword">class </span>helper;
-<a name="l00164"></a>00164         <span class="keyword">friend</span> <span class="keyword">class </span>helper;
-<a name="l00165"></a>00165     };
-<a name="l00166"></a>00166     
-<a name="l00167"></a>00167     <span class="keyword">typedef</span> concurrent_vector_base_v3 concurrent_vector_base;
-<a name="l00168"></a>00168 
-<a name="l00170"></a>00170 
-<a name="l00172"></a>00172     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
-<a name="l00173"></a>00173     <span class="keyword">class </span>vector_iterator 
-<a name="l00174"></a>00174     {
-<a name="l00176"></a>00176         Container* my_vector;
-<a name="l00177"></a>00177 
-<a name="l00179"></a>00179         size_t my_index;
-<a name="l00180"></a>00180 
-<a name="l00182"></a>00182 
-<a name="l00183"></a>00183         <span class="keyword">mutable</span> Value* my_item;
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T>
-<a name="l00186"></a>00186         <span class="keyword">friend</span> vector_iterator<C,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<C,T>& v );
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00189"></a>00189         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
-<a name="l00190"></a>00190 
-<a name="l00191"></a>00191         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00192"></a>00192         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( const vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00195"></a>00195         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
-<a name="l00196"></a>00196     
-<a name="l00197"></a>00197         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00198"></a>00198         <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
-<a name="l00199"></a>00199 
-<a name="l00200"></a>00200 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
-<a name="l00201"></a>00201 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00202"></a>00202         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00136.html">tbb::concurrent_vector</a>;
-<a name="l00203"></a>00203 <span class="preprocessor">#else</span>
-<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
-<a name="l00205"></a>00205 <span class="preprocessor">#endif </span>
-<a name="l00206"></a>00206 <span class="preprocessor"></span>
-<a name="l00207"></a>00207         vector_iterator( <span class="keyword">const</span> Container& vector, size_t index, <span class="keywordtype">void</span> *ptr = 0 ) : 
-<a name="l00208"></a>00208             my_vector(const_cast<Container*>(&vector)), 
-<a name="l00209"></a>00209             my_index(index), 
-<a name="l00210"></a>00210             my_item(static_cast<Value*>(ptr))
-<a name="l00211"></a>00211         {}
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213     <span class="keyword">public</span>:
-<a name="l00215"></a>00215         vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {}
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217         vector_iterator( <span class="keyword">const</span> vector_iterator<Container,typename Container::value_type>& other ) :
-<a name="l00218"></a>00218             my_vector(other.my_vector),
-<a name="l00219"></a>00219             my_index(other.my_index),
-<a name="l00220"></a>00220             my_item(other.my_item)
-<a name="l00221"></a>00221         {}
-<a name="l00222"></a>00222 
-<a name="l00223"></a>00223         vector_iterator operator+( ptrdiff_t offset )<span class="keyword"> const </span>{
-<a name="l00224"></a>00224             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index+offset );
-<a name="l00225"></a>00225         }
-<a name="l00226"></a>00226         vector_iterator &operator+=( ptrdiff_t offset ) {
-<a name="l00227"></a>00227             my_index+=offset;
-<a name="l00228"></a>00228             my_item = NULL;
-<a name="l00229"></a>00229             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00230"></a>00230         }
-<a name="l00231"></a>00231         vector_iterator operator-( ptrdiff_t offset )<span class="keyword"> const </span>{
-<a name="l00232"></a>00232             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index-offset );
-<a name="l00233"></a>00233         }
-<a name="l00234"></a>00234         vector_iterator &operator-=( ptrdiff_t offset ) {
-<a name="l00235"></a>00235             my_index-=offset;
-<a name="l00236"></a>00236             my_item = NULL;
-<a name="l00237"></a>00237             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00238"></a>00238         }
-<a name="l00239"></a>00239         Value& operator*()<span class="keyword"> const </span>{
-<a name="l00240"></a>00240             Value* item = my_item;
-<a name="l00241"></a>00241             <span class="keywordflow">if</span>( !item ) {
-<a name="l00242"></a>00242                 item = my_item = &my_vector->internal_subscript(my_index);
-<a name="l00243"></a>00243             }
-<a name="l00244"></a>00244             __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), <span class="stringliteral">"corrupt cache"</span> );
-<a name="l00245"></a>00245             <span class="keywordflow">return</span> *item;
-<a name="l00246"></a>00246         }
-<a name="l00247"></a>00247         Value& <a class="code" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a>( ptrdiff_t k )<span class="keyword"> const </span>{
-<a name="l00248"></a>00248             <span class="keywordflow">return</span> my_vector->internal_subscript(my_index+k);
-<a name="l00249"></a>00249         }
-<a name="l00250"></a>00250         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
-<a name="l00251"></a>00251 
-<a name="l00253"></a>00253         vector_iterator& operator++() {
-<a name="l00254"></a>00254             size_t k = ++my_index;
-<a name="l00255"></a>00255             <span class="keywordflow">if</span>( my_item ) {
-<a name="l00256"></a>00256                 <span class="comment">// Following test uses 2's-complement wizardry</span>
-<a name="l00257"></a>00257                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
-<a name="l00258"></a>00258                     <span class="comment">// k is a power of two that is at least k-2</span>
-<a name="l00259"></a>00259                     my_item= NULL;
-<a name="l00260"></a>00260                 } <span class="keywordflow">else</span> {
-<a name="l00261"></a>00261                     ++my_item;
-<a name="l00262"></a>00262                 }
-<a name="l00263"></a>00263             }
-<a name="l00264"></a>00264             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00265"></a>00265         }
-<a name="l00266"></a>00266 
-<a name="l00268"></a>00268         vector_iterator& operator--() {
-<a name="l00269"></a>00269             __TBB_ASSERT( my_index>0, <span class="stringliteral">"operator--() applied to iterator already at beginning of concurrent_vector"</span> ); 
-<a name="l00270"></a>00270             size_t k = my_index--;
-<a name="l00271"></a>00271             <span class="keywordflow">if</span>( my_item ) {
-<a name="l00272"></a>00272                 <span class="comment">// Following test uses 2's-complement wizardry</span>
-<a name="l00273"></a>00273                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
-<a name="l00274"></a>00274                     <span class="comment">// k is a power of two that is at least k-2  </span>
-<a name="l00275"></a>00275                     my_item= NULL;
-<a name="l00276"></a>00276                 } <span class="keywordflow">else</span> {
-<a name="l00277"></a>00277                     --my_item;
-<a name="l00278"></a>00278                 }
-<a name="l00279"></a>00279             }
-<a name="l00280"></a>00280             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00281"></a>00281         }
-<a name="l00282"></a>00282 
-<a name="l00284"></a>00284         vector_iterator operator++(<span class="keywordtype">int</span>) {
-<a name="l00285"></a>00285             vector_iterator result = *<span class="keyword">this</span>;
-<a name="l00286"></a>00286             operator++();
-<a name="l00287"></a>00287             <span class="keywordflow">return</span> result;
-<a name="l00288"></a>00288         }
-<a name="l00289"></a>00289 
-<a name="l00291"></a>00291         vector_iterator operator--(<span class="keywordtype">int</span>) {
-<a name="l00292"></a>00292             vector_iterator result = *<span class="keyword">this</span>;
-<a name="l00293"></a>00293             operator--();
-<a name="l00294"></a>00294             <span class="keywordflow">return</span> result;
-<a name="l00295"></a>00295         }
-<a name="l00296"></a>00296 
-<a name="l00297"></a>00297         <span class="comment">// STL support</span>
-<a name="l00298"></a>00298 
-<a name="l00299"></a>00299         <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00300"></a>00300         <span class="keyword">typedef</span> Value value_type;
-<a name="l00301"></a>00301         <span class="keyword">typedef</span> Value* pointer;
-<a name="l00302"></a>00302         <span class="keyword">typedef</span> Value& reference;
-<a name="l00303"></a>00303         <span class="keyword">typedef</span> std::random_access_iterator_tag iterator_category;
-<a name="l00304"></a>00304     };
-<a name="l00305"></a>00305 
-<a name="l00306"></a>00306     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T>
-<a name="l00307"></a>00307     vector_iterator<Container,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<Container,T>& v ) {
-<a name="l00308"></a>00308         <span class="keywordflow">return</span> vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
-<a name="l00309"></a>00309     }
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00312"></a>00312     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00313"></a>00313         <span class="keywordflow">return</span> i.my_index==j.my_index && i.my_vector == j.my_vector;
-<a name="l00314"></a>00314     }
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00317"></a>00317     <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00318"></a>00318         <span class="keywordflow">return</span> !(i==j);
-<a name="l00319"></a>00319     }
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00322"></a>00322     <span class="keywordtype">bool</span> operator<( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00323"></a>00323         <span class="keywordflow">return</span> i.my_index<j.my_index;
-<a name="l00324"></a>00324     }
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00327"></a>00327     <span class="keywordtype">bool</span> operator>( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00328"></a>00328         <span class="keywordflow">return</span> j<i;
-<a name="l00329"></a>00329     }
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00332"></a>00332     <span class="keywordtype">bool</span> operator>=( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00333"></a>00333         <span class="keywordflow">return</span> !(i<j);
-<a name="l00334"></a>00334     }
-<a name="l00335"></a>00335 
-<a name="l00336"></a>00336     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00337"></a>00337     <span class="keywordtype">bool</span> operator<=( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00338"></a>00338         <span class="keywordflow">return</span> !(j<i);
-<a name="l00339"></a>00339     }
-<a name="l00340"></a>00340 
-<a name="l00341"></a>00341     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00342"></a>00342     ptrdiff_t operator-( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
-<a name="l00343"></a>00343         <span class="keywordflow">return</span> ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
-<a name="l00344"></a>00344     }
-<a name="l00345"></a>00345 
-<a name="l00346"></a>00346     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00347"></a>00347     <span class="keyword">class </span>allocator_base {
-<a name="l00348"></a>00348     <span class="keyword">public</span>:
-<a name="l00349"></a>00349         <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template
-<a name="l00350"></a>00350             rebind<T>::other allocator_type;
-<a name="l00351"></a>00351         allocator_type my_allocator;
-<a name="l00352"></a>00352 
-<a name="l00353"></a>00353         allocator_base(<span class="keyword">const</span> allocator_type &a = allocator_type() ) : my_allocator(a) {}
-<a name="l00354"></a>00354     };
-<a name="l00355"></a>00355 
-<a name="l00356"></a>00356 } <span class="comment">// namespace internal</span>
-<a name="l00358"></a>00358 <span class="comment"></span>
-<a name="l00360"></a>00360 
-<a name="l00421"></a>00421 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00422"></a><a class="code" href="a00136.html">00422</a> <span class="keyword">class </span><a class="code" href="a00136.html">concurrent_vector</a>: <span class="keyword">protected</span> internal::allocator_base<T, A>,
-<a name="l00423"></a>00423                          <span class="keyword">private</span> internal::concurrent_vector_base {
-<a name="l00424"></a>00424 <span class="keyword">private</span>:
-<a name="l00425"></a>00425     <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00426"></a>00426     <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00122.html">blocked_range</a><I> {
-<a name="l00427"></a>00427     <span class="keyword">public</span>:
-<a name="l00428"></a>00428         <span class="keyword">typedef</span> T value_type;
-<a name="l00429"></a>00429         <span class="keyword">typedef</span> T& reference;
-<a name="l00430"></a>00430         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00431"></a>00431         <span class="keyword">typedef</span> I iterator;
-<a name="l00432"></a>00432         <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00433"></a>00433         generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00122.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
-<a name="l00434"></a>00434         template<typename U>
-<a name="l00435"></a>00435         generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00122.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
-<a name="l00436"></a>00436         generic_range_type( generic_range_type& r, <a class="code" href="a00161.html">split</a> ) : <a class="code" href="a00122.html">blocked_range<I></a>(r,<a class="code" href="a00161.html">split</a>()) {}
-<a name="l00437"></a>00437     };
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
-<a name="l00440"></a>00440     <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
-<a name="l00441"></a>00441 <span class="keyword">public</span>:
-<a name="l00442"></a>00442     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00443"></a>00443     <span class="comment">// STL compatible types</span>
-<a name="l00444"></a>00444     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00445"></a>00445     <span class="keyword">typedef</span> internal::concurrent_vector_base_v3::size_type size_type;
-<a name="l00446"></a>00446     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_base<T, A>::allocator_type allocator_type;
-<a name="l00447"></a>00447 
-<a name="l00448"></a>00448     <span class="keyword">typedef</span> T value_type;
-<a name="l00449"></a>00449     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00450"></a>00450     <span class="keyword">typedef</span> T& reference;
-<a name="l00451"></a>00451     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00452"></a>00452     <span class="keyword">typedef</span> T *pointer;
-<a name="l00453"></a>00453     <span class="keyword">typedef</span> <span class="keyword">const</span> T *const_pointer;
-<a name="l00454"></a>00454 
-<a name="l00455"></a>00455     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,T> iterator;
-<a name="l00456"></a>00456     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,const T> const_iterator;
-<a name="l00457"></a>00457 
-<a name="l00458"></a>00458 <span class="preprocessor">#if !defined(_MSC_VER) || _CPPLIB_VER>=300 </span>
-<a name="l00459"></a>00459 <span class="preprocessor"></span>    <span class="comment">// Assume ISO standard definition of std::reverse_iterator</span>
-<a name="l00460"></a>00460     <span class="keyword">typedef</span> std::reverse_iterator<iterator> reverse_iterator;
-<a name="l00461"></a>00461     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator> const_reverse_iterator;
-<a name="l00462"></a>00462 <span class="preprocessor">#else</span>
-<a name="l00463"></a>00463 <span class="preprocessor"></span>    <span class="comment">// Use non-standard std::reverse_iterator</span>
-<a name="l00464"></a>00464     <span class="keyword">typedef</span> std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
-<a name="l00465"></a>00465     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
-<a name="l00466"></a>00466 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && (_MSC_VER<1300) */</span>
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00469"></a>00469     <span class="comment">// Parallel algorithm support</span>
-<a name="l00470"></a>00470     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00471"></a>00471     <span class="keyword">typedef</span> generic_range_type<iterator> range_type;
-<a name="l00472"></a>00472     <span class="keyword">typedef</span> generic_range_type<const_iterator> const_range_type;
-<a name="l00473"></a>00473 
-<a name="l00474"></a>00474     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00475"></a>00475     <span class="comment">// STL compatible constructors & destructors</span>
-<a name="l00476"></a>00476     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00477"></a>00477 
-<a name="l00479"></a><a class="code" href="a00136.html#2c8ca9cabfcd30ad5943324c853664b5">00479</a>     <span class="keyword">explicit</span> <a class="code" href="a00136.html">concurrent_vector</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00480"></a>00480         : internal::allocator_base<T, A>(a)
-<a name="l00481"></a>00481     {
-<a name="l00482"></a>00482         vector_allocator_ptr = &internal_allocator;
-<a name="l00483"></a>00483     }
-<a name="l00484"></a>00484 
-<a name="l00486"></a><a class="code" href="a00136.html#dd8a200b99a8088435a37934b58fe335">00486</a>     <a class="code" href="a00136.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector</a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
-<a name="l00487"></a>00487         : internal::allocator_base<T, A>(a)
-<a name="l00488"></a>00488     {
-<a name="l00489"></a>00489         vector_allocator_ptr = &internal_allocator;
-<a name="l00490"></a>00490         internal_copy(vector, <span class="keyword">sizeof</span>(T), &copy_array);
-<a name="l00491"></a>00491     }
-<a name="l00492"></a>00492 
-<a name="l00494"></a>00494     <span class="keyword">template</span><<span class="keyword">class</span> M>
-<a name="l00495"></a><a class="code" href="a00136.html#64432f13f7b29bfe4acfb5568f34f3a8">00495</a>     <a class="code" href="a00136.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector<T, M></a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
-<a name="l00496"></a>00496         : internal::allocator_base<T, A>(a)
-<a name="l00497"></a>00497     {
-<a name="l00498"></a>00498         vector_allocator_ptr = &internal_allocator;
-<a name="l00499"></a>00499         internal_copy(vector.<a class="code" href="a00136.html#bb5ae659871478f1f5c68039e1273e12">internal_vector_base</a>(), <span class="keyword">sizeof</span>(T), &copy_array);
-<a name="l00500"></a>00500     }
-<a name="l00501"></a>00501 
-<a name="l00503"></a><a class="code" href="a00136.html#2a2e261dfe1cab3f73f7b1a94137cfca">00503</a>     <span class="keyword">explicit</span> <a class="code" href="a00136.html">concurrent_vector</a>(size_type n)
-<a name="l00504"></a>00504     {
-<a name="l00505"></a>00505         vector_allocator_ptr = &internal_allocator;
-<a name="l00506"></a>00506         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), NULL, &destroy_array, &initialize_array );
-<a name="l00507"></a>00507     }
-<a name="l00508"></a>00508 
-<a name="l00510"></a><a class="code" href="a00136.html#3883a8a908b44e249a57f454de3f55d8">00510</a>     <a class="code" href="a00136.html">concurrent_vector</a>(size_type n, const_reference t, <span class="keyword">const</span> allocator_type& a = allocator_type())
-<a name="l00511"></a>00511         : internal::allocator_base<T, A>(a)
-<a name="l00512"></a>00512     {
-<a name="l00513"></a>00513         vector_allocator_ptr = &internal_allocator;
-<a name="l00514"></a>00514         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
-<a name="l00515"></a>00515     }
-<a name="l00516"></a>00516 
-<a name="l00518"></a>00518     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00519"></a><a class="code" href="a00136.html#4450de83c5862ea4bcd9443fd7e67419">00519</a>     <a class="code" href="a00136.html">concurrent_vector</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
-<a name="l00520"></a>00520         : internal::allocator_base<T, A>(a)
-<a name="l00521"></a>00521     {
-<a name="l00522"></a>00522         vector_allocator_ptr = &internal_allocator;
-<a name="l00523"></a>00523         internal_assign_range(first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
-<a name="l00524"></a>00524     }
-<a name="l00525"></a>00525 
-<a name="l00527"></a><a class="code" href="a00136.html#691f0f3cda3e489c37a657016e375eaf">00527</a>     <a class="code" href="a00136.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector</a>& vector ) {
-<a name="l00528"></a>00528         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector )
-<a name="l00529"></a>00529             internal_assign(vector, <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
-<a name="l00530"></a>00530         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00531"></a>00531     }
-<a name="l00532"></a>00532 
-<a name="l00534"></a>00534     <span class="keyword">template</span><<span class="keyword">class</span> M>
-<a name="l00535"></a><a class="code" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">00535</a>     <a class="code" href="a00136.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector<T, M></a>& vector ) {
-<a name="l00536"></a>00536         <span class="keywordflow">if</span>( static_cast<void*>( <span class="keyword">this</span> ) != static_cast<const void*>( &vector ) )
-<a name="l00537"></a>00537             internal_assign(vector.internal_vector_base(),
-<a name="l00538"></a>00538                 <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
-<a name="l00539"></a>00539         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00540"></a>00540     }
-<a name="l00541"></a>00541 
-<a name="l00542"></a>00542     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00543"></a>00543     <span class="comment">// Concurrent operations</span>
-<a name="l00544"></a>00544     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00546"></a>00546 <span class="comment"></span><span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00547"></a>00547 <span class="preprocessor"></span>
-<a name="l00548"></a><a class="code" href="a00136.html#30484e3959892fd5392fa93c873c31f0">00548</a>     size_type grow_by( size_type delta ) {
-<a name="l00549"></a>00549         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size;
-<a name="l00550"></a>00550     }
-<a name="l00551"></a>00551 <span class="preprocessor">#else</span>
-<a name="l00552"></a>00552 <span class="preprocessor"></span>
-<a name="l00553"></a><a class="code" href="a00136.html#c8177b1865270ea68aa1ab9148e5e35e">00553</a>     iterator grow_by( size_type delta ) {
-<a name="l00554"></a>00554         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size);
-<a name="l00555"></a>00555     }
-<a name="l00556"></a>00556 <span class="preprocessor">#endif</span>
-<a name="l00557"></a>00557 <span class="preprocessor"></span>
-<a name="l00559"></a>00559 <span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00560"></a>00560 <span class="preprocessor"></span>
-<a name="l00561"></a><a class="code" href="a00136.html#38274ab3f772ecba600c7daca7690102">00561</a>     size_type grow_by( size_type delta, const_reference t ) {
-<a name="l00562"></a>00562         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size;
-<a name="l00563"></a>00563     }
-<a name="l00564"></a>00564 <span class="preprocessor">#else</span>
-<a name="l00565"></a>00565 <span class="preprocessor"></span>
-<a name="l00566"></a><a class="code" href="a00136.html#473a59a4c9308b93411b898b3110d26c">00566</a>     iterator grow_by( size_type delta, const_reference t ) {
-<a name="l00567"></a>00567         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size);
-<a name="l00568"></a>00568     }
-<a name="l00569"></a>00569 <span class="preprocessor">#endif</span>
-<a name="l00570"></a>00570 <span class="preprocessor"></span>
-<a name="l00572"></a>00572 <span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00573"></a>00573 <span class="preprocessor"></span>
-<a name="l00575"></a><a class="code" href="a00136.html#47fe588214dd5fa06ab6e8ab78d83874">00575</a>     <span class="keywordtype">void</span> grow_to_at_least( size_type n ) {
-<a name="l00576"></a>00576         <span class="keywordflow">if</span>( n ) internal_grow_to_at_least_with_result( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
-<a name="l00577"></a>00577     };
-<a name="l00578"></a>00578 <span class="preprocessor">#else</span>
-<a name="l00579"></a>00579 <span class="preprocessor"></span>
-<a name="l00583"></a><a class="code" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">00583</a>     iterator grow_to_at_least( size_type n ) {
-<a name="l00584"></a>00584         size_type m=0;
-<a name="l00585"></a>00585         <span class="keywordflow">if</span>( n ) {
-<a name="l00586"></a>00586             m = internal_grow_to_at_least_with_result( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
-<a name="l00587"></a>00587             <span class="keywordflow">if</span>( m>n ) m=n;
-<a name="l00588"></a>00588         }
-<a name="l00589"></a>00589         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, m);
-<a name="l00590"></a>00590     };
-<a name="l00591"></a>00591 <span class="preprocessor">#endif</span>
-<a name="l00592"></a>00592 <span class="preprocessor"></span>
-<a name="l00594"></a>00594 <span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00595"></a><a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">00595</a> <span class="preprocessor"></span>    size_type push_back( const_reference item )
-<a name="l00596"></a>00596 <span class="preprocessor">#else</span>
-<a name="l00597"></a>00597 <span class="preprocessor"></span>
-<a name="l00598"></a>00598     iterator push_back( const_reference item )
-<a name="l00599"></a>00599 <span class="preprocessor">#endif</span>
-<a name="l00600"></a>00600 <span class="preprocessor"></span>    {
-<a name="l00601"></a>00601         size_type k;
-<a name="l00602"></a>00602         <span class="keywordtype">void</span> *ptr = internal_push_back(<span class="keyword">sizeof</span>(T),k);
-<a name="l00603"></a>00603         internal_loop_guide loop(1, ptr);
-<a name="l00604"></a>00604         loop.init(&item);
-<a name="l00605"></a>00605 <span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00606"></a>00606 <span class="preprocessor"></span>        <span class="keywordflow">return</span> k;
-<a name="l00607"></a>00607 <span class="preprocessor">#else</span>
-<a name="l00608"></a>00608 <span class="preprocessor"></span>        <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, k, ptr);
-<a name="l00609"></a>00609 <span class="preprocessor">#endif</span>
-<a name="l00610"></a>00610 <span class="preprocessor"></span>    }
-<a name="l00611"></a>00611 
-<a name="l00613"></a>00613 
-<a name="l00615"></a><a class="code" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">00615</a>     reference operator[]( size_type index ) {
-<a name="l00616"></a>00616         <span class="keywordflow">return</span> internal_subscript(index);
-<a name="l00617"></a>00617     }
-<a name="l00618"></a>00618 
-<a name="l00620"></a><a class="code" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">00620</a>     const_reference operator[]( size_type index )<span class="keyword"> const </span>{
-<a name="l00621"></a>00621         <span class="keywordflow">return</span> internal_subscript(index);
-<a name="l00622"></a>00622     }
-<a name="l00623"></a>00623 
-<a name="l00625"></a><a class="code" href="a00136.html#0c073ca43e787c7cbf7b0e26d2221748">00625</a>     reference at( size_type index ) {
-<a name="l00626"></a>00626         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
-<a name="l00627"></a>00627     }
-<a name="l00628"></a>00628 
-<a name="l00630"></a><a class="code" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">00630</a>     const_reference at( size_type index )<span class="keyword"> const </span>{
-<a name="l00631"></a>00631         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
-<a name="l00632"></a>00632     }
-<a name="l00633"></a>00633 
-<a name="l00635"></a><a class="code" href="a00136.html#a4c6ffff3bf08b92939aa2fc516edfba">00635</a>     range_type range( size_t grainsize = 1) {
-<a name="l00636"></a>00636         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
-<a name="l00637"></a>00637     }
-<a name="l00638"></a>00638 
-<a name="l00640"></a><a class="code" href="a00136.html#3d09ccfb581b879ae64203741035e193">00640</a>     const_range_type range( size_t grainsize = 1 )<span class="keyword"> const </span>{
-<a name="l00641"></a>00641         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
-<a name="l00642"></a>00642     }
-<a name="l00643"></a>00643     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00644"></a>00644     <span class="comment">// Capacity</span>
-<a name="l00645"></a>00645     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00647"></a><a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">00647</a> <span class="comment"></span>    size_type size()<span class="keyword"> const </span>{
-<a name="l00648"></a>00648         size_type sz = my_early_size, cp = internal_capacity();
-<a name="l00649"></a>00649         <span class="keywordflow">return</span> cp < sz ? cp : sz;
-<a name="l00650"></a>00650     }
-<a name="l00651"></a>00651 
-<a name="l00653"></a><a class="code" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">00653</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_early_size;}
-<a name="l00654"></a>00654 
-<a name="l00656"></a><a class="code" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">00656</a>     size_type capacity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_capacity();}
-<a name="l00657"></a>00657 
-<a name="l00659"></a>00659 
-<a name="l00661"></a><a class="code" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">00661</a>     <span class="keywordtype">void</span> reserve( size_type n ) {
-<a name="l00662"></a>00662         <span class="keywordflow">if</span>( n )
-<a name="l00663"></a>00663             internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size());
-<a name="l00664"></a>00664     }
-<a name="l00665"></a>00665 
-<a name="l00667"></a><a class="code" href="a00136.html#8dfb0cb0eef96d440b4dcf801807a718">00667</a>     <span class="keywordtype">void</span> resize( size_type n ) {
-<a name="l00668"></a>00668         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), NULL, &destroy_array, &initialize_array );
-<a name="l00669"></a>00669     }
-<a name="l00670"></a>00670     
-<a name="l00672"></a><a class="code" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">00672</a>     <span class="keywordtype">void</span> resize( size_type n, const_reference t ) {
-<a name="l00673"></a>00673         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
-<a name="l00674"></a>00674     }
-<a name="l00675"></a>00675    
-<a name="l00676"></a>00676 <span class="preprocessor">#if TBB_DEPRECATED </span>
-<a name="l00678"></a><a class="code" href="a00136.html#1693d1da41b1a8235871be9c6633be35">00678</a> <span class="preprocessor">    void compact() {shrink_to_fit();}</span>
-<a name="l00679"></a>00679 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DEPRECATED */</span>
-<a name="l00680"></a>00680 
-<a name="l00682"></a>00682     <span class="keywordtype">void</span> shrink_to_fit();
-<a name="l00683"></a>00683 
-<a name="l00685"></a><a class="code" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">00685</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(T);}
-<a name="l00686"></a>00686 
-<a name="l00687"></a>00687     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00688"></a>00688     <span class="comment">// STL support</span>
-<a name="l00689"></a>00689     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00690"></a>00690 
-<a name="l00692"></a><a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">00692</a>     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0);}
-<a name="l00694"></a><a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">00694</a>     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,size());}
-<a name="l00696"></a><a class="code" href="a00136.html#78a06182276ff758788d4c0623ae0d71">00696</a>     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
-<a name="l00698"></a><a class="code" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">00698</a>     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,size());}
-<a name="l00700"></a><a class="code" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">00700</a>     const_iterator cbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
-<a name="l00702"></a><a class="code" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">00702</a>     const_iterator cend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,size());}
-<a name="l00704"></a><a class="code" href="a00136.html#5e220926d09236d98f04fe0721e5f9a1">00704</a>     reverse_iterator rbegin() {<span class="keywordflow">return</span> reverse_iterator(end());}
-<a name="l00706"></a><a class="code" href="a00136.html#290119a4eb43cd6a9e98fa17016ba3c2">00706</a>     reverse_iterator rend() {<span class="keywordflow">return</span> reverse_iterator(begin());}
-<a name="l00708"></a><a class="code" href="a00136.html#9f9c103e18d5f212703805354074ad44">00708</a>     const_reverse_iterator rbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
-<a name="l00710"></a><a class="code" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">00710</a>     const_reverse_iterator rend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
-<a name="l00712"></a><a class="code" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">00712</a>     const_reverse_iterator crbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
-<a name="l00714"></a><a class="code" href="a00136.html#fff9cece89438587997ebedf93c5e962">00714</a>     const_reverse_iterator crend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
-<a name="l00716"></a><a class="code" href="a00136.html#15181759c0bfa2ddce5d10c7550e0002">00716</a>     reference front() {
-<a name="l00717"></a>00717         __TBB_ASSERT( size()>0, NULL);
-<a name="l00718"></a>00718         <span class="keywordflow">return</span> static_cast<T*>(my_segment[0].array)[0];
-<a name="l00719"></a>00719     }
-<a name="l00721"></a><a class="code" href="a00136.html#502615a858eb9fa0390ee59169065e90">00721</a>     const_reference front()<span class="keyword"> const </span>{
-<a name="l00722"></a>00722         __TBB_ASSERT( size()>0, NULL);
-<a name="l00723"></a>00723         <span class="keywordflow">return</span> static_cast<const T*>(my_segment[0].array)[0];
-<a name="l00724"></a>00724     }
-<a name="l00726"></a><a class="code" href="a00136.html#41ce48d6015a1a2812d41cf620ec3476">00726</a>     reference back() {
-<a name="l00727"></a>00727         __TBB_ASSERT( size()>0, NULL);
-<a name="l00728"></a>00728         <span class="keywordflow">return</span> internal_subscript( size()-1 );
-<a name="l00729"></a>00729     }
-<a name="l00731"></a><a class="code" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">00731</a>     const_reference back()<span class="keyword"> const </span>{
-<a name="l00732"></a>00732         __TBB_ASSERT( size()>0, NULL);
-<a name="l00733"></a>00733         <span class="keywordflow">return</span> internal_subscript( size()-1 );
-<a name="l00734"></a>00734     }
-<a name="l00736"></a><a class="code" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">00736</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
-<a name="l00737"></a>00737 
-<a name="l00739"></a><a class="code" href="a00136.html#423e5aa15e0e3309ad86d026fd85f6f6">00739</a>     <span class="keywordtype">void</span> assign(size_type n, const_reference t) {
-<a name="l00740"></a>00740         clear();
-<a name="l00741"></a>00741         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
-<a name="l00742"></a>00742     }
-<a name="l00743"></a>00743 
-<a name="l00745"></a>00745     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00746"></a><a class="code" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">00746</a>     <span class="keywordtype">void</span> assign(I first, I last) {
-<a name="l00747"></a>00747         clear(); internal_assign_range( first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
-<a name="l00748"></a>00748     }
-<a name="l00749"></a>00749 
-<a name="l00751"></a><a class="code" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">00751</a>     <span class="keywordtype">void</span> swap(<a class="code" href="a00136.html">concurrent_vector</a> &vector) {
-<a name="l00752"></a>00752         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector ) {
-<a name="l00753"></a>00753             concurrent_vector_base_v3::internal_swap(static_cast<concurrent_vector_base_v3&>(vector));
-<a name="l00754"></a>00754             std::swap(this->my_allocator, vector.my_allocator);
-<a name="l00755"></a>00755         }
-<a name="l00756"></a>00756     }
-<a name="l00757"></a>00757 
-<a name="l00759"></a>00759 
-<a name="l00760"></a><a class="code" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">00760</a>     <span class="keywordtype">void</span> clear() {
-<a name="l00761"></a>00761         internal_clear(&destroy_array);
-<a name="l00762"></a>00762     }
-<a name="l00763"></a>00763 
-<a name="l00765"></a><a class="code" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">00765</a>     ~<a class="code" href="a00136.html">concurrent_vector</a>() {
-<a name="l00766"></a>00766         segment_t *table = my_segment;
-<a name="l00767"></a>00767         internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
-<a name="l00768"></a>00768         <span class="comment">// base class destructor call should be then</span>
-<a name="l00769"></a>00769     }
-<a name="l00770"></a>00770 
-<a name="l00771"></a>00771     <span class="keyword">const</span> internal::concurrent_vector_base_v3 &internal_vector_base()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
-<a name="l00772"></a>00772 <span class="keyword">private</span>:
-<a name="l00774"></a>00774     <span class="keyword">static</span> <span class="keywordtype">void</span> *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) {
-<a name="l00775"></a>00775         <span class="keywordflow">return</span> static_cast<concurrent_vector<T, A>&>(vb).my_allocator.allocate(k);
-<a name="l00776"></a>00776     }
-<a name="l00778"></a>00778     <span class="keywordtype">void</span> internal_free_segments(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block);
-<a name="l00779"></a>00779 
-<a name="l00781"></a>00781     T& internal_subscript( size_type index ) <span class="keyword">const</span>;
-<a name="l00782"></a>00782 
-<a name="l00784"></a>00784     T& internal_subscript_with_exceptions( size_type index ) <span class="keyword">const</span>;
-<a name="l00785"></a>00785 
-<a name="l00787"></a>00787     <span class="keywordtype">void</span> internal_assign_n(size_type n, const_pointer p) {
-<a name="l00788"></a>00788         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(p), &destroy_array, p? &initialize_array_by : &initialize_array );
-<a name="l00789"></a>00789     }
-<a name="l00790"></a>00790 
-<a name="l00792"></a>00792     <span class="keyword">template</span><<span class="keywordtype">bool</span> B> <span class="keyword">class </span>is_integer_tag;
-<a name="l00793"></a>00793 
-<a name="l00795"></a>00795     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00796"></a>00796     <span class="keywordtype">void</span> internal_assign_range(I first, I last, is_integer_tag<true> *) {
-<a name="l00797"></a>00797         internal_assign_n(static_cast<size_type>(first), &static_cast<T&>(last));
-<a name="l00798"></a>00798     }
-<a name="l00800"></a>00800     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00801"></a>00801     <span class="keywordtype">void</span> internal_assign_range(I first, I last, is_integer_tag<false> *) {
-<a name="l00802"></a>00802         internal_assign_iterators(first, last);
-<a name="l00803"></a>00803     }
-<a name="l00805"></a>00805     <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00806"></a>00806     <span class="keywordtype">void</span> internal_assign_iterators(I first, I last);
-<a name="l00807"></a>00807 
-<a name="l00809"></a>00809     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC initialize_array( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>*, size_type n );
-<a name="l00810"></a>00810 
-<a name="l00812"></a>00812     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC initialize_array_by( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
-<a name="l00813"></a>00813 
-<a name="l00815"></a>00815     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC copy_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
-<a name="l00816"></a>00816 
-<a name="l00818"></a>00818     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC assign_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
-<a name="l00819"></a>00819 
-<a name="l00821"></a>00821     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC destroy_array( <span class="keywordtype">void</span>* begin, size_type n );
-<a name="l00822"></a>00822 
-<a name="l00824"></a>00824     <span class="keyword">class </span>internal_loop_guide : internal::no_copy {
-<a name="l00825"></a>00825     <span class="keyword">public</span>:
-<a name="l00826"></a>00826         <span class="keyword">const</span> pointer array;
-<a name="l00827"></a>00827         <span class="keyword">const</span> size_type n;
-<a name="l00828"></a>00828         size_type i;
-<a name="l00829"></a>00829         internal_loop_guide(size_type ntrials, <span class="keywordtype">void</span> *ptr)
-<a name="l00830"></a>00830             : array(static_cast<pointer>(ptr)), n(ntrials), i(0) {}
-<a name="l00831"></a>00831         <span class="keywordtype">void</span> init() {   <span class="keywordflow">for</span>(; i < n; ++i) <span class="keyword">new</span>( &array[i] ) T(); }
-<a name="l00832"></a>00832         <span class="keywordtype">void</span> init(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) new( &array[i] ) T(*static_cast<const T*>(src)); }
-<a name="l00833"></a>00833         <span class="keywordtype">void</span> copy(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) new( &array[i] ) T(static_cast<const T*>(src)[i]); }
-<a name="l00834"></a>00834         <span class="keywordtype">void</span> assign(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) array[i] = static_cast<const T*>(src)[i]; }
-<a name="l00835"></a>00835         <span class="keyword">template</span><<span class="keyword">class</span> I> <span class="keywordtype">void</span> iterate(I &src) { <span class="keywordflow">for</span>(; i < n; ++i, ++src) <span class="keyword">new</span>( &array[i] ) T( *src ); }
-<a name="l00836"></a>00836         ~internal_loop_guide() {
-<a name="l00837"></a>00837             <span class="keywordflow">if</span>(i < n) <span class="comment">// if exception raised, do zerroing on the rest of items</span>
-<a name="l00838"></a>00838                 std::memset(array+i, 0, (n-i)*<span class="keyword">sizeof</span>(value_type));
-<a name="l00839"></a>00839         }
-<a name="l00840"></a>00840     };
-<a name="l00841"></a>00841 };
-<a name="l00842"></a>00842 
-<a name="l00843"></a>00843 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00844"></a><a class="code" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">00844</a> <span class="keywordtype">void</span> <a class="code" href="a00136.html">concurrent_vector<T, A>::shrink_to_fit</a>() {
-<a name="l00845"></a>00845     internal_segments_table old;
-<a name="l00846"></a>00846     <span class="keywordflow">try</span> {
-<a name="l00847"></a>00847         <span class="keywordflow">if</span>( internal_compact( <span class="keyword">sizeof</span>(T), &old, &destroy_array, &copy_array ) )
-<a name="l00848"></a>00848             internal_free_segments( old.table, pointers_per_long_table, old.first_block ); <span class="comment">// free joined and unnecessary segments</span>
-<a name="l00849"></a>00849     } <span class="keywordflow">catch</span>(...) {
-<a name="l00850"></a>00850         <span class="keywordflow">if</span>( old.first_block ) <span class="comment">// free segment allocated for compacting. Only for support of exceptions in ctor of user T[ype]</span>
-<a name="l00851"></a>00851             internal_free_segments( old.table, 1, old.first_block );
-<a name="l00852"></a>00852         <span class="keywordflow">throw</span>;
-<a name="l00853"></a>00853     }
-<a name="l00854"></a>00854 }
-<a name="l00855"></a>00855 
-<a name="l00856"></a>00856 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00857"></a>00857 <span class="keywordtype">void</span> <a class="code" href="a00136.html">concurrent_vector<T, A>::internal_free_segments</a>(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block) {
-<a name="l00858"></a>00858     <span class="comment">// Free the arrays</span>
-<a name="l00859"></a>00859     <span class="keywordflow">while</span>( k > first_block ) {
-<a name="l00860"></a>00860         --k;
-<a name="l00861"></a>00861         T* array = static_cast<T*>(table[k]);
-<a name="l00862"></a>00862         table[k] = NULL;
-<a name="l00863"></a>00863         <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
-<a name="l00864"></a>00864             this->my_allocator.deallocate( array, segment_size(k) );
-<a name="l00865"></a>00865     }
-<a name="l00866"></a>00866     T* array = static_cast<T*>(table[0]);
-<a name="l00867"></a>00867     <span class="keywordflow">if</span>( array > __TBB_BAD_ALLOC ) {
-<a name="l00868"></a>00868         __TBB_ASSERT( first_block > 0, NULL );
-<a name="l00869"></a>00869         <span class="keywordflow">while</span>(k > 0) table[--k] = NULL;
-<a name="l00870"></a>00870         this->my_allocator.deallocate( array, segment_size(first_block) );
-<a name="l00871"></a>00871     }
-<a name="l00872"></a>00872 }
-<a name="l00873"></a>00873 
-<a name="l00874"></a>00874 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00875"></a>00875 T& concurrent_vector<T, A>::internal_subscript( size_type index )<span class="keyword"> const </span>{
-<a name="l00876"></a>00876     __TBB_ASSERT( index < my_early_size, <span class="stringliteral">"index out of bounds"</span> );
-<a name="l00877"></a>00877     size_type j = index;
-<a name="l00878"></a>00878     segment_index_t k = segment_base_index_of( j );
-<a name="l00879"></a>00879     __TBB_ASSERT( my_segment != (segment_t*)my_storage || k < pointers_per_short_table, <span class="stringliteral">"index is being allocated"</span> );
-<a name="l00880"></a>00880     <span class="comment">// no need in __TBB_load_with_acquire since thread works in own space or gets </span>
-<a name="l00881"></a>00881 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00882"></a>00882 <span class="preprocessor"></span>    T* array = static_cast<T*>( tbb::internal::itt_load_pointer_v3(&my_segment[k].array));
-<a name="l00883"></a>00883 <span class="preprocessor">#else</span>
-<a name="l00884"></a>00884 <span class="preprocessor"></span>    T* array = static_cast<T*>(my_segment[k].array);
-<a name="l00885"></a>00885 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00886"></a>00886     __TBB_ASSERT( array != __TBB_BAD_ALLOC, <span class="stringliteral">"the instance is broken by bad allocation. Use at() instead"</span> );
-<a name="l00887"></a>00887     __TBB_ASSERT( array, <span class="stringliteral">"index is being allocated"</span> );
-<a name="l00888"></a>00888     <span class="keywordflow">return</span> array[j];
-<a name="l00889"></a>00889 }
-<a name="l00890"></a>00890 
-<a name="l00891"></a>00891 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00892"></a>00892 T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index )<span class="keyword"> const </span>{
-<a name="l00893"></a>00893     <span class="keywordflow">if</span>( index >= my_early_size )
-<a name="l00894"></a>00894         internal_throw_exception(0); <span class="comment">// throw std::out_of_range</span>
-<a name="l00895"></a>00895     size_type j = index;
-<a name="l00896"></a>00896     segment_index_t k = segment_base_index_of( j );
-<a name="l00897"></a>00897     <span class="keywordflow">if</span>( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
-<a name="l00898"></a>00898         internal_throw_exception(1); <span class="comment">// throw std::range_error</span>
-<a name="l00899"></a>00899     <span class="keywordtype">void</span> *array = my_segment[k].array; <span class="comment">// no need in __TBB_load_with_acquire</span>
-<a name="l00900"></a>00900     <span class="keywordflow">if</span>( array <= __TBB_BAD_ALLOC ) <span class="comment">// check for correct segment pointer</span>
-<a name="l00901"></a>00901         internal_throw_exception(2); <span class="comment">// throw std::range_error</span>
-<a name="l00902"></a>00902     <span class="keywordflow">return</span> static_cast<T*>(array)[j];
-<a name="l00903"></a>00903 }
-<a name="l00904"></a>00904 
-<a name="l00905"></a>00905 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A> <span class="keyword">template</span><<span class="keyword">class</span> I>
-<a name="l00906"></a>00906 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign_iterators(I first, I last) {
-<a name="l00907"></a>00907     __TBB_ASSERT(my_early_size == 0, NULL);
-<a name="l00908"></a>00908     size_type n = std::distance(first, last);
-<a name="l00909"></a>00909     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
-<a name="l00910"></a>00910     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>());
-<a name="l00911"></a>00911     my_early_size = n;
-<a name="l00912"></a>00912     segment_index_t k = 0;
-<a name="l00913"></a>00913     size_type sz = segment_size( my_first_block );
-<a name="l00914"></a>00914     <span class="keywordflow">while</span>( sz < n ) {
-<a name="l00915"></a>00915         internal_loop_guide loop(sz, my_segment[k].array);
-<a name="l00916"></a>00916         loop.iterate(first);
-<a name="l00917"></a>00917         n -= sz;
-<a name="l00918"></a>00918         <span class="keywordflow">if</span>( !k ) k = my_first_block;
-<a name="l00919"></a>00919         <span class="keywordflow">else</span> { ++k; sz <<= 1; }
-<a name="l00920"></a>00920     }
-<a name="l00921"></a>00921     internal_loop_guide loop(n, my_segment[k].array);
-<a name="l00922"></a>00922     loop.iterate(first);
-<a name="l00923"></a>00923 }
-<a name="l00924"></a>00924 
-<a name="l00925"></a>00925 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00926"></a>00926 <span class="keywordtype">void</span> concurrent_vector<T, A>::initialize_array( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span> *, size_type n ) {
-<a name="l00927"></a>00927     internal_loop_guide loop(n, begin); loop.init();
-<a name="l00928"></a>00928 }
-<a name="l00929"></a>00929 
-<a name="l00930"></a>00930 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00931"></a>00931 <span class="keywordtype">void</span> concurrent_vector<T, A>::initialize_array_by( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, size_type n ) {
-<a name="l00932"></a>00932     internal_loop_guide loop(n, begin); loop.init(src);
-<a name="l00933"></a>00933 }
-<a name="l00934"></a>00934 
-<a name="l00935"></a>00935 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00936"></a>00936 <span class="keywordtype">void</span> concurrent_vector<T, A>::copy_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n ) {
-<a name="l00937"></a>00937     internal_loop_guide loop(n, dst); loop.copy(src);
-<a name="l00938"></a>00938 }
-<a name="l00939"></a>00939 
-<a name="l00940"></a>00940 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00941"></a>00941 <span class="keywordtype">void</span> concurrent_vector<T, A>::assign_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n ) {
-<a name="l00942"></a>00942     internal_loop_guide loop(n, dst); loop.assign(src);
-<a name="l00943"></a>00943 }
-<a name="l00944"></a>00944 
-<a name="l00945"></a>00945 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) </span>
-<a name="l00946"></a>00946 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warning</span>
-<a name="l00947"></a>00947 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00948"></a>00948 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4189)</span>
-<a name="l00949"></a>00949 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00950"></a>00950 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00951"></a>00951 <span class="keywordtype">void</span> concurrent_vector<T, A>::destroy_array( <span class="keywordtype">void</span>* begin, size_type n ) {
-<a name="l00952"></a>00952     T* array = static_cast<T*>(begin);
-<a name="l00953"></a>00953     <span class="keywordflow">for</span>( size_type j=n; j>0; --j )
-<a name="l00954"></a>00954         array[j-1].~T(); <span class="comment">// destructors are supposed to not throw any exceptions</span>
-<a name="l00955"></a>00955 }
-<a name="l00956"></a>00956 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) </span>
-<a name="l00957"></a>00957 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00958"></a>00958 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4189 is back </span>
-<a name="l00959"></a>00959 <span class="preprocessor"></span>
-<a name="l00960"></a>00960 <span class="comment">// concurrent_vector's template functions</span>
-<a name="l00961"></a>00961 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00962"></a>00962 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b) {
-<a name="l00963"></a>00963     <span class="comment">// Simply:    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());</span>
-<a name="l00964"></a>00964     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00965"></a>00965     <span class="keyword">typename</span> concurrent_vector<T, A1>::const_iterator i(a.begin());
-<a name="l00966"></a>00966     <span class="keyword">typename</span> concurrent_vector<T, A2>::const_iterator j(b.begin());
-<a name="l00967"></a>00967     <span class="keywordflow">for</span>(; i != a.end(); ++i, ++j)
-<a name="l00968"></a>00968         <span class="keywordflow">if</span>( !(*i == *j) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00969"></a>00969     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00970"></a>00970 }
-<a name="l00971"></a>00971 
-<a name="l00972"></a>00972 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00973"></a>00973 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
-<a name="l00974"></a>00974 {    <span class="keywordflow">return</span> !(a == b); }
-<a name="l00975"></a>00975 
-<a name="l00976"></a>00976 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00977"></a>00977 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<(const concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
-<a name="l00978"></a>00978 {    <span class="keywordflow">return</span> (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
-<a name="l00979"></a>00979 
-<a name="l00980"></a>00980 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00981"></a>00981 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
-<a name="l00982"></a>00982 {    <span class="keywordflow">return</span> b < a; }
-<a name="l00983"></a>00983 
-<a name="l00984"></a>00984 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00985"></a>00985 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<=(const concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
-<a name="l00986"></a>00986 {    <span class="keywordflow">return</span> !(b < a); }
-<a name="l00987"></a>00987 
-<a name="l00988"></a>00988 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
-<a name="l00989"></a>00989 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>=(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
-<a name="l00990"></a>00990 {    <span class="keywordflow">return</span> !(a < b); }
-<a name="l00991"></a>00991 
-<a name="l00992"></a>00992 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
-<a name="l00993"></a>00993 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
-<a name="l00994"></a>00994 {    a.swap( b ); }
-<a name="l00995"></a>00995 
-<a name="l00996"></a>00996 } <span class="comment">// namespace tbb</span>
-<a name="l00997"></a>00997 
-<a name="l00998"></a>00998 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
-<a name="l00999"></a>00999 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l01000"></a>01000 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4267 is back</span>
-<a name="l01001"></a>01001 <span class="preprocessor"></span>
-<a name="l01002"></a>01002 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_vector_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00276.html b/doc/html/a00282.html
similarity index 100%
rename from doc/html/a00276.html
rename to doc/html/a00282.html
diff --git a/doc/html/a00283.html b/doc/html/a00283.html
new file mode 100644
index 0000000..214dd78
--- /dev/null
+++ b/doc/html/a00283.html
@@ -0,0 +1,914 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>concurrent_vector.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="files.html"><span>File List</span></a></li>
+    <li><a href="globals.html"><span>File Members</span></a></li>
+  </ul></div>
+<h1>concurrent_vector.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
+<a name="l00003"></a>00003 <span class="comment"></span>
+<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+<a name="l00018"></a>00018 <span class="comment">    writing.</span>
+<a name="l00019"></a>00019 <span class="comment">*/</span>
+<a name="l00020"></a>00020 
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_concurrent_vector_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_concurrent_vector_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include <algorithm></span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include <iterator></span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include <new></span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include <cstring></span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include "blocked_range.h"</span>
+<a name="l00032"></a>00032 
+<a name="l00033"></a>00033 <span class="preprocessor">#include "tbb_machine.h"</span>
+<a name="l00034"></a>00034 
+<a name="l00035"></a>00035 <span class="preprocessor">#if _MSC_VER==1500 && !__INTEL_COMPILER</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span>    <span class="comment">// VS2008/VC9 seems to have an issue; limits pull in math.h</span>
+<a name="l00037"></a>00037 <span class="preprocessor">    #pragma warning( push )</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( disable: 4985 )</span>
+<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include <limits></span> <span class="comment">/* std::numeric_limits */</span>
+<a name="l00041"></a>00041 <span class="preprocessor">#if _MSC_VER==1500 && !__INTEL_COMPILER</span>
+<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning( pop )</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00044"></a>00044 <span class="preprocessor"></span>
+<a name="l00045"></a>00045 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
+<a name="l00046"></a>00046 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warnings in /Wp64 mode</span>
+<a name="l00047"></a>00047 <span class="preprocessor">    #pragma warning (push)</span>
+<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4267)</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span>
+<a name="l00051"></a>00051 <span class="keyword">namespace </span>tbb {
+<a name="l00052"></a>00052 
+<a name="l00053"></a>00053 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A = cache_aligned_allocator<T> >
+<a name="l00054"></a>00054 <span class="keyword">class </span>concurrent_vector;
+<a name="l00055"></a>00055 
+<a name="l00056"></a>00056 
+<a name="l00058"></a>00058 <span class="keyword">namespace </span>internal {
+<a name="l00059"></a>00059 
+<a name="l00061"></a>00061     <span class="keyword">static</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> vector_allocation_error_flag = reinterpret_cast<void*>(size_t(63));
+<a name="l00063"></a>00063     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC itt_load_pointer_v3( <span class="keyword">const</span> <span class="keywordtype">void</span>* src );
+<a name="l00064"></a>00064 
+<a name="l00066"></a>00066 
+<a name="l00067"></a>00067     <span class="keyword">class </span>concurrent_vector_base_v3 {
+<a name="l00068"></a>00068     <span class="keyword">protected</span>:
+<a name="l00069"></a>00069 
+<a name="l00070"></a>00070         <span class="comment">// Basic types declarations</span>
+<a name="l00071"></a>00071         <span class="keyword">typedef</span> size_t segment_index_t;
+<a name="l00072"></a>00072         <span class="keyword">typedef</span> size_t size_type;
+<a name="l00073"></a>00073 
+<a name="l00074"></a>00074         <span class="comment">// Using enumerations due to Mac linking problems of static const variables</span>
+<a name="l00075"></a>00075         <span class="keyword">enum</span> {
+<a name="l00076"></a>00076             <span class="comment">// Size constants</span>
+<a name="l00077"></a>00077             default_initial_segments = 1, <span class="comment">// 2 initial items</span>
+<a name="l00079"></a>00079 <span class="comment"></span>            pointers_per_short_table = 3, <span class="comment">// to fit into 8 words of entire structure</span>
+<a name="l00080"></a>00080             pointers_per_long_table = <span class="keyword">sizeof</span>(segment_index_t) * 8 <span class="comment">// one segment per bit</span>
+<a name="l00081"></a>00081         };
+<a name="l00082"></a>00082 
+<a name="l00083"></a>00083         <span class="comment">// Segment pointer. Can be zero-initialized</span>
+<a name="l00084"></a>00084         <span class="keyword">struct </span>segment_t {
+<a name="l00085"></a>00085             <span class="keywordtype">void</span>* array;
+<a name="l00086"></a>00086 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00087"></a>00087 <span class="preprocessor"></span>            ~segment_t() {
+<a name="l00088"></a>00088                 __TBB_ASSERT( array <= internal::vector_allocation_error_flag, <span class="stringliteral">"should have been freed by clear"</span> );
+<a name="l00089"></a>00089             }
+<a name="l00090"></a>00090 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00091"></a>00091         };
+<a name="l00092"></a>00092  
+<a name="l00093"></a>00093         <span class="comment">// Data fields</span>
+<a name="l00094"></a>00094 
+<a name="l00096"></a>00096         <span class="keywordtype">void</span>* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t);
+<a name="l00097"></a>00097 
+<a name="l00099"></a>00099         atomic<size_type> my_first_block;
+<a name="l00100"></a>00100 
+<a name="l00102"></a>00102         atomic<size_type> my_early_size;
+<a name="l00103"></a>00103 
+<a name="l00105"></a>00105         atomic<segment_t*> my_segment;
+<a name="l00106"></a>00106 
+<a name="l00108"></a>00108         segment_t my_storage[pointers_per_short_table];
+<a name="l00109"></a>00109 
+<a name="l00110"></a>00110         <span class="comment">// Methods</span>
+<a name="l00111"></a>00111 
+<a name="l00112"></a>00112         concurrent_vector_base_v3() {
+<a name="l00113"></a>00113             my_early_size = 0;
+<a name="l00114"></a>00114             my_first_block = 0; <span class="comment">// here is not default_initial_segments</span>
+<a name="l00115"></a>00115             <span class="keywordflow">for</span>( segment_index_t i = 0; i < pointers_per_short_table; i++)
+<a name="l00116"></a>00116                 my_storage[i].array = NULL;
+<a name="l00117"></a>00117             my_segment = my_storage;
+<a name="l00118"></a>00118         }
+<a name="l00119"></a>00119         __TBB_EXPORTED_METHOD ~concurrent_vector_base_v3();
+<a name="l00120"></a>00120 
+<a name="l00121"></a>00121         <span class="keyword">static</span> segment_index_t segment_index_of( size_type index ) {
+<a name="l00122"></a>00122             <span class="keywordflow">return</span> segment_index_t( __TBB_Log2( index|1 ) );
+<a name="l00123"></a>00123         }
+<a name="l00124"></a>00124 
+<a name="l00125"></a>00125         <span class="keyword">static</span> segment_index_t segment_base( segment_index_t k ) {
+<a name="l00126"></a>00126             <span class="keywordflow">return</span> (segment_index_t(1)<<k & ~segment_index_t(1));
+<a name="l00127"></a>00127         }
+<a name="l00128"></a>00128 
+<a name="l00129"></a>00129         <span class="keyword">static</span> <span class="keyword">inline</span> segment_index_t segment_base_index_of( segment_index_t &index ) {
+<a name="l00130"></a>00130             segment_index_t k = segment_index_of( index );
+<a name="l00131"></a>00131             index -= segment_base(k);
+<a name="l00132"></a>00132             <span class="keywordflow">return</span> k;
+<a name="l00133"></a>00133         }
+<a name="l00134"></a>00134 
+<a name="l00135"></a>00135         <span class="keyword">static</span> size_type segment_size( segment_index_t k ) {
+<a name="l00136"></a>00136             <span class="keywordflow">return</span> segment_index_t(1)<<k; <span class="comment">// fake value for k==0</span>
+<a name="l00137"></a>00137         }
+<a name="l00138"></a>00138 
+<a name="l00140"></a>00140         <span class="keyword">typedef</span> void (__TBB_EXPORTED_FUNC *internal_array_op1)(<span class="keywordtype">void</span>* begin, size_type n );
+<a name="l00141"></a>00141 
+<a name="l00143"></a>00143         <span class="keyword">typedef</span> void (__TBB_EXPORTED_FUNC *internal_array_op2)(<span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+<a name="l00144"></a>00144 
+<a name="l00146"></a>00146         <span class="keyword">struct </span>internal_segments_table {
+<a name="l00147"></a>00147             segment_index_t first_block;
+<a name="l00148"></a>00148             <span class="keywordtype">void</span>* table[pointers_per_long_table];
+<a name="l00149"></a>00149         };
+<a name="l00150"></a>00150 
+<a name="l00151"></a>00151         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_reserve( size_type n, size_type element_size, size_type max_size );
+<a name="l00152"></a>00152         size_type __TBB_EXPORTED_METHOD internal_capacity() <span class="keyword">const</span>;
+<a name="l00153"></a>00153         <span class="keywordtype">void</span> internal_grow( size_type start, size_type finish, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
+<a name="l00154"></a>00154         size_type __TBB_EXPORTED_METHOD internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
+<a name="l00155"></a>00155         <span class="keywordtype">void</span>* __TBB_EXPORTED_METHOD internal_push_back( size_type element_size, size_type& index );
+<a name="l00156"></a>00156         segment_index_t __TBB_EXPORTED_METHOD internal_clear( internal_array_op1 destroy );
+<a name="l00157"></a>00157         <span class="keywordtype">void</span>* __TBB_EXPORTED_METHOD internal_compact( size_type element_size, <span class="keywordtype">void</span> *table, internal_array_op1 destroy, internal_array_op2 copy );
+<a name="l00158"></a>00158         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_copy( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy );
+<a name="l00159"></a>00159         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_assign( <span class="keyword">const</span> concurrent_vector_base_v3& src, size_type element_size,
+<a name="l00160"></a>00160                               internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy );
+<a name="l00161"></a>00161         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_throw_exception(size_type) <span class="keyword">const</span>;
+<a name="l00162"></a>00162         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_swap(concurrent_vector_base_v3& v);
+<a name="l00163"></a>00163 
+<a name="l00164"></a>00164         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_resize( size_type n, size_type element_size, size_type max_size, <span class="keyword">const</span> <span class="keywordtype">void</span> *src,
+<a name="l00165"></a>00165                                                     internal_array_op1 destroy, internal_array_op2 init );
+<a name="l00166"></a>00166         size_type __TBB_EXPORTED_METHOD internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
+<a name="l00167"></a>00167 
+<a name="l00169"></a>00169         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, <span class="keyword">const</span> <span class="keywordtype">void</span> *src );
+<a name="l00170"></a>00170 <span class="keyword">private</span>:
+<a name="l00172"></a>00172         <span class="keyword">class </span>helper;
+<a name="l00173"></a>00173         <span class="keyword">friend</span> <span class="keyword">class </span>helper;
+<a name="l00174"></a>00174     };
+<a name="l00175"></a>00175     
+<a name="l00176"></a>00176     <span class="keyword">typedef</span> concurrent_vector_base_v3 concurrent_vector_base;
+<a name="l00177"></a>00177 
+<a name="l00179"></a>00179 
+<a name="l00181"></a>00181     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> Value>
+<a name="l00182"></a>00182     <span class="keyword">class </span>vector_iterator 
+<a name="l00183"></a>00183     {
+<a name="l00185"></a>00185         Container* my_vector;
+<a name="l00186"></a>00186 
+<a name="l00188"></a>00188         size_t my_index;
+<a name="l00189"></a>00189 
+<a name="l00191"></a>00191 
+<a name="l00192"></a>00192         <span class="keyword">mutable</span> Value* my_item;
+<a name="l00193"></a>00193 
+<a name="l00194"></a>00194         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T>
+<a name="l00195"></a>00195         <span class="keyword">friend</span> vector_iterator<C,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<C,T>& v );
+<a name="l00196"></a>00196 
+<a name="l00197"></a>00197         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00198"></a>00198         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
+<a name="l00199"></a>00199 
+<a name="l00200"></a>00200         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00201"></a>00201         <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator<( const vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
+<a name="l00202"></a>00202 
+<a name="l00203"></a>00203         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00204"></a>00204         <span class="keyword">friend</span> ptrdiff_t operator-( <span class="keyword">const</span> vector_iterator<C,T>& i, <span class="keyword">const</span> vector_iterator<C,U>& j );
+<a name="l00205"></a>00205     
+<a name="l00206"></a>00206         <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+<a name="l00207"></a>00207         <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
+<a name="l00208"></a>00208 
+<a name="l00209"></a>00209 <span class="preprocessor">#if !defined(_MSC_VER) || defined(__INTEL_COMPILER)</span>
+<a name="l00210"></a>00210 <span class="preprocessor"></span>        <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00211"></a>00211         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00136.html">tbb::concurrent_vector</a>;
+<a name="l00212"></a>00212 <span class="preprocessor">#else</span>
+<a name="l00213"></a>00213 <span class="preprocessor"></span><span class="keyword">public</span>: <span class="comment">// workaround for MSVC</span>
+<a name="l00214"></a>00214 <span class="preprocessor">#endif </span>
+<a name="l00215"></a>00215 <span class="preprocessor"></span>
+<a name="l00216"></a>00216         vector_iterator( <span class="keyword">const</span> Container& vector, size_t index, <span class="keywordtype">void</span> *ptr = 0 ) : 
+<a name="l00217"></a>00217             my_vector(const_cast<Container*>(&vector)), 
+<a name="l00218"></a>00218             my_index(index), 
+<a name="l00219"></a>00219             my_item(static_cast<Value*>(ptr))
+<a name="l00220"></a>00220         {}
+<a name="l00221"></a>00221 
+<a name="l00222"></a>00222     <span class="keyword">public</span>:
+<a name="l00224"></a>00224         vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {}
+<a name="l00225"></a>00225 
+<a name="l00226"></a>00226         vector_iterator( <span class="keyword">const</span> vector_iterator<Container,typename Container::value_type>& other ) :
+<a name="l00227"></a>00227             my_vector(other.my_vector),
+<a name="l00228"></a>00228             my_index(other.my_index),
+<a name="l00229"></a>00229             my_item(other.my_item)
+<a name="l00230"></a>00230         {}
+<a name="l00231"></a>00231 
+<a name="l00232"></a>00232         vector_iterator operator+( ptrdiff_t offset )<span class="keyword"> const </span>{
+<a name="l00233"></a>00233             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index+offset );
+<a name="l00234"></a>00234         }
+<a name="l00235"></a>00235         vector_iterator &operator+=( ptrdiff_t offset ) {
+<a name="l00236"></a>00236             my_index+=offset;
+<a name="l00237"></a>00237             my_item = NULL;
+<a name="l00238"></a>00238             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00239"></a>00239         }
+<a name="l00240"></a>00240         vector_iterator operator-( ptrdiff_t offset )<span class="keyword"> const </span>{
+<a name="l00241"></a>00241             <span class="keywordflow">return</span> vector_iterator( *my_vector, my_index-offset );
+<a name="l00242"></a>00242         }
+<a name="l00243"></a>00243         vector_iterator &operator-=( ptrdiff_t offset ) {
+<a name="l00244"></a>00244             my_index-=offset;
+<a name="l00245"></a>00245             my_item = NULL;
+<a name="l00246"></a>00246             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00247"></a>00247         }
+<a name="l00248"></a>00248         Value& operator*()<span class="keyword"> const </span>{
+<a name="l00249"></a>00249             Value* item = my_item;
+<a name="l00250"></a>00250             <span class="keywordflow">if</span>( !item ) {
+<a name="l00251"></a>00251                 item = my_item = &my_vector->internal_subscript(my_index);
+<a name="l00252"></a>00252             }
+<a name="l00253"></a>00253             __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), <span class="stringliteral">"corrupt cache"</span> );
+<a name="l00254"></a>00254             <span class="keywordflow">return</span> *item;
+<a name="l00255"></a>00255         }
+<a name="l00256"></a>00256         Value& <a class="code" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">operator[]</a>( ptrdiff_t k )<span class="keyword"> const </span>{
+<a name="l00257"></a>00257             <span class="keywordflow">return</span> my_vector->internal_subscript(my_index+k);
+<a name="l00258"></a>00258         }
+<a name="l00259"></a>00259         Value* operator->()<span class="keyword"> const </span>{<span class="keywordflow">return</span> &operator*();}
+<a name="l00260"></a>00260 
+<a name="l00262"></a>00262         vector_iterator& operator++() {
+<a name="l00263"></a>00263             size_t k = ++my_index;
+<a name="l00264"></a>00264             <span class="keywordflow">if</span>( my_item ) {
+<a name="l00265"></a>00265                 <span class="comment">// Following test uses 2's-complement wizardry</span>
+<a name="l00266"></a>00266                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
+<a name="l00267"></a>00267                     <span class="comment">// k is a power of two that is at least k-2</span>
+<a name="l00268"></a>00268                     my_item= NULL;
+<a name="l00269"></a>00269                 } <span class="keywordflow">else</span> {
+<a name="l00270"></a>00270                     ++my_item;
+<a name="l00271"></a>00271                 }
+<a name="l00272"></a>00272             }
+<a name="l00273"></a>00273             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00274"></a>00274         }
+<a name="l00275"></a>00275 
+<a name="l00277"></a>00277         vector_iterator& operator--() {
+<a name="l00278"></a>00278             __TBB_ASSERT( my_index>0, <span class="stringliteral">"operator--() applied to iterator already at beginning of concurrent_vector"</span> ); 
+<a name="l00279"></a>00279             size_t k = my_index--;
+<a name="l00280"></a>00280             <span class="keywordflow">if</span>( my_item ) {
+<a name="l00281"></a>00281                 <span class="comment">// Following test uses 2's-complement wizardry</span>
+<a name="l00282"></a>00282                 <span class="keywordflow">if</span>( (k& (k-2))==0 ) {
+<a name="l00283"></a>00283                     <span class="comment">// k is a power of two that is at least k-2  </span>
+<a name="l00284"></a>00284                     my_item= NULL;
+<a name="l00285"></a>00285                 } <span class="keywordflow">else</span> {
+<a name="l00286"></a>00286                     --my_item;
+<a name="l00287"></a>00287                 }
+<a name="l00288"></a>00288             }
+<a name="l00289"></a>00289             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00290"></a>00290         }
+<a name="l00291"></a>00291 
+<a name="l00293"></a>00293         vector_iterator operator++(<span class="keywordtype">int</span>) {
+<a name="l00294"></a>00294             vector_iterator result = *<span class="keyword">this</span>;
+<a name="l00295"></a>00295             operator++();
+<a name="l00296"></a>00296             <span class="keywordflow">return</span> result;
+<a name="l00297"></a>00297         }
+<a name="l00298"></a>00298 
+<a name="l00300"></a>00300         vector_iterator operator--(<span class="keywordtype">int</span>) {
+<a name="l00301"></a>00301             vector_iterator result = *<span class="keyword">this</span>;
+<a name="l00302"></a>00302             operator--();
+<a name="l00303"></a>00303             <span class="keywordflow">return</span> result;
+<a name="l00304"></a>00304         }
+<a name="l00305"></a>00305 
+<a name="l00306"></a>00306         <span class="comment">// STL support</span>
+<a name="l00307"></a>00307 
+<a name="l00308"></a>00308         <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00309"></a>00309         <span class="keyword">typedef</span> Value value_type;
+<a name="l00310"></a>00310         <span class="keyword">typedef</span> Value* pointer;
+<a name="l00311"></a>00311         <span class="keyword">typedef</span> Value& reference;
+<a name="l00312"></a>00312         <span class="keyword">typedef</span> std::random_access_iterator_tag iterator_category;
+<a name="l00313"></a>00313     };
+<a name="l00314"></a>00314 
+<a name="l00315"></a>00315     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T>
+<a name="l00316"></a>00316     vector_iterator<Container,T> operator+( ptrdiff_t offset, <span class="keyword">const</span> vector_iterator<Container,T>& v ) {
+<a name="l00317"></a>00317         <span class="keywordflow">return</span> vector_iterator<Container,T>( *v.my_vector, v.my_index+offset );
+<a name="l00318"></a>00318     }
+<a name="l00319"></a>00319 
+<a name="l00320"></a>00320     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00321"></a>00321     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00322"></a>00322         <span class="keywordflow">return</span> i.my_index==j.my_index && i.my_vector == j.my_vector;
+<a name="l00323"></a>00323     }
+<a name="l00324"></a>00324 
+<a name="l00325"></a>00325     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00326"></a>00326     <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00327"></a>00327         <span class="keywordflow">return</span> !(i==j);
+<a name="l00328"></a>00328     }
+<a name="l00329"></a>00329 
+<a name="l00330"></a>00330     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00331"></a>00331     <span class="keywordtype">bool</span> operator<( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00332"></a>00332         <span class="keywordflow">return</span> i.my_index<j.my_index;
+<a name="l00333"></a>00333     }
+<a name="l00334"></a>00334 
+<a name="l00335"></a>00335     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00336"></a>00336     <span class="keywordtype">bool</span> operator>( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00337"></a>00337         <span class="keywordflow">return</span> j<i;
+<a name="l00338"></a>00338     }
+<a name="l00339"></a>00339 
+<a name="l00340"></a>00340     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00341"></a>00341     <span class="keywordtype">bool</span> operator>=( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00342"></a>00342         <span class="keywordflow">return</span> !(i<j);
+<a name="l00343"></a>00343     }
+<a name="l00344"></a>00344 
+<a name="l00345"></a>00345     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00346"></a>00346     <span class="keywordtype">bool</span> operator<=( const vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00347"></a>00347         <span class="keywordflow">return</span> !(j<i);
+<a name="l00348"></a>00348     }
+<a name="l00349"></a>00349 
+<a name="l00350"></a>00350     <span class="keyword">template</span><<span class="keyword">typename</span> Container, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00351"></a>00351     ptrdiff_t operator-( <span class="keyword">const</span> vector_iterator<Container,T>& i, <span class="keyword">const</span> vector_iterator<Container,U>& j ) {
+<a name="l00352"></a>00352         <span class="keywordflow">return</span> ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index);
+<a name="l00353"></a>00353     }
+<a name="l00354"></a>00354 
+<a name="l00355"></a>00355     <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00356"></a>00356     <span class="keyword">class </span>allocator_base {
+<a name="l00357"></a>00357     <span class="keyword">public</span>:
+<a name="l00358"></a>00358         <span class="keyword">typedef</span> <span class="keyword">typename</span> A::template
+<a name="l00359"></a>00359             rebind<T>::other allocator_type;
+<a name="l00360"></a>00360         allocator_type my_allocator;
+<a name="l00361"></a>00361 
+<a name="l00362"></a>00362         allocator_base(<span class="keyword">const</span> allocator_type &a = allocator_type() ) : my_allocator(a) {}
+<a name="l00363"></a>00363     };
+<a name="l00364"></a>00364 
+<a name="l00365"></a>00365 } <span class="comment">// namespace internal</span>
+<a name="l00367"></a>00367 <span class="comment"></span>
+<a name="l00369"></a>00369 
+<a name="l00430"></a>00430 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00431"></a><a class="code" href="a00136.html">00431</a> <span class="keyword">class </span><a class="code" href="a00136.html">concurrent_vector</a>: <span class="keyword">protected</span> internal::allocator_base<T, A>,
+<a name="l00432"></a>00432                          <span class="keyword">private</span> internal::concurrent_vector_base {
+<a name="l00433"></a>00433 <span class="keyword">private</span>:
+<a name="l00434"></a>00434     <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00435"></a>00435     <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00122.html">blocked_range</a><I> {
+<a name="l00436"></a>00436     <span class="keyword">public</span>:
+<a name="l00437"></a>00437         <span class="keyword">typedef</span> T value_type;
+<a name="l00438"></a>00438         <span class="keyword">typedef</span> T& reference;
+<a name="l00439"></a>00439         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+<a name="l00440"></a>00440         <span class="keyword">typedef</span> I iterator;
+<a name="l00441"></a>00441         <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00442"></a>00442         generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00122.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
+<a name="l00443"></a>00443         template<typename U>
+<a name="l00444"></a>00444         generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00122.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
+<a name="l00445"></a>00445         generic_range_type( generic_range_type& r, <a class="code" href="a00165.html">split</a> ) : <a class="code" href="a00122.html">blocked_range<I></a>(r,<a class="code" href="a00165.html">split</a>()) {}
+<a name="l00446"></a>00446     };
+<a name="l00447"></a>00447 
+<a name="l00448"></a>00448     <span class="keyword">template</span><<span class="keyword">typename</span> C, <span class="keyword">typename</span> U>
+<a name="l00449"></a>00449     <span class="keyword">friend</span> <span class="keyword">class </span>internal::vector_iterator;
+<a name="l00450"></a>00450 <span class="keyword">public</span>:
+<a name="l00451"></a>00451     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00452"></a>00452     <span class="comment">// STL compatible types</span>
+<a name="l00453"></a>00453     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00454"></a>00454     <span class="keyword">typedef</span> internal::concurrent_vector_base_v3::size_type size_type;
+<a name="l00455"></a>00455     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_base<T, A>::allocator_type allocator_type;
+<a name="l00456"></a>00456 
+<a name="l00457"></a>00457     <span class="keyword">typedef</span> T value_type;
+<a name="l00458"></a>00458     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00459"></a>00459     <span class="keyword">typedef</span> T& reference;
+<a name="l00460"></a>00460     <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+<a name="l00461"></a>00461     <span class="keyword">typedef</span> T *pointer;
+<a name="l00462"></a>00462     <span class="keyword">typedef</span> <span class="keyword">const</span> T *const_pointer;
+<a name="l00463"></a>00463 
+<a name="l00464"></a>00464     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,T> iterator;
+<a name="l00465"></a>00465     <span class="keyword">typedef</span> internal::vector_iterator<concurrent_vector,const T> const_iterator;
+<a name="l00466"></a>00466 
+<a name="l00467"></a>00467 <span class="preprocessor">#if !defined(_MSC_VER) || _CPPLIB_VER>=300 </span>
+<a name="l00468"></a>00468 <span class="preprocessor"></span>    <span class="comment">// Assume ISO standard definition of std::reverse_iterator</span>
+<a name="l00469"></a>00469     <span class="keyword">typedef</span> std::reverse_iterator<iterator> reverse_iterator;
+<a name="l00470"></a>00470     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator> const_reverse_iterator;
+<a name="l00471"></a>00471 <span class="preprocessor">#else</span>
+<a name="l00472"></a>00472 <span class="preprocessor"></span>    <span class="comment">// Use non-standard std::reverse_iterator</span>
+<a name="l00473"></a>00473     <span class="keyword">typedef</span> std::reverse_iterator<iterator,T,T&,T*> reverse_iterator;
+<a name="l00474"></a>00474     <span class="keyword">typedef</span> std::reverse_iterator<const_iterator,T,const T&,const T*> const_reverse_iterator;
+<a name="l00475"></a>00475 <span class="preprocessor">#endif </span><span class="comment">/* defined(_MSC_VER) && (_MSC_VER<1300) */</span>
+<a name="l00476"></a>00476 
+<a name="l00477"></a>00477     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00478"></a>00478     <span class="comment">// Parallel algorithm support</span>
+<a name="l00479"></a>00479     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00480"></a>00480     <span class="keyword">typedef</span> generic_range_type<iterator> range_type;
+<a name="l00481"></a>00481     <span class="keyword">typedef</span> generic_range_type<const_iterator> const_range_type;
+<a name="l00482"></a>00482 
+<a name="l00483"></a>00483     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00484"></a>00484     <span class="comment">// STL compatible constructors & destructors</span>
+<a name="l00485"></a>00485     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00486"></a>00486 
+<a name="l00488"></a><a class="code" href="a00136.html#2c8ca9cabfcd30ad5943324c853664b5">00488</a>     <span class="keyword">explicit</span> <a class="code" href="a00136.html">concurrent_vector</a>(<span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00489"></a>00489         : internal::allocator_base<T, A>(a)
+<a name="l00490"></a>00490     {
+<a name="l00491"></a>00491         vector_allocator_ptr = &internal_allocator;
+<a name="l00492"></a>00492     }
+<a name="l00493"></a>00493 
+<a name="l00495"></a><a class="code" href="a00136.html#dd8a200b99a8088435a37934b58fe335">00495</a>     <a class="code" href="a00136.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector</a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
+<a name="l00496"></a>00496         : internal::allocator_base<T, A>(a)
+<a name="l00497"></a>00497     {
+<a name="l00498"></a>00498         vector_allocator_ptr = &internal_allocator;
+<a name="l00499"></a>00499         <span class="keywordflow">try</span> {
+<a name="l00500"></a>00500             internal_copy(vector, <span class="keyword">sizeof</span>(T), &copy_array);
+<a name="l00501"></a>00501         } <span class="keywordflow">catch</span>(...) {
+<a name="l00502"></a>00502             segment_t *table = my_segment;
+<a name="l00503"></a>00503             internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00504"></a>00504             <span class="keywordflow">throw</span>;
+<a name="l00505"></a>00505         }
+<a name="l00506"></a>00506     }
+<a name="l00507"></a>00507 
+<a name="l00509"></a>00509     <span class="keyword">template</span><<span class="keyword">class</span> M>
+<a name="l00510"></a><a class="code" href="a00136.html#64432f13f7b29bfe4acfb5568f34f3a8">00510</a>     <a class="code" href="a00136.html">concurrent_vector</a>( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector<T, M></a>& vector, <span class="keyword">const</span> allocator_type& a = allocator_type() )
+<a name="l00511"></a>00511         : internal::allocator_base<T, A>(a)
+<a name="l00512"></a>00512     {
+<a name="l00513"></a>00513         vector_allocator_ptr = &internal_allocator;
+<a name="l00514"></a>00514         <span class="keywordflow">try</span> {
+<a name="l00515"></a>00515             internal_copy(vector.<a class="code" href="a00136.html#bb5ae659871478f1f5c68039e1273e12">internal_vector_base</a>(), <span class="keyword">sizeof</span>(T), &copy_array);
+<a name="l00516"></a>00516         } <span class="keywordflow">catch</span>(...) {
+<a name="l00517"></a>00517             segment_t *table = my_segment;
+<a name="l00518"></a>00518             internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00519"></a>00519             <span class="keywordflow">throw</span>;
+<a name="l00520"></a>00520         }
+<a name="l00521"></a>00521     }
+<a name="l00522"></a>00522 
+<a name="l00524"></a><a class="code" href="a00136.html#2a2e261dfe1cab3f73f7b1a94137cfca">00524</a>     <span class="keyword">explicit</span> <a class="code" href="a00136.html">concurrent_vector</a>(size_type n)
+<a name="l00525"></a>00525     {
+<a name="l00526"></a>00526         vector_allocator_ptr = &internal_allocator;
+<a name="l00527"></a>00527         <span class="keywordflow">try</span> {
+<a name="l00528"></a>00528             internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), NULL, &destroy_array, &initialize_array );
+<a name="l00529"></a>00529         } <span class="keywordflow">catch</span>(...) {
+<a name="l00530"></a>00530             segment_t *table = my_segment;
+<a name="l00531"></a>00531             internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00532"></a>00532             <span class="keywordflow">throw</span>;
+<a name="l00533"></a>00533         }
+<a name="l00534"></a>00534     }
+<a name="l00535"></a>00535 
+<a name="l00537"></a><a class="code" href="a00136.html#3883a8a908b44e249a57f454de3f55d8">00537</a>     <a class="code" href="a00136.html">concurrent_vector</a>(size_type n, const_reference t, <span class="keyword">const</span> allocator_type& a = allocator_type())
+<a name="l00538"></a>00538         : internal::allocator_base<T, A>(a)
+<a name="l00539"></a>00539     {
+<a name="l00540"></a>00540         vector_allocator_ptr = &internal_allocator;
+<a name="l00541"></a>00541         <span class="keywordflow">try</span> {
+<a name="l00542"></a>00542             internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+<a name="l00543"></a>00543         } <span class="keywordflow">catch</span>(...) {
+<a name="l00544"></a>00544             segment_t *table = my_segment;
+<a name="l00545"></a>00545             internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00546"></a>00546             <span class="keywordflow">throw</span>;
+<a name="l00547"></a>00547         }
+<a name="l00548"></a>00548     }
+<a name="l00549"></a>00549 
+<a name="l00551"></a>00551     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00552"></a><a class="code" href="a00136.html#4450de83c5862ea4bcd9443fd7e67419">00552</a>     <a class="code" href="a00136.html">concurrent_vector</a>(I first, I last, <span class="keyword">const</span> allocator_type &a = allocator_type())
+<a name="l00553"></a>00553         : internal::allocator_base<T, A>(a)
+<a name="l00554"></a>00554     {
+<a name="l00555"></a>00555         vector_allocator_ptr = &internal_allocator;
+<a name="l00556"></a>00556         <span class="keywordflow">try</span> {
+<a name="l00557"></a>00557             internal_assign_range(first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+<a name="l00558"></a>00558         } <span class="keywordflow">catch</span>(...) {
+<a name="l00559"></a>00559             segment_t *table = my_segment;
+<a name="l00560"></a>00560             internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00561"></a>00561             <span class="keywordflow">throw</span>;
+<a name="l00562"></a>00562         }
+<a name="l00563"></a>00563     }
+<a name="l00564"></a>00564 
+<a name="l00566"></a><a class="code" href="a00136.html#691f0f3cda3e489c37a657016e375eaf">00566</a>     <a class="code" href="a00136.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector</a>& vector ) {
+<a name="l00567"></a>00567         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector )
+<a name="l00568"></a>00568             internal_assign(vector, <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
+<a name="l00569"></a>00569         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00570"></a>00570     }
+<a name="l00571"></a>00571 
+<a name="l00573"></a>00573     <span class="keyword">template</span><<span class="keyword">class</span> M>
+<a name="l00574"></a><a class="code" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">00574</a>     <a class="code" href="a00136.html">concurrent_vector</a>& operator=( <span class="keyword">const</span> <a class="code" href="a00136.html">concurrent_vector<T, M></a>& vector ) {
+<a name="l00575"></a>00575         <span class="keywordflow">if</span>( static_cast<void*>( <span class="keyword">this</span> ) != static_cast<const void*>( &vector ) )
+<a name="l00576"></a>00576             internal_assign(vector.internal_vector_base(),
+<a name="l00577"></a>00577                 <span class="keyword">sizeof</span>(T), &destroy_array, &assign_array, &copy_array);
+<a name="l00578"></a>00578         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00579"></a>00579     }
+<a name="l00580"></a>00580 
+<a name="l00581"></a>00581     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00582"></a>00582     <span class="comment">// Concurrent operations</span>
+<a name="l00583"></a>00583     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00585"></a>00585 <span class="comment"></span><span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00586"></a>00586 <span class="preprocessor"></span>
+<a name="l00587"></a><a class="code" href="a00136.html#30484e3959892fd5392fa93c873c31f0">00587</a>     size_type grow_by( size_type delta ) {
+<a name="l00588"></a>00588         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size;
+<a name="l00589"></a>00589     }
+<a name="l00590"></a>00590 <span class="preprocessor">#else</span>
+<a name="l00591"></a>00591 <span class="preprocessor"></span>
+<a name="l00592"></a><a class="code" href="a00136.html#c8177b1865270ea68aa1ab9148e5e35e">00592</a>     iterator grow_by( size_type delta ) {
+<a name="l00593"></a>00593         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array, NULL ) : my_early_size);
+<a name="l00594"></a>00594     }
+<a name="l00595"></a>00595 <span class="preprocessor">#endif</span>
+<a name="l00596"></a>00596 <span class="preprocessor"></span>
+<a name="l00598"></a>00598 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00599"></a>00599 <span class="preprocessor"></span>
+<a name="l00600"></a><a class="code" href="a00136.html#38274ab3f772ecba600c7daca7690102">00600</a>     size_type grow_by( size_type delta, const_reference t ) {
+<a name="l00601"></a>00601         <span class="keywordflow">return</span> delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size;
+<a name="l00602"></a>00602     }
+<a name="l00603"></a>00603 <span class="preprocessor">#else</span>
+<a name="l00604"></a>00604 <span class="preprocessor"></span>
+<a name="l00605"></a><a class="code" href="a00136.html#473a59a4c9308b93411b898b3110d26c">00605</a>     iterator grow_by( size_type delta, const_reference t ) {
+<a name="l00606"></a>00606         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, delta ? internal_grow_by( delta, <span class="keyword">sizeof</span>(T), &initialize_array_by, static_cast<const void*>(&t) ) : my_early_size);
+<a name="l00607"></a>00607     }
+<a name="l00608"></a>00608 <span class="preprocessor">#endif</span>
+<a name="l00609"></a>00609 <span class="preprocessor"></span>
+<a name="l00611"></a>00611 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00612"></a>00612 <span class="preprocessor"></span>
+<a name="l00614"></a><a class="code" href="a00136.html#47fe588214dd5fa06ab6e8ab78d83874">00614</a>     <span class="keywordtype">void</span> grow_to_at_least( size_type n ) {
+<a name="l00615"></a>00615         <span class="keywordflow">if</span>( n ) internal_grow_to_at_least_with_result( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
+<a name="l00616"></a>00616     };
+<a name="l00617"></a>00617 <span class="preprocessor">#else</span>
+<a name="l00618"></a>00618 <span class="preprocessor"></span>
+<a name="l00622"></a><a class="code" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">00622</a>     iterator grow_to_at_least( size_type n ) {
+<a name="l00623"></a>00623         size_type m=0;
+<a name="l00624"></a>00624         <span class="keywordflow">if</span>( n ) {
+<a name="l00625"></a>00625             m = internal_grow_to_at_least_with_result( n, <span class="keyword">sizeof</span>(T), &initialize_array, NULL );
+<a name="l00626"></a>00626             <span class="keywordflow">if</span>( m>n ) m=n;
+<a name="l00627"></a>00627         }
+<a name="l00628"></a>00628         <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, m);
+<a name="l00629"></a>00629     };
+<a name="l00630"></a>00630 <span class="preprocessor">#endif</span>
+<a name="l00631"></a>00631 <span class="preprocessor"></span>
+<a name="l00633"></a>00633 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00634"></a><a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">00634</a> <span class="preprocessor"></span>    size_type push_back( const_reference item )
+<a name="l00635"></a>00635 <span class="preprocessor">#else</span>
+<a name="l00636"></a>00636 <span class="preprocessor"></span>
+<a name="l00637"></a>00637     iterator push_back( const_reference item )
+<a name="l00638"></a>00638 <span class="preprocessor">#endif</span>
+<a name="l00639"></a>00639 <span class="preprocessor"></span>    {
+<a name="l00640"></a>00640         size_type k;
+<a name="l00641"></a>00641         <span class="keywordtype">void</span> *ptr = internal_push_back(<span class="keyword">sizeof</span>(T),k);
+<a name="l00642"></a>00642         internal_loop_guide loop(1, ptr);
+<a name="l00643"></a>00643         loop.init(&item);
+<a name="l00644"></a>00644 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00645"></a>00645 <span class="preprocessor"></span>        <span class="keywordflow">return</span> k;
+<a name="l00646"></a>00646 <span class="preprocessor">#else</span>
+<a name="l00647"></a>00647 <span class="preprocessor"></span>        <span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>, k, ptr);
+<a name="l00648"></a>00648 <span class="preprocessor">#endif</span>
+<a name="l00649"></a>00649 <span class="preprocessor"></span>    }
+<a name="l00650"></a>00650 
+<a name="l00652"></a>00652 
+<a name="l00654"></a><a class="code" href="a00136.html#4c52f2950bb1832886bd4458eb09d7eb">00654</a>     reference operator[]( size_type index ) {
+<a name="l00655"></a>00655         <span class="keywordflow">return</span> internal_subscript(index);
+<a name="l00656"></a>00656     }
+<a name="l00657"></a>00657 
+<a name="l00659"></a><a class="code" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">00659</a>     const_reference operator[]( size_type index )<span class="keyword"> const </span>{
+<a name="l00660"></a>00660         <span class="keywordflow">return</span> internal_subscript(index);
+<a name="l00661"></a>00661     }
+<a name="l00662"></a>00662 
+<a name="l00664"></a><a class="code" href="a00136.html#0c073ca43e787c7cbf7b0e26d2221748">00664</a>     reference at( size_type index ) {
+<a name="l00665"></a>00665         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
+<a name="l00666"></a>00666     }
+<a name="l00667"></a>00667 
+<a name="l00669"></a><a class="code" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">00669</a>     const_reference at( size_type index )<span class="keyword"> const </span>{
+<a name="l00670"></a>00670         <span class="keywordflow">return</span> internal_subscript_with_exceptions(index);
+<a name="l00671"></a>00671     }
+<a name="l00672"></a>00672 
+<a name="l00674"></a><a class="code" href="a00136.html#a4c6ffff3bf08b92939aa2fc516edfba">00674</a>     range_type range( size_t grainsize = 1) {
+<a name="l00675"></a>00675         <span class="keywordflow">return</span> range_type( begin(), end(), grainsize );
+<a name="l00676"></a>00676     }
+<a name="l00677"></a>00677 
+<a name="l00679"></a><a class="code" href="a00136.html#3d09ccfb581b879ae64203741035e193">00679</a>     const_range_type range( size_t grainsize = 1 )<span class="keyword"> const </span>{
+<a name="l00680"></a>00680         <span class="keywordflow">return</span> const_range_type( begin(), end(), grainsize );
+<a name="l00681"></a>00681     }
+<a name="l00682"></a>00682     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00683"></a>00683     <span class="comment">// Capacity</span>
+<a name="l00684"></a>00684     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00686"></a><a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">00686</a> <span class="comment"></span>    size_type size()<span class="keyword"> const </span>{
+<a name="l00687"></a>00687         size_type sz = my_early_size, cp = internal_capacity();
+<a name="l00688"></a>00688         <span class="keywordflow">return</span> cp < sz ? cp : sz;
+<a name="l00689"></a>00689     }
+<a name="l00690"></a>00690 
+<a name="l00692"></a><a class="code" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">00692</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !my_early_size;}
+<a name="l00693"></a>00693 
+<a name="l00695"></a><a class="code" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">00695</a>     size_type capacity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> internal_capacity();}
+<a name="l00696"></a>00696 
+<a name="l00698"></a>00698 
+<a name="l00700"></a><a class="code" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">00700</a>     <span class="keywordtype">void</span> reserve( size_type n ) {
+<a name="l00701"></a>00701         <span class="keywordflow">if</span>( n )
+<a name="l00702"></a>00702             internal_reserve(n, <span class="keyword">sizeof</span>(T), max_size());
+<a name="l00703"></a>00703     }
+<a name="l00704"></a>00704 
+<a name="l00706"></a><a class="code" href="a00136.html#8dfb0cb0eef96d440b4dcf801807a718">00706</a>     <span class="keywordtype">void</span> resize( size_type n ) {
+<a name="l00707"></a>00707         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), NULL, &destroy_array, &initialize_array );
+<a name="l00708"></a>00708     }
+<a name="l00709"></a>00709     
+<a name="l00711"></a><a class="code" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">00711</a>     <span class="keywordtype">void</span> resize( size_type n, const_reference t ) {
+<a name="l00712"></a>00712         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+<a name="l00713"></a>00713     }
+<a name="l00714"></a>00714    
+<a name="l00715"></a>00715 <span class="preprocessor">#if TBB_DEPRECATED </span>
+<a name="l00717"></a><a class="code" href="a00136.html#1693d1da41b1a8235871be9c6633be35">00717</a> <span class="preprocessor">    void compact() {shrink_to_fit();}</span>
+<a name="l00718"></a>00718 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DEPRECATED */</span>
+<a name="l00719"></a>00719 
+<a name="l00721"></a>00721     <span class="keywordtype">void</span> shrink_to_fit();
+<a name="l00722"></a>00722 
+<a name="l00724"></a><a class="code" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">00724</a>     size_type max_size()<span class="keyword"> const </span>{<span class="keywordflow">return</span> (~size_type(0))/<span class="keyword">sizeof</span>(T);}
+<a name="l00725"></a>00725 
+<a name="l00726"></a>00726     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00727"></a>00727     <span class="comment">// STL support</span>
+<a name="l00728"></a>00728     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00729"></a>00729 
+<a name="l00731"></a><a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">00731</a>     iterator begin() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,0);}
+<a name="l00733"></a><a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">00733</a>     iterator end() {<span class="keywordflow">return</span> iterator(*<span class="keyword">this</span>,size());}
+<a name="l00735"></a><a class="code" href="a00136.html#78a06182276ff758788d4c0623ae0d71">00735</a>     const_iterator begin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
+<a name="l00737"></a><a class="code" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">00737</a>     const_iterator end()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,size());}
+<a name="l00739"></a><a class="code" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">00739</a>     const_iterator cbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,0);}
+<a name="l00741"></a><a class="code" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">00741</a>     const_iterator cend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_iterator(*<span class="keyword">this</span>,size());}
+<a name="l00743"></a><a class="code" href="a00136.html#5e220926d09236d98f04fe0721e5f9a1">00743</a>     reverse_iterator rbegin() {<span class="keywordflow">return</span> reverse_iterator(end());}
+<a name="l00745"></a><a class="code" href="a00136.html#290119a4eb43cd6a9e98fa17016ba3c2">00745</a>     reverse_iterator rend() {<span class="keywordflow">return</span> reverse_iterator(begin());}
+<a name="l00747"></a><a class="code" href="a00136.html#9f9c103e18d5f212703805354074ad44">00747</a>     const_reverse_iterator rbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
+<a name="l00749"></a><a class="code" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">00749</a>     const_reverse_iterator rend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
+<a name="l00751"></a><a class="code" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">00751</a>     const_reverse_iterator crbegin()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(end());}
+<a name="l00753"></a><a class="code" href="a00136.html#fff9cece89438587997ebedf93c5e962">00753</a>     const_reverse_iterator crend()<span class="keyword"> const </span>{<span class="keywordflow">return</span> const_reverse_iterator(begin());}
+<a name="l00755"></a><a class="code" href="a00136.html#15181759c0bfa2ddce5d10c7550e0002">00755</a>     reference front() {
+<a name="l00756"></a>00756         __TBB_ASSERT( size()>0, NULL);
+<a name="l00757"></a>00757         <span class="keywordflow">return</span> static_cast<T*>(my_segment[0].array)[0];
+<a name="l00758"></a>00758     }
+<a name="l00760"></a><a class="code" href="a00136.html#502615a858eb9fa0390ee59169065e90">00760</a>     const_reference front()<span class="keyword"> const </span>{
+<a name="l00761"></a>00761         __TBB_ASSERT( size()>0, NULL);
+<a name="l00762"></a>00762         <span class="keywordflow">return</span> static_cast<const T*>(my_segment[0].array)[0];
+<a name="l00763"></a>00763     }
+<a name="l00765"></a><a class="code" href="a00136.html#41ce48d6015a1a2812d41cf620ec3476">00765</a>     reference back() {
+<a name="l00766"></a>00766         __TBB_ASSERT( size()>0, NULL);
+<a name="l00767"></a>00767         <span class="keywordflow">return</span> internal_subscript( size()-1 );
+<a name="l00768"></a>00768     }
+<a name="l00770"></a><a class="code" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">00770</a>     const_reference back()<span class="keyword"> const </span>{
+<a name="l00771"></a>00771         __TBB_ASSERT( size()>0, NULL);
+<a name="l00772"></a>00772         <span class="keywordflow">return</span> internal_subscript( size()-1 );
+<a name="l00773"></a>00773     }
+<a name="l00775"></a><a class="code" href="a00136.html#2fdba8e90de6a4d2300222236d46758e">00775</a>     allocator_type get_allocator()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this->my_allocator; }
+<a name="l00776"></a>00776 
+<a name="l00778"></a><a class="code" href="a00136.html#423e5aa15e0e3309ad86d026fd85f6f6">00778</a>     <span class="keywordtype">void</span> assign(size_type n, const_reference t) {
+<a name="l00779"></a>00779         clear();
+<a name="l00780"></a>00780         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+<a name="l00781"></a>00781     }
+<a name="l00782"></a>00782 
+<a name="l00784"></a>00784     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00785"></a><a class="code" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">00785</a>     <span class="keywordtype">void</span> assign(I first, I last) {
+<a name="l00786"></a>00786         clear(); internal_assign_range( first, last, <span class="keyword">static_cast</span><is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+<a name="l00787"></a>00787     }
+<a name="l00788"></a>00788 
+<a name="l00790"></a><a class="code" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">00790</a>     <span class="keywordtype">void</span> swap(<a class="code" href="a00136.html">concurrent_vector</a> &vector) {
+<a name="l00791"></a>00791         <span class="keywordflow">if</span>( <span class="keyword">this</span> != &vector ) {
+<a name="l00792"></a>00792             concurrent_vector_base_v3::internal_swap(static_cast<concurrent_vector_base_v3&>(vector));
+<a name="l00793"></a>00793             std::swap(this->my_allocator, vector.my_allocator);
+<a name="l00794"></a>00794         }
+<a name="l00795"></a>00795     }
+<a name="l00796"></a>00796 
+<a name="l00798"></a>00798 
+<a name="l00799"></a><a class="code" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">00799</a>     <span class="keywordtype">void</span> clear() {
+<a name="l00800"></a>00800         internal_clear(&destroy_array);
+<a name="l00801"></a>00801     }
+<a name="l00802"></a>00802 
+<a name="l00804"></a><a class="code" href="a00136.html#da2444b28bb840d38f60d0030333a5fc">00804</a>     ~<a class="code" href="a00136.html">concurrent_vector</a>() {
+<a name="l00805"></a>00805         segment_t *table = my_segment;
+<a name="l00806"></a>00806         internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+<a name="l00807"></a>00807         <span class="comment">// base class destructor call should be then</span>
+<a name="l00808"></a>00808     }
+<a name="l00809"></a>00809 
+<a name="l00810"></a>00810     <span class="keyword">const</span> internal::concurrent_vector_base_v3 &internal_vector_base()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l00811"></a>00811 <span class="keyword">private</span>:
+<a name="l00813"></a>00813     <span class="keyword">static</span> <span class="keywordtype">void</span> *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) {
+<a name="l00814"></a>00814         <span class="keywordflow">return</span> static_cast<concurrent_vector<T, A>&>(vb).my_allocator.allocate(k);
+<a name="l00815"></a>00815     }
+<a name="l00817"></a>00817     <span class="keywordtype">void</span> internal_free_segments(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block);
+<a name="l00818"></a>00818 
+<a name="l00820"></a>00820     T& internal_subscript( size_type index ) <span class="keyword">const</span>;
+<a name="l00821"></a>00821 
+<a name="l00823"></a>00823     T& internal_subscript_with_exceptions( size_type index ) <span class="keyword">const</span>;
+<a name="l00824"></a>00824 
+<a name="l00826"></a>00826     <span class="keywordtype">void</span> internal_assign_n(size_type n, const_pointer p) {
+<a name="l00827"></a>00827         internal_resize( n, <span class="keyword">sizeof</span>(T), max_size(), static_cast<const void*>(p), &destroy_array, p? &initialize_array_by : &initialize_array );
+<a name="l00828"></a>00828     }
+<a name="l00829"></a>00829 
+<a name="l00831"></a>00831     <span class="keyword">template</span><<span class="keywordtype">bool</span> B> <span class="keyword">class </span>is_integer_tag;
+<a name="l00832"></a>00832 
+<a name="l00834"></a>00834     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00835"></a>00835     <span class="keywordtype">void</span> internal_assign_range(I first, I last, is_integer_tag<true> *) {
+<a name="l00836"></a>00836         internal_assign_n(static_cast<size_type>(first), &static_cast<T&>(last));
+<a name="l00837"></a>00837     }
+<a name="l00839"></a>00839     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00840"></a>00840     <span class="keywordtype">void</span> internal_assign_range(I first, I last, is_integer_tag<false> *) {
+<a name="l00841"></a>00841         internal_assign_iterators(first, last);
+<a name="l00842"></a>00842     }
+<a name="l00844"></a>00844     <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00845"></a>00845     <span class="keywordtype">void</span> internal_assign_iterators(I first, I last);
+<a name="l00846"></a>00846 
+<a name="l00848"></a>00848     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC initialize_array( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>*, size_type n );
+<a name="l00849"></a>00849 
+<a name="l00851"></a>00851     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC initialize_array_by( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+<a name="l00852"></a>00852 
+<a name="l00854"></a>00854     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC copy_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+<a name="l00855"></a>00855 
+<a name="l00857"></a>00857     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC assign_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n );
+<a name="l00858"></a>00858 
+<a name="l00860"></a>00860     <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC destroy_array( <span class="keywordtype">void</span>* begin, size_type n );
+<a name="l00861"></a>00861 
+<a name="l00863"></a>00863     <span class="keyword">class </span>internal_loop_guide : internal::no_copy {
+<a name="l00864"></a>00864     <span class="keyword">public</span>:
+<a name="l00865"></a>00865         <span class="keyword">const</span> pointer array;
+<a name="l00866"></a>00866         <span class="keyword">const</span> size_type n;
+<a name="l00867"></a>00867         size_type i;
+<a name="l00868"></a>00868         internal_loop_guide(size_type ntrials, <span class="keywordtype">void</span> *ptr)
+<a name="l00869"></a>00869             : array(static_cast<pointer>(ptr)), n(ntrials), i(0) {}
+<a name="l00870"></a>00870         <span class="keywordtype">void</span> init() {   <span class="keywordflow">for</span>(; i < n; ++i) <span class="keyword">new</span>( &array[i] ) T(); }
+<a name="l00871"></a>00871         <span class="keywordtype">void</span> init(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) new( &array[i] ) T(*static_cast<const T*>(src)); }
+<a name="l00872"></a>00872         <span class="keywordtype">void</span> copy(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) new( &array[i] ) T(static_cast<const T*>(src)[i]); }
+<a name="l00873"></a>00873         <span class="keywordtype">void</span> assign(<span class="keyword">const</span> <span class="keywordtype">void</span> *src) { <span class="keywordflow">for</span>(; i < n; ++i) array[i] = static_cast<const T*>(src)[i]; }
+<a name="l00874"></a>00874         <span class="keyword">template</span><<span class="keyword">class</span> I> <span class="keywordtype">void</span> iterate(I &src) { <span class="keywordflow">for</span>(; i < n; ++i, ++src) <span class="keyword">new</span>( &array[i] ) T( *src ); }
+<a name="l00875"></a>00875         ~internal_loop_guide() {
+<a name="l00876"></a>00876             <span class="keywordflow">if</span>(i < n) <span class="comment">// if exception raised, do zerroing on the rest of items</span>
+<a name="l00877"></a>00877                 std::memset(array+i, 0, (n-i)*<span class="keyword">sizeof</span>(value_type));
+<a name="l00878"></a>00878         }
+<a name="l00879"></a>00879     };
+<a name="l00880"></a>00880 };
+<a name="l00881"></a>00881 
+<a name="l00882"></a>00882 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00883"></a><a class="code" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">00883</a> <span class="keywordtype">void</span> <a class="code" href="a00136.html">concurrent_vector<T, A>::shrink_to_fit</a>() {
+<a name="l00884"></a>00884     internal_segments_table old;
+<a name="l00885"></a>00885     <span class="keywordflow">try</span> {
+<a name="l00886"></a>00886         <span class="keywordflow">if</span>( internal_compact( <span class="keyword">sizeof</span>(T), &old, &destroy_array, &copy_array ) )
+<a name="l00887"></a>00887             internal_free_segments( old.table, pointers_per_long_table, old.first_block ); <span class="comment">// free joined and unnecessary segments</span>
+<a name="l00888"></a>00888     } <span class="keywordflow">catch</span>(...) {
+<a name="l00889"></a>00889         <span class="keywordflow">if</span>( old.first_block ) <span class="comment">// free segment allocated for compacting. Only for support of exceptions in ctor of user T[ype]</span>
+<a name="l00890"></a>00890             internal_free_segments( old.table, 1, old.first_block );
+<a name="l00891"></a>00891         <span class="keywordflow">throw</span>;
+<a name="l00892"></a>00892     }
+<a name="l00893"></a>00893 }
+<a name="l00894"></a>00894 
+<a name="l00895"></a>00895 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00896"></a>00896 <span class="keywordtype">void</span> <a class="code" href="a00136.html">concurrent_vector<T, A>::internal_free_segments</a>(<span class="keywordtype">void</span> *table[], segment_index_t k, segment_index_t first_block) {
+<a name="l00897"></a>00897     <span class="comment">// Free the arrays</span>
+<a name="l00898"></a>00898     <span class="keywordflow">while</span>( k > first_block ) {
+<a name="l00899"></a>00899         --k;
+<a name="l00900"></a>00900         T* array = static_cast<T*>(table[k]);
+<a name="l00901"></a>00901         table[k] = NULL;
+<a name="l00902"></a>00902         <span class="keywordflow">if</span>( array > internal::vector_allocation_error_flag ) <span class="comment">// check for correct segment pointer</span>
+<a name="l00903"></a>00903             this->my_allocator.deallocate( array, segment_size(k) );
+<a name="l00904"></a>00904     }
+<a name="l00905"></a>00905     T* array = static_cast<T*>(table[0]);
+<a name="l00906"></a>00906     <span class="keywordflow">if</span>( array > internal::vector_allocation_error_flag ) {
+<a name="l00907"></a>00907         __TBB_ASSERT( first_block > 0, NULL );
+<a name="l00908"></a>00908         <span class="keywordflow">while</span>(k > 0) table[--k] = NULL;
+<a name="l00909"></a>00909         this->my_allocator.deallocate( array, segment_size(first_block) );
+<a name="l00910"></a>00910     }
+<a name="l00911"></a>00911 }
+<a name="l00912"></a>00912 
+<a name="l00913"></a>00913 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00914"></a>00914 T& concurrent_vector<T, A>::internal_subscript( size_type index )<span class="keyword"> const </span>{
+<a name="l00915"></a>00915     __TBB_ASSERT( index < my_early_size, <span class="stringliteral">"index out of bounds"</span> );
+<a name="l00916"></a>00916     size_type j = index;
+<a name="l00917"></a>00917     segment_index_t k = segment_base_index_of( j );
+<a name="l00918"></a>00918     __TBB_ASSERT( my_segment != (segment_t*)my_storage || k < pointers_per_short_table, <span class="stringliteral">"index is being allocated"</span> );
+<a name="l00919"></a>00919     <span class="comment">// no need in __TBB_load_with_acquire since thread works in own space or gets </span>
+<a name="l00920"></a>00920 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00921"></a>00921 <span class="preprocessor"></span>    T* array = static_cast<T*>( tbb::internal::itt_load_pointer_v3(&my_segment[k].array));
+<a name="l00922"></a>00922 <span class="preprocessor">#else</span>
+<a name="l00923"></a>00923 <span class="preprocessor"></span>    T* array = static_cast<T*>(my_segment[k].array);
+<a name="l00924"></a>00924 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
+<a name="l00925"></a>00925     __TBB_ASSERT( array != internal::vector_allocation_error_flag, <span class="stringliteral">"the instance is broken by bad allocation. Use at() instead"</span> );
+<a name="l00926"></a>00926     __TBB_ASSERT( array, <span class="stringliteral">"index is being allocated"</span> );
+<a name="l00927"></a>00927     <span class="keywordflow">return</span> array[j];
+<a name="l00928"></a>00928 }
+<a name="l00929"></a>00929 
+<a name="l00930"></a>00930 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00931"></a>00931 T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index )<span class="keyword"> const </span>{
+<a name="l00932"></a>00932     <span class="keywordflow">if</span>( index >= my_early_size )
+<a name="l00933"></a>00933         internal_throw_exception(0); <span class="comment">// throw std::out_of_range</span>
+<a name="l00934"></a>00934     size_type j = index;
+<a name="l00935"></a>00935     segment_index_t k = segment_base_index_of( j );
+<a name="l00936"></a>00936     <span class="keywordflow">if</span>( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
+<a name="l00937"></a>00937         internal_throw_exception(1); <span class="comment">// throw std::range_error</span>
+<a name="l00938"></a>00938     <span class="keywordtype">void</span> *array = my_segment[k].array; <span class="comment">// no need in __TBB_load_with_acquire</span>
+<a name="l00939"></a>00939     <span class="keywordflow">if</span>( array <= internal::vector_allocation_error_flag ) <span class="comment">// check for correct segment pointer</span>
+<a name="l00940"></a>00940         internal_throw_exception(2); <span class="comment">// throw std::range_error</span>
+<a name="l00941"></a>00941     <span class="keywordflow">return</span> static_cast<T*>(array)[j];
+<a name="l00942"></a>00942 }
+<a name="l00943"></a>00943 
+<a name="l00944"></a>00944 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A> <span class="keyword">template</span><<span class="keyword">class</span> I>
+<a name="l00945"></a>00945 <span class="keywordtype">void</span> concurrent_vector<T, A>::internal_assign_iterators(I first, I last) {
+<a name="l00946"></a>00946     __TBB_ASSERT(my_early_size == 0, NULL);
+<a name="l00947"></a>00947     size_type n = std::distance(first, last);
+<a name="l00948"></a>00948     <span class="keywordflow">if</span>( !n ) <span class="keywordflow">return</span>;
+<a name="l00949"></a>00949     internal_reserve(n, <span class="keyword">sizeof</span>(T), <a class="code" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">max_size</a>());
+<a name="l00950"></a>00950     my_early_size = n;
+<a name="l00951"></a>00951     segment_index_t k = 0;
+<a name="l00952"></a>00952     size_type sz = segment_size( my_first_block );
+<a name="l00953"></a>00953     <span class="keywordflow">while</span>( sz < n ) {
+<a name="l00954"></a>00954         internal_loop_guide loop(sz, my_segment[k].array);
+<a name="l00955"></a>00955         loop.iterate(first);
+<a name="l00956"></a>00956         n -= sz;
+<a name="l00957"></a>00957         <span class="keywordflow">if</span>( !k ) k = my_first_block;
+<a name="l00958"></a>00958         <span class="keywordflow">else</span> { ++k; sz <<= 1; }
+<a name="l00959"></a>00959     }
+<a name="l00960"></a>00960     internal_loop_guide loop(n, my_segment[k].array);
+<a name="l00961"></a>00961     loop.iterate(first);
+<a name="l00962"></a>00962 }
+<a name="l00963"></a>00963 
+<a name="l00964"></a>00964 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00965"></a>00965 <span class="keywordtype">void</span> concurrent_vector<T, A>::initialize_array( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span> *, size_type n ) {
+<a name="l00966"></a>00966     internal_loop_guide loop(n, begin); loop.init();
+<a name="l00967"></a>00967 }
+<a name="l00968"></a>00968 
+<a name="l00969"></a>00969 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00970"></a>00970 <span class="keywordtype">void</span> concurrent_vector<T, A>::initialize_array_by( <span class="keywordtype">void</span>* begin, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, size_type n ) {
+<a name="l00971"></a>00971     internal_loop_guide loop(n, begin); loop.init(src);
+<a name="l00972"></a>00972 }
+<a name="l00973"></a>00973 
+<a name="l00974"></a>00974 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00975"></a>00975 <span class="keywordtype">void</span> concurrent_vector<T, A>::copy_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n ) {
+<a name="l00976"></a>00976     internal_loop_guide loop(n, dst); loop.copy(src);
+<a name="l00977"></a>00977 }
+<a name="l00978"></a>00978 
+<a name="l00979"></a>00979 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00980"></a>00980 <span class="keywordtype">void</span> concurrent_vector<T, A>::assign_array( <span class="keywordtype">void</span>* dst, <span class="keyword">const</span> <span class="keywordtype">void</span>* src, size_type n ) {
+<a name="l00981"></a>00981     internal_loop_guide loop(n, dst); loop.assign(src);
+<a name="l00982"></a>00982 }
+<a name="l00983"></a>00983 
+<a name="l00984"></a>00984 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) </span>
+<a name="l00985"></a>00985 <span class="preprocessor"></span>    <span class="comment">// Workaround for overzealous compiler warning</span>
+<a name="l00986"></a>00986 <span class="preprocessor">    #pragma warning (push)</span>
+<a name="l00987"></a>00987 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4189)</span>
+<a name="l00988"></a>00988 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00989"></a>00989 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l00990"></a>00990 <span class="keywordtype">void</span> concurrent_vector<T, A>::destroy_array( <span class="keywordtype">void</span>* begin, size_type n ) {
+<a name="l00991"></a>00991     T* array = static_cast<T*>(begin);
+<a name="l00992"></a>00992     <span class="keywordflow">for</span>( size_type j=n; j>0; --j )
+<a name="l00993"></a>00993         array[j-1].~T(); <span class="comment">// destructors are supposed to not throw any exceptions</span>
+<a name="l00994"></a>00994 }
+<a name="l00995"></a>00995 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) </span>
+<a name="l00996"></a>00996 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l00997"></a>00997 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4189 is back </span>
+<a name="l00998"></a>00998 <span class="preprocessor"></span>
+<a name="l00999"></a>00999 <span class="comment">// concurrent_vector's template functions</span>
+<a name="l01000"></a>01000 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01001"></a>01001 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b) {
+<a name="l01002"></a>01002     <span class="comment">// Simply:    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());</span>
+<a name="l01003"></a>01003     <span class="keywordflow">if</span>(a.size() != b.size()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01004"></a>01004     <span class="keyword">typename</span> concurrent_vector<T, A1>::const_iterator i(a.begin());
+<a name="l01005"></a>01005     <span class="keyword">typename</span> concurrent_vector<T, A2>::const_iterator j(b.begin());
+<a name="l01006"></a>01006     <span class="keywordflow">for</span>(; i != a.end(); ++i, ++j)
+<a name="l01007"></a>01007         <span class="keywordflow">if</span>( !(*i == *j) ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l01008"></a>01008     <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l01009"></a>01009 }
+<a name="l01010"></a>01010 
+<a name="l01011"></a>01011 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01012"></a>01012 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
+<a name="l01013"></a>01013 {    <span class="keywordflow">return</span> !(a == b); }
+<a name="l01014"></a>01014 
+<a name="l01015"></a>01015 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01016"></a>01016 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<(const concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
+<a name="l01017"></a>01017 {    <span class="keywordflow">return</span> (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); }
+<a name="l01018"></a>01018 
+<a name="l01019"></a>01019 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01020"></a>01020 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
+<a name="l01021"></a>01021 {    <span class="keywordflow">return</span> b < a; }
+<a name="l01022"></a>01022 
+<a name="l01023"></a>01023 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01024"></a>01024 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator<=(const concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
+<a name="l01025"></a>01025 {    <span class="keywordflow">return</span> !(b < a); }
+<a name="l01026"></a>01026 
+<a name="l01027"></a>01027 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A1, <span class="keyword">class</span> A2>
+<a name="l01028"></a>01028 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator>=(<span class="keyword">const</span> concurrent_vector<T, A1> &a, <span class="keyword">const</span> concurrent_vector<T, A2> &b)
+<a name="l01029"></a>01029 {    <span class="keywordflow">return</span> !(a < b); }
+<a name="l01030"></a>01030 
+<a name="l01031"></a>01031 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">class</span> A>
+<a name="l01032"></a>01032 <span class="keyword">inline</span> <span class="keywordtype">void</span> swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
+<a name="l01033"></a>01033 {    a.swap( b ); }
+<a name="l01034"></a>01034 
+<a name="l01035"></a>01035 } <span class="comment">// namespace tbb</span>
+<a name="l01036"></a>01036 
+<a name="l01037"></a>01037 <span class="preprocessor">#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)</span>
+<a name="l01038"></a>01038 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l01039"></a>01039 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4267 is back</span>
+<a name="l01040"></a>01040 <span class="preprocessor"></span>
+<a name="l01041"></a>01041 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_concurrent_vector_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00286.html b/doc/html/a00292.html
similarity index 73%
rename from doc/html/a00286.html
rename to doc/html/a00292.html
index 73afcbc..3eb0687 100644
--- a/doc/html/a00286.html
+++ b/doc/html/a00292.html
@@ -58,7 +58,7 @@
 <a name="l00037"></a>00037 <span class="preprocessor"></span>
 <a name="l00038"></a>00038 <span class="keyword">namespace </span>tbb {
 <a name="l00039"></a>00039 
-<a name="l00041"></a><a class="code" href="a00224.html#a8622ae61b7e7737dac26542e181178e">00041</a>     <span class="keyword">enum</span> <a class="code" href="a00224.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> { ets_key_per_instance, ets_no_key };
+<a name="l00041"></a><a class="code" href="a00229.html#a8622ae61b7e7737dac26542e181178e">00041</a>     <span class="keyword">enum</span> <a class="code" href="a00229.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> { ets_key_per_instance, ets_no_key };
 <a name="l00042"></a>00042 
 <a name="l00044"></a>00044     <span class="keyword">namespace </span>internal {
 <a name="l00045"></a>00045         
@@ -428,7 +428,7 @@
 <a name="l00416"></a>00416             <span class="keyword">typedef</span> Functor my_callback_type;
 <a name="l00417"></a>00417             <span class="keyword">typedef</span> callback_leaf<T,Functor> my_type;
 <a name="l00418"></a>00418             <span class="keyword">typedef</span> my_type* callback_pointer;
-<a name="l00419"></a>00419             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00166.html">tbb::tbb_allocator<my_type></a> my_allocator_type;
+<a name="l00419"></a>00419             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00170.html">tbb::tbb_allocator<my_type></a> my_allocator_type;
 <a name="l00420"></a>00420             Functor f;
 <a name="l00421"></a>00421             callback_leaf( <span class="keyword">const</span> Functor& f_) : f(f_) {
 <a name="l00422"></a>00422             }
@@ -457,393 +457,410 @@
 <a name="l00445"></a>00445             <span class="keyword">typedef</span> <a class="code" href="a00130.html">tbb::concurrent_hash_map<Key, T, HC, A></a> base_type;
 <a name="l00446"></a>00446             <span class="keyword">typedef</span> <span class="keyword">typename</span> base_type::const_pointer const_pointer;
 <a name="l00447"></a>00447             <span class="keyword">typedef</span> <span class="keyword">typename</span> base_type::key_type key_type;
-<a name="l00448"></a>00448             const_pointer find( <span class="keyword">const</span> key_type &k ) { <span class="keywordflow">return</span> base_type::find( k ); } <span class="comment">// make public</span>
-<a name="l00449"></a>00449         };
-<a name="l00450"></a>00450     
-<a name="l00451"></a>00451     } <span class="comment">// namespace internal</span>
-<a name="l00453"></a>00453 <span class="comment"></span>
-<a name="l00455"></a>00455     <span class="keyword">template</span> <<span class="keyword">typename</span> T, 
-<a name="l00456"></a>00456               <span class="keyword">typename</span> Allocator=cache_aligned_allocator<T>, 
-<a name="l00457"></a><a class="code" href="a00138.html">00457</a>               <a class="code" href="a00224.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> ETS_key_type=ets_no_key > 
-<a name="l00458"></a>00458     <span class="keyword">class </span><a class="code" href="a00138.html">enumerable_thread_specific</a> { 
-<a name="l00459"></a>00459 
-<a name="l00460"></a>00460         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A, ets_key_usage_type C> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00138.html">enumerable_thread_specific</a>;
-<a name="l00461"></a>00461     
-<a name="l00462"></a>00462         <span class="keyword">typedef</span> internal::tls_manager< ETS_key_type > my_tls_manager;
-<a name="l00463"></a>00463 
-<a name="l00465"></a>00465         <span class="keyword">template</span><<span class="keyword">typename</span> U>
-<a name="l00466"></a>00466         <span class="keyword">struct </span>padded_element {
-<a name="l00467"></a>00467             U value;
-<a name="l00468"></a>00468             <span class="keywordtype">char</span> padding[ ( (<span class="keyword">sizeof</span>(U) - 1) / internal::NFS_MaxLineSize + 1 ) * internal::NFS_MaxLineSize - <span class="keyword">sizeof</span>(U) ];
-<a name="l00469"></a>00469             padded_element(<span class="keyword">const</span> U &v) : value(v) {}
-<a name="l00470"></a>00470             padded_element() {}
-<a name="l00471"></a>00471         };
-<a name="l00472"></a>00472     
-<a name="l00474"></a>00474         <span class="keyword">template</span><<span class="keyword">typename</span> I>
-<a name="l00475"></a>00475         <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00122.html">blocked_range</a><I> {
-<a name="l00476"></a>00476         <span class="keyword">public</span>:
-<a name="l00477"></a>00477             <span class="keyword">typedef</span> T value_type;
-<a name="l00478"></a>00478             <span class="keyword">typedef</span> T& reference;
-<a name="l00479"></a>00479             <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00480"></a>00480             <span class="keyword">typedef</span> I iterator;
-<a name="l00481"></a>00481             <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00482"></a>00482             generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00122.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
-<a name="l00483"></a>00483             template<typename U>
-<a name="l00484"></a>00484             generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00122.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
-<a name="l00485"></a>00485             generic_range_type( generic_range_type& r, <a class="code" href="a00161.html">split</a> ) : <a class="code" href="a00122.html">blocked_range<I></a>(r,<a class="code" href="a00161.html">split</a>()) {}
-<a name="l00486"></a>00486         };
-<a name="l00487"></a>00487     
-<a name="l00488"></a>00488         <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind< padded_element<T> >::other padded_allocator_type;
-<a name="l00489"></a>00489         <span class="keyword">typedef</span> <a class="code" href="a00136.html">tbb::concurrent_vector< padded_element<T></a>, padded_allocator_type > <a class="code" href="a00136.html">internal_collection_type</a>;
-<a name="l00490"></a>00490         <span class="keyword">typedef</span> ptrdiff_t hash_table_index_type; <span class="comment">// storing array indices rather than iterators to simplify</span>
-<a name="l00491"></a>00491         <span class="comment">// copying the hash table that correlates thread IDs with concurrent vector elements.</span>
-<a name="l00492"></a>00492         
-<a name="l00493"></a>00493         <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind< std::pair< typename internal::thread_hash_compare::thread_key, hash_table_index_type > >::other hash_element_allocator;
-<a name="l00494"></a>00494         <span class="keyword">typedef</span> internal::ets_concurrent_hash_map< typename internal::thread_hash_compare::thread_key, hash_table_index_type, internal::thread_hash_compare, hash_element_allocator > thread_to_index_type;
-<a name="l00495"></a>00495 
-<a name="l00496"></a>00496         <span class="keyword">typename</span> my_tls_manager::tls_key_t my_key;
+<a name="l00448"></a>00448             const_pointer find( <span class="keyword">const</span> key_type &k ) {
+<a name="l00449"></a>00449                 <span class="keywordflow">return</span> internal_fast_find( k );
+<a name="l00450"></a>00450             } <span class="comment">// make public</span>
+<a name="l00451"></a>00451         };
+<a name="l00452"></a>00452     
+<a name="l00453"></a>00453     } <span class="comment">// namespace internal</span>
+<a name="l00455"></a>00455 <span class="comment"></span>
+<a name="l00457"></a>00457     <span class="keyword">template</span> <<span class="keyword">typename</span> T, 
+<a name="l00458"></a>00458               <span class="keyword">typename</span> Allocator=cache_aligned_allocator<T>, 
+<a name="l00459"></a><a class="code" href="a00138.html">00459</a>               <a class="code" href="a00229.html#a8622ae61b7e7737dac26542e181178e">ets_key_usage_type</a> ETS_key_type=ets_no_key > 
+<a name="l00460"></a>00460     <span class="keyword">class </span><a class="code" href="a00138.html">enumerable_thread_specific</a> { 
+<a name="l00461"></a>00461 
+<a name="l00462"></a>00462         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A, ets_key_usage_type C> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00138.html">enumerable_thread_specific</a>;
+<a name="l00463"></a>00463     
+<a name="l00464"></a>00464         <span class="keyword">typedef</span> internal::tls_manager< ETS_key_type > my_tls_manager;
+<a name="l00465"></a>00465 
+<a name="l00467"></a>00467         <span class="keyword">template</span><<span class="keyword">typename</span> U>
+<a name="l00468"></a>00468         <span class="keyword">struct </span>padded_element {
+<a name="l00469"></a>00469             U value;
+<a name="l00470"></a>00470             <span class="keywordtype">char</span> padding[ ( (<span class="keyword">sizeof</span>(U) - 1) / internal::NFS_MaxLineSize + 1 ) * internal::NFS_MaxLineSize - <span class="keyword">sizeof</span>(U) ];
+<a name="l00471"></a>00471             padded_element(<span class="keyword">const</span> U &v) : value(v) {}
+<a name="l00472"></a>00472             padded_element() {}
+<a name="l00473"></a>00473         };
+<a name="l00474"></a>00474     
+<a name="l00476"></a>00476         <span class="keyword">template</span><<span class="keyword">typename</span> I>
+<a name="l00477"></a>00477         <span class="keyword">class </span>generic_range_type: <span class="keyword">public</span> <a class="code" href="a00122.html">blocked_range</a><I> {
+<a name="l00478"></a>00478         <span class="keyword">public</span>:
+<a name="l00479"></a>00479             <span class="keyword">typedef</span> T value_type;
+<a name="l00480"></a>00480             <span class="keyword">typedef</span> T& reference;
+<a name="l00481"></a>00481             <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+<a name="l00482"></a>00482             <span class="keyword">typedef</span> I iterator;
+<a name="l00483"></a>00483             <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00484"></a>00484             generic_range_type( I begin_, I end_, size_t grainsize = 1) : <a class="code" href="a00122.html">blocked_range<I></a>(begin_,end_,grainsize) {} 
+<a name="l00485"></a>00485             template<typename U>
+<a name="l00486"></a>00486             generic_range_type( <span class="keyword">const</span> generic_range_type<U>& r) : <a class="code" href="a00122.html">blocked_range<I></a>(r.begin(),r.end(),r.grainsize()) {} 
+<a name="l00487"></a>00487             generic_range_type( generic_range_type& r, <a class="code" href="a00165.html">split</a> ) : <a class="code" href="a00122.html">blocked_range<I></a>(r,<a class="code" href="a00165.html">split</a>()) {}
+<a name="l00488"></a>00488         };
+<a name="l00489"></a>00489     
+<a name="l00490"></a>00490         <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind< padded_element<T> >::other padded_allocator_type;
+<a name="l00491"></a>00491         <span class="keyword">typedef</span> <a class="code" href="a00136.html">tbb::concurrent_vector< padded_element<T></a>, padded_allocator_type > <a class="code" href="a00136.html">internal_collection_type</a>;
+<a name="l00492"></a>00492         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal_collection_type::size_type hash_table_index_type; <span class="comment">// storing array indices rather than iterators to simplify</span>
+<a name="l00493"></a>00493         <span class="comment">// copying the hash table that correlates thread IDs with concurrent vector elements.</span>
+<a name="l00494"></a>00494         
+<a name="l00495"></a>00495         <span class="keyword">typedef</span> <span class="keyword">typename</span> Allocator::template rebind< std::pair< typename internal::thread_hash_compare::thread_key, hash_table_index_type > >::other hash_element_allocator;
+<a name="l00496"></a>00496         <span class="keyword">typedef</span> internal::ets_concurrent_hash_map< typename internal::thread_hash_compare::thread_key, hash_table_index_type, internal::thread_hash_compare, hash_element_allocator > thread_to_index_type;
 <a name="l00497"></a>00497 
-<a name="l00498"></a>00498         <span class="keywordtype">void</span> reset_key() {
-<a name="l00499"></a>00499             my_tls_manager::destroy_key(my_key);
-<a name="l00500"></a>00500             my_tls_manager::create_key(my_key); 
-<a name="l00501"></a>00501         }
-<a name="l00502"></a>00502 
-<a name="l00503"></a>00503         internal::callback_base<T> *my_finit_callback;
+<a name="l00498"></a>00498         <span class="keyword">typename</span> my_tls_manager::tls_key_t my_key;
+<a name="l00499"></a>00499 
+<a name="l00500"></a>00500         <span class="keywordtype">void</span> reset_key() {
+<a name="l00501"></a>00501             my_tls_manager::destroy_key(my_key);
+<a name="l00502"></a>00502             my_tls_manager::create_key(my_key); 
+<a name="l00503"></a>00503         }
 <a name="l00504"></a>00504 
-<a name="l00505"></a>00505         <span class="comment">// need to use a pointed-to exemplar because T may not be assignable.</span>
-<a name="l00506"></a>00506         <span class="comment">// using tbb_allocator instead of padded_element_allocator because we may be</span>
-<a name="l00507"></a>00507         <span class="comment">// copying an exemplar from one instantiation of ETS to another with a different</span>
-<a name="l00508"></a>00508         <span class="comment">// allocator.</span>
-<a name="l00509"></a>00509         <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00166.html">tbb::tbb_allocator<padded_element<T></a> > <a class="code" href="a00166.html">exemplar_allocator_type</a>;
-<a name="l00510"></a>00510         <span class="keyword">static</span> padded_element<T> * create_exemplar(<span class="keyword">const</span> T& my_value) {
-<a name="l00511"></a>00511             padded_element<T> *new_exemplar = 0;
-<a name="l00512"></a>00512             <span class="comment">// void *new_space = padded_allocator_type().allocate(1);</span>
-<a name="l00513"></a>00513             <span class="keywordtype">void</span> *new_space = exemplar_allocator_type().allocate(1);
-<a name="l00514"></a>00514             new_exemplar = <span class="keyword">new</span>(new_space) padded_element<T>(my_value);
-<a name="l00515"></a>00515             <span class="keywordflow">return</span> new_exemplar;
-<a name="l00516"></a>00516         }
-<a name="l00517"></a>00517 
-<a name="l00518"></a>00518         <span class="keyword">static</span> padded_element<T> *create_exemplar( ) {
-<a name="l00519"></a>00519             <span class="comment">// void *new_space = padded_allocator_type().allocate(1);</span>
-<a name="l00520"></a>00520             <span class="keywordtype">void</span> *new_space = exemplar_allocator_type().allocate(1);
-<a name="l00521"></a>00521             padded_element<T> *new_exemplar = <span class="keyword">new</span>(new_space) padded_element<T>( );
-<a name="l00522"></a>00522             <span class="keywordflow">return</span> new_exemplar;
-<a name="l00523"></a>00523         }
-<a name="l00524"></a>00524 
-<a name="l00525"></a>00525         <span class="keyword">static</span> <span class="keywordtype">void</span> free_exemplar(padded_element<T> *my_ptr) {
-<a name="l00526"></a>00526             <span class="comment">// padded_allocator_type().destroy(my_ptr);</span>
-<a name="l00527"></a>00527             <span class="comment">// padded_allocator_type().deallocate(my_ptr,1);</span>
-<a name="l00528"></a>00528             exemplar_allocator_type().destroy(my_ptr);
-<a name="l00529"></a>00529             exemplar_allocator_type().deallocate(my_ptr,1);
-<a name="l00530"></a>00530         }
-<a name="l00531"></a>00531 
-<a name="l00532"></a>00532         padded_element<T>* my_exemplar_ptr;
+<a name="l00505"></a>00505         internal::callback_base<T> *my_finit_callback;
+<a name="l00506"></a>00506 
+<a name="l00507"></a>00507         <span class="comment">// need to use a pointed-to exemplar because T may not be assignable.</span>
+<a name="l00508"></a>00508         <span class="comment">// using tbb_allocator instead of padded_element_allocator because we may be</span>
+<a name="l00509"></a>00509         <span class="comment">// copying an exemplar from one instantiation of ETS to another with a different</span>
+<a name="l00510"></a>00510         <span class="comment">// allocator.</span>
+<a name="l00511"></a>00511         <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00170.html">tbb::tbb_allocator<padded_element<T></a> > <a class="code" href="a00170.html">exemplar_allocator_type</a>;
+<a name="l00512"></a>00512         <span class="keyword">static</span> padded_element<T> * create_exemplar(<span class="keyword">const</span> T& my_value) {
+<a name="l00513"></a>00513             padded_element<T> *new_exemplar = 0;
+<a name="l00514"></a>00514             <span class="comment">// void *new_space = padded_allocator_type().allocate(1);</span>
+<a name="l00515"></a>00515             <span class="keywordtype">void</span> *new_space = exemplar_allocator_type().allocate(1);
+<a name="l00516"></a>00516             new_exemplar = <span class="keyword">new</span>(new_space) padded_element<T>(my_value);
+<a name="l00517"></a>00517             <span class="keywordflow">return</span> new_exemplar;
+<a name="l00518"></a>00518         }
+<a name="l00519"></a>00519 
+<a name="l00520"></a>00520         <span class="keyword">static</span> padded_element<T> *create_exemplar( ) {
+<a name="l00521"></a>00521             <span class="comment">// void *new_space = padded_allocator_type().allocate(1);</span>
+<a name="l00522"></a>00522             <span class="keywordtype">void</span> *new_space = exemplar_allocator_type().allocate(1);
+<a name="l00523"></a>00523             padded_element<T> *new_exemplar = <span class="keyword">new</span>(new_space) padded_element<T>( );
+<a name="l00524"></a>00524             <span class="keywordflow">return</span> new_exemplar;
+<a name="l00525"></a>00525         }
+<a name="l00526"></a>00526 
+<a name="l00527"></a>00527         <span class="keyword">static</span> <span class="keywordtype">void</span> free_exemplar(padded_element<T> *my_ptr) {
+<a name="l00528"></a>00528             <span class="comment">// padded_allocator_type().destroy(my_ptr);</span>
+<a name="l00529"></a>00529             <span class="comment">// padded_allocator_type().deallocate(my_ptr,1);</span>
+<a name="l00530"></a>00530             exemplar_allocator_type().destroy(my_ptr);
+<a name="l00531"></a>00531             exemplar_allocator_type().deallocate(my_ptr,1);
+<a name="l00532"></a>00532         }
 <a name="l00533"></a>00533 
-<a name="l00534"></a>00534         internal_collection_type my_locals;
-<a name="l00535"></a>00535         thread_to_index_type my_hash_tbl;
-<a name="l00536"></a>00536     
-<a name="l00537"></a>00537     <span class="keyword">public</span>:
+<a name="l00534"></a>00534         padded_element<T>* my_exemplar_ptr;
+<a name="l00535"></a>00535 
+<a name="l00536"></a>00536         internal_collection_type my_locals;
+<a name="l00537"></a>00537         thread_to_index_type my_hash_tbl;
 <a name="l00538"></a>00538     
-<a name="l00540"></a>00540         <span class="keyword">typedef</span> Allocator <a class="code" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">allocator_type</a>;
-<a name="l00541"></a>00541         <span class="keyword">typedef</span> T value_type;
-<a name="l00542"></a>00542         <span class="keyword">typedef</span> T& reference;
-<a name="l00543"></a>00543         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
-<a name="l00544"></a>00544         <span class="keyword">typedef</span> T* pointer;
-<a name="l00545"></a>00545         <span class="keyword">typedef</span> <span class="keyword">const</span> T* const_pointer;
-<a name="l00546"></a>00546         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal_collection_type::size_type size_type;
-<a name="l00547"></a>00547         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal_collection_type::difference_type difference_type;
-<a name="l00548"></a>00548     
-<a name="l00549"></a>00549         <span class="comment">// Iterator types</span>
-<a name="l00550"></a>00550         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator;
-<a name="l00551"></a>00551         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator;
-<a name="l00552"></a>00552 
-<a name="l00553"></a>00553         <span class="comment">// Parallel range types</span>
-<a name="l00554"></a>00554         <span class="keyword">typedef</span> generic_range_type< iterator > range_type;
-<a name="l00555"></a>00555         <span class="keyword">typedef</span> generic_range_type< const_iterator > const_range_type;
-<a name="l00556"></a>00556     
-<a name="l00558"></a>00558         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>() : my_finit_callback(0) { 
-<a name="l00559"></a>00559             my_exemplar_ptr = create_exemplar();
-<a name="l00560"></a>00560             my_tls_manager::create_key(my_key); 
-<a name="l00561"></a>00561         }
-<a name="l00562"></a>00562 
-<a name="l00564"></a>00564         <span class="comment">// Finit should be a function taking 0 parameters and returning a T</span>
-<a name="l00565"></a><a class="code" href="a00138.html#e5698930b84c098bb6d87175b8b50306">00565</a>         <span class="keyword">template</span> <<span class="keyword">typename</span> Finit>
-<a name="l00566"></a>00566         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( Finit _finit )
-<a name="l00567"></a>00567         {
-<a name="l00568"></a>00568             my_finit_callback = internal::callback_leaf<T,Finit>::new_callback( _finit );
-<a name="l00569"></a>00569             my_tls_manager::create_key(my_key);
-<a name="l00570"></a>00570             my_exemplar_ptr = 0; <span class="comment">// don't need exemplar if function is provided</span>
-<a name="l00571"></a>00571         }
-<a name="l00572"></a>00572     
-<a name="l00574"></a>00574         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>(<span class="keyword">const</span> T &_exemplar) : my_finit_callback(0) {
-<a name="l00575"></a>00575             my_exemplar_ptr = create_exemplar(_exemplar);
-<a name="l00576"></a>00576             my_tls_manager::create_key(my_key); 
-<a name="l00577"></a>00577         }
-<a name="l00578"></a>00578     
-<a name="l00580"></a>00580         <a class="code" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">~enumerable_thread_specific</a>() { 
-<a name="l00581"></a>00581             my_tls_manager::destroy_key(my_key); 
-<a name="l00582"></a>00582             <span class="keywordflow">if</span>(my_finit_callback) {
-<a name="l00583"></a>00583                 my_finit_callback->destroy();
-<a name="l00584"></a>00584             }
-<a name="l00585"></a>00585             <span class="keywordflow">if</span>(my_exemplar_ptr)
-<a name="l00586"></a>00586             {
-<a name="l00587"></a>00587                 free_exemplar(my_exemplar_ptr);
-<a name="l00588"></a>00588             }
-<a name="l00589"></a>00589         }
-<a name="l00590"></a>00590       
-<a name="l00592"></a>00592         reference <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>() {
-<a name="l00593"></a>00593             <span class="keywordtype">bool</span> exists;
-<a name="l00594"></a>00594             <span class="keywordflow">return</span> <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(exists);
-<a name="l00595"></a>00595         }
-<a name="l00596"></a>00596     
-<a name="l00598"></a>00598         reference <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(<span class="keywordtype">bool</span>& exists)  {
-<a name="l00599"></a>00599             <span class="keywordflow">if</span> ( pointer local_ptr = static_cast<pointer>(my_tls_manager::get_tls(my_key)) ) {
-<a name="l00600"></a>00600                 exists = <span class="keyword">true</span>;
-<a name="l00601"></a>00601                <span class="keywordflow">return</span> *local_ptr;
-<a name="l00602"></a>00602             }
-<a name="l00603"></a>00603             <span class="comment">// check hash table</span>
-<a name="l00604"></a>00604             <span class="keyword">typename</span> internal::thread_hash_compare::thread_key my_t_key = internal::thread_hash_compare::my_thread_key(tbb::this_tbb_thread::get_id());
-<a name="l00605"></a>00605             {
-<a name="l00606"></a>00606                 <span class="keyword">typename</span> thread_to_index_type::const_pointer my_existing_entry;
-<a name="l00607"></a>00607                 my_existing_entry = my_hash_tbl.find(my_t_key);
-<a name="l00608"></a>00608                 <span class="keywordflow">if</span>(my_existing_entry) {
-<a name="l00609"></a>00609                     exists = <span class="keyword">true</span>;
-<a name="l00610"></a>00610                     hash_table_index_type my_index = my_existing_entry->second;
-<a name="l00611"></a>00611                     reference local_ref = (my_locals[my_index].value);
-<a name="l00612"></a>00612                     <span class="comment">// This will only be needed if a change is made to the instance</span>
-<a name="l00613"></a>00613                     my_tls_manager::set_tls( my_key, static_cast<void *>(&local_ref) );
-<a name="l00614"></a>00614                     <span class="keywordflow">return</span> local_ref;
-<a name="l00615"></a>00615                 }
-<a name="l00616"></a>00616             }
-<a name="l00617"></a>00617             <span class="comment">// create new entry</span>
-<a name="l00618"></a>00618             exists = <span class="keyword">false</span>;
-<a name="l00619"></a>00619             hash_table_index_type local_index;
-<a name="l00620"></a>00620             <span class="keywordflow">if</span>(my_finit_callback) {
-<a name="l00621"></a>00621                 <span class="comment">// convert iterator to array index</span>
-<a name="l00622"></a>00622                 local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(my_finit_callback->apply()) - my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>();
-<a name="l00623"></a>00623             }
-<a name="l00624"></a>00624             <span class="keywordflow">else</span> {
-<a name="l00625"></a>00625                 <span class="comment">// convert iterator to array index</span>
-<a name="l00626"></a>00626                 local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*my_exemplar_ptr) - my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>();
-<a name="l00627"></a>00627             }
-<a name="l00628"></a>00628             <span class="comment">// insert into hash table</span>
-<a name="l00629"></a>00629             reference local_ref = (my_locals[local_index].value);
-<a name="l00630"></a>00630             my_hash_tbl.insert( std::make_pair(my_t_key, local_index) );
-<a name="l00631"></a>00631             my_tls_manager::set_tls( my_key, static_cast<void *>(&local_ref) );
-<a name="l00632"></a>00632             <span class="keywordflow">return</span> local_ref;
-<a name="l00633"></a>00633         }
-<a name="l00634"></a>00634 
-<a name="l00636"></a>00636         size_type <a class="code" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>(); }
-<a name="l00637"></a>00637     
-<a name="l00639"></a>00639         <span class="keywordtype">bool</span> <a class="code" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_locals.<a class="code" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a>(); }
-<a name="l00640"></a>00640     
-<a name="l00642"></a>00642         iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>() { <span class="keywordflow">return</span> iterator( my_locals, 0 ); }
-<a name="l00644"></a>00644         iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>() { <span class="keywordflow">return</span> iterator(my_locals, my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>() ); }
-<a name="l00645"></a>00645     
-<a name="l00647"></a>00647         const_iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(my_locals, 0); }
-<a name="l00648"></a>00648     
-<a name="l00650"></a>00650         const_iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(my_locals, my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>()); }
+<a name="l00539"></a>00539     <span class="keyword">public</span>:
+<a name="l00540"></a>00540     
+<a name="l00542"></a>00542         <span class="keyword">typedef</span> Allocator <a class="code" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">allocator_type</a>;
+<a name="l00543"></a>00543         <span class="keyword">typedef</span> T value_type;
+<a name="l00544"></a>00544         <span class="keyword">typedef</span> T& reference;
+<a name="l00545"></a>00545         <span class="keyword">typedef</span> <span class="keyword">const</span> T& const_reference;
+<a name="l00546"></a>00546         <span class="keyword">typedef</span> T* pointer;
+<a name="l00547"></a>00547         <span class="keyword">typedef</span> <span class="keyword">const</span> T* const_pointer;
+<a name="l00548"></a>00548         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal_collection_type::size_type size_type;
+<a name="l00549"></a>00549         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal_collection_type::difference_type difference_type;
+<a name="l00550"></a>00550     
+<a name="l00551"></a>00551         <span class="comment">// Iterator types</span>
+<a name="l00552"></a>00552         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator;
+<a name="l00553"></a>00553         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator;
+<a name="l00554"></a>00554 
+<a name="l00555"></a>00555         <span class="comment">// Parallel range types</span>
+<a name="l00556"></a>00556         <span class="keyword">typedef</span> generic_range_type< iterator > range_type;
+<a name="l00557"></a>00557         <span class="keyword">typedef</span> generic_range_type< const_iterator > const_range_type;
+<a name="l00558"></a>00558     
+<a name="l00560"></a>00560         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>() : my_finit_callback(0) { 
+<a name="l00561"></a>00561             my_exemplar_ptr = create_exemplar();
+<a name="l00562"></a>00562             my_tls_manager::create_key(my_key); 
+<a name="l00563"></a>00563         }
+<a name="l00564"></a>00564 
+<a name="l00566"></a>00566         <span class="comment">// Finit should be a function taking 0 parameters and returning a T</span>
+<a name="l00567"></a><a class="code" href="a00138.html#e5698930b84c098bb6d87175b8b50306">00567</a>         <span class="keyword">template</span> <<span class="keyword">typename</span> Finit>
+<a name="l00568"></a>00568         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( Finit _finit )
+<a name="l00569"></a>00569         {
+<a name="l00570"></a>00570             my_finit_callback = internal::callback_leaf<T,Finit>::new_callback( _finit );
+<a name="l00571"></a>00571             my_tls_manager::create_key(my_key);
+<a name="l00572"></a>00572             my_exemplar_ptr = 0; <span class="comment">// don't need exemplar if function is provided</span>
+<a name="l00573"></a>00573         }
+<a name="l00574"></a>00574     
+<a name="l00576"></a>00576         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>(<span class="keyword">const</span> T &_exemplar) : my_finit_callback(0) {
+<a name="l00577"></a>00577             my_exemplar_ptr = create_exemplar(_exemplar);
+<a name="l00578"></a>00578             my_tls_manager::create_key(my_key); 
+<a name="l00579"></a>00579         }
+<a name="l00580"></a>00580     
+<a name="l00582"></a>00582         <a class="code" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">~enumerable_thread_specific</a>() { 
+<a name="l00583"></a>00583             my_tls_manager::destroy_key(my_key); 
+<a name="l00584"></a>00584             <span class="keywordflow">if</span>(my_finit_callback) {
+<a name="l00585"></a>00585                 my_finit_callback->destroy();
+<a name="l00586"></a>00586             }
+<a name="l00587"></a>00587             <span class="keywordflow">if</span>(my_exemplar_ptr)
+<a name="l00588"></a>00588             {
+<a name="l00589"></a>00589                 free_exemplar(my_exemplar_ptr);
+<a name="l00590"></a>00590             }
+<a name="l00591"></a>00591         }
+<a name="l00592"></a>00592       
+<a name="l00594"></a>00594         reference <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>() {
+<a name="l00595"></a>00595             <span class="keywordtype">bool</span> exists;
+<a name="l00596"></a>00596             <span class="keywordflow">return</span> <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(exists);
+<a name="l00597"></a>00597         }
+<a name="l00598"></a>00598 
+<a name="l00600"></a>00600         reference <a class="code" href="a00138.html#ceb691814a0001241c43595d309cf615">local</a>(<span class="keywordtype">bool</span>& exists)  {
+<a name="l00601"></a>00601             <span class="keywordflow">if</span> ( pointer local_ptr = static_cast<pointer>(my_tls_manager::get_tls(my_key)) ) {
+<a name="l00602"></a>00602                 exists = <span class="keyword">true</span>;
+<a name="l00603"></a>00603                <span class="keywordflow">return</span> *local_ptr;
+<a name="l00604"></a>00604             }
+<a name="l00605"></a>00605             hash_table_index_type local_index;
+<a name="l00606"></a>00606             <span class="keyword">typename</span> internal::thread_hash_compare::thread_key my_t_key = internal::thread_hash_compare::my_thread_key(tbb::this_tbb_thread::get_id());
+<a name="l00607"></a>00607             {
+<a name="l00608"></a>00608                 <span class="keyword">typename</span> thread_to_index_type::const_pointer my_existing_entry;
+<a name="l00609"></a>00609                 my_existing_entry = my_hash_tbl.find(my_t_key);
+<a name="l00610"></a>00610                 <span class="keywordflow">if</span>(my_existing_entry) {
+<a name="l00611"></a>00611                     exists = <span class="keyword">true</span>;
+<a name="l00612"></a>00612                     local_index = my_existing_entry->second;
+<a name="l00613"></a>00613                 }
+<a name="l00614"></a>00614                 <span class="keywordflow">else</span> {
+<a name="l00615"></a>00615 
+<a name="l00616"></a>00616                     <span class="comment">// see if the table entry can be found by accessor</span>
+<a name="l00617"></a>00617                     <span class="keyword">typename</span> thread_to_index_type::accessor a;
+<a name="l00618"></a>00618                     <span class="keywordflow">if</span>(!my_hash_tbl.insert(a, my_t_key)) {
+<a name="l00619"></a>00619                         exists = <span class="keyword">true</span>;
+<a name="l00620"></a>00620                         local_index = a->second;
+<a name="l00621"></a>00621                     }
+<a name="l00622"></a>00622                     <span class="keywordflow">else</span> {
+<a name="l00623"></a>00623                         <span class="comment">// create new entry</span>
+<a name="l00624"></a>00624                         exists = <span class="keyword">false</span>;
+<a name="l00625"></a>00625                         <span class="keywordflow">if</span>(my_finit_callback) {
+<a name="l00626"></a>00626                             <span class="comment">// convert iterator to array index</span>
+<a name="l00627"></a>00627 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00628"></a>00628 <span class="preprocessor"></span>                            local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(my_finit_callback->apply());
+<a name="l00629"></a>00629 <span class="preprocessor">#else</span>
+<a name="l00630"></a>00630 <span class="preprocessor"></span>                            local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(my_finit_callback->apply()) - my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>();
+<a name="l00631"></a>00631 <span class="preprocessor">#endif</span>
+<a name="l00632"></a>00632 <span class="preprocessor"></span>                        }
+<a name="l00633"></a>00633                         <span class="keywordflow">else</span> {
+<a name="l00634"></a>00634                             <span class="comment">// convert iterator to array index</span>
+<a name="l00635"></a>00635 <span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00636"></a>00636 <span class="preprocessor"></span>                            local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*my_exemplar_ptr);
+<a name="l00637"></a>00637 <span class="preprocessor">#else</span>
+<a name="l00638"></a>00638 <span class="preprocessor"></span>                            local_index = my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*my_exemplar_ptr) - my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>();
+<a name="l00639"></a>00639 <span class="preprocessor">#endif</span>
+<a name="l00640"></a>00640 <span class="preprocessor"></span>                        }
+<a name="l00641"></a>00641                         <span class="comment">// insert into hash table</span>
+<a name="l00642"></a>00642                         a->second = local_index;
+<a name="l00643"></a>00643                     }
+<a name="l00644"></a>00644                 }
+<a name="l00645"></a>00645             }
+<a name="l00646"></a>00646 
+<a name="l00647"></a>00647             reference local_ref = (my_locals[local_index].value);
+<a name="l00648"></a>00648             my_tls_manager::set_tls( my_key, static_cast<void *>(&local_ref) );
+<a name="l00649"></a>00649             <span class="keywordflow">return</span> local_ref;
+<a name="l00650"></a>00650         } <span class="comment">// local</span>
 <a name="l00651"></a>00651 
-<a name="l00653"></a>00653         range_type <a class="code" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a>( size_t grainsize=1 ) { <span class="keywordflow">return</span> range_type( <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(), <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(), grainsize ); } 
-<a name="l00654"></a>00654         
-<a name="l00656"></a>00656         const_range_type <a class="code" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a>( size_t grainsize=1 )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_range_type( <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(), <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(), grainsize ); }
+<a name="l00653"></a>00653         size_type <a class="code" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>(); }
+<a name="l00654"></a>00654     
+<a name="l00656"></a>00656         <span class="keywordtype">bool</span> <a class="code" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_locals.<a class="code" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">empty</a>(); }
 <a name="l00657"></a>00657     
-<a name="l00659"></a>00659         <span class="keywordtype">void</span> <a class="code" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>() {
-<a name="l00660"></a>00660             my_locals.<a class="code" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">clear</a>();
-<a name="l00661"></a>00661             my_hash_tbl.clear();
-<a name="l00662"></a>00662             reset_key();
-<a name="l00663"></a>00663             <span class="comment">// callback is not destroyed</span>
-<a name="l00664"></a>00664             <span class="comment">// exemplar is not destroyed</span>
-<a name="l00665"></a>00665         }
-<a name="l00666"></a>00666 
-<a name="l00667"></a>00667         <span class="comment">// STL container methods</span>
-<a name="l00668"></a>00668         <span class="comment">// copy constructor</span>
-<a name="l00669"></a>00669 
-<a name="l00670"></a>00670     <span class="keyword">private</span>:
-<a name="l00671"></a>00671 
-<a name="l00672"></a>00672         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A2, ets_key_usage_type C2>
-<a name="l00673"></a>00673         <span class="keywordtype">void</span>
-<a name="l00674"></a>00674         internal_copy_construct( <span class="keyword">const</span> enumerable_thread_specific<U, A2, C2>& other) {
-<a name="l00675"></a>00675             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00138.html">tbb::enumerable_thread_specific<U, A2, C2></a> other_type;
-<a name="l00676"></a>00676             <span class="keywordflow">for</span>(<span class="keyword">typename</span> other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
-<a name="l00677"></a>00677                 my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*ci);
-<a name="l00678"></a>00678             }
-<a name="l00679"></a>00679             <span class="keywordflow">if</span>(other.my_finit_callback) {
-<a name="l00680"></a>00680                 my_finit_callback = other.my_finit_callback->make_copy();
-<a name="l00681"></a>00681             }
-<a name="l00682"></a>00682             <span class="keywordflow">else</span> {
-<a name="l00683"></a>00683                 my_finit_callback = 0;
-<a name="l00684"></a>00684             }
-<a name="l00685"></a>00685             <span class="keywordflow">if</span>(other.my_exemplar_ptr) {
-<a name="l00686"></a>00686                 my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
-<a name="l00687"></a>00687             }
-<a name="l00688"></a>00688             <span class="keywordflow">else</span> {
-<a name="l00689"></a>00689                 my_exemplar_ptr = 0;
-<a name="l00690"></a>00690             }
-<a name="l00691"></a>00691             my_tls_manager::create_key(my_key);
-<a name="l00692"></a>00692         }
-<a name="l00693"></a>00693 
-<a name="l00694"></a>00694     <span class="keyword">public</span>:
-<a name="l00695"></a>00695 
-<a name="l00696"></a>00696         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> Alloc, ets_key_usage_type Cachetype>
-<a name="l00697"></a>00697         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( <span class="keyword">const</span> enumerable_thread_specific<U, Alloc, Cachetype>& other ) : my_hash_tbl(other.my_hash_tbl) 
-<a name="l00698"></a>00698         {   <span class="comment">// Have to do push_back because the contained elements are not necessarily assignable.</span>
-<a name="l00699"></a>00699             internal_copy_construct(other);
-<a name="l00700"></a>00700         }
-<a name="l00701"></a>00701 
-<a name="l00702"></a>00702         <span class="comment">// non-templatized version</span>
-<a name="l00703"></a>00703         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( <span class="keyword">const</span> <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& other ) : my_hash_tbl(other.my_hash_tbl) 
-<a name="l00704"></a>00704         {
-<a name="l00705"></a>00705             internal_copy_construct(other);
-<a name="l00706"></a>00706         }
-<a name="l00707"></a>00707 
-<a name="l00708"></a>00708     <span class="keyword">private</span>:
-<a name="l00709"></a>00709 
-<a name="l00710"></a>00710         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A2, ets_key_usage_type C2>
-<a name="l00711"></a>00711         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a> &
-<a name="l00712"></a>00712         internal_assign(<span class="keyword">const</span> enumerable_thread_specific<U, A2, C2>& other) {
-<a name="l00713"></a>00713             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00138.html">tbb::enumerable_thread_specific<U, A2, C2></a> other_type;
-<a name="l00714"></a>00714             <span class="keywordflow">if</span>(static_cast<void *>( <span class="keyword">this</span> ) != static_cast<const void *>( &other )) {
-<a name="l00715"></a>00715                 this-><a class="code" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>(); <span class="comment">// resets TLS key</span>
-<a name="l00716"></a>00716                 my_hash_tbl = other.my_hash_tbl;
-<a name="l00717"></a>00717                 <span class="comment">// cannot use assign because T may not be assignable.</span>
-<a name="l00718"></a>00718                 <span class="keywordflow">for</span>(<span class="keyword">typename</span> other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
-<a name="l00719"></a>00719                     my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*ci);
-<a name="l00720"></a>00720                 }
-<a name="l00721"></a>00721 
-<a name="l00722"></a>00722                 <span class="keywordflow">if</span>(my_finit_callback) {
-<a name="l00723"></a>00723                     my_finit_callback->destroy();
-<a name="l00724"></a>00724                     my_finit_callback = 0;
-<a name="l00725"></a>00725                 }
-<a name="l00726"></a>00726                 <span class="keywordflow">if</span>(my_exemplar_ptr) {
-<a name="l00727"></a>00727                     free_exemplar(my_exemplar_ptr);
-<a name="l00728"></a>00728                     my_exemplar_ptr = 0;
-<a name="l00729"></a>00729                 }
-<a name="l00730"></a>00730                 <span class="keywordflow">if</span>(other.my_finit_callback) {
-<a name="l00731"></a>00731                     my_finit_callback = other.my_finit_callback->make_copy();
-<a name="l00732"></a>00732                 }
-<a name="l00733"></a>00733 
-<a name="l00734"></a>00734                 <span class="keywordflow">if</span>(other.my_exemplar_ptr) {
-<a name="l00735"></a>00735                     my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
-<a name="l00736"></a>00736                 }
-<a name="l00737"></a>00737             }
-<a name="l00738"></a>00738             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00739"></a>00739         }
-<a name="l00740"></a>00740 
-<a name="l00741"></a>00741     <span class="keyword">public</span>:
-<a name="l00742"></a>00742 
-<a name="l00743"></a>00743         <span class="comment">// assignment</span>
-<a name="l00744"></a>00744         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& operator=(<span class="keyword">const</span> <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& other) {
-<a name="l00745"></a>00745             <span class="keywordflow">return</span> internal_assign(other);
-<a name="l00746"></a>00746         }
-<a name="l00747"></a>00747 
-<a name="l00748"></a>00748         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> Alloc, ets_key_usage_type Cachetype>
-<a name="l00749"></a>00749         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& operator=(<span class="keyword">const</span> enumerable_thread_specific<U, Alloc, Cachetype>& other)
-<a name="l00750"></a>00750         {
-<a name="l00751"></a>00751             <span class="keywordflow">return</span> internal_assign(other);
-<a name="l00752"></a>00752         }
-<a name="l00753"></a>00753 
-<a name="l00754"></a>00754     <span class="keyword">private</span>:
-<a name="l00755"></a>00755 
-<a name="l00756"></a>00756         <span class="comment">// combine_func_t has signature T(T,T) or T(const T&, const T&)</span>
-<a name="l00757"></a>00757         <span class="keyword">template</span> <<span class="keyword">typename</span> combine_func_t>
-<a name="l00758"></a>00758         T internal_combine(<span class="keyword">typename</span> internal_collection_type::const_range_type r, combine_func_t f_combine) {
-<a name="l00759"></a>00759             <span class="keywordflow">if</span>(r.is_divisible()) {
-<a name="l00760"></a>00760                 <span class="keyword">typename</span> internal_collection_type::const_range_type r2(r,split());
-<a name="l00761"></a>00761                 <span class="keywordflow">return</span> f_combine(internal_combine(r2, f_combine), internal_combine(r, f_combine));
-<a name="l00762"></a>00762             }
-<a name="l00763"></a>00763             <span class="keywordflow">if</span>(r.size() == 1) {
-<a name="l00764"></a>00764                 <span class="keywordflow">return</span> r.begin()->value;
-<a name="l00765"></a>00765             }
-<a name="l00766"></a>00766             <span class="keyword">typename</span> internal_collection_type::const_iterator i2 = r.begin();
-<a name="l00767"></a>00767             ++i2;
-<a name="l00768"></a>00768             <span class="keywordflow">return</span> f_combine(r.begin()->value, i2->value);
+<a name="l00659"></a>00659         iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>() { <span class="keywordflow">return</span> iterator( my_locals, 0 ); }
+<a name="l00661"></a>00661         iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>() { <span class="keywordflow">return</span> iterator(my_locals, my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>() ); }
+<a name="l00662"></a>00662     
+<a name="l00664"></a>00664         const_iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(my_locals, 0); }
+<a name="l00665"></a>00665     
+<a name="l00667"></a>00667         const_iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(my_locals, my_locals.<a class="code" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">size</a>()); }
+<a name="l00668"></a>00668 
+<a name="l00670"></a>00670         range_type <a class="code" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a>( size_t grainsize=1 ) { <span class="keywordflow">return</span> range_type( <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(), <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(), grainsize ); } 
+<a name="l00671"></a>00671         
+<a name="l00673"></a>00673         const_range_type <a class="code" href="a00138.html#56f6124f5870e26433a5bb2b71e4b7e9">range</a>( size_t grainsize=1 )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_range_type( <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(), <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(), grainsize ); }
+<a name="l00674"></a>00674     
+<a name="l00676"></a>00676         <span class="keywordtype">void</span> <a class="code" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>() {
+<a name="l00677"></a>00677             my_locals.<a class="code" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">clear</a>();
+<a name="l00678"></a>00678             my_hash_tbl.clear();
+<a name="l00679"></a>00679             reset_key();
+<a name="l00680"></a>00680             <span class="comment">// callback is not destroyed</span>
+<a name="l00681"></a>00681             <span class="comment">// exemplar is not destroyed</span>
+<a name="l00682"></a>00682         }
+<a name="l00683"></a>00683 
+<a name="l00684"></a>00684         <span class="comment">// STL container methods</span>
+<a name="l00685"></a>00685         <span class="comment">// copy constructor</span>
+<a name="l00686"></a>00686 
+<a name="l00687"></a>00687     <span class="keyword">private</span>:
+<a name="l00688"></a>00688 
+<a name="l00689"></a>00689         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A2, ets_key_usage_type C2>
+<a name="l00690"></a>00690         <span class="keywordtype">void</span>
+<a name="l00691"></a>00691         internal_copy_construct( <span class="keyword">const</span> enumerable_thread_specific<U, A2, C2>& other) {
+<a name="l00692"></a>00692             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00138.html">tbb::enumerable_thread_specific<U, A2, C2></a> other_type;
+<a name="l00693"></a>00693             <span class="keywordflow">for</span>(<span class="keyword">typename</span> other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
+<a name="l00694"></a>00694                 my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*ci);
+<a name="l00695"></a>00695             }
+<a name="l00696"></a>00696             <span class="keywordflow">if</span>(other.my_finit_callback) {
+<a name="l00697"></a>00697                 my_finit_callback = other.my_finit_callback->make_copy();
+<a name="l00698"></a>00698             }
+<a name="l00699"></a>00699             <span class="keywordflow">else</span> {
+<a name="l00700"></a>00700                 my_finit_callback = 0;
+<a name="l00701"></a>00701             }
+<a name="l00702"></a>00702             <span class="keywordflow">if</span>(other.my_exemplar_ptr) {
+<a name="l00703"></a>00703                 my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
+<a name="l00704"></a>00704             }
+<a name="l00705"></a>00705             <span class="keywordflow">else</span> {
+<a name="l00706"></a>00706                 my_exemplar_ptr = 0;
+<a name="l00707"></a>00707             }
+<a name="l00708"></a>00708             my_tls_manager::create_key(my_key);
+<a name="l00709"></a>00709         }
+<a name="l00710"></a>00710 
+<a name="l00711"></a>00711     <span class="keyword">public</span>:
+<a name="l00712"></a>00712 
+<a name="l00713"></a>00713         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> Alloc, ets_key_usage_type Cachetype>
+<a name="l00714"></a>00714         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( <span class="keyword">const</span> enumerable_thread_specific<U, Alloc, Cachetype>& other ) : my_hash_tbl(other.my_hash_tbl) 
+<a name="l00715"></a>00715         {   <span class="comment">// Have to do push_back because the contained elements are not necessarily assignable.</span>
+<a name="l00716"></a>00716             internal_copy_construct(other);
+<a name="l00717"></a>00717         }
+<a name="l00718"></a>00718 
+<a name="l00719"></a>00719         <span class="comment">// non-templatized version</span>
+<a name="l00720"></a>00720         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>( <span class="keyword">const</span> <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& other ) : my_hash_tbl(other.my_hash_tbl) 
+<a name="l00721"></a>00721         {
+<a name="l00722"></a>00722             internal_copy_construct(other);
+<a name="l00723"></a>00723         }
+<a name="l00724"></a>00724 
+<a name="l00725"></a>00725     <span class="keyword">private</span>:
+<a name="l00726"></a>00726 
+<a name="l00727"></a>00727         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> A2, ets_key_usage_type C2>
+<a name="l00728"></a>00728         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a> &
+<a name="l00729"></a>00729         internal_assign(<span class="keyword">const</span> enumerable_thread_specific<U, A2, C2>& other) {
+<a name="l00730"></a>00730             <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00138.html">tbb::enumerable_thread_specific<U, A2, C2></a> other_type;
+<a name="l00731"></a>00731             <span class="keywordflow">if</span>(static_cast<void *>( <span class="keyword">this</span> ) != static_cast<const void *>( &other )) {
+<a name="l00732"></a>00732                 this-><a class="code" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">clear</a>(); <span class="comment">// resets TLS key</span>
+<a name="l00733"></a>00733                 my_hash_tbl = other.my_hash_tbl;
+<a name="l00734"></a>00734                 <span class="comment">// cannot use assign because T may not be assignable.</span>
+<a name="l00735"></a>00735                 <span class="keywordflow">for</span>(<span class="keyword">typename</span> other_type::const_iterator ci = other.begin(); ci != other.end(); ++ci) {
+<a name="l00736"></a>00736                     my_locals.<a class="code" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">push_back</a>(*ci);
+<a name="l00737"></a>00737                 }
+<a name="l00738"></a>00738 
+<a name="l00739"></a>00739                 <span class="keywordflow">if</span>(my_finit_callback) {
+<a name="l00740"></a>00740                     my_finit_callback->destroy();
+<a name="l00741"></a>00741                     my_finit_callback = 0;
+<a name="l00742"></a>00742                 }
+<a name="l00743"></a>00743                 <span class="keywordflow">if</span>(my_exemplar_ptr) {
+<a name="l00744"></a>00744                     free_exemplar(my_exemplar_ptr);
+<a name="l00745"></a>00745                     my_exemplar_ptr = 0;
+<a name="l00746"></a>00746                 }
+<a name="l00747"></a>00747                 <span class="keywordflow">if</span>(other.my_finit_callback) {
+<a name="l00748"></a>00748                     my_finit_callback = other.my_finit_callback->make_copy();
+<a name="l00749"></a>00749                 }
+<a name="l00750"></a>00750 
+<a name="l00751"></a>00751                 <span class="keywordflow">if</span>(other.my_exemplar_ptr) {
+<a name="l00752"></a>00752                     my_exemplar_ptr = create_exemplar(other.my_exemplar_ptr->value);
+<a name="l00753"></a>00753                 }
+<a name="l00754"></a>00754             }
+<a name="l00755"></a>00755             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00756"></a>00756         }
+<a name="l00757"></a>00757 
+<a name="l00758"></a>00758     <span class="keyword">public</span>:
+<a name="l00759"></a>00759 
+<a name="l00760"></a>00760         <span class="comment">// assignment</span>
+<a name="l00761"></a>00761         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& operator=(<span class="keyword">const</span> <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& other) {
+<a name="l00762"></a>00762             <span class="keywordflow">return</span> internal_assign(other);
+<a name="l00763"></a>00763         }
+<a name="l00764"></a>00764 
+<a name="l00765"></a>00765         <span class="keyword">template</span><<span class="keyword">typename</span> U, <span class="keyword">typename</span> Alloc, ets_key_usage_type Cachetype>
+<a name="l00766"></a>00766         <a class="code" href="a00138.html#632e351d5269ac609b08dba19282f3a3">enumerable_thread_specific</a>& operator=(<span class="keyword">const</span> enumerable_thread_specific<U, Alloc, Cachetype>& other)
+<a name="l00767"></a>00767         {
+<a name="l00768"></a>00768             <span class="keywordflow">return</span> internal_assign(other);
 <a name="l00769"></a>00769         }
 <a name="l00770"></a>00770 
-<a name="l00771"></a>00771     <span class="keyword">public</span>:
+<a name="l00771"></a>00771     <span class="keyword">private</span>:
 <a name="l00772"></a>00772 
 <a name="l00773"></a>00773         <span class="comment">// combine_func_t has signature T(T,T) or T(const T&, const T&)</span>
 <a name="l00774"></a>00774         <span class="keyword">template</span> <<span class="keyword">typename</span> combine_func_t>
-<a name="l00775"></a>00775         T combine(combine_func_t f_combine) {
-<a name="l00776"></a>00776             <span class="keywordflow">if</span>(my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>() == my_locals.<a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a>()) {
-<a name="l00777"></a>00777                 <span class="keywordflow">if</span>(my_finit_callback) {
-<a name="l00778"></a>00778                     <span class="keywordflow">return</span> my_finit_callback->apply();
-<a name="l00779"></a>00779                 }
-<a name="l00780"></a>00780                 <span class="keywordflow">return</span> (*my_exemplar_ptr).value;
-<a name="l00781"></a>00781             }
-<a name="l00782"></a>00782             <span class="keyword">typename</span> internal_collection_type::const_range_type r(my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>(), my_locals.<a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a>(), (size_t)2);
-<a name="l00783"></a>00783             <span class="keywordflow">return</span> internal_combine(r, f_combine);
-<a name="l00784"></a>00784         }
-<a name="l00785"></a>00785 
-<a name="l00786"></a>00786         <span class="comment">// combine_func_t has signature void(T) or void(const T&)</span>
-<a name="l00787"></a>00787         <span class="keyword">template</span> <<span class="keyword">typename</span> combine_func_t>
-<a name="l00788"></a>00788         <span class="keywordtype">void</span> combine_each(combine_func_t f_combine) {
-<a name="l00789"></a>00789             <span class="keywordflow">for</span>(const_iterator ci = <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(); ci != <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(); ++ci) {
-<a name="l00790"></a>00790                 f_combine( *ci );
-<a name="l00791"></a>00791             }
-<a name="l00792"></a>00792         }
-<a name="l00793"></a>00793     }; <span class="comment">// enumerable_thread_specific</span>
-<a name="l00794"></a>00794 
-<a name="l00795"></a>00795     <span class="keyword">template</span>< <span class="keyword">typename</span> Container >
-<a name="l00796"></a>00796     <span class="keyword">class </span>flattened2d {
-<a name="l00797"></a>00797 
-<a name="l00798"></a>00798         <span class="comment">// This intermediate typedef is to address issues with VC7.1 compilers</span>
-<a name="l00799"></a>00799         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::value_type conval_type;
-<a name="l00800"></a>00800 
-<a name="l00801"></a>00801     <span class="keyword">public</span>:
+<a name="l00775"></a>00775         T internal_combine(<span class="keyword">typename</span> internal_collection_type::const_range_type r, combine_func_t f_combine) {
+<a name="l00776"></a>00776             <span class="keywordflow">if</span>(r.is_divisible()) {
+<a name="l00777"></a>00777                 <span class="keyword">typename</span> internal_collection_type::const_range_type r2(r,split());
+<a name="l00778"></a>00778                 <span class="keywordflow">return</span> f_combine(internal_combine(r2, f_combine), internal_combine(r, f_combine));
+<a name="l00779"></a>00779             }
+<a name="l00780"></a>00780             <span class="keywordflow">if</span>(r.size() == 1) {
+<a name="l00781"></a>00781                 <span class="keywordflow">return</span> r.begin()->value;
+<a name="l00782"></a>00782             }
+<a name="l00783"></a>00783             <span class="keyword">typename</span> internal_collection_type::const_iterator i2 = r.begin();
+<a name="l00784"></a>00784             ++i2;
+<a name="l00785"></a>00785             <span class="keywordflow">return</span> f_combine(r.begin()->value, i2->value);
+<a name="l00786"></a>00786         }
+<a name="l00787"></a>00787 
+<a name="l00788"></a>00788     <span class="keyword">public</span>:
+<a name="l00789"></a>00789 
+<a name="l00790"></a>00790         <span class="comment">// combine_func_t has signature T(T,T) or T(const T&, const T&)</span>
+<a name="l00791"></a>00791         <span class="keyword">template</span> <<span class="keyword">typename</span> combine_func_t>
+<a name="l00792"></a>00792         T combine(combine_func_t f_combine) {
+<a name="l00793"></a>00793             <span class="keywordflow">if</span>(my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>() == my_locals.<a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a>()) {
+<a name="l00794"></a>00794                 <span class="keywordflow">if</span>(my_finit_callback) {
+<a name="l00795"></a>00795                     <span class="keywordflow">return</span> my_finit_callback->apply();
+<a name="l00796"></a>00796                 }
+<a name="l00797"></a>00797                 <span class="keywordflow">return</span> (*my_exemplar_ptr).value;
+<a name="l00798"></a>00798             }
+<a name="l00799"></a>00799             <span class="keyword">typename</span> internal_collection_type::const_range_type r(my_locals.<a class="code" href="a00136.html#730b23a251ecb6d37f692fb22f38e029">begin</a>(), my_locals.<a class="code" href="a00136.html#c0b51160e5a764982ec97a455f94f2c6">end</a>(), (size_t)2);
+<a name="l00800"></a>00800             <span class="keywordflow">return</span> internal_combine(r, f_combine);
+<a name="l00801"></a>00801         }
 <a name="l00802"></a>00802 
-<a name="l00804"></a>00804         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::size_type size_type;
-<a name="l00805"></a>00805         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::difference_type difference_type;
-<a name="l00806"></a>00806         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::allocator_type allocator_type;
-<a name="l00807"></a>00807         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::value_type value_type;
-<a name="l00808"></a>00808         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::reference reference;
-<a name="l00809"></a>00809         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::const_reference const_reference;
-<a name="l00810"></a>00810         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::pointer pointer;
-<a name="l00811"></a>00811         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::const_pointer const_pointer;
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::segmented_iterator<Container, value_type> iterator;
-<a name="l00814"></a>00814         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::segmented_iterator<Container, const value_type> const_iterator;
-<a name="l00815"></a>00815 
-<a name="l00816"></a>00816         flattened2d( <span class="keyword">const</span> Container &c, <span class="keyword">typename</span> Container::const_iterator b, <span class="keyword">typename</span> Container::const_iterator e ) : 
-<a name="l00817"></a>00817             my_container(const_cast<Container*>(&c)), my_begin(b), my_end(e) { }
-<a name="l00818"></a>00818 
-<a name="l00819"></a>00819         flattened2d( <span class="keyword">const</span> Container &c ) : 
-<a name="l00820"></a>00820             my_container(const_cast<Container*>(&c)), my_begin(c.<a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()), my_end(c.<a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()) { }
-<a name="l00821"></a>00821 
-<a name="l00822"></a>00822         iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>() { <span class="keywordflow">return</span> iterator(*my_container) = my_begin; }
-<a name="l00823"></a>00823         iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>() { <span class="keywordflow">return</span> iterator(*my_container) = my_end; }
-<a name="l00824"></a>00824         const_iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(*my_container) = my_begin; }
-<a name="l00825"></a>00825         const_iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(*my_container) = my_end; }
-<a name="l00826"></a>00826 
-<a name="l00827"></a>00827         size_type <a class="code" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a>()<span class="keyword"> const </span>{
-<a name="l00828"></a>00828             size_type tot_size = 0;
-<a name="l00829"></a>00829             <span class="keywordflow">for</span>(<span class="keyword">typename</span> Container::const_iterator i = my_begin; i != my_end; ++i) {
-<a name="l00830"></a>00830                 tot_size += i->size();
-<a name="l00831"></a>00831             }
-<a name="l00832"></a>00832             <span class="keywordflow">return</span> tot_size;
-<a name="l00833"></a>00833         }
-<a name="l00834"></a>00834 
-<a name="l00835"></a>00835     <span class="keyword">private</span>:
-<a name="l00836"></a>00836 
-<a name="l00837"></a>00837         Container *my_container;
-<a name="l00838"></a>00838         <span class="keyword">typename</span> Container::const_iterator my_begin;
-<a name="l00839"></a>00839         <span class="keyword">typename</span> Container::const_iterator my_end;
-<a name="l00840"></a>00840 
-<a name="l00841"></a>00841     };
-<a name="l00842"></a>00842 
-<a name="l00843"></a>00843     <span class="keyword">template</span> <<span class="keyword">typename</span> Container>
-<a name="l00844"></a>00844     flattened2d<Container> flatten2d(<span class="keyword">const</span> Container &c, <span class="keyword">const</span> <span class="keyword">typename</span> Container::const_iterator b, <span class="keyword">const</span> <span class="keyword">typename</span> Container::const_iterator e) {
-<a name="l00845"></a>00845         <span class="keywordflow">return</span> flattened2d<Container>(c, b, e);
-<a name="l00846"></a>00846     }
-<a name="l00847"></a>00847 
-<a name="l00848"></a>00848     <span class="keyword">template</span> <<span class="keyword">typename</span> Container>
-<a name="l00849"></a>00849     flattened2d<Container> flatten2d(<span class="keyword">const</span> Container &c) {
-<a name="l00850"></a>00850         <span class="keywordflow">return</span> flattened2d<Container>(c);
-<a name="l00851"></a>00851     }
-<a name="l00852"></a>00852 
-<a name="l00853"></a>00853 } <span class="comment">// namespace tbb</span>
-<a name="l00854"></a>00854 
-<a name="l00855"></a>00855 <span class="preprocessor">#endif</span>
+<a name="l00803"></a>00803         <span class="comment">// combine_func_t has signature void(T) or void(const T&)</span>
+<a name="l00804"></a>00804         <span class="keyword">template</span> <<span class="keyword">typename</span> combine_func_t>
+<a name="l00805"></a>00805         <span class="keywordtype">void</span> combine_each(combine_func_t f_combine) {
+<a name="l00806"></a>00806             <span class="keywordflow">for</span>(const_iterator ci = <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>(); ci != <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>(); ++ci) {
+<a name="l00807"></a>00807                 f_combine( *ci );
+<a name="l00808"></a>00808             }
+<a name="l00809"></a>00809         }
+<a name="l00810"></a>00810     }; <span class="comment">// enumerable_thread_specific</span>
+<a name="l00811"></a>00811 
+<a name="l00812"></a>00812     <span class="keyword">template</span>< <span class="keyword">typename</span> Container >
+<a name="l00813"></a>00813     <span class="keyword">class </span>flattened2d {
+<a name="l00814"></a>00814 
+<a name="l00815"></a>00815         <span class="comment">// This intermediate typedef is to address issues with VC7.1 compilers</span>
+<a name="l00816"></a>00816         <span class="keyword">typedef</span> <span class="keyword">typename</span> Container::value_type conval_type;
+<a name="l00817"></a>00817 
+<a name="l00818"></a>00818     <span class="keyword">public</span>:
+<a name="l00819"></a>00819 
+<a name="l00821"></a>00821         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::size_type size_type;
+<a name="l00822"></a>00822         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::difference_type difference_type;
+<a name="l00823"></a>00823         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::allocator_type allocator_type;
+<a name="l00824"></a>00824         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::value_type value_type;
+<a name="l00825"></a>00825         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::reference reference;
+<a name="l00826"></a>00826         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::const_reference const_reference;
+<a name="l00827"></a>00827         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::pointer pointer;
+<a name="l00828"></a>00828         <span class="keyword">typedef</span> <span class="keyword">typename</span> conval_type::const_pointer const_pointer;
+<a name="l00829"></a>00829 
+<a name="l00830"></a>00830         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::segmented_iterator<Container, value_type> iterator;
+<a name="l00831"></a>00831         <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::segmented_iterator<Container, const value_type> const_iterator;
+<a name="l00832"></a>00832 
+<a name="l00833"></a>00833         flattened2d( <span class="keyword">const</span> Container &c, <span class="keyword">typename</span> Container::const_iterator b, <span class="keyword">typename</span> Container::const_iterator e ) : 
+<a name="l00834"></a>00834             my_container(const_cast<Container*>(&c)), my_begin(b), my_end(e) { }
+<a name="l00835"></a>00835 
+<a name="l00836"></a>00836         flattened2d( <span class="keyword">const</span> Container &c ) : 
+<a name="l00837"></a>00837             my_container(const_cast<Container*>(&c)), my_begin(c.<a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()), my_end(c.<a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()) { }
+<a name="l00838"></a>00838 
+<a name="l00839"></a>00839         iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>() { <span class="keywordflow">return</span> iterator(*my_container) = my_begin; }
+<a name="l00840"></a>00840         iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>() { <span class="keywordflow">return</span> iterator(*my_container) = my_end; }
+<a name="l00841"></a>00841         const_iterator <a class="code" href="a00138.html#225f945c810397c6a54d5b8317dc5843">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(*my_container) = my_begin; }
+<a name="l00842"></a>00842         const_iterator <a class="code" href="a00138.html#44c0b67ebb56b2ae1fa260d9e2bd1e99">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(*my_container) = my_end; }
+<a name="l00843"></a>00843 
+<a name="l00844"></a>00844         size_type <a class="code" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">size</a>()<span class="keyword"> const </span>{
+<a name="l00845"></a>00845             size_type tot_size = 0;
+<a name="l00846"></a>00846             <span class="keywordflow">for</span>(<span class="keyword">typename</span> Container::const_iterator i = my_begin; i != my_end; ++i) {
+<a name="l00847"></a>00847                 tot_size += i->size();
+<a name="l00848"></a>00848             }
+<a name="l00849"></a>00849             <span class="keywordflow">return</span> tot_size;
+<a name="l00850"></a>00850         }
+<a name="l00851"></a>00851 
+<a name="l00852"></a>00852     <span class="keyword">private</span>:
+<a name="l00853"></a>00853 
+<a name="l00854"></a>00854         Container *my_container;
+<a name="l00855"></a>00855         <span class="keyword">typename</span> Container::const_iterator my_begin;
+<a name="l00856"></a>00856         <span class="keyword">typename</span> Container::const_iterator my_end;
+<a name="l00857"></a>00857 
+<a name="l00858"></a>00858     };
+<a name="l00859"></a>00859 
+<a name="l00860"></a>00860     <span class="keyword">template</span> <<span class="keyword">typename</span> Container>
+<a name="l00861"></a>00861     flattened2d<Container> flatten2d(<span class="keyword">const</span> Container &c, <span class="keyword">const</span> <span class="keyword">typename</span> Container::const_iterator b, <span class="keyword">const</span> <span class="keyword">typename</span> Container::const_iterator e) {
+<a name="l00862"></a>00862         <span class="keywordflow">return</span> flattened2d<Container>(c, b, e);
+<a name="l00863"></a>00863     }
+<a name="l00864"></a>00864 
+<a name="l00865"></a>00865     <span class="keyword">template</span> <<span class="keyword">typename</span> Container>
+<a name="l00866"></a>00866     flattened2d<Container> flatten2d(<span class="keyword">const</span> Container &c) {
+<a name="l00867"></a>00867         <span class="keywordflow">return</span> flattened2d<Container>(c);
+<a name="l00868"></a>00868     }
+<a name="l00869"></a>00869 
+<a name="l00870"></a>00870 } <span class="comment">// namespace tbb</span>
+<a name="l00871"></a>00871 
+<a name="l00872"></a>00872 <span class="preprocessor">#endif</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00294.html b/doc/html/a00300.html
similarity index 100%
rename from doc/html/a00294.html
rename to doc/html/a00300.html
diff --git a/doc/html/a00296.html b/doc/html/a00302.html
similarity index 66%
rename from doc/html/a00296.html
rename to doc/html/a00302.html
index f8e93a0..aa934cd 100644
--- a/doc/html/a00296.html
+++ b/doc/html/a00302.html
@@ -44,31 +44,32 @@
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
 <a name="l00024"></a>00024 <span class="keyword">namespace </span>tbb {
 <a name="l00025"></a>00025     
-<a name="l00026"></a>00026 <span class="keyword">class </span>null_mutex {   
-<a name="l00028"></a>00028     null_mutex( <span class="keyword">const</span> null_mutex& );   
-<a name="l00029"></a>00029     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> null_mutex& );   
-<a name="l00030"></a>00030 <span class="keyword">public</span>:   
-<a name="l00031"></a>00031     <span class="keyword">class </span>scoped_lock {   
-<a name="l00032"></a>00032     <span class="keyword">public</span>:   
-<a name="l00033"></a>00033         scoped_lock() {}
-<a name="l00034"></a>00034         scoped_lock( null_mutex& ) {}   
-<a name="l00035"></a>00035         ~scoped_lock() {}
-<a name="l00036"></a>00036         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( null_mutex& ) {}
-<a name="l00037"></a>00037         <span class="keywordtype">bool</span> try_acquire( null_mutex& ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
-<a name="l00038"></a>00038         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {}
-<a name="l00039"></a>00039     };
-<a name="l00040"></a>00040   
-<a name="l00041"></a>00041     null_mutex() {}
-<a name="l00042"></a>00042     
-<a name="l00043"></a>00043     <span class="comment">// Mutex traits   </span>
-<a name="l00044"></a>00044     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;   
-<a name="l00045"></a>00045     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
-<a name="l00046"></a>00046     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
-<a name="l00047"></a>00047 };  
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 }
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_null_mutex_H */</span>
+<a name="l00027"></a>00027 
+<a name="l00029"></a><a class="code" href="a00144.html">00029</a> <span class="keyword">class </span><a class="code" href="a00144.html">null_mutex</a> {   
+<a name="l00031"></a>00031     <a class="code" href="a00144.html">null_mutex</a>( <span class="keyword">const</span> <a class="code" href="a00144.html">null_mutex</a>& );   
+<a name="l00032"></a>00032     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00144.html">null_mutex</a>& );   
+<a name="l00033"></a>00033 <span class="keyword">public</span>:   
+<a name="l00035"></a><a class="code" href="a00145.html">00035</a>     <span class="keyword">class </span><a class="code" href="a00145.html">scoped_lock</a> {   
+<a name="l00036"></a>00036     <span class="keyword">public</span>:   
+<a name="l00037"></a>00037         <a class="code" href="a00145.html">scoped_lock</a>() {}
+<a name="l00038"></a>00038         <a class="code" href="a00145.html">scoped_lock</a>( <a class="code" href="a00144.html">null_mutex</a>& ) {}   
+<a name="l00039"></a>00039         ~<a class="code" href="a00145.html">scoped_lock</a>() {}
+<a name="l00040"></a>00040         <span class="keywordtype">void</span> acquire( <a class="code" href="a00144.html">null_mutex</a>& ) {}
+<a name="l00041"></a>00041         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00144.html">null_mutex</a>& ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00042"></a>00042         <span class="keywordtype">void</span> release() {}
+<a name="l00043"></a>00043     };
+<a name="l00044"></a>00044   
+<a name="l00045"></a>00045     <a class="code" href="a00144.html">null_mutex</a>() {}
+<a name="l00046"></a>00046     
+<a name="l00047"></a>00047     <span class="comment">// Mutex traits   </span>
+<a name="l00048"></a>00048     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;   
+<a name="l00049"></a>00049     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
+<a name="l00050"></a>00050     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
+<a name="l00051"></a>00051 };  
+<a name="l00052"></a>00052 
+<a name="l00053"></a>00053 }
+<a name="l00054"></a>00054 
+<a name="l00055"></a>00055 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_null_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00299.html b/doc/html/a00303.html
similarity index 65%
rename from doc/html/a00299.html
rename to doc/html/a00303.html
index b4c4d79..7f648db 100644
--- a/doc/html/a00299.html
+++ b/doc/html/a00303.html
@@ -44,33 +44,34 @@
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
 <a name="l00024"></a>00024 <span class="keyword">namespace </span>tbb {
 <a name="l00025"></a>00025     
-<a name="l00026"></a>00026 <span class="keyword">class </span>null_rw_mutex {
-<a name="l00028"></a>00028     null_rw_mutex( <span class="keyword">const</span> null_rw_mutex& );   
-<a name="l00029"></a>00029     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> null_rw_mutex& );   
-<a name="l00030"></a>00030 <span class="keyword">public</span>:   
-<a name="l00031"></a>00031     <span class="keyword">class </span>scoped_lock {   
-<a name="l00032"></a>00032     <span class="keyword">public</span>:   
-<a name="l00033"></a>00033         scoped_lock() {}
-<a name="l00034"></a>00034         scoped_lock( null_rw_mutex& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) {}
-<a name="l00035"></a>00035         ~scoped_lock() {}
-<a name="l00036"></a>00036         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( null_rw_mutex& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) {}
-<a name="l00037"></a>00037         <span class="keywordtype">bool</span> upgrade_to_writer() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
-<a name="l00038"></a>00038         <span class="keywordtype">bool</span> downgrade_to_reader() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
-<a name="l00039"></a>00039         <span class="keywordtype">bool</span> try_acquire( null_rw_mutex& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
-<a name="l00040"></a>00040         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {}
-<a name="l00041"></a>00041     };
-<a name="l00042"></a>00042   
-<a name="l00043"></a>00043     null_rw_mutex() {}
-<a name="l00044"></a>00044     
-<a name="l00045"></a>00045     <span class="comment">// Mutex traits   </span>
-<a name="l00046"></a>00046     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;   
-<a name="l00047"></a>00047     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
-<a name="l00048"></a>00048     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
-<a name="l00049"></a>00049 };  
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051 }
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_null_rw_mutex_H */</span>
+<a name="l00027"></a>00027 
+<a name="l00029"></a><a class="code" href="a00146.html">00029</a> <span class="keyword">class </span><a class="code" href="a00146.html">null_rw_mutex</a> {
+<a name="l00031"></a>00031     <a class="code" href="a00146.html">null_rw_mutex</a>( <span class="keyword">const</span> <a class="code" href="a00146.html">null_rw_mutex</a>& );   
+<a name="l00032"></a>00032     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="a00146.html">null_rw_mutex</a>& );   
+<a name="l00033"></a>00033 <span class="keyword">public</span>:   
+<a name="l00035"></a><a class="code" href="a00147.html">00035</a>     <span class="keyword">class </span><a class="code" href="a00147.html">scoped_lock</a> {   
+<a name="l00036"></a>00036     <span class="keyword">public</span>:   
+<a name="l00037"></a>00037         <a class="code" href="a00147.html">scoped_lock</a>() {}
+<a name="l00038"></a>00038         <a class="code" href="a00147.html">scoped_lock</a>( <a class="code" href="a00146.html">null_rw_mutex</a>& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) {}
+<a name="l00039"></a>00039         ~<a class="code" href="a00147.html">scoped_lock</a>() {}
+<a name="l00040"></a>00040         <span class="keywordtype">void</span> acquire( <a class="code" href="a00146.html">null_rw_mutex</a>& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) {}
+<a name="l00041"></a>00041         <span class="keywordtype">bool</span> upgrade_to_writer() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00042"></a>00042         <span class="keywordtype">bool</span> downgrade_to_reader() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00043"></a>00043         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00146.html">null_rw_mutex</a>& , <span class="keywordtype">bool</span> = <span class="keyword">true</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00044"></a>00044         <span class="keywordtype">void</span> release() {}
+<a name="l00045"></a>00045     };
+<a name="l00046"></a>00046   
+<a name="l00047"></a>00047     <a class="code" href="a00146.html">null_rw_mutex</a>() {}
+<a name="l00048"></a>00048     
+<a name="l00049"></a>00049     <span class="comment">// Mutex traits   </span>
+<a name="l00050"></a>00050     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;   
+<a name="l00051"></a>00051     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
+<a name="l00052"></a>00052     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
+<a name="l00053"></a>00053 };  
+<a name="l00054"></a>00054 
+<a name="l00055"></a>00055 }
+<a name="l00056"></a>00056 
+<a name="l00057"></a>00057 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_null_rw_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00301.html b/doc/html/a00304.html
similarity index 97%
rename from doc/html/a00301.html
rename to doc/html/a00304.html
index 4c8e61f..74a1184 100644
--- a/doc/html/a00301.html
+++ b/doc/html/a00304.html
@@ -74,14 +74,14 @@
 <a name="l00056"></a>00056 <span class="comment"></span>
 <a name="l00058"></a>00058 
 <a name="l00059"></a>00059 <span class="keyword">template</span><<span class="keyword">typename</span> Item>
-<a name="l00060"></a><a class="code" href="a00144.html">00060</a> <span class="keyword">class </span><a class="code" href="a00144.html">parallel_do_feeder</a>: internal::no_copy
+<a name="l00060"></a><a class="code" href="a00148.html">00060</a> <span class="keyword">class </span><a class="code" href="a00148.html">parallel_do_feeder</a>: internal::no_copy
 <a name="l00061"></a>00061 {
-<a name="l00062"></a>00062     <a class="code" href="a00144.html">parallel_do_feeder</a>() {}
-<a name="l00063"></a>00063     <span class="keyword">virtual</span> ~<a class="code" href="a00144.html">parallel_do_feeder</a> () {}
+<a name="l00062"></a>00062     <a class="code" href="a00148.html">parallel_do_feeder</a>() {}
+<a name="l00063"></a>00063     <span class="keyword">virtual</span> ~<a class="code" href="a00148.html">parallel_do_feeder</a> () {}
 <a name="l00064"></a>00064     <span class="keyword">virtual</span> <span class="keywordtype">void</span> internal_add( <span class="keyword">const</span> Item& item ) = 0;
 <a name="l00065"></a>00065     <span class="keyword">template</span><<span class="keyword">typename</span> Body_, <span class="keyword">typename</span> Item_> <span class="keyword">friend</span> <span class="keyword">class </span>internal::parallel_do_feeder_impl;
 <a name="l00066"></a>00066 <span class="keyword">public</span>:
-<a name="l00068"></a><a class="code" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">00068</a>     <span class="keywordtype">void</span> <a class="code" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">add</a>( <span class="keyword">const</span> Item& item ) {internal_add(item);}
+<a name="l00068"></a><a class="code" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">00068</a>     <span class="keywordtype">void</span> <a class="code" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">add</a>( <span class="keyword">const</span> Item& item ) {internal_add(item);}
 <a name="l00069"></a>00069 };
 <a name="l00070"></a>00070 
 <a name="l00072"></a>00072 <span class="keyword">namespace </span>internal {
@@ -163,7 +163,7 @@
 <a name="l00154"></a>00154         {
 <a name="l00155"></a>00155             <span class="keyword">typedef</span> do_iteration_task<Body, Item> iteration_type;
 <a name="l00156"></a>00156 
-<a name="l00157"></a>00157             iteration_type& t = *<span class="keyword">new</span> (<a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().allocate_additional_child_of(*my_barrier)) iteration_type(item, *<span class="keyword">this</span>);
+<a name="l00157"></a>00157             iteration_type& t = *<span class="keyword">new</span> (<a class="code" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().allocate_additional_child_of(*my_barrier)) iteration_type(item, *<span class="keyword">this</span>);
 <a name="l00158"></a>00158 
 <a name="l00159"></a>00159             t.spawn( t );
 <a name="l00160"></a>00160         }
@@ -173,14 +173,14 @@
 <a name="l00164"></a>00164 
 <a name="l00165"></a>00165         parallel_do_feeder_impl()
 <a name="l00166"></a>00166         {
-<a name="l00167"></a>00167             my_barrier = <span class="keyword">new</span>( <a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) empty_task();
+<a name="l00167"></a>00167             my_barrier = <span class="keyword">new</span>( <a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) empty_task();
 <a name="l00168"></a>00168             __TBB_ASSERT(my_barrier, <span class="stringliteral">"root task allocation failed"</span>);
 <a name="l00169"></a>00169         }
 <a name="l00170"></a>00170 
 <a name="l00171"></a>00171 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span>        parallel_do_feeder_impl(<a class="code" href="a00163.html">tbb::task_group_context</a> &context)
+<a name="l00172"></a>00172 <span class="preprocessor"></span>        parallel_do_feeder_impl(<a class="code" href="a00167.html">tbb::task_group_context</a> &context)
 <a name="l00173"></a>00173         {
-<a name="l00174"></a>00174             my_barrier = <span class="keyword">new</span>( <a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>(context) ) empty_task();
+<a name="l00174"></a>00174             my_barrier = <span class="keyword">new</span>( <a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>(context) ) empty_task();
 <a name="l00175"></a>00175             __TBB_ASSERT(my_barrier, <span class="stringliteral">"root task allocation failed"</span>);
 <a name="l00176"></a>00176         }
 <a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
@@ -440,12 +440,12 @@
 <a name="l00467"></a>00467 
 <a name="l00468"></a>00468 
 <a name="l00469"></a>00469 <span class="keyword">template</span><<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Body> 
-<a name="l00470"></a><a class="code" href="a00228.html#g3383e2703977012b6f384d673410f1f7">00470</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body )
+<a name="l00470"></a><a class="code" href="a00233.html#g3383e2703977012b6f384d673410f1f7">00470</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body )
 <a name="l00471"></a>00471 {
 <a name="l00472"></a>00472     <span class="keywordflow">if</span> ( first == last )
 <a name="l00473"></a>00473         <span class="keywordflow">return</span>;
 <a name="l00474"></a>00474 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00475"></a>00475 <span class="preprocessor"></span>    <a class="code" href="a00163.html">task_group_context</a> context;
+<a name="l00475"></a>00475 <span class="preprocessor"></span>    <a class="code" href="a00167.html">task_group_context</a> context;
 <a name="l00476"></a>00476 <span class="preprocessor">#endif // __TBB_EXCEPTIONS</span>
 <a name="l00477"></a>00477 <span class="preprocessor"></span>    internal::select_parallel_do( first, last, body, &Body::operator()
 <a name="l00478"></a>00478 #<span class="keywordflow">if</span> __TBB_EXCEPTIONS
@@ -457,7 +457,7 @@
 <a name="l00484"></a>00484 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
 <a name="l00486"></a>00486 <span class="preprocessor"></span>
 <a name="l00487"></a>00487 <span class="preprocessor">template<typename Iterator, typename Body> </span>
-<a name="l00488"></a><a class="code" href="a00228.html#g2617dc9b88b3285a7212599d49f74228">00488</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00228.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <a class="code" href="a00163.html">task_group_context</a>& context  )
+<a name="l00488"></a><a class="code" href="a00233.html#g2617dc9b88b3285a7212599d49f74228">00488</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00233.html#g3383e2703977012b6f384d673410f1f7">parallel_do</a>( Iterator first, Iterator last, <span class="keyword">const</span> Body& body, <a class="code" href="a00167.html">task_group_context</a>& context  )
 <a name="l00489"></a>00489 {
 <a name="l00490"></a>00490     <span class="keywordflow">if</span> ( first == last )
 <a name="l00491"></a>00491         <span class="keywordflow">return</span>;
diff --git a/doc/html/a00310.html b/doc/html/a00313.html
similarity index 81%
rename from doc/html/a00310.html
rename to doc/html/a00313.html
index 8f91b57..4bd12ad 100644
--- a/doc/html/a00310.html
+++ b/doc/html/a00313.html
@@ -82,21 +82,21 @@
 <a name="l00066"></a>00066         <span class="keyword">static</span> <span class="keywordtype">void</span> run(  <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> Partitioner& partitioner ) {
 <a name="l00067"></a>00067             <span class="keywordflow">if</span>( !range.empty() ) {
 <a name="l00068"></a>00068 #<span class="keywordflow">if</span> !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
-<a name="l00069"></a>00069                 start_for& a = *<span class="keyword">new</span>(<a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_for(range,body,const_cast<Partitioner&>(partitioner));
+<a name="l00069"></a>00069                 start_for& a = *<span class="keyword">new</span>(<a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_for(range,body,const_cast<Partitioner&>(partitioner));
 <a name="l00070"></a>00070 <span class="preprocessor">#else</span>
 <a name="l00071"></a>00071 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
 <a name="l00072"></a>00072                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
 <a name="l00073"></a>00073                 task_group_context context;
 <a name="l00074"></a>00074                 start_for& a = *<span class="keyword">new</span>(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
 <a name="l00075"></a>00075 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
-<a name="l00076"></a>00076                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
+<a name="l00076"></a>00076                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
 <a name="l00077"></a>00077             }
 <a name="l00078"></a>00078         }
 <a name="l00079"></a>00079 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
 <a name="l00080"></a>00080 <span class="preprocessor"></span>        <span class="keyword">static</span> <span class="keywordtype">void</span> run(  <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> Partitioner& partitioner, task_group_context& context ) {
 <a name="l00081"></a>00081             <span class="keywordflow">if</span>( !range.empty() ) {
 <a name="l00082"></a>00082                 start_for& a = *<span class="keyword">new</span>(task::allocate_root(context)) start_for(range,body,const_cast<Partitioner&>(partitioner));
-<a name="l00083"></a>00083                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
+<a name="l00083"></a>00083                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>(a);
 <a name="l00084"></a>00084             }
 <a name="l00085"></a>00085         }
 <a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
@@ -125,44 +125,44 @@
 <a name="l00120"></a>00120 
 <a name="l00122"></a>00122 
 <a name="l00123"></a>00123 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00124"></a><a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">00124</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body ) {
+<a name="l00124"></a><a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">00124</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body ) {
 <a name="l00125"></a>00125     internal::start_for<Range,Body,__TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());
 <a name="l00126"></a>00126 }
 <a name="l00127"></a>00127 
 <a name="l00129"></a>00129 
 <a name="l00130"></a>00130 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00131"></a><a class="code" href="a00228.html#g13cac5dd55c7533bccea43a51c33d0e5">00131</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner ) {
+<a name="l00131"></a><a class="code" href="a00233.html#g13cac5dd55c7533bccea43a51c33d0e5">00131</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner ) {
 <a name="l00132"></a>00132     internal::start_for<Range,Body,simple_partitioner>::run(range,body,partitioner);
 <a name="l00133"></a>00133 }
 <a name="l00134"></a>00134 
 <a name="l00136"></a>00136 
 <a name="l00137"></a>00137 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00138"></a><a class="code" href="a00228.html#ga7ac75d532389b55b9247f3fdb0b00d1">00138</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
+<a name="l00138"></a><a class="code" href="a00233.html#ga7ac75d532389b55b9247f3fdb0b00d1">00138</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
 <a name="l00139"></a>00139     internal::start_for<Range,Body,auto_partitioner>::run(range,body,partitioner);
 <a name="l00140"></a>00140 }
 <a name="l00141"></a>00141 
 <a name="l00143"></a>00143 
 <a name="l00144"></a>00144 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00145"></a><a class="code" href="a00228.html#g9cd1b210ceb1c040f30e390b4a21bde8">00145</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
+<a name="l00145"></a><a class="code" href="a00233.html#g9cd1b210ceb1c040f30e390b4a21bde8">00145</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
 <a name="l00146"></a>00146     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);
 <a name="l00147"></a>00147 }
 <a name="l00148"></a>00148 
 <a name="l00149"></a>00149 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
 <a name="l00151"></a>00151 <span class="preprocessor"></span>
 <a name="l00152"></a>00152 <span class="preprocessor">template<typename Range, typename Body></span>
-<a name="l00153"></a><a class="code" href="a00228.html#g2d317a5e0078cd193125439fed60dfdc">00153</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner, <a class="code" hr [...]
+<a name="l00153"></a><a class="code" href="a00233.html#g2d317a5e0078cd193125439fed60dfdc">00153</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner, <a class="code" hr [...]
 <a name="l00154"></a>00154     internal::start_for<Range,Body,simple_partitioner>::run(range, body, partitioner, context);
 <a name="l00155"></a>00155 }
 <a name="l00156"></a>00156 
 <a name="l00158"></a>00158 
 <a name="l00159"></a>00159 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00160"></a><a class="code" href="a00228.html#g1c0700e3f85e83a788ff3ede88ebb7e9">00160</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context< [...]
+<a name="l00160"></a><a class="code" href="a00233.html#g1c0700e3f85e83a788ff3ede88ebb7e9">00160</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context< [...]
 <a name="l00161"></a>00161     internal::start_for<Range,Body,auto_partitioner>::run(range, body, partitioner, context);
 <a name="l00162"></a>00162 }
 <a name="l00163"></a>00163 
 <a name="l00165"></a>00165 
 <a name="l00166"></a>00166 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00167"></a><a class="code" href="a00228.html#g04b4696b67370c01353ff5974c8f1196">00167</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
+<a name="l00167"></a><a class="code" href="a00233.html#g04b4696b67370c01353ff5974c8f1196">00167</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
 <a name="l00168"></a>00168     internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);
 <a name="l00169"></a>00169 }
 <a name="l00170"></a>00170 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
@@ -171,11 +171,11 @@
 <a name="l00174"></a>00174 <span class="keyword">namespace </span>internal {
 <a name="l00176"></a>00176 <span class="keyword">template</span><<span class="keyword">typename</span> Function, <span class="keyword">typename</span> Index>
 <a name="l00177"></a>00177 <span class="keyword">class </span>parallel_for_body : internal::no_assign {
-<a name="l00178"></a>00178     Function &my_func;
+<a name="l00178"></a>00178     <span class="keyword">const</span> Function &my_func;
 <a name="l00179"></a>00179     <span class="keyword">const</span> Index my_begin;
 <a name="l00180"></a>00180     <span class="keyword">const</span> Index my_step; 
 <a name="l00181"></a>00181 <span class="keyword">public</span>:
-<a name="l00182"></a>00182     parallel_for_body( Function& _func, Index& _begin, Index& _step) 
+<a name="l00182"></a>00182     parallel_for_body( <span class="keyword">const</span> Function& _func, Index& _begin, Index& _step) 
 <a name="l00183"></a>00183         : my_func(_func), my_begin(_begin), my_step(_step) {}
 <a name="l00184"></a>00184     
 <a name="l00185"></a>00185     <span class="keywordtype">void</span> operator()( <a class="code" href="a00122.html">tbb::blocked_range<Index></a>& r )<span class="keyword"> const </span>{
@@ -189,12 +189,12 @@
 <a name="l00194"></a>00194 
 <a name="l00196"></a>00196 
 <a name="l00197"></a>00197 <span class="keyword">template</span> <<span class="keyword">typename</span> Index, <span class="keyword">typename</span> Function>
-<a name="l00198"></a>00198 Function <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, Index step, Function f) {
-<a name="l00199"></a>00199     <a class="code" href="a00163.html">tbb::task_group_context</a> context;
-<a name="l00200"></a>00200     <span class="keywordflow">return</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(first, last, step, f, context);
+<a name="l00198"></a><a class="code" href="a00232.html#15c764c70c8a32e7a4b8c291d0cc8dde">00198</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, Index step, <span class="keyword">const</span> Function& f) {
+<a name="l00199"></a>00199     <a class="code" href="a00167.html">tbb::task_group_context</a> context;
+<a name="l00200"></a>00200     <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(first, last, step, f, context);
 <a name="l00201"></a>00201 }
 <a name="l00202"></a>00202 <span class="keyword">template</span> <<span class="keyword">typename</span> Index, <span class="keyword">typename</span> Function>
-<a name="l00203"></a>00203 Function <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, Index step, Function f, <a class="code" href="a00163.html">tbb::task_group_context</a> &context) {
+<a name="l00203"></a>00203 <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, Index step, <span class="keyword">const</span> Function& f, <a class="code" href="a00167.html">tbb::task_group_context</a> &context) {
 <a name="l00204"></a>00204     <span class="keywordflow">if</span> (step <= 0 ) <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">"step should be positive"</span>);
 <a name="l00205"></a>00205 
 <a name="l00206"></a>00206     <span class="keywordflow">if</span> (last > first) {
@@ -202,19 +202,28 @@
 <a name="l00208"></a>00208         <span class="keywordflow">if</span> (first + end * step < last) end++;
 <a name="l00209"></a>00209         <a class="code" href="a00122.html">tbb::blocked_range<Index></a> range(static_cast<Index>(0), end);
 <a name="l00210"></a>00210         internal::parallel_for_body<Function, Index> body(f, first, step);
-<a name="l00211"></a>00211         <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">tbb::parallel_for</a>(range, body, <a class="code" href="a00120.html">tbb::auto_partitioner</a>(), context);
+<a name="l00211"></a>00211         <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">tbb::parallel_for</a>(range, body, <a class="code" href="a00120.html">tbb::auto_partitioner</a>(), context);
 <a name="l00212"></a>00212     }
-<a name="l00213"></a>00213     <span class="keywordflow">return</span> f;
-<a name="l00214"></a>00214 }
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 } <span class="comment">// namespace strict_ppl</span>
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219 <span class="keyword">using</span> <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">strict_ppl::parallel_for</a>;
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 } <span class="comment">// namespace tbb</span>
-<a name="l00222"></a>00222 
-<a name="l00223"></a>00223 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_for_H */</span>
+<a name="l00213"></a>00213 }
+<a name="l00215"></a>00215 <span class="keyword">template</span> <<span class="keyword">typename</span> Index, <span class="keyword">typename</span> Function>
+<a name="l00216"></a><a class="code" href="a00232.html#490399525b1e690ec31d6db964c6b272">00216</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, <span class="keyword">const</span> Function& f) {
+<a name="l00217"></a>00217     <a class="code" href="a00167.html">tbb::task_group_context</a> context;
+<a name="l00218"></a>00218     <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(first, last, static_cast<Index>(1), f, context);
+<a name="l00219"></a>00219 }
+<a name="l00220"></a>00220 <span class="keyword">template</span> <<span class="keyword">typename</span> Index, <span class="keyword">typename</span> Function>
+<a name="l00221"></a>00221 <span class="keywordtype">void</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(Index first, Index last, <span class="keyword">const</span> Function& f, <a class="code" href="a00167.html">tbb::task_group_context</a> &context) {
+<a name="l00222"></a>00222     <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>(first, last, static_cast<Index>(1), f, context);
+<a name="l00223"></a>00223 }
 <a name="l00224"></a>00224 
+<a name="l00226"></a>00226 
+<a name="l00227"></a>00227 } <span class="comment">// namespace strict_ppl</span>
+<a name="l00228"></a>00228 
+<a name="l00229"></a>00229 <span class="keyword">using</span> <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">strict_ppl::parallel_for</a>;
+<a name="l00230"></a>00230 
+<a name="l00231"></a>00231 } <span class="comment">// namespace tbb</span>
+<a name="l00232"></a>00232 
+<a name="l00233"></a>00233 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_for_H */</span>
+<a name="l00234"></a>00234 
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00314.html b/doc/html/a00317.html
similarity index 83%
rename from doc/html/a00314.html
rename to doc/html/a00317.html
index 51fd807..75f8a07 100644
--- a/doc/html/a00314.html
+++ b/doc/html/a00317.html
@@ -63,20 +63,20 @@
 <a name="l00044"></a>00044 <span class="comment"></span>
 <a name="l00048"></a>00048 
 <a name="l00049"></a>00049 
-<a name="l00050"></a>00050 <span class="keyword">template</span><<span class="keyword">typename</span> Input_iterator, <span class="keyword">typename</span> Function>
-<a name="l00051"></a><a class="code" href="a00228.html#g99b24f5d0e90aa76fd5f089e263a99b4">00051</a> Function <a class="code" href="a00228.html#g99b24f5d0e90aa76fd5f089e263a99b4">parallel_for_each</a>(Input_iterator _First, Input_iterator _Last, Function _Func, <a class="code" href="a00163.html">task_group_context</a> &context) {
-<a name="l00052"></a>00052     internal::parallel_for_each_body<Function, Input_iterator> body(_Func);
+<a name="l00050"></a>00050 <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator, <span class="keyword">typename</span> Function>
+<a name="l00051"></a><a class="code" href="a00233.html#gbcb40499f038fd82deca88366b404790">00051</a> Function <a class="code" href="a00233.html#gbcb40499f038fd82deca88366b404790">parallel_for_each</a>(InputIterator first, InputIterator last, Function f, <a class="code" href="a00167.html">task_group_context</a> &context) {
+<a name="l00052"></a>00052     internal::parallel_for_each_body<Function, InputIterator> body(f);
 <a name="l00053"></a>00053 
-<a name="l00054"></a>00054     <a class="code" href="a00228.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (_First, _Last, body, context);
-<a name="l00055"></a>00055     <span class="keywordflow">return</span> _Func;
+<a name="l00054"></a>00054     <a class="code" href="a00233.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (first, last, body, context);
+<a name="l00055"></a>00055     <span class="keywordflow">return</span> f;
 <a name="l00056"></a>00056 }
 <a name="l00057"></a>00057 
-<a name="l00059"></a>00059 <span class="keyword">template</span><<span class="keyword">typename</span> Input_iterator, <span class="keyword">typename</span> Function>
-<a name="l00060"></a><a class="code" href="a00228.html#g59794cb24f74cda4253fd9aed0a4b150">00060</a> Function <a class="code" href="a00228.html#g99b24f5d0e90aa76fd5f089e263a99b4">parallel_for_each</a>(Input_iterator _First, Input_iterator _Last, Function _Func) {
-<a name="l00061"></a>00061     internal::parallel_for_each_body<Function, Input_iterator> body(_Func);
+<a name="l00059"></a>00059 <span class="keyword">template</span><<span class="keyword">typename</span> InputIterator, <span class="keyword">typename</span> Function>
+<a name="l00060"></a><a class="code" href="a00233.html#g85a58ff0853f129adb6f9e4355326ccc">00060</a> Function <a class="code" href="a00233.html#gbcb40499f038fd82deca88366b404790">parallel_for_each</a>(InputIterator first, InputIterator last, Function f) {
+<a name="l00061"></a>00061     internal::parallel_for_each_body<Function, InputIterator> body(f);
 <a name="l00062"></a>00062 
-<a name="l00063"></a>00063     <a class="code" href="a00228.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (_First, _Last, body);
-<a name="l00064"></a>00064     <span class="keywordflow">return</span> _Func;
+<a name="l00063"></a>00063     <a class="code" href="a00233.html#g3383e2703977012b6f384d673410f1f7">tbb::parallel_do</a> (first, last, body);
+<a name="l00064"></a>00064     <span class="keywordflow">return</span> f;
 <a name="l00065"></a>00065 }
 <a name="l00066"></a>00066 
 <a name="l00068"></a>00068 
diff --git a/doc/html/a00316.html b/doc/html/a00319.html
similarity index 94%
rename from doc/html/a00316.html
rename to doc/html/a00319.html
index 66fcbe0..3096d79 100644
--- a/doc/html/a00316.html
+++ b/doc/html/a00319.html
@@ -149,7 +149,7 @@
 <a name="l00129"></a>00129     <span class="comment">// The class destroys root if exception occured as well as in normal case</span>
 <a name="l00130"></a>00130     <span class="keyword">class </span>parallel_invoke_cleaner: internal::no_copy { 
 <a name="l00131"></a>00131     <span class="keyword">public</span>:
-<a name="l00132"></a>00132         parallel_invoke_cleaner(<span class="keywordtype">int</span> number_of_children, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children))
+<a name="l00132"></a>00132         parallel_invoke_cleaner(<span class="keywordtype">int</span> number_of_children, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children))
 <a name="l00133"></a>00133         {}
 <a name="l00134"></a>00134         ~parallel_invoke_cleaner(){
 <a name="l00135"></a>00135             root.destroy(root);
@@ -163,7 +163,7 @@
 <a name="l00148"></a>00148 <span class="comment">// parallel_invoke with user-defined context</span>
 <a name="l00149"></a>00149 <span class="comment">// two arguments</span>
 <a name="l00150"></a>00150 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1 >
-<a name="l00151"></a><a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">00151</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00151"></a><a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">00151</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00152"></a>00152     internal::parallel_invoke_cleaner cleaner(2, context);
 <a name="l00153"></a>00153     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00154"></a>00154 
@@ -174,7 +174,7 @@
 <a name="l00159"></a>00159 
 <a name="l00160"></a>00160 <span class="comment">// three arguments</span>
 <a name="l00161"></a>00161 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2 >
-<a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00163"></a>00163     internal::parallel_invoke_cleaner cleaner(3, context);
 <a name="l00164"></a>00164     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00165"></a>00165 
@@ -186,7 +186,7 @@
 <a name="l00171"></a>00171 
 <a name="l00172"></a>00172 <span class="comment">// four arguments</span>
 <a name="l00173"></a>00173 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3>
-<a name="l00174"></a>00174 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00174"></a>00174 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00175"></a>00175     internal::parallel_invoke_cleaner cleaner(4, context);
 <a name="l00176"></a>00176     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00177"></a>00177 
@@ -199,7 +199,7 @@
 <a name="l00184"></a>00184 
 <a name="l00185"></a>00185 <span class="comment">// five arguments</span>
 <a name="l00186"></a>00186 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4 >
-<a name="l00187"></a>00187 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00187"></a>00187 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00188"></a>00188     internal::parallel_invoke_cleaner cleaner(3, context);
 <a name="l00189"></a>00189     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00190"></a>00190 
@@ -211,7 +211,7 @@
 <a name="l00196"></a>00196 
 <a name="l00197"></a>00197 <span class="comment">// six arguments</span>
 <a name="l00198"></a>00198 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5 >
-<a name="l00199"></a>00199 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00199"></a>00199 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00200"></a>00200     internal::parallel_invoke_cleaner cleaner(3, context);
 <a name="l00201"></a>00201     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00202"></a>00202 
@@ -223,7 +223,7 @@
 <a name="l00208"></a>00208 
 <a name="l00209"></a>00209 <span class="comment">// seven arguments</span>
 <a name="l00210"></a>00210 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6 >
-<a name="l00211"></a>00211 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00211"></a>00211 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00212"></a>00212     internal::parallel_invoke_cleaner cleaner(3, context);
 <a name="l00213"></a>00213     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00214"></a>00214 
@@ -236,7 +236,7 @@
 <a name="l00221"></a>00221 <span class="comment">// eight arguments</span>
 <a name="l00222"></a>00222 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00223"></a>00223     <span class="keyword">typename</span> F7>
-<a name="l00224"></a>00224 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00224"></a>00224 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00225"></a>00225     internal::parallel_invoke_cleaner cleaner(4, context);
 <a name="l00226"></a>00226     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00227"></a>00227 
@@ -250,7 +250,7 @@
 <a name="l00235"></a>00235 <span class="comment">// nine arguments</span>
 <a name="l00236"></a>00236 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00237"></a>00237         <span class="keyword">typename</span> F7, <span class="keyword">typename</span> F8>
-<a name="l00238"></a>00238 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00238"></a>00238 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00239"></a>00239     internal::parallel_invoke_cleaner cleaner(4, context);
 <a name="l00240"></a>00240     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00241"></a>00241 
@@ -264,7 +264,7 @@
 <a name="l00249"></a>00249 <span class="comment">// ten arguments</span>
 <a name="l00250"></a>00250 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00251"></a>00251         <span class="keyword">typename</span> F7, <span class="keyword">typename</span> F8, <span class="keyword">typename</span> F9>
-<a name="l00252"></a>00252 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="code" href="a00163.html">tbb::task_group_context</a>& context) {
+<a name="l00252"></a>00252 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9, <a class="code" href="a00167.html">tbb::task_group_context</a>& context) {
 <a name="l00253"></a>00253     internal::parallel_invoke_cleaner cleaner(4, context);
 <a name="l00254"></a>00254     internal::parallel_invoke_helper& root = cleaner.root;
 <a name="l00255"></a>00255 
@@ -277,58 +277,58 @@
 <a name="l00262"></a>00262 
 <a name="l00263"></a>00263 <span class="comment">// two arguments</span>
 <a name="l00264"></a>00264 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1>
-<a name="l00265"></a>00265 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1) {
+<a name="l00265"></a>00265 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1) {
 <a name="l00266"></a>00266     task_group_context context;
 <a name="l00267"></a>00267     parallel_invoke<F0, F1>(f0, f1, context);
 <a name="l00268"></a>00268 }
 <a name="l00269"></a>00269 <span class="comment">// three arguments</span>
 <a name="l00270"></a>00270 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2>
-<a name="l00271"></a>00271 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2) {
+<a name="l00271"></a>00271 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2) {
 <a name="l00272"></a>00272     task_group_context context;
 <a name="l00273"></a>00273     parallel_invoke<F0, F1, F2>(f0, f1, f2, context);
 <a name="l00274"></a>00274 }
 <a name="l00275"></a>00275 <span class="comment">// four arguments</span>
 <a name="l00276"></a>00276 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3 >
-<a name="l00277"></a>00277 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3) {
+<a name="l00277"></a>00277 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3) {
 <a name="l00278"></a>00278     task_group_context context;
 <a name="l00279"></a>00279     parallel_invoke<F0, F1, F2, F3>(f0, f1, f2, f3, context);
 <a name="l00280"></a>00280 }
 <a name="l00281"></a>00281 <span class="comment">// five arguments</span>
 <a name="l00282"></a>00282 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4>
-<a name="l00283"></a>00283 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4) {
+<a name="l00283"></a>00283 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4) {
 <a name="l00284"></a>00284     task_group_context context;
 <a name="l00285"></a>00285     parallel_invoke<F0, F1, F2, F3, F4>(f0, f1, f2, f3, f4, context);
 <a name="l00286"></a>00286 }
 <a name="l00287"></a>00287 <span class="comment">// six arguments</span>
 <a name="l00288"></a>00288 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5>
-<a name="l00289"></a>00289 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5) {
+<a name="l00289"></a>00289 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5) {
 <a name="l00290"></a>00290     task_group_context context;
 <a name="l00291"></a>00291     parallel_invoke<F0, F1, F2, F3, F4, F5>(f0, f1, f2, f3, f4, f5, context);
 <a name="l00292"></a>00292 }
 <a name="l00293"></a>00293 <span class="comment">// seven arguments</span>
 <a name="l00294"></a>00294 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6>
-<a name="l00295"></a>00295 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6) {
+<a name="l00295"></a>00295 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6) {
 <a name="l00296"></a>00296     task_group_context context;
 <a name="l00297"></a>00297     parallel_invoke<F0, F1, F2, F3, F4, F5, F6>(f0, f1, f2, f3, f4, f5, f6, context);
 <a name="l00298"></a>00298 }
 <a name="l00299"></a>00299 <span class="comment">// eigth arguments</span>
 <a name="l00300"></a>00300 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00301"></a>00301         <span class="keyword">typename</span> F7>
-<a name="l00302"></a>00302 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7) {
+<a name="l00302"></a>00302 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7) {
 <a name="l00303"></a>00303     task_group_context context;
 <a name="l00304"></a>00304     parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7>(f0, f1, f2, f3, f4, f5, f6, f7, context);
 <a name="l00305"></a>00305 }
 <a name="l00306"></a>00306 <span class="comment">// nine arguments</span>
 <a name="l00307"></a>00307 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00308"></a>00308         <span class="keyword">typename</span> F7, <span class="keyword">typename</span> F8>
-<a name="l00309"></a>00309 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8) {
+<a name="l00309"></a>00309 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8) {
 <a name="l00310"></a>00310     task_group_context context;
 <a name="l00311"></a>00311     parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7, F8>(f0, f1, f2, f3, f4, f5, f6, f7, f8, context);
 <a name="l00312"></a>00312 }
 <a name="l00313"></a>00313 <span class="comment">// ten arguments</span>
 <a name="l00314"></a>00314 <span class="keyword">template</span><<span class="keyword">typename</span> F0, <span class="keyword">typename</span> F1, <span class="keyword">typename</span> F2, <span class="keyword">typename</span> F3, <span class="keyword">typename</span> F4, <span class="keyword">typename</span> F5, <span class="keyword">typename</span> F6,
 <a name="l00315"></a>00315         <span class="keyword">typename</span> F7, <span class="keyword">typename</span> F8, <span class="keyword">typename</span> F9>
-<a name="l00316"></a>00316 <span class="keywordtype">void</span> <a class="code" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9) {
+<a name="l00316"></a>00316 <span class="keywordtype">void</span> <a class="code" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">parallel_invoke</a>(F0 f0, F1 f1, F2 f2, F3 f3, F4 f4, F5 f5, F6 f6, F7 f7, F8 f8, F9 f9) {
 <a name="l00317"></a>00317     task_group_context context;
 <a name="l00318"></a>00318     parallel_invoke<F0, F1, F2, F3, F4, F5, F6, F7, F8, F9>(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, context);
 <a name="l00319"></a>00319 }
diff --git a/doc/html/a00322.html b/doc/html/a00325.html
similarity index 69%
rename from doc/html/a00322.html
rename to doc/html/a00325.html
index 00bed61..e0ea2c4 100644
--- a/doc/html/a00322.html
+++ b/doc/html/a00325.html
@@ -139,19 +139,19 @@
 <a name="l00128"></a>00128         <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, Partitioner& partitioner ) {
 <a name="l00129"></a>00129             <span class="keywordflow">if</span>( !range.empty() ) {
 <a name="l00130"></a>00130 #<span class="keywordflow">if</span> !__TBB_EXCEPTIONS || TBB_JOIN_OUTER_TASK_GROUP
-<a name="l00131"></a>00131                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(<a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_reduce(range,&body,partitioner) );
+<a name="l00131"></a>00131                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(<a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_reduce(range,&body,partitioner) );
 <a name="l00132"></a>00132 <span class="preprocessor">#else</span>
 <a name="l00133"></a>00133 <span class="preprocessor"></span>                <span class="comment">// Bound context prevents exceptions from body to affect nesting or sibling algorithms,</span>
 <a name="l00134"></a>00134                 <span class="comment">// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.</span>
 <a name="l00135"></a>00135                 task_group_context context;
-<a name="l00136"></a>00136                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
+<a name="l00136"></a>00136                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
 <a name="l00137"></a>00137 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS && !TBB_JOIN_OUTER_TASK_GROUP */</span>
 <a name="l00138"></a>00138             }
 <a name="l00139"></a>00139         }
 <a name="l00140"></a>00140 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
 <a name="l00141"></a>00141 <span class="preprocessor"></span>        <span class="keyword">static</span> <span class="keywordtype">void</span> run( <span class="keyword">const</span> Range& range, Body& body, Partitioner& partitioner, task_group_context& context ) {
 <a name="l00142"></a>00142             <span class="keywordflow">if</span>( !range.empty() ) 
-<a name="l00143"></a>00143                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
+<a name="l00143"></a>00143                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *<span class="keyword">new</span>(task::allocate_root(context)) start_reduce(range,&body,partitioner) );
 <a name="l00144"></a>00144         }
 <a name="l00145"></a>00145 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
 <a name="l00146"></a>00146     };
@@ -192,162 +192,163 @@
 <a name="l00185"></a>00185         <span class="keyword">const</span> RealBody&  my_real_body;
 <a name="l00186"></a>00186         <span class="keyword">const</span> Reduction& my_reduction;
 <a name="l00187"></a>00187         Value            my_value;
-<a name="l00188"></a>00188     <span class="keyword">public</span>:
-<a name="l00189"></a>00189         lambda_reduce_body( <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& body, <span class="keyword">const</span> Reduction& reduction )
-<a name="l00190"></a>00190             : identity_element(identity)
-<a name="l00191"></a>00191             , my_real_body(body)
-<a name="l00192"></a>00192             , my_reduction(reduction)
-<a name="l00193"></a>00193             , my_value(identity)
-<a name="l00194"></a>00194         { }
-<a name="l00195"></a>00195         lambda_reduce_body( <span class="keyword">const</span> lambda_reduce_body& other )
-<a name="l00196"></a>00196             : identity_element(other.identity_element)
-<a name="l00197"></a>00197             , my_real_body(other.my_real_body)
-<a name="l00198"></a>00198             , my_reduction(other.my_reduction)
-<a name="l00199"></a>00199             , my_value(other.my_value)
-<a name="l00200"></a>00200         { }
-<a name="l00201"></a>00201         lambda_reduce_body( lambda_reduce_body& other, <a class="code" href="a00161.html">tbb::split</a> )
-<a name="l00202"></a>00202             : identity_element(other.identity_element)
-<a name="l00203"></a>00203             , my_real_body(other.my_real_body)
-<a name="l00204"></a>00204             , my_reduction(other.my_reduction)
-<a name="l00205"></a>00205             , my_value(other.identity_element)
-<a name="l00206"></a>00206         { }
-<a name="l00207"></a>00207         <span class="keywordtype">void</span> operator()(Range& range) {
-<a name="l00208"></a>00208             my_value = my_real_body(range, const_cast<const Value&>(my_value));
-<a name="l00209"></a>00209         }
-<a name="l00210"></a>00210         <span class="keywordtype">void</span> join( lambda_reduce_body& rhs ) {
-<a name="l00211"></a>00211             my_value = my_reduction(const_cast<const Value&>(my_value), const_cast<const Value&>(rhs.my_value));
-<a name="l00212"></a>00212         }
-<a name="l00213"></a>00213         Value result()<span class="keyword"> const </span>{
-<a name="l00214"></a>00214             <span class="keywordflow">return</span> my_value;
-<a name="l00215"></a>00215         }
-<a name="l00216"></a>00216     };
-<a name="l00217"></a>00217 
-<a name="l00218"></a>00218 } <span class="comment">// namespace internal</span>
-<a name="l00220"></a>00220 <span class="comment"></span>
-<a name="l00221"></a>00221 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
-<a name="l00222"></a>00222 
-<a name="l00241"></a>00241 
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00245"></a><a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">00245</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body ) {
-<a name="l00246"></a>00246     internal::start_reduce<Range,Body, const __TBB_DEFAULT_PARTITIONER>::run( range, body, __TBB_DEFAULT_PARTITIONER() );
-<a name="l00247"></a>00247 }
-<a name="l00248"></a>00248 
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00252"></a><a class="code" href="a00228.html#gec1b7c03f9da909bef5db12e3d41bed3">00252</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner ) {
-<a name="l00253"></a>00253     internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner );
-<a name="l00254"></a>00254 }
-<a name="l00255"></a>00255 
-<a name="l00257"></a>00257 
-<a name="l00258"></a>00258 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00259"></a><a class="code" href="a00228.html#g18a19157e6245992fc00ca0adeb7dd37">00259</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
-<a name="l00260"></a>00260     internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner );
-<a name="l00261"></a>00261 }
-<a name="l00262"></a>00262 
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00266"></a><a class="code" href="a00228.html#gc61e73fcc36c92d79a217fc355ff4a6b">00266</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
-<a name="l00267"></a>00267     internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner );
-<a name="l00268"></a>00268 }
-<a name="l00269"></a>00269 
-<a name="l00270"></a>00270 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00272"></a>00272 <span class="preprocessor"></span>
-<a name="l00273"></a>00273 <span class="preprocessor">template<typename Range, typename Body></span>
-<a name="l00274"></a><a class="code" href="a00228.html#g45cb00c42a18e334bbde8b7535afe460">00274</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_cont [...]
-<a name="l00275"></a>00275     internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner, context );
-<a name="l00276"></a>00276 }
-<a name="l00277"></a>00277 
-<a name="l00279"></a>00279 
-<a name="l00280"></a>00280 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00281"></a><a class="code" href="a00228.html#g1c1ea1d7c61b3c225e92c70d669a53a5">00281</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
-<a name="l00282"></a>00282     internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner, context );
-<a name="l00283"></a>00283 }
-<a name="l00284"></a>00284 
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00288"></a><a class="code" href="a00228.html#gd9ac3a3811060314695f33b703c6e11b">00288</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
-<a name="l00289"></a>00289     internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner, context );
-<a name="l00290"></a>00290 }
-<a name="l00291"></a>00291 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00292"></a>00292 
-<a name="l00296"></a>00296 
+<a name="l00188"></a>00188         lambda_reduce_body& operator= ( <span class="keyword">const</span> lambda_reduce_body& other );
+<a name="l00189"></a>00189     <span class="keyword">public</span>:
+<a name="l00190"></a>00190         lambda_reduce_body( <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& body, <span class="keyword">const</span> Reduction& reduction )
+<a name="l00191"></a>00191             : identity_element(identity)
+<a name="l00192"></a>00192             , my_real_body(body)
+<a name="l00193"></a>00193             , my_reduction(reduction)
+<a name="l00194"></a>00194             , my_value(identity)
+<a name="l00195"></a>00195         { }
+<a name="l00196"></a>00196         lambda_reduce_body( <span class="keyword">const</span> lambda_reduce_body& other )
+<a name="l00197"></a>00197             : identity_element(other.identity_element)
+<a name="l00198"></a>00198             , my_real_body(other.my_real_body)
+<a name="l00199"></a>00199             , my_reduction(other.my_reduction)
+<a name="l00200"></a>00200             , my_value(other.my_value)
+<a name="l00201"></a>00201         { }
+<a name="l00202"></a>00202         lambda_reduce_body( lambda_reduce_body& other, <a class="code" href="a00165.html">tbb::split</a> )
+<a name="l00203"></a>00203             : identity_element(other.identity_element)
+<a name="l00204"></a>00204             , my_real_body(other.my_real_body)
+<a name="l00205"></a>00205             , my_reduction(other.my_reduction)
+<a name="l00206"></a>00206             , my_value(other.identity_element)
+<a name="l00207"></a>00207         { }
+<a name="l00208"></a>00208         <span class="keywordtype">void</span> operator()(Range& range) {
+<a name="l00209"></a>00209             my_value = my_real_body(range, const_cast<const Value&>(my_value));
+<a name="l00210"></a>00210         }
+<a name="l00211"></a>00211         <span class="keywordtype">void</span> join( lambda_reduce_body& rhs ) {
+<a name="l00212"></a>00212             my_value = my_reduction(const_cast<const Value&>(my_value), const_cast<const Value&>(rhs.my_value));
+<a name="l00213"></a>00213         }
+<a name="l00214"></a>00214         Value result()<span class="keyword"> const </span>{
+<a name="l00215"></a>00215             <span class="keywordflow">return</span> my_value;
+<a name="l00216"></a>00216         }
+<a name="l00217"></a>00217     };
+<a name="l00218"></a>00218 
+<a name="l00219"></a>00219 } <span class="comment">// namespace internal</span>
+<a name="l00221"></a>00221 <span class="comment"></span>
+<a name="l00222"></a>00222 <span class="comment">// Requirements on Range concept are documented in blocked_range.h</span>
+<a name="l00223"></a>00223 
+<a name="l00242"></a>00242 
+<a name="l00244"></a>00244 
+<a name="l00245"></a>00245 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00246"></a><a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">00246</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body ) {
+<a name="l00247"></a>00247     internal::start_reduce<Range,Body, const __TBB_DEFAULT_PARTITIONER>::run( range, body, __TBB_DEFAULT_PARTITIONER() );
+<a name="l00248"></a>00248 }
+<a name="l00249"></a>00249 
+<a name="l00251"></a>00251 
+<a name="l00252"></a>00252 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00253"></a><a class="code" href="a00233.html#gec1b7c03f9da909bef5db12e3d41bed3">00253</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner ) {
+<a name="l00254"></a>00254     internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner );
+<a name="l00255"></a>00255 }
+<a name="l00256"></a>00256 
+<a name="l00258"></a>00258 
+<a name="l00259"></a>00259 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00260"></a><a class="code" href="a00233.html#g18a19157e6245992fc00ca0adeb7dd37">00260</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
+<a name="l00261"></a>00261     internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner );
+<a name="l00262"></a>00262 }
+<a name="l00263"></a>00263 
+<a name="l00265"></a>00265 
+<a name="l00266"></a>00266 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00267"></a><a class="code" href="a00233.html#gc61e73fcc36c92d79a217fc355ff4a6b">00267</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
+<a name="l00268"></a>00268     internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner );
+<a name="l00269"></a>00269 }
+<a name="l00270"></a>00270 
+<a name="l00271"></a>00271 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00273"></a>00273 <span class="preprocessor"></span>
+<a name="l00274"></a>00274 <span class="preprocessor">template<typename Range, typename Body></span>
+<a name="l00275"></a><a class="code" href="a00233.html#g45cb00c42a18e334bbde8b7535afe460">00275</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_cont [...]
+<a name="l00276"></a>00276     internal::start_reduce<Range,Body,const simple_partitioner>::run( range, body, partitioner, context );
+<a name="l00277"></a>00277 }
+<a name="l00278"></a>00278 
+<a name="l00280"></a>00280 
+<a name="l00281"></a>00281 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00282"></a><a class="code" href="a00233.html#g1c1ea1d7c61b3c225e92c70d669a53a5">00282</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
+<a name="l00283"></a>00283     internal::start_reduce<Range,Body,const auto_partitioner>::run( range, body, partitioner, context );
+<a name="l00284"></a>00284 }
+<a name="l00285"></a>00285 
+<a name="l00287"></a>00287 
+<a name="l00288"></a>00288 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
+<a name="l00289"></a><a class="code" href="a00233.html#gd9ac3a3811060314695f33b703c6e11b">00289</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, Body& body, <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
+<a name="l00290"></a>00290     internal::start_reduce<Range,Body,affinity_partitioner>::run( range, body, partitioner, context );
+<a name="l00291"></a>00291 }
+<a name="l00292"></a>00292 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00293"></a>00293 
 <a name="l00297"></a>00297 
-<a name="l00298"></a>00298 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00299"></a><a class="code" href="a00228.html#gc9412e09fb01fcad8c018ea9cffb28ef">00299</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction ) {
-<a name="l00300"></a>00300     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00301"></a>00301     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,__TBB_DEFAULT_PARTITIONER>
-<a name="l00302"></a>00302                           ::run(range, body, __TBB_DEFAULT_PARTITIONER() );
-<a name="l00303"></a>00303     <span class="keywordflow">return</span> body.result();
-<a name="l00304"></a>00304 }
-<a name="l00305"></a>00305 
-<a name="l00307"></a>00307 
-<a name="l00308"></a>00308 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00309"></a><a class="code" href="a00228.html#gaddffeec0e892ac3d6fc7fc2053e1eca">00309</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00310"></a>00310                        <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner ) {
-<a name="l00311"></a>00311     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00312"></a>00312     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>>
-<a name="l00313"></a>00313                           ::run(range, body, partitioner );
-<a name="l00314"></a>00314     <span class="keywordflow">return</span> body.result();
-<a name="l00315"></a>00315 }
-<a name="l00316"></a>00316 
-<a name="l00318"></a>00318 
-<a name="l00319"></a>00319 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00320"></a><a class="code" href="a00228.html#gb175401f0729e40dd2c5860a17c14385">00320</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00321"></a>00321                        <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
-<a name="l00322"></a>00322     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00323"></a>00323     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>>
-<a name="l00324"></a>00324                           ::run( range, body, partitioner );
-<a name="l00325"></a>00325     <span class="keywordflow">return</span> body.result();
-<a name="l00326"></a>00326 }
-<a name="l00327"></a>00327 
-<a name="l00329"></a>00329 
-<a name="l00330"></a>00330 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00331"></a><a class="code" href="a00228.html#gb7f1f1828ae2b330ce05b8513a495154">00331</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00332"></a>00332                        <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
-<a name="l00333"></a>00333     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00334"></a>00334     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00115.html">affinity_partitioner</a>>
-<a name="l00335"></a>00335                                         ::run( range, body, partitioner );
-<a name="l00336"></a>00336     <span class="keywordflow">return</span> body.result();
-<a name="l00337"></a>00337 }
-<a name="l00338"></a>00338 
-<a name="l00339"></a>00339 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span>
-<a name="l00342"></a>00342 <span class="preprocessor">template<typename Range, typename Value, typename RealBody, typename Reduction></span>
-<a name="l00343"></a><a class="code" href="a00228.html#gfbc0cc2026d87f11a96bcd62788f5bb5">00343</a> <span class="preprocessor"></span>Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00344"></a>00344                        <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
-<a name="l00345"></a>00345     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00346"></a>00346     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>>
-<a name="l00347"></a>00347                           ::run( range, body, partitioner, context );
-<a name="l00348"></a>00348     <span class="keywordflow">return</span> body.result();
-<a name="l00349"></a>00349 }
-<a name="l00350"></a>00350 
-<a name="l00352"></a>00352 
-<a name="l00353"></a>00353 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00354"></a><a class="code" href="a00228.html#g630c90a399937d9d4ae70ff883186dfd">00354</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00355"></a>00355                        <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
-<a name="l00356"></a>00356     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00357"></a>00357     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>>
-<a name="l00358"></a>00358                           ::run( range, body, partitioner, context );
-<a name="l00359"></a>00359     <span class="keywordflow">return</span> body.result();
-<a name="l00360"></a>00360 }
-<a name="l00361"></a>00361 
-<a name="l00363"></a>00363 
-<a name="l00364"></a>00364 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
-<a name="l00365"></a><a class="code" href="a00228.html#g496bd7eadb3b97495ccb5655ef90319e">00365</a> Value <a class="code" href="a00228.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
-<a name="l00366"></a>00366                        <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00163.html">task_group_context</a>& context ) {
-<a name="l00367"></a>00367     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-<a name="l00368"></a>00368     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00115.html">affinity_partitioner</a>>
-<a name="l00369"></a>00369                                         ::run( range, body, partitioner, context );
-<a name="l00370"></a>00370     <span class="keywordflow">return</span> body.result();
-<a name="l00371"></a>00371 }
-<a name="l00372"></a>00372 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00373"></a>00373 
+<a name="l00298"></a>00298 
+<a name="l00299"></a>00299 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00300"></a><a class="code" href="a00233.html#gc9412e09fb01fcad8c018ea9cffb28ef">00300</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction ) {
+<a name="l00301"></a>00301     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00302"></a>00302     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> __TBB_DEFAULT_PARTITIONER>
+<a name="l00303"></a>00303                           ::run(range, body, __TBB_DEFAULT_PARTITIONER() );
+<a name="l00304"></a>00304     <span class="keywordflow">return</span> body.result();
+<a name="l00305"></a>00305 }
+<a name="l00306"></a>00306 
+<a name="l00308"></a>00308 
+<a name="l00309"></a>00309 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00310"></a><a class="code" href="a00233.html#gaddffeec0e892ac3d6fc7fc2053e1eca">00310</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00311"></a>00311                        <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner ) {
+<a name="l00312"></a>00312     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00313"></a>00313     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>>
+<a name="l00314"></a>00314                           ::run(range, body, partitioner );
+<a name="l00315"></a>00315     <span class="keywordflow">return</span> body.result();
+<a name="l00316"></a>00316 }
+<a name="l00317"></a>00317 
+<a name="l00319"></a>00319 
+<a name="l00320"></a>00320 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00321"></a><a class="code" href="a00233.html#gb175401f0729e40dd2c5860a17c14385">00321</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00322"></a>00322                        <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
+<a name="l00323"></a>00323     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00324"></a>00324     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>>
+<a name="l00325"></a>00325                           ::run( range, body, partitioner );
+<a name="l00326"></a>00326     <span class="keywordflow">return</span> body.result();
+<a name="l00327"></a>00327 }
+<a name="l00328"></a>00328 
+<a name="l00330"></a>00330 
+<a name="l00331"></a>00331 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00332"></a><a class="code" href="a00233.html#gb7f1f1828ae2b330ce05b8513a495154">00332</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00333"></a>00333                        <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner ) {
+<a name="l00334"></a>00334     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00335"></a>00335     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00115.html">affinity_partitioner</a>>
+<a name="l00336"></a>00336                                         ::run( range, body, partitioner );
+<a name="l00337"></a>00337     <span class="keywordflow">return</span> body.result();
+<a name="l00338"></a>00338 }
+<a name="l00339"></a>00339 
+<a name="l00340"></a>00340 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00342"></a>00342 <span class="preprocessor"></span>
+<a name="l00343"></a>00343 <span class="preprocessor">template<typename Range, typename Value, typename RealBody, typename Reduction></span>
+<a name="l00344"></a><a class="code" href="a00233.html#gfbc0cc2026d87f11a96bcd62788f5bb5">00344</a> <span class="preprocessor"></span>Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00345"></a>00345                        <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
+<a name="l00346"></a>00346     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00347"></a>00347     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>>
+<a name="l00348"></a>00348                           ::run( range, body, partitioner, context );
+<a name="l00349"></a>00349     <span class="keywordflow">return</span> body.result();
+<a name="l00350"></a>00350 }
+<a name="l00351"></a>00351 
+<a name="l00353"></a>00353 
+<a name="l00354"></a>00354 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00355"></a><a class="code" href="a00233.html#g630c90a399937d9d4ae70ff883186dfd">00355</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00356"></a>00356                        <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
+<a name="l00357"></a>00357     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00358"></a>00358     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>>
+<a name="l00359"></a>00359                           ::run( range, body, partitioner, context );
+<a name="l00360"></a>00360     <span class="keywordflow">return</span> body.result();
+<a name="l00361"></a>00361 }
+<a name="l00362"></a>00362 
+<a name="l00364"></a>00364 
+<a name="l00365"></a>00365 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Value, <span class="keyword">typename</span> RealBody, <span class="keyword">typename</span> Reduction>
+<a name="l00366"></a><a class="code" href="a00233.html#g496bd7eadb3b97495ccb5655ef90319e">00366</a> Value <a class="code" href="a00233.html#g1b3d59c5eb62683c5754db6970392fa3">parallel_reduce</a>( <span class="keyword">const</span> Range& range, <span class="keyword">const</span> Value& identity, <span class="keyword">const</span> RealBody& real_body, <span class="keyword">const</span> Reduction& reduction,
+<a name="l00367"></a>00367                        <a class="code" href="a00115.html">affinity_partitioner</a>& partitioner, <a class="code" href="a00167.html">task_group_context</a>& context ) {
+<a name="l00368"></a>00368     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
+<a name="l00369"></a>00369     internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,<a class="code" href="a00115.html">affinity_partitioner</a>>
+<a name="l00370"></a>00370                                         ::run( range, body, partitioner, context );
+<a name="l00371"></a>00371     <span class="keywordflow">return</span> body.result();
+<a name="l00372"></a>00372 }
+<a name="l00373"></a>00373 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
 <a name="l00374"></a>00374 
-<a name="l00375"></a>00375 } <span class="comment">// namespace tbb</span>
-<a name="l00376"></a>00376 
-<a name="l00377"></a>00377 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_reduce_H */</span>
-<a name="l00378"></a>00378 
+<a name="l00375"></a>00375 
+<a name="l00376"></a>00376 } <span class="comment">// namespace tbb</span>
+<a name="l00377"></a>00377 
+<a name="l00378"></a>00378 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_parallel_reduce_H */</span>
+<a name="l00379"></a>00379 
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00326.html b/doc/html/a00329.html
similarity index 96%
rename from doc/html/a00326.html
rename to doc/html/a00329.html
index 460de7a..d0d8b59 100644
--- a/doc/html/a00326.html
+++ b/doc/html/a00329.html
@@ -50,7 +50,7 @@
 <a name="l00029"></a>00029 <span class="keyword">namespace </span>tbb {
 <a name="l00030"></a>00030 
 <a name="l00032"></a>00032 
-<a name="l00033"></a><a class="code" href="a00147.html">00033</a> <span class="keyword">struct </span><a class="code" href="a00147.html">pre_scan_tag</a> {
+<a name="l00033"></a><a class="code" href="a00151.html">00033</a> <span class="keyword">struct </span><a class="code" href="a00151.html">pre_scan_tag</a> {
 <a name="l00034"></a>00034     <span class="keyword">static</span> <span class="keywordtype">bool</span> is_final_scan() {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
 <a name="l00035"></a>00035 };
 <a name="l00036"></a>00036 
@@ -63,7 +63,7 @@
 <a name="l00045"></a>00045 
 <a name="l00047"></a>00047 
 <a name="l00048"></a>00048     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00049"></a>00049     <span class="keyword">class </span>final_sum: <span class="keyword">public</span> <a class="code" href="a00162.html">task</a> {
+<a name="l00049"></a>00049     <span class="keyword">class </span>final_sum: <span class="keyword">public</span> <a class="code" href="a00166.html">task</a> {
 <a name="l00050"></a>00050     <span class="keyword">public</span>:
 <a name="l00051"></a>00051         Body body;
 <a name="l00052"></a>00052     <span class="keyword">private</span>:
@@ -71,7 +71,7 @@
 <a name="l00055"></a>00055         Body* stuff_last;
 <a name="l00056"></a>00056     <span class="keyword">public</span>:
 <a name="l00057"></a>00057         final_sum( Body& body_ ) :
-<a name="l00058"></a>00058             body(body_,<a class="code" href="a00161.html">split</a>())
+<a name="l00058"></a>00058             body(body_,<a class="code" href="a00165.html">split</a>())
 <a name="l00059"></a>00059         {
 <a name="l00060"></a>00060             poison_pointer(stuff_last);
 <a name="l00061"></a>00061         }
@@ -235,18 +235,18 @@
 <a name="l00224"></a>00224                 <span class="keyword">typedef</span> internal::start_scan<Range,Body,Partitioner> start_pass1_type;
 <a name="l00225"></a>00225                 internal::sum_node<Range,Body>* root = NULL;
 <a name="l00226"></a>00226                 <span class="keyword">typedef</span> internal::final_sum<Range,Body> final_sum_type;
-<a name="l00227"></a>00227                 final_sum_type* temp_body = <span class="keyword">new</span>(<a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) final_sum_type( body );
-<a name="l00228"></a>00228                 start_pass1_type& pass1 = *<span class="keyword">new</span>(<a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_pass1_type(
+<a name="l00227"></a>00227                 final_sum_type* temp_body = <span class="keyword">new</span>(<a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) final_sum_type( body );
+<a name="l00228"></a>00228                 start_pass1_type& pass1 = *<span class="keyword">new</span>(<a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) start_pass1_type(
 <a name="l00229"></a>00229                     <span class="comment">/*return_slot=*/</span>root,
 <a name="l00230"></a>00230                     range,
 <a name="l00231"></a>00231                     *temp_body,
 <a name="l00232"></a>00232                     partitioner );
-<a name="l00233"></a>00233                 <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( pass1 );
+<a name="l00233"></a>00233                 <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( pass1 );
 <a name="l00234"></a>00234                 <span class="keywordflow">if</span>( root ) {
 <a name="l00235"></a>00235                     root->body = temp_body;
 <a name="l00236"></a>00236                     root->incoming = NULL;
 <a name="l00237"></a>00237                     root->stuff_last = &body;
-<a name="l00238"></a>00238                     <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *root );
+<a name="l00238"></a>00238                     <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( *root );
 <a name="l00239"></a>00239                 } <span class="keywordflow">else</span> {
 <a name="l00240"></a>00240                     body.assign(temp_body->body);
 <a name="l00241"></a>00241                     temp_body->finish_construction( range, NULL );
@@ -283,7 +283,7 @@
 <a name="l00272"></a>00272             <span class="keywordflow">if</span>( parent_sum ) 
 <a name="l00273"></a>00273                 result = <span class="keyword">new</span>(allocate_additional_child_of(*parent_sum)) sum_node_type(range,<span class="comment">/*left_is_final=*/</span>is_final);
 <a name="l00274"></a>00274             <span class="keywordflow">else</span>
-<a name="l00275"></a>00275                 result = <span class="keyword">new</span>(<a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) sum_node_type(range,<span class="comment">/*left_is_final=*/</span>is_final);
+<a name="l00275"></a>00275                 result = <span class="keyword">new</span>(<a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>()) sum_node_type(range,<span class="comment">/*left_is_final=*/</span>is_final);
 <a name="l00276"></a>00276             finish_pass1_type& c = *<span class="keyword">new</span>( allocate_continuation()) finish_pass1_type(*return_slot,sum,*result);
 <a name="l00277"></a>00277             <span class="comment">// Split off right child</span>
 <a name="l00278"></a>00278             start_scan& b = *<span class="keyword">new</span>( c.allocate_child() ) start_scan( <span class="comment">/*return_slot=*/</span>result->right, *<span class="keyword">this</span>, result );
@@ -310,19 +310,19 @@
 <a name="l00317"></a>00317 
 <a name="l00319"></a>00319 
 <a name="l00320"></a>00320 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00321"></a><a class="code" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">00321</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body ) {
+<a name="l00321"></a><a class="code" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">00321</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body ) {
 <a name="l00322"></a>00322     internal::start_scan<Range,Body,__TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());
 <a name="l00323"></a>00323 }
 <a name="l00324"></a>00324 
 <a name="l00326"></a>00326 
 <a name="l00327"></a>00327 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00328"></a><a class="code" href="a00228.html#gc9fac8870b2e6365fb337014404529df">00328</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& partitioner ) {
+<a name="l00328"></a><a class="code" href="a00233.html#gc9fac8870b2e6365fb337014404529df">00328</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& partitioner ) {
 <a name="l00329"></a>00329     internal::start_scan<Range,Body,simple_partitioner>::run(range,body,partitioner);
 <a name="l00330"></a>00330 }
 <a name="l00331"></a>00331 
 <a name="l00333"></a>00333 
 <a name="l00334"></a>00334 <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body>
-<a name="l00335"></a><a class="code" href="a00228.html#g62fde400a37bbca1a2fddc8e3d22f556">00335</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
+<a name="l00335"></a><a class="code" href="a00233.html#g62fde400a37bbca1a2fddc8e3d22f556">00335</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#ged143f31dd3d96ded02ab3db915b91c7">parallel_scan</a>( <span class="keyword">const</span> Range& range, Body& body, <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& partitioner ) {
 <a name="l00336"></a>00336     internal::start_scan<Range,Body,auto_partitioner>::run(range,body,partitioner);
 <a name="l00337"></a>00337 }
 <a name="l00339"></a>00339 
diff --git a/doc/html/a00331.html b/doc/html/a00334.html
similarity index 96%
rename from doc/html/a00331.html
rename to doc/html/a00334.html
index e190654..fe8795c 100644
--- a/doc/html/a00331.html
+++ b/doc/html/a00334.html
@@ -129,7 +129,7 @@
 <a name="l00113"></a>00113     quick_sort_pretest_body(<span class="keyword">const</span> Compare &_comp) : comp(_comp) {}
 <a name="l00114"></a>00114 
 <a name="l00115"></a>00115     <span class="keywordtype">void</span> operator()( <span class="keyword">const</span> blocked_range<RandomAccessIterator>& range )<span class="keyword"> const </span>{
-<a name="l00116"></a>00116         task &my_task = <a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>();
+<a name="l00116"></a>00116         task &my_task = <a class="code" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>();
 <a name="l00117"></a>00117         RandomAccessIterator my_end = range.end();
 <a name="l00118"></a>00118 
 <a name="l00119"></a>00119         <span class="keywordtype">int</span> i = 0;
@@ -169,14 +169,14 @@
 <a name="l00155"></a>00155         }
 <a name="l00156"></a>00156     }
 <a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( blocked_range<RandomAccessIterator>(k+1, end),
+<a name="l00158"></a>00158     <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( blocked_range<RandomAccessIterator>(k+1, end),
 <a name="l00159"></a>00159                   quick_sort_pretest_body<RandomAccessIterator,Compare>(comp),
 <a name="l00160"></a>00160                   auto_partitioner(),
 <a name="l00161"></a>00161                   my_context);
 <a name="l00162"></a>00162 
 <a name="l00163"></a>00163     <span class="keywordflow">if</span> (my_context.is_group_execution_cancelled())
 <a name="l00164"></a>00164 do_parallel_quick_sort:
-<a name="l00165"></a>00165         <a class="code" href="a00228.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( quick_sort_range<RandomAccessIterator,Compare>(begin, end-begin, comp ), 
+<a name="l00165"></a>00165         <a class="code" href="a00233.html#g68cc046ef72c42ce205fccbc435a0d81">parallel_for</a>( quick_sort_range<RandomAccessIterator,Compare>(begin, end-begin, comp ), 
 <a name="l00166"></a>00166                       quick_sort_body<RandomAccessIterator,Compare>(),
 <a name="l00167"></a>00167                       auto_partitioner() );
 <a name="l00168"></a>00168 }
@@ -186,7 +186,7 @@
 <a name="l00183"></a>00183 
 <a name="l00185"></a>00185 
 <a name="l00188"></a>00188 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator, <span class="keyword">typename</span> Compare>
-<a name="l00189"></a><a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">00189</a> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end, <span class="keyword">const</span> Compare& comp) { 
+<a name="l00189"></a><a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">00189</a> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end, <span class="keyword">const</span> Compare& comp) { 
 <a name="l00190"></a>00190     <span class="keyword">const</span> <span class="keywordtype">int</span> min_parallel_size = 500; 
 <a name="l00191"></a>00191     <span class="keywordflow">if</span>( end > begin ) {
 <a name="l00192"></a>00192         <span class="keywordflow">if</span> (end - begin < min_parallel_size) { 
@@ -199,14 +199,14 @@
 <a name="l00199"></a>00199 
 <a name="l00201"></a>00201 
 <a name="l00202"></a>00202 <span class="keyword">template</span><<span class="keyword">typename</span> RandomAccessIterator>
-<a name="l00203"></a><a class="code" href="a00228.html#g16c3eb77d0e530834c51ce3857f01012">00203</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end ) { 
-<a name="l00204"></a>00204     <a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( begin, end, std::less< <span class="keyword">typename</span> std::iterator_traits<RandomAccessIterator>::value_type >() );
+<a name="l00203"></a><a class="code" href="a00233.html#g16c3eb77d0e530834c51ce3857f01012">00203</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( RandomAccessIterator begin, RandomAccessIterator end ) { 
+<a name="l00204"></a>00204     <a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( begin, end, std::less< <span class="keyword">typename</span> std::iterator_traits<RandomAccessIterator>::value_type >() );
 <a name="l00205"></a>00205 }
 <a name="l00206"></a>00206 
 <a name="l00208"></a>00208 
 <a name="l00209"></a>00209 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00210"></a><a class="code" href="a00228.html#gc7576f82fdedc8a701a6c17ad9415926">00210</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( T * begin, T * end ) {
-<a name="l00211"></a>00211     <a class="code" href="a00228.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( begin, end, std::less< T >() );
+<a name="l00210"></a><a class="code" href="a00233.html#gc7576f82fdedc8a701a6c17ad9415926">00210</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( T * begin, T * end ) {
+<a name="l00211"></a>00211     <a class="code" href="a00233.html#g49edcf9447cd91a9527a3f8e8512b7aa">parallel_sort</a>( begin, end, std::less< T >() );
 <a name="l00212"></a>00212 }   
 <a name="l00214"></a>00214 
 <a name="l00215"></a>00215 
diff --git a/doc/html/a00335.html b/doc/html/a00338.html
similarity index 90%
rename from doc/html/a00335.html
rename to doc/html/a00338.html
index 4b66f00..4ad6cfc 100644
--- a/doc/html/a00335.html
+++ b/doc/html/a00338.html
@@ -67,7 +67,7 @@
 <a name="l00049"></a>00049             my_body(body), my_value(value)
 <a name="l00050"></a>00050         {}
 <a name="l00051"></a>00051         <span class="keyword">template</span><<span class="keyword">typename</span> Body_> <span class="keyword">friend</span> <span class="keyword">class </span>while_group_task;
-<a name="l00052"></a>00052         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00145.html">tbb::parallel_while</a><Body>;
+<a name="l00052"></a>00052         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00149.html">tbb::parallel_while</a><Body>;
 <a name="l00053"></a>00053     };
 <a name="l00054"></a>00054 
 <a name="l00056"></a>00056 
@@ -127,32 +127,32 @@
 <a name="l00113"></a>00113             my_body(body),
 <a name="l00114"></a>00114             my_barrier(barrier)
 <a name="l00115"></a>00115         {} 
-<a name="l00116"></a>00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00145.html">tbb::parallel_while</a><Body>;
+<a name="l00116"></a>00116         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00149.html">tbb::parallel_while</a><Body>;
 <a name="l00117"></a>00117     };
 <a name="l00118"></a>00118 
 <a name="l00119"></a>00119 } <span class="comment">// namespace internal</span>
 <a name="l00121"></a>00121 <span class="comment"></span>
 <a name="l00123"></a>00123 
 <a name="l00128"></a>00128 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
-<a name="l00129"></a><a class="code" href="a00145.html">00129</a> <span class="keyword">class </span><a class="code" href="a00145.html">parallel_while</a>: internal::no_copy {
+<a name="l00129"></a><a class="code" href="a00149.html">00129</a> <span class="keyword">class </span><a class="code" href="a00149.html">parallel_while</a>: internal::no_copy {
 <a name="l00130"></a>00130 <span class="keyword">public</span>:
-<a name="l00132"></a><a class="code" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">00132</a>     <a class="code" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>() : my_body(NULL), my_barrier(NULL) {}
+<a name="l00132"></a><a class="code" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">00132</a>     <a class="code" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a>() : my_body(NULL), my_barrier(NULL) {}
 <a name="l00133"></a>00133 
-<a name="l00135"></a><a class="code" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">00135</a>     <a class="code" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>() {
+<a name="l00135"></a><a class="code" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">00135</a>     <a class="code" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a>() {
 <a name="l00136"></a>00136         <span class="keywordflow">if</span>( my_barrier ) {
-<a name="l00137"></a>00137             my_barrier-><a class="code" href="a00162.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_barrier);    
+<a name="l00137"></a>00137             my_barrier-><a class="code" href="a00166.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_barrier);    
 <a name="l00138"></a>00138             my_barrier = NULL;
 <a name="l00139"></a>00139         }
 <a name="l00140"></a>00140     }
 <a name="l00141"></a>00141 
-<a name="l00143"></a><a class="code" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">00143</a>     <span class="keyword">typedef</span> <span class="keyword">typename</span> Body::argument_type <a class="code" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>;
+<a name="l00143"></a><a class="code" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">00143</a>     <span class="keyword">typedef</span> <span class="keyword">typename</span> Body::argument_type <a class="code" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>;
 <a name="l00144"></a>00144 
 <a name="l00146"></a>00146 
 <a name="l00149"></a>00149     <span class="keyword">template</span><<span class="keyword">typename</span> Stream>
-<a name="l00150"></a>00150     <span class="keywordtype">void</span> <a class="code" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a>( Stream& stream, <span class="keyword">const</span> Body& body );
+<a name="l00150"></a>00150     <span class="keywordtype">void</span> <a class="code" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a>( Stream& stream, <span class="keyword">const</span> Body& body );
 <a name="l00151"></a>00151 
 <a name="l00153"></a>00153 
-<a name="l00154"></a>00154     <span class="keywordtype">void</span> <a class="code" href="a00145.html#e131c560057a58229992b61eb8dba4c6">add</a>( <span class="keyword">const</span> <a class="code" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>& item );
+<a name="l00154"></a>00154     <span class="keywordtype">void</span> <a class="code" href="a00149.html#e131c560057a58229992b61eb8dba4c6">add</a>( <span class="keyword">const</span> <a class="code" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">value_type</a>& item );
 <a name="l00155"></a>00155 
 <a name="l00156"></a>00156 <span class="keyword">private</span>:
 <a name="l00157"></a>00157     <span class="keyword">const</span> Body* my_body;
@@ -161,25 +161,25 @@
 <a name="l00160"></a>00160 
 <a name="l00161"></a>00161 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
 <a name="l00162"></a>00162 <span class="keyword">template</span><<span class="keyword">typename</span> Stream>
-<a name="l00163"></a><a class="code" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">00163</a> <span class="keywordtype">void</span> <a class="code" href="a00145.html">parallel_while<Body>::run</a>( Stream& stream, <span class="keyword">const</span> Body& body ) {
+<a name="l00163"></a><a class="code" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">00163</a> <span class="keywordtype">void</span> <a class="code" href="a00149.html">parallel_while<Body>::run</a>( Stream& stream, <span class="keyword">const</span> Body& body ) {
 <a name="l00164"></a>00164     <span class="keyword">using namespace </span>internal;
-<a name="l00165"></a>00165     <a class="code" href="a00137.html">empty_task</a>& barrier = *<span class="keyword">new</span>( <a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) <a class="code" href="a00137.html">empty_task</a>();
+<a name="l00165"></a>00165     <a class="code" href="a00137.html">empty_task</a>& barrier = *<span class="keyword">new</span>( <a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>() ) <a class="code" href="a00137.html">empty_task</a>();
 <a name="l00166"></a>00166     my_body = &body;
 <a name="l00167"></a>00167     my_barrier = &barrier;
-<a name="l00168"></a>00168     my_barrier-><a class="code" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(2);
-<a name="l00169"></a>00169     while_task<Stream,Body>& w = *<span class="keyword">new</span>( my_barrier-><a class="code" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>() ) while_task<Stream,Body>( stream, body, barrier );
-<a name="l00170"></a>00170     my_barrier-><a class="code" href="a00162.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(w);
-<a name="l00171"></a>00171     my_barrier-><a class="code" href="a00162.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_barrier);
+<a name="l00168"></a>00168     my_barrier-><a class="code" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">set_ref_count</a>(2);
+<a name="l00169"></a>00169     while_task<Stream,Body>& w = *<span class="keyword">new</span>( my_barrier-><a class="code" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">allocate_child</a>() ) while_task<Stream,Body>( stream, body, barrier );
+<a name="l00170"></a>00170     my_barrier-><a class="code" href="a00166.html#3ce28ca9baa771cfc37ecd72e69c4f3c">spawn_and_wait_for_all</a>(w);
+<a name="l00171"></a>00171     my_barrier-><a class="code" href="a00166.html#a57def00c8e9d932dbea0b3ee23991b9">destroy</a>(*my_barrier);
 <a name="l00172"></a>00172     my_barrier = NULL;
 <a name="l00173"></a>00173     my_body = NULL;
 <a name="l00174"></a>00174 }
 <a name="l00175"></a>00175 
 <a name="l00176"></a>00176 <span class="keyword">template</span><<span class="keyword">typename</span> Body>
-<a name="l00177"></a><a class="code" href="a00145.html#e131c560057a58229992b61eb8dba4c6">00177</a> <span class="keywordtype">void</span> <a class="code" href="a00145.html">parallel_while<Body>::add</a>( <span class="keyword">const</span> value_type& item ) {
+<a name="l00177"></a><a class="code" href="a00149.html#e131c560057a58229992b61eb8dba4c6">00177</a> <span class="keywordtype">void</span> <a class="code" href="a00149.html">parallel_while<Body>::add</a>( <span class="keyword">const</span> value_type& item ) {
 <a name="l00178"></a>00178     __TBB_ASSERT(my_barrier,<span class="stringliteral">"attempt to add to parallel_while that is not running"</span>);
 <a name="l00179"></a>00179     <span class="keyword">typedef</span> internal::while_iteration_task<Body> iteration_type;
-<a name="l00180"></a>00180     iteration_type& i = *<span class="keyword">new</span>( <a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(*my_barrier) ) iteration_type(item,*my_body);
-<a name="l00181"></a>00181     <a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00162.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>( i );
+<a name="l00180"></a>00180     iteration_type& i = *<span class="keyword">new</span>( <a class="code" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">allocate_additional_child_of</a>(*my_barrier) ) iteration_type(item,*my_body);
+<a name="l00181"></a>00181     <a class="code" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00166.html#f7737143d458f1ed1c0d7da3971d9e6b">spawn</a>( i );
 <a name="l00182"></a>00182 }
 <a name="l00183"></a>00183 
 <a name="l00184"></a>00184 } <span class="comment">// namespace </span>
diff --git a/doc/html/a00339.html b/doc/html/a00342.html
similarity index 96%
rename from doc/html/a00339.html
rename to doc/html/a00342.html
index 341f2e5..aef9058 100644
--- a/doc/html/a00339.html
+++ b/doc/html/a00342.html
@@ -66,7 +66,7 @@
 <a name="l00053"></a>00053 <span class="keyword">class </span>partition_type_base {
 <a name="l00054"></a>00054 <span class="keyword">public</span>:
 <a name="l00055"></a>00055     <span class="keywordtype">void</span> set_affinity( task & ) {}
-<a name="l00056"></a>00056     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> ) {}
+<a name="l00056"></a>00056     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> ) {}
 <a name="l00057"></a>00057     task* continue_after_execute_range( task& ) {<span class="keywordflow">return</span> NULL;}
 <a name="l00058"></a>00058     <span class="keywordtype">bool</span> decide_whether_to_delay() {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
 <a name="l00059"></a>00059     <span class="keywordtype">void</span> spawn_or_delay( <span class="keywordtype">bool</span>, task& a, task& b ) {
@@ -84,9 +84,9 @@
 <a name="l00071"></a>00071 } <span class="comment">// namespace internal</span>
 <a name="l00073"></a>00073 <span class="comment"></span>
 <a name="l00075"></a>00075 
-<a name="l00077"></a><a class="code" href="a00156.html">00077</a> <span class="keyword">class </span><a class="code" href="a00156.html">simple_partitioner</a> {
+<a name="l00077"></a><a class="code" href="a00160.html">00077</a> <span class="keyword">class </span><a class="code" href="a00160.html">simple_partitioner</a> {
 <a name="l00078"></a>00078 <span class="keyword">public</span>:
-<a name="l00079"></a>00079     <a class="code" href="a00156.html">simple_partitioner</a>() {}
+<a name="l00079"></a>00079     <a class="code" href="a00160.html">simple_partitioner</a>() {}
 <a name="l00080"></a>00080 <span class="keyword">private</span>:
 <a name="l00081"></a>00081     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner> <span class="keyword">friend</span> <span class="keyword">class </span>internal::start_for;
 <a name="l00082"></a>00082     <span class="keyword">template</span><<span class="keyword">typename</span> Range, <span class="keyword">typename</span> Body, <span class="keyword">typename</span> Partitioner> <span class="keyword">friend</span> <span class="keyword">class </span>internal::start_reduce;
@@ -94,9 +94,9 @@
 <a name="l00084"></a>00084 
 <a name="l00085"></a>00085     <span class="keyword">class </span>partition_type: <span class="keyword">public</span> internal::partition_type_base {
 <a name="l00086"></a>00086     <span class="keyword">public</span>:
-<a name="l00087"></a>00087         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00162.html">task</a>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
-<a name="l00088"></a>00088         partition_type( <span class="keyword">const</span> <a class="code" href="a00156.html">simple_partitioner</a>& ) {}
-<a name="l00089"></a>00089         partition_type( <span class="keyword">const</span> partition_type&, <a class="code" href="a00161.html">split</a> ) {}
+<a name="l00087"></a>00087         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00166.html">task</a>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
+<a name="l00088"></a>00088         partition_type( <span class="keyword">const</span> <a class="code" href="a00160.html">simple_partitioner</a>& ) {}
+<a name="l00089"></a>00089         partition_type( <span class="keyword">const</span> partition_type&, <a class="code" href="a00165.html">split</a> ) {}
 <a name="l00090"></a>00090     };
 <a name="l00091"></a>00091 };
 <a name="l00092"></a>00092 
@@ -114,13 +114,13 @@
 <a name="l00107"></a>00107         size_t num_chunks;
 <a name="l00108"></a>00108         <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
 <a name="l00109"></a>00109 <span class="keyword">public</span>:
-<a name="l00110"></a>00110         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00162.html">task</a> &t) {
-<a name="l00111"></a>00111             <span class="keywordflow">if</span>( num_chunks<VICTIM_CHUNKS && t.<a class="code" href="a00162.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() )
+<a name="l00110"></a>00110         <span class="keywordtype">bool</span> should_execute_range(<span class="keyword">const</span> <a class="code" href="a00166.html">task</a> &t) {
+<a name="l00111"></a>00111             <span class="keywordflow">if</span>( num_chunks<VICTIM_CHUNKS && t.<a class="code" href="a00166.html#f9169402702f56bf519448aaf34450aa">is_stolen_task</a>() )
 <a name="l00112"></a>00112                 num_chunks = VICTIM_CHUNKS;
 <a name="l00113"></a>00113             <span class="keywordflow">return</span> num_chunks==1;
 <a name="l00114"></a>00114         }
 <a name="l00115"></a>00115         partition_type( <span class="keyword">const</span> <a class="code" href="a00120.html">auto_partitioner</a>& ) : num_chunks(internal::get_initial_auto_partitioner_divisor()) {}
-<a name="l00116"></a>00116         partition_type( partition_type& pt, <a class="code" href="a00161.html">split</a> ) {
+<a name="l00116"></a>00116         partition_type( partition_type& pt, <a class="code" href="a00165.html">split</a> ) {
 <a name="l00117"></a>00117             num_chunks = pt.num_chunks /= 2u;
 <a name="l00118"></a>00118         }
 <a name="l00119"></a>00119     };
@@ -147,7 +147,7 @@
 <a name="l00143"></a>00143     <span class="keyword">static</span> <span class="keyword">const</span> size_t VICTIM_CHUNKS = 4;
 <a name="l00144"></a>00144 
 <a name="l00145"></a>00145     internal::affinity_id* my_array;
-<a name="l00146"></a>00146     <a class="code" href="a00164.html">task_list</a> delay_list;
+<a name="l00146"></a>00146     <a class="code" href="a00168.html">task_list</a> delay_list;
 <a name="l00147"></a>00147     <span class="keywordtype">unsigned</span> map_begin, map_end;
 <a name="l00148"></a>00148     size_t num_chunks;
 <a name="l00149"></a>00149 <span class="keyword">public</span>:
@@ -180,7 +180,7 @@
 <a name="l00176"></a>00176         <span class="keywordflow">if</span>( map_begin<map_end )
 <a name="l00177"></a>00177             t.set_affinity( my_array[map_begin] );
 <a name="l00178"></a>00178     }
-<a name="l00179"></a>00179     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> <span class="keywordtype">id</span> ) {
+<a name="l00179"></a>00179     <span class="keywordtype">void</span> note_affinity( <a class="code" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">task::affinity_id</a> <span class="keywordtype">id</span> ) {
 <a name="l00180"></a>00180         <span class="keywordflow">if</span>( map_begin<map_end ) 
 <a name="l00181"></a>00181             my_array[map_begin] = id;
 <a name="l00182"></a>00182     }
diff --git a/doc/html/a00344.html b/doc/html/a00344.html
deleted file mode 100644
index 181fbc8..0000000
--- a/doc/html/a00344.html
+++ /dev/null
@@ -1,237 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>pipeline.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>pipeline.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_pipeline_H </span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_pipeline_H </span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "task.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <cstddef></span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030 <span class="keyword">class </span>pipeline;
-<a name="l00031"></a>00031 <span class="keyword">class </span>filter;
-<a name="l00032"></a>00032 
-<a name="l00034"></a>00034 <span class="keyword">namespace </span>internal {
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="comment">// The argument for PIPELINE_VERSION should be an integer between 2 and 9</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Token;
-<a name="l00040"></a>00040 <span class="keyword">typedef</span> <span class="keywordtype">long</span> tokendiff_t;
-<a name="l00041"></a>00041 <span class="keyword">class </span>stage_task;
-<a name="l00042"></a>00042 <span class="keyword">class </span>ordered_buffer;
-<a name="l00043"></a>00043 <span class="keyword">class </span>pipeline_root_task;
-<a name="l00044"></a>00044 <span class="keyword">class </span>pipeline_cleaner;
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 } <span class="comment">// namespace internal</span>
-<a name="l00048"></a>00048 <span class="comment"></span>
-<a name="l00050"></a>00050 
-<a name="l00051"></a><a class="code" href="a00139.html">00051</a> <span class="keyword">class </span><a class="code" href="a00139.html">filter</a>: internal::no_copy {
-<a name="l00052"></a>00052 <span class="keyword">private</span>:
-<a name="l00054"></a>00054     <span class="keyword">static</span> <a class="code" href="a00139.html">filter</a>* not_in_pipeline() {<span class="keywordflow">return</span> reinterpret_cast<filter*>(internal::intptr(-1));}
-<a name="l00055"></a>00055     
-<a name="l00057"></a>00057     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_serial = 0x1; 
-<a name="l00058"></a>00058 
-<a name="l00060"></a>00060 
-<a name="l00062"></a>00062     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_out_of_order = 0x1<<4;  
-<a name="l00063"></a>00063 
-<a name="l00065"></a>00065     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_bound = 0x1<<5;  
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_version = __TBB_PIPELINE_VERSION(5);
-<a name="l00068"></a>00068     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> version_mask = 0x7<<1; <span class="comment">// bits 1-3 are for version</span>
-<a name="l00069"></a>00069 <span class="keyword">public</span>:
-<a name="l00070"></a><a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">00070</a>     <span class="keyword">enum</span> <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> {
-<a name="l00072"></a>00072         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> = current_version | filter_is_out_of_order, 
-<a name="l00074"></a>00074         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> = current_version | filter_is_serial,
-<a name="l00076"></a>00076         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> = current_version | filter_is_serial | filter_is_out_of_order,
-<a name="l00078"></a>00078         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> = serial_in_order
-<a name="l00079"></a>00079     };
-<a name="l00080"></a>00080 <span class="keyword">protected</span>:
-<a name="l00081"></a>00081     <a class="code" href="a00139.html">filter</a>( <span class="keywordtype">bool</span> is_serial_ ) : 
-<a name="l00082"></a>00082         next_filter_in_pipeline(not_in_pipeline()),
-<a name="l00083"></a>00083         input_buffer(NULL),
-<a name="l00084"></a>00084         my_filter_mode(static_cast<unsigned char>(is_serial_ ? <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> : <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a>)),
-<a name="l00085"></a>00085         prev_filter_in_pipeline(not_in_pipeline()),
-<a name="l00086"></a>00086         my_pipeline(NULL),
-<a name="l00087"></a>00087         next_segment(NULL)
-<a name="l00088"></a>00088     {}
-<a name="l00089"></a>00089     
-<a name="l00090"></a>00090     filter( <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode ) :
-<a name="l00091"></a>00091         next_filter_in_pipeline(not_in_pipeline()),
-<a name="l00092"></a>00092         input_buffer(NULL),
-<a name="l00093"></a>00093         my_filter_mode(static_cast<unsigned char>(filter_mode)),
-<a name="l00094"></a>00094         prev_filter_in_pipeline(not_in_pipeline()),
-<a name="l00095"></a>00095         my_pipeline(NULL),
-<a name="l00096"></a>00096         next_segment(NULL)
-<a name="l00097"></a>00097     {}
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099 <span class="keyword">public</span>:
-<a name="l00101"></a><a class="code" href="a00139.html#fcfec27656a69ff2072802ac001e936f">00101</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#fcfec27656a69ff2072802ac001e936f">is_serial</a>()<span class="keyword"> const </span>{
-<a name="l00102"></a>00102         <span class="keywordflow">return</span> bool( my_filter_mode & filter_is_serial );
-<a name="l00103"></a>00103     }  
-<a name="l00104"></a>00104     
-<a name="l00106"></a><a class="code" href="a00139.html#cd53206c4795ef2df5df26b795caf692">00106</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#cd53206c4795ef2df5df26b795caf692">is_ordered</a>()<span class="keyword"> const </span>{
-<a name="l00107"></a>00107         <span class="keywordflow">return</span> (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial;
-<a name="l00108"></a>00108     }
-<a name="l00109"></a>00109 
-<a name="l00111"></a><a class="code" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">00111</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">is_bound</a>()<span class="keyword"> const </span>{
-<a name="l00112"></a>00112         <span class="keywordflow">return</span> ( my_filter_mode & filter_is_bound )==filter_is_bound;
-<a name="l00113"></a>00113     }
-<a name="l00114"></a>00114 
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117     <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a>( <span class="keywordtype">void</span>* item ) = 0;
-<a name="l00118"></a>00118 
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00139.html#66d159f362293e3964ba3da8bc1d2604">~filter</a>();
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00125"></a>00125 <span class="preprocessor"></span>
-<a name="l00127"></a><a class="code" href="a00139.html#56275eb889c77c4807967133e21401bd">00127</a> <span class="preprocessor">    virtual void finalize( void* </span><span class="comment">/*item*/</span> ) {};
-<a name="l00128"></a>00128 <span class="preprocessor">#endif</span>
-<a name="l00129"></a>00129 <span class="preprocessor"></span>
-<a name="l00130"></a>00130 <span class="keyword">private</span>:
-<a name="l00132"></a>00132     <a class="code" href="a00139.html">filter</a>* next_filter_in_pipeline;
-<a name="l00133"></a>00133 
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136     internal::ordered_buffer* input_buffer;
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
-<a name="l00139"></a>00139     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_root_task;
-<a name="l00140"></a>00140     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00146.html">pipeline</a>;
-<a name="l00141"></a>00141     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00171.html">thread_bound_filter</a>;
-<a name="l00142"></a>00142 
-<a name="l00144"></a>00144     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> my_filter_mode;
-<a name="l00145"></a>00145 
-<a name="l00147"></a>00147     <a class="code" href="a00139.html">filter</a>* prev_filter_in_pipeline;
-<a name="l00148"></a>00148 
-<a name="l00150"></a>00150     <a class="code" href="a00146.html">pipeline</a>* my_pipeline;
-<a name="l00151"></a>00151 
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154     <a class="code" href="a00139.html">filter</a>* next_segment;
-<a name="l00155"></a>00155 };
-<a name="l00156"></a>00156 
-<a name="l00158"></a>00158 
-<a name="l00159"></a><a class="code" href="a00171.html">00159</a> <span class="keyword">class </span><a class="code" href="a00171.html">thread_bound_filter</a>: <span class="keyword">public</span> <a class="code" href="a00139.html">filter</a> {
-<a name="l00160"></a>00160 <span class="keyword">public</span>:
-<a name="l00161"></a>00161     <span class="keyword">enum</span> result_type {
-<a name="l00162"></a>00162         <span class="comment">// item was processed</span>
-<a name="l00163"></a>00163         success,
-<a name="l00164"></a>00164         <span class="comment">// item is currently not available</span>
-<a name="l00165"></a>00165         item_not_available,
-<a name="l00166"></a>00166         <span class="comment">// there are no more items to process</span>
-<a name="l00167"></a>00167         end_of_stream
-<a name="l00168"></a>00168     };
-<a name="l00169"></a>00169 <span class="keyword">protected</span>:
-<a name="l00170"></a>00170     <a class="code" href="a00171.html">thread_bound_filter</a>(<a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode): 
-<a name="l00171"></a>00171          <a class="code" href="a00139.html">filter</a>(static_cast<mode>(filter_mode | filter::filter_is_bound))
-<a name="l00172"></a>00172     {}
-<a name="l00173"></a>00173 <span class="keyword">public</span>:
-<a name="l00175"></a>00175 
-<a name="l00180"></a>00180     result_type __TBB_EXPORTED_METHOD <a class="code" href="a00171.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a>(); 
-<a name="l00181"></a>00181 
-<a name="l00183"></a>00183 
-<a name="l00187"></a>00187     result_type __TBB_EXPORTED_METHOD <a class="code" href="a00171.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a>();
-<a name="l00188"></a>00188 
-<a name="l00189"></a>00189 <span class="keyword">private</span>:
-<a name="l00191"></a>00191     result_type internal_process_item(<span class="keywordtype">bool</span> is_blocking);
-<a name="l00192"></a>00192 };
-<a name="l00193"></a>00193 
-<a name="l00195"></a>00195 
-<a name="l00196"></a><a class="code" href="a00146.html">00196</a> <span class="keyword">class </span><a class="code" href="a00146.html">pipeline</a> {
-<a name="l00197"></a>00197 <span class="keyword">public</span>:
-<a name="l00199"></a>00199     __TBB_EXPORTED_METHOD <a class="code" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>();
-<a name="l00200"></a>00200 
-<a name="l00203"></a>00203     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00146.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>();
-<a name="l00204"></a>00204 
-<a name="l00206"></a>00206     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00146.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>( <a class="code" href="a00139.html">filter</a>& filter_ );
-<a name="l00207"></a>00207 
-<a name="l00209"></a>00209     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00146.html#f627616049b3fe36801f37ee40403ef8">run</a>( size_t max_number_of_live_tokens );
-<a name="l00210"></a>00210 
-<a name="l00211"></a>00211 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00213"></a>00213 <span class="preprocessor">    void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context );</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00215"></a>00215 <span class="preprocessor"></span>
-<a name="l00217"></a>00217     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00146.html#2c84aef5b834b555ee220b176e25931e">clear</a>();
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219 <span class="keyword">private</span>:
-<a name="l00220"></a>00220     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
-<a name="l00221"></a>00221     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_root_task;
-<a name="l00222"></a>00222     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00139.html">filter</a>;
-<a name="l00223"></a>00223     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00171.html">thread_bound_filter</a>;
-<a name="l00224"></a>00224     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_cleaner;
-<a name="l00225"></a>00225 
-<a name="l00227"></a>00227     <a class="code" href="a00139.html">filter</a>* filter_list;
-<a name="l00228"></a>00228 
-<a name="l00230"></a>00230     <a class="code" href="a00139.html">filter</a>* filter_end;
-<a name="l00231"></a>00231 
-<a name="l00233"></a>00233     <a class="code" href="a00162.html">task</a>* end_counter;
-<a name="l00234"></a>00234 
-<a name="l00236"></a>00236     <a class="code" href="a00117.html">atomic<internal::Token></a> input_tokens;
-<a name="l00237"></a>00237 
-<a name="l00239"></a>00239     <a class="code" href="a00117.html">atomic<internal::Token></a> token_counter;
-<a name="l00240"></a>00240 
-<a name="l00242"></a>00242     <span class="keywordtype">bool</span> end_of_input;
-<a name="l00243"></a>00243 
-<a name="l00245"></a>00245     <span class="keywordtype">bool</span> has_thread_bound_filters;
-<a name="l00246"></a>00246 
-<a name="l00248"></a>00248     <span class="keywordtype">void</span> remove_filter( <a class="code" href="a00139.html">filter</a>& filter_ );
-<a name="l00249"></a>00249 
-<a name="l00251"></a>00251     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD inject_token( <a class="code" href="a00162.html">task</a>& <span class="keyword">self</span> );
-<a name="l00252"></a>00252 
-<a name="l00253"></a>00253 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00255"></a>00255 <span class="preprocessor">    void clear_filters();</span>
-<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00257"></a>00257 <span class="preprocessor"></span>};
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 } <span class="comment">// tbb</span>
-<a name="l00260"></a>00260 
-<a name="l00261"></a>00261 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_pipeline_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00345.html b/doc/html/a00345.html
deleted file mode 100644
index db30309..0000000
--- a/doc/html/a00345.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>queuing_mutex.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>queuing_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_queuing_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_mutex_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include <cstring></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
-<a name="l00029"></a>00029 
-<a name="l00031"></a>00031 
-<a name="l00032"></a><a class="code" href="a00148.html">00032</a> <span class="keyword">class </span><a class="code" href="a00148.html">queuing_mutex</a> {
-<a name="l00033"></a>00033 <span class="keyword">public</span>:
-<a name="l00035"></a><a class="code" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">00035</a>     <a class="code" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>() {
-<a name="l00036"></a>00036         q_tail = NULL;
-<a name="l00037"></a>00037 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>        internal_construct();
-<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span>    }
-<a name="l00041"></a>00041 
-<a name="l00043"></a>00043 
-<a name="l00045"></a><a class="code" href="a00149.html">00045</a>     <span class="keyword">class </span><a class="code" href="a00149.html">scoped_lock</a>: internal::no_copy {
-<a name="l00047"></a>00047         <span class="keywordtype">void</span> initialize() {
-<a name="l00048"></a>00048             <a class="code" href="a00142.html">mutex</a> = NULL;
-<a name="l00049"></a>00049 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>            internal::poison_pointer(next);
-<a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00052"></a>00052         }
-<a name="l00053"></a>00053     <span class="keyword">public</span>:
-<a name="l00055"></a>00055 
-<a name="l00056"></a><a class="code" href="a00149.html#db0fa3967491014572e24d6607bdc971">00056</a>         <a class="code" href="a00149.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>() {initialize();}
-<a name="l00057"></a>00057 
-<a name="l00059"></a>00059 
-<a name="l00060"></a><a class="code" href="a00149.html#9b51ef972f5618ac17caadb58841ab6d">00060</a>         <a class="code" href="a00149.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>( <a class="code" href="a00148.html">queuing_mutex</a>& m ) {
-<a name="l00061"></a>00061             initialize();
-<a name="l00062"></a>00062             <a class="code" href="a00149.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(m);
-<a name="l00063"></a>00063         }
-<a name="l00064"></a>00064 
-<a name="l00066"></a><a class="code" href="a00149.html#ac2c576a93570957d694192a5f491443">00066</a>         <a class="code" href="a00149.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>() {
-<a name="l00067"></a>00067             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
-<a name="l00068"></a>00068         }
-<a name="l00069"></a>00069 
-<a name="l00071"></a>00071         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00149.html#533e4fc8355ee321206a0609c42d909d">acquire</a>( <a class="code" href="a00148.html">queuing_mutex</a>& m );
-<a name="l00072"></a>00072 
-<a name="l00074"></a>00074         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00149.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>( <a class="code" href="a00148.html">queuing_mutex</a>& m );
-<a name="l00075"></a>00075 
-<a name="l00077"></a>00077         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079     <span class="keyword">private</span>:
-<a name="l00081"></a>00081         <a class="code" href="a00148.html">queuing_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
-<a name="l00082"></a>00082 
-<a name="l00084"></a>00084         <a class="code" href="a00149.html">scoped_lock</a> *next;
-<a name="l00085"></a>00085 
-<a name="l00087"></a>00087 
-<a name="l00090"></a>00090         internal::uintptr going;
-<a name="l00091"></a>00091     };
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095     <span class="comment">// Mutex traits</span>
-<a name="l00096"></a>00096     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
-<a name="l00097"></a>00097     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
-<a name="l00098"></a>00098     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00101"></a>00101 <span class="keyword">private</span>:
-<a name="l00103"></a>00103     <a class="code" href="a00117.html">atomic<scoped_lock*></a> q_tail;
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 };
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107 __TBB_DEFINE_PROFILING_SET_NAME(queuing_mutex)
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109 } <span class="comment">// namespace tbb</span>
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_mutex_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00346.html b/doc/html/a00346.html
deleted file mode 100644
index 0997a93..0000000
--- a/doc/html/a00346.html
+++ /dev/null
@@ -1,156 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>queuing_rw_mutex.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>queuing_rw_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_queuing_rw_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_rw_mutex_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include <cstring></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
-<a name="l00029"></a>00029 
-<a name="l00031"></a>00031 
-<a name="l00034"></a><a class="code" href="a00150.html">00034</a> <span class="keyword">class </span><a class="code" href="a00150.html">queuing_rw_mutex</a> {
-<a name="l00035"></a>00035 <span class="keyword">public</span>:
-<a name="l00037"></a><a class="code" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">00037</a>     <a class="code" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>() {
-<a name="l00038"></a>00038         q_tail = NULL;
-<a name="l00039"></a>00039 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span>        internal_construct();
-<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span>    }
-<a name="l00043"></a>00043 
-<a name="l00045"></a><a class="code" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">00045</a>     <a class="code" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>() {
-<a name="l00046"></a>00046 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>        __TBB_ASSERT( !q_tail, <span class="stringliteral">"destruction of an acquired mutex"</span>);
-<a name="l00048"></a>00048 <span class="preprocessor">#endif</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span>    }
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051     <span class="keyword">class </span>scoped_lock;
-<a name="l00052"></a>00052     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00053"></a>00053 
-<a name="l00055"></a>00055 
-<a name="l00057"></a><a class="code" href="a00151.html">00057</a>     <span class="keyword">class </span><a class="code" href="a00151.html">scoped_lock</a>: internal::no_copy {
-<a name="l00059"></a>00059         <span class="keywordtype">void</span> initialize() {
-<a name="l00060"></a>00060             <a class="code" href="a00142.html">mutex</a> = NULL;
-<a name="l00061"></a>00061 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00062"></a>00062 <span class="preprocessor"></span>            state = 0xFF; <span class="comment">// Set to invalid state</span>
-<a name="l00063"></a>00063             internal::poison_pointer(next);
-<a name="l00064"></a>00064             internal::poison_pointer(prev);
-<a name="l00065"></a>00065 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00066"></a>00066         }
-<a name="l00067"></a>00067     <span class="keyword">public</span>:
-<a name="l00069"></a>00069 
-<a name="l00070"></a><a class="code" href="a00151.html#c62e365be7bcbba091c9ea7454a4d22c">00070</a>         <a class="code" href="a00151.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>() {initialize();}
-<a name="l00071"></a>00071 
-<a name="l00073"></a>00073 
-<a name="l00074"></a><a class="code" href="a00151.html#fbb8798792d3aebb136c46fc63d2529e">00074</a>         <a class="code" href="a00151.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>( <a class="code" href="a00150.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> ) {
-<a name="l00075"></a>00075             initialize();
-<a name="l00076"></a>00076             <a class="code" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(m,write);
-<a name="l00077"></a>00077         }
-<a name="l00078"></a>00078 
-<a name="l00080"></a><a class="code" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">00080</a>         <a class="code" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>() {
-<a name="l00081"></a>00081             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00151.html#67ae221109ddc69510ab593874e435d4">release</a>();
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083 
-<a name="l00085"></a>00085         <span class="keywordtype">void</span> <a class="code" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>( <a class="code" href="a00150.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
-<a name="l00086"></a>00086 
-<a name="l00088"></a>00088         <span class="keywordtype">bool</span> <a class="code" href="a00151.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>( <a class="code" href="a00150.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
-<a name="l00089"></a>00089 
-<a name="l00091"></a>00091         <span class="keywordtype">void</span> <a class="code" href="a00151.html#67ae221109ddc69510ab593874e435d4">release</a>();
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095         <span class="keywordtype">bool</span> <a class="code" href="a00151.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>();
-<a name="l00096"></a>00096 
-<a name="l00098"></a>00098         <span class="keywordtype">bool</span> <a class="code" href="a00151.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>();
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100     <span class="keyword">private</span>:
-<a name="l00102"></a>00102         <a class="code" href="a00150.html">queuing_rw_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
-<a name="l00103"></a>00103 
-<a name="l00105"></a>00105         <a class="code" href="a00151.html">scoped_lock</a> * prev, * next;
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107         <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state_t;
-<a name="l00108"></a>00108 
-<a name="l00110"></a>00110         <a class="code" href="a00117.html">atomic<state_t></a> state;
-<a name="l00111"></a>00111 
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> going;
-<a name="l00115"></a>00115 
-<a name="l00117"></a>00117         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> internal_lock;
-<a name="l00118"></a>00118 
-<a name="l00120"></a>00120         <span class="keywordtype">void</span> acquire_internal_lock();
-<a name="l00121"></a>00121 
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124         <span class="keywordtype">bool</span> try_acquire_internal_lock();
-<a name="l00125"></a>00125 
-<a name="l00127"></a>00127         <span class="keywordtype">void</span> release_internal_lock();
-<a name="l00128"></a>00128 
-<a name="l00130"></a>00130         <span class="keywordtype">void</span> wait_for_release_of_internal_lock();
-<a name="l00131"></a>00131 
-<a name="l00133"></a>00133         <span class="keywordtype">void</span> unblock_or_wait_on_internal_lock( uintptr_t );
-<a name="l00134"></a>00134     };
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138     <span class="comment">// Mutex traits</span>
-<a name="l00139"></a>00139     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;
-<a name="l00140"></a>00140     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
-<a name="l00141"></a>00141     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143 <span class="keyword">private</span>:
-<a name="l00145"></a>00145     <a class="code" href="a00117.html">atomic<scoped_lock*></a> q_tail;
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147 };
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149 __TBB_DEFINE_PROFILING_SET_NAME(queuing_rw_mutex)
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151 } <span class="comment">// namespace tbb</span>
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_rw_mutex_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00347.html b/doc/html/a00347.html
index e53eed0..48b1ebf 100644
--- a/doc/html/a00347.html
+++ b/doc/html/a00347.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>recursive_mutex.h Source File</title>
+<title>pipeline.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>recursive_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>pipeline.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,203 +39,193 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_recursive_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_recursive_mutex_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_pipeline_H </span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_pipeline_H </span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include <windows.h></span>
-<a name="l00027"></a>00027 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
-<a name="l00029"></a>00029 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
-<a name="l00030"></a>00030 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
-<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
-<a name="l00032"></a>00032 <span class="preprocessor"></span>
-<a name="l00033"></a>00033 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="preprocessor">#include <pthread.h></span>
-<a name="l00036"></a>00036 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
-<a name="l00037"></a>00037 <span class="comment">// Use this internal TBB function to throw an exception</span>
-<a name="l00038"></a>00038   <span class="keyword">extern</span> <span class="keywordtype">void</span> handle_perror( <span class="keywordtype">int</span> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span>* what );
-<a name="l00039"></a>00039 } } <span class="comment">//namespaces</span>
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043 <span class="preprocessor">#include <new></span>
-<a name="l00044"></a>00044 <span class="preprocessor">#include "aligned_space.h"</span>
-<a name="l00045"></a>00045 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00046"></a>00046 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048 <span class="keyword">namespace </span>tbb {
+<a name="l00024"></a>00024 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "task.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include <cstddef></span>
+<a name="l00027"></a>00027 
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
+<a name="l00029"></a>00029 
+<a name="l00030"></a>00030 <span class="keyword">class </span>pipeline;
+<a name="l00031"></a>00031 <span class="keyword">class </span>filter;
+<a name="l00032"></a>00032 
+<a name="l00034"></a>00034 <span class="keyword">namespace </span>internal {
+<a name="l00035"></a>00035 
+<a name="l00036"></a>00036 <span class="comment">// The argument for PIPELINE_VERSION should be an integer between 2 and 9</span>
+<a name="l00037"></a>00037 <span class="preprocessor">#define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span>
+<a name="l00039"></a>00039 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> Token;
+<a name="l00040"></a>00040 <span class="keyword">typedef</span> <span class="keywordtype">long</span> tokendiff_t;
+<a name="l00041"></a>00041 <span class="keyword">class </span>stage_task;
+<a name="l00042"></a>00042 <span class="keyword">class </span>input_buffer;
+<a name="l00043"></a>00043 <span class="keyword">class </span>pipeline_root_task;
+<a name="l00044"></a>00044 <span class="keyword">class </span>pipeline_cleaner;
+<a name="l00045"></a>00045 
+<a name="l00046"></a>00046 } <span class="comment">// namespace internal</span>
+<a name="l00048"></a>00048 <span class="comment"></span>
 <a name="l00050"></a>00050 
-<a name="l00052"></a><a class="code" href="a00152.html">00052</a> <span class="keyword">class </span><a class="code" href="a00152.html">recursive_mutex</a> {
-<a name="l00053"></a>00053 <span class="keyword">public</span>:
-<a name="l00055"></a><a class="code" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">00055</a>     <a class="code" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>() {
-<a name="l00056"></a>00056 <span class="preprocessor">#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span>        internal_construct();
-<a name="l00058"></a>00058 <span class="preprocessor">#else</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
-<a name="l00061"></a>00061 <span class="preprocessor">  #else</span>
-<a name="l00062"></a>00062 <span class="preprocessor"></span>        pthread_mutexattr_t mtx_attr;
-<a name="l00063"></a>00063         <span class="keywordtype">int</span> error_code = pthread_mutexattr_init( &mtx_attr );
-<a name="l00064"></a>00064         <span class="keywordflow">if</span>( error_code )
-<a name="l00065"></a>00065             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutexattr_init failed"</span>);
+<a name="l00051"></a><a class="code" href="a00139.html">00051</a> <span class="keyword">class </span><a class="code" href="a00139.html">filter</a>: internal::no_copy {
+<a name="l00052"></a>00052 <span class="keyword">private</span>:
+<a name="l00054"></a>00054     <span class="keyword">static</span> <a class="code" href="a00139.html">filter</a>* not_in_pipeline() {<span class="keywordflow">return</span> reinterpret_cast<filter*>(internal::intptr(-1));}
+<a name="l00055"></a>00055     
+<a name="l00057"></a>00057     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_serial = 0x1; 
+<a name="l00058"></a>00058 
+<a name="l00060"></a>00060 
+<a name="l00062"></a>00062     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_out_of_order = 0x1<<4;  
+<a name="l00063"></a>00063 
+<a name="l00065"></a>00065     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> filter_is_bound = 0x1<<5;  
 <a name="l00066"></a>00066 
-<a name="l00067"></a>00067         pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
-<a name="l00068"></a>00068         error_code = pthread_mutex_init( &impl, &mtx_attr );
-<a name="l00069"></a>00069         <span class="keywordflow">if</span>( error_code )
-<a name="l00070"></a>00070             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutex_init failed"</span>);
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         pthread_mutexattr_destroy( &mtx_attr );
-<a name="l00073"></a>00073 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
-<a name="l00074"></a>00074 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00075"></a>00075     };
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077     ~<a class="code" href="a00152.html">recursive_mutex</a>() {
-<a name="l00078"></a>00078 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>        internal_destroy();
-<a name="l00080"></a>00080 <span class="preprocessor">#else</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
-<a name="l00083"></a>00083 <span class="preprocessor">  #else</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00087"></a>00087 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00088"></a>00088     };
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090     <span class="keyword">class </span>scoped_lock;
-<a name="l00091"></a>00091     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00153.html">00096</a>     <span class="keyword">class </span><a class="code" href="a00153.html">scoped_lock</a>: internal::no_copy {
-<a name="l00097"></a>00097     <span class="keyword">public</span>:
-<a name="l00099"></a><a class="code" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">00099</a>         <a class="code" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>() : my_mutex(NULL) {};
-<a name="l00100"></a>00100 
-<a name="l00102"></a><a class="code" href="a00153.html#dec17713c4c1321ac8fec66816d0c602">00102</a>         <a class="code" href="a00153.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>( <a class="code" href="a00152.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
-<a name="l00103"></a>00103 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00104"></a>00104 <span class="preprocessor"></span>            my_mutex = &mutex; 
-<a name="l00105"></a>00105 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00106"></a>00106             <a class="code" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( mutex );
-<a name="l00107"></a>00107         }
-<a name="l00108"></a>00108 
-<a name="l00110"></a><a class="code" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">00110</a>         <a class="code" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>() {
-<a name="l00111"></a>00111             <span class="keywordflow">if</span>( my_mutex ) 
-<a name="l00112"></a>00112                 <a class="code" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>();
-<a name="l00113"></a>00113         }
+<a name="l00067"></a>00067     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_version = __TBB_PIPELINE_VERSION(5);
+<a name="l00068"></a>00068     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> version_mask = 0x7<<1; <span class="comment">// bits 1-3 are for version</span>
+<a name="l00069"></a>00069 <span class="keyword">public</span>:
+<a name="l00070"></a><a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">00070</a>     <span class="keyword">enum</span> <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> {
+<a name="l00072"></a>00072         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a> = current_version | filter_is_out_of_order, 
+<a name="l00074"></a>00074         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">serial_in_order</a> = current_version | filter_is_serial,
+<a name="l00076"></a>00076         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">serial_out_of_order</a> = current_version | filter_is_serial | filter_is_out_of_order,
+<a name="l00078"></a>00078         <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> = serial_in_order
+<a name="l00079"></a>00079     };
+<a name="l00080"></a>00080 <span class="keyword">protected</span>:
+<a name="l00081"></a>00081     <a class="code" href="a00139.html">filter</a>( <span class="keywordtype">bool</span> is_serial_ ) : 
+<a name="l00082"></a>00082         next_filter_in_pipeline(not_in_pipeline()),
+<a name="l00083"></a>00083         my_input_buffer(NULL),
+<a name="l00084"></a>00084         my_filter_mode(static_cast<unsigned char>(is_serial_ ? <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">serial</a> : <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">parallel</a>)),
+<a name="l00085"></a>00085         prev_filter_in_pipeline(not_in_pipeline()),
+<a name="l00086"></a>00086         my_pipeline(NULL),
+<a name="l00087"></a>00087         next_segment(NULL)
+<a name="l00088"></a>00088     {}
+<a name="l00089"></a>00089     
+<a name="l00090"></a>00090     filter( <a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode ) :
+<a name="l00091"></a>00091         next_filter_in_pipeline(not_in_pipeline()),
+<a name="l00092"></a>00092         my_input_buffer(NULL),
+<a name="l00093"></a>00093         my_filter_mode(static_cast<unsigned char>(filter_mode)),
+<a name="l00094"></a>00094         prev_filter_in_pipeline(not_in_pipeline()),
+<a name="l00095"></a>00095         my_pipeline(NULL),
+<a name="l00096"></a>00096         next_segment(NULL)
+<a name="l00097"></a>00097     {}
+<a name="l00098"></a>00098 
+<a name="l00099"></a>00099 <span class="keyword">public</span>:
+<a name="l00101"></a><a class="code" href="a00139.html#fcfec27656a69ff2072802ac001e936f">00101</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#fcfec27656a69ff2072802ac001e936f">is_serial</a>()<span class="keyword"> const </span>{
+<a name="l00102"></a>00102         <span class="keywordflow">return</span> bool( my_filter_mode & filter_is_serial );
+<a name="l00103"></a>00103     }  
+<a name="l00104"></a>00104     
+<a name="l00106"></a><a class="code" href="a00139.html#cd53206c4795ef2df5df26b795caf692">00106</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#cd53206c4795ef2df5df26b795caf692">is_ordered</a>()<span class="keyword"> const </span>{
+<a name="l00107"></a>00107         <span class="keywordflow">return</span> (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial;
+<a name="l00108"></a>00108     }
+<a name="l00109"></a>00109 
+<a name="l00111"></a><a class="code" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">00111</a>     <span class="keywordtype">bool</span> <a class="code" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">is_bound</a>()<span class="keyword"> const </span>{
+<a name="l00112"></a>00112         <span class="keywordflow">return</span> ( my_filter_mode & filter_is_bound )==filter_is_bound;
+<a name="l00113"></a>00113     }
 <a name="l00114"></a>00114 
-<a name="l00116"></a><a class="code" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">00116</a>         <span class="keywordtype">void</span> <a class="code" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( <a class="code" href="a00152.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
-<a name="l00117"></a>00117 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00118"></a>00118 <span class="preprocessor"></span>            internal_acquire( mutex );
-<a name="l00119"></a>00119 <span class="preprocessor">#else</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span>            my_mutex = &mutex;
-<a name="l00121"></a>00121             mutex.<a class="code" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>();
-<a name="l00122"></a>00122 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00123"></a>00123         }
-<a name="l00124"></a>00124 
-<a name="l00126"></a><a class="code" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">00126</a>         <span class="keywordtype">bool</span> <a class="code" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>( <a class="code" href="a00152.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
-<a name="l00127"></a>00127 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00128"></a>00128 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire( mutex );
-<a name="l00129"></a>00129 <span class="preprocessor">#else</span>
-<a name="l00130"></a>00130 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = mutex.<a class="code" href="a00152.html#86e719b0afee25704af11ab97694d240">try_lock</a>();
-<a name="l00131"></a>00131             <span class="keywordflow">if</span>( result )
-<a name="l00132"></a>00132                 my_mutex = &mutex;
-<a name="l00133"></a>00133             <span class="keywordflow">return</span> result;
-<a name="l00134"></a>00134 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00135"></a>00135         }
-<a name="l00136"></a>00136 
-<a name="l00138"></a><a class="code" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">00138</a>         <span class="keywordtype">void</span> <a class="code" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>() {
-<a name="l00139"></a>00139 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00140"></a>00140 <span class="preprocessor"></span>            internal_release();
-<a name="l00141"></a>00141 <span class="preprocessor">#else</span>
-<a name="l00142"></a>00142 <span class="preprocessor"></span>            my_mutex-><a class="code" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>();
-<a name="l00143"></a>00143             my_mutex = NULL;
-<a name="l00144"></a>00144 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00145"></a>00145         }
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147     <span class="keyword">private</span>:
-<a name="l00149"></a>00149         <a class="code" href="a00152.html">recursive_mutex</a>* my_mutex;
-<a name="l00150"></a>00150 
-<a name="l00152"></a>00152         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00152.html">recursive_mutex</a>& m );
+<a name="l00116"></a>00116 
+<a name="l00117"></a>00117     <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">operator()</a>( <span class="keywordtype">void</span>* item ) = 0;
+<a name="l00118"></a>00118 
+<a name="l00120"></a>00120 
+<a name="l00121"></a>00121     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00139.html#66d159f362293e3964ba3da8bc1d2604">~filter</a>();
+<a name="l00122"></a>00122 
+<a name="l00123"></a>00123 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00125"></a>00125 <span class="preprocessor"></span>
+<a name="l00127"></a><a class="code" href="a00139.html#56275eb889c77c4807967133e21401bd">00127</a> <span class="preprocessor">    virtual void finalize( void* </span><span class="comment">/*item*/</span> ) {};
+<a name="l00128"></a>00128 <span class="preprocessor">#endif</span>
+<a name="l00129"></a>00129 <span class="preprocessor"></span>
+<a name="l00130"></a>00130 <span class="keyword">private</span>:
+<a name="l00132"></a>00132     <a class="code" href="a00139.html">filter</a>* next_filter_in_pipeline;
+<a name="l00133"></a>00133 
+<a name="l00135"></a>00135 
+<a name="l00136"></a>00136     internal::input_buffer* my_input_buffer;
+<a name="l00137"></a>00137 
+<a name="l00138"></a>00138     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
+<a name="l00139"></a>00139     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_root_task;
+<a name="l00140"></a>00140     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00150.html">pipeline</a>;
+<a name="l00141"></a>00141     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00175.html">thread_bound_filter</a>;
+<a name="l00142"></a>00142 
+<a name="l00144"></a>00144     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> my_filter_mode;
+<a name="l00145"></a>00145 
+<a name="l00147"></a>00147     <a class="code" href="a00139.html">filter</a>* prev_filter_in_pipeline;
+<a name="l00148"></a>00148 
+<a name="l00150"></a>00150     <a class="code" href="a00150.html">pipeline</a>* my_pipeline;
+<a name="l00151"></a>00151 
 <a name="l00153"></a>00153 
-<a name="l00155"></a>00155         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00152.html">recursive_mutex</a>& m );
+<a name="l00154"></a>00154     <a class="code" href="a00139.html">filter</a>* next_segment;
+<a name="l00155"></a>00155 };
 <a name="l00156"></a>00156 
-<a name="l00158"></a>00158         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00152.html">recursive_mutex</a>;
-<a name="l00161"></a>00161     };
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163     <span class="comment">// Mutex traits</span>
-<a name="l00164"></a>00164     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
-<a name="l00165"></a>00165     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
-<a name="l00166"></a>00166     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168     <span class="comment">// C++0x compatibility interface</span>
-<a name="l00169"></a>00169     
-<a name="l00171"></a><a class="code" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">00171</a>     <span class="keywordtype">void</span> <a class="code" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>() {
-<a name="l00172"></a>00172 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00174"></a>00174         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00153.html">scoped_lock</a>(*<span class="keyword">this</span>);
-<a name="l00175"></a>00175 <span class="preprocessor">#else</span>
-<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00177"></a>00177 <span class="preprocessor"></span>        EnterCriticalSection(&impl);
-<a name="l00178"></a>00178 <span class="preprocessor">  #else</span>
-<a name="l00179"></a>00179 <span class="preprocessor"></span>        pthread_mutex_lock(&impl);
-<a name="l00180"></a>00180 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00181"></a>00181 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00182"></a>00182     }
+<a name="l00158"></a>00158 
+<a name="l00159"></a><a class="code" href="a00175.html">00159</a> <span class="keyword">class </span><a class="code" href="a00175.html">thread_bound_filter</a>: <span class="keyword">public</span> <a class="code" href="a00139.html">filter</a> {
+<a name="l00160"></a>00160 <span class="keyword">public</span>:
+<a name="l00161"></a>00161     <span class="keyword">enum</span> result_type {
+<a name="l00162"></a>00162         <span class="comment">// item was processed</span>
+<a name="l00163"></a>00163         success,
+<a name="l00164"></a>00164         <span class="comment">// item is currently not available</span>
+<a name="l00165"></a>00165         item_not_available,
+<a name="l00166"></a>00166         <span class="comment">// there are no more items to process</span>
+<a name="l00167"></a>00167         end_of_stream
+<a name="l00168"></a>00168     };
+<a name="l00169"></a>00169 <span class="keyword">protected</span>:
+<a name="l00170"></a>00170     <a class="code" href="a00175.html">thread_bound_filter</a>(<a class="code" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">mode</a> filter_mode): 
+<a name="l00171"></a>00171          <a class="code" href="a00139.html">filter</a>(static_cast<mode>(filter_mode | filter::filter_is_bound))
+<a name="l00172"></a>00172     {}
+<a name="l00173"></a>00173 <span class="keyword">public</span>:
+<a name="l00175"></a>00175 
+<a name="l00180"></a>00180     result_type __TBB_EXPORTED_METHOD <a class="code" href="a00175.html#c4f90f2c771bce748beb9be734fa286c">try_process_item</a>(); 
+<a name="l00181"></a>00181 
 <a name="l00183"></a>00183 
-<a name="l00185"></a>00185 
-<a name="l00186"></a><a class="code" href="a00152.html#86e719b0afee25704af11ab97694d240">00186</a>     <span class="keywordtype">bool</span> <a class="code" href="a00152.html#86e719b0afee25704af11ab97694d240">try_lock</a>() {
-<a name="l00187"></a>00187 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00189"></a>00189         <span class="keywordflow">return</span> (<span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00153.html">scoped_lock</a>)->internal_try_acquire(*<span class="keyword">this</span>);
-<a name="l00190"></a>00190 <span class="preprocessor">#else        </span>
-<a name="l00191"></a>00191 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00192"></a>00192 <span class="preprocessor"></span>        <span class="keywordflow">return</span> TryEnterCriticalSection(&impl)!=0;
-<a name="l00193"></a>00193 <span class="preprocessor">  #else</span>
-<a name="l00194"></a>00194 <span class="preprocessor"></span>        <span class="keywordflow">return</span> pthread_mutex_trylock(&impl)==0;
-<a name="l00195"></a>00195 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00196"></a>00196 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00197"></a>00197     }
-<a name="l00198"></a>00198 
-<a name="l00200"></a><a class="code" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">00200</a>     <span class="keywordtype">void</span> <a class="code" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>() {
-<a name="l00201"></a>00201 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00202"></a>00202 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00203"></a>00203         <a class="code" href="a00153.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
-<a name="l00204"></a>00204         s.<a class="code" href="a00153.html#3efd10a49e2435ea5215b49907f93ba2">my_mutex</a> = <span class="keyword">this</span>;
-<a name="l00205"></a>00205         s.<a class="code" href="a00153.html#43ed37cec508072e53a52113c8040137">internal_release</a>();
-<a name="l00206"></a>00206 <span class="preprocessor">#else</span>
-<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
-<a name="l00208"></a>00208 <span class="preprocessor"></span>        LeaveCriticalSection(&impl);
-<a name="l00209"></a>00209 <span class="preprocessor">  #else</span>
-<a name="l00210"></a>00210 <span class="preprocessor"></span>        pthread_mutex_unlock(&impl);
-<a name="l00211"></a>00211 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
-<a name="l00212"></a>00212 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00213"></a>00213     }
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215 <span class="keyword">private</span>:
-<a name="l00216"></a>00216 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00217"></a>00217 <span class="preprocessor"></span>    CRITICAL_SECTION impl;
-<a name="l00218"></a>00218     <span class="keyword">enum</span> state_t {
-<a name="l00219"></a>00219         INITIALIZED=0x1234,
-<a name="l00220"></a>00220         DESTROYED=0x789A,
-<a name="l00221"></a>00221     } state;
-<a name="l00222"></a>00222 <span class="preprocessor">#else</span>
-<a name="l00223"></a>00223 <span class="preprocessor"></span>    pthread_mutex_t impl;
-<a name="l00224"></a>00224 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00187"></a>00187     result_type __TBB_EXPORTED_METHOD <a class="code" href="a00175.html#5e726bdc7fbd924c0b07bd558b1d4d5d">process_item</a>();
+<a name="l00188"></a>00188 
+<a name="l00189"></a>00189 <span class="keyword">private</span>:
+<a name="l00191"></a>00191     result_type internal_process_item(<span class="keywordtype">bool</span> is_blocking);
+<a name="l00192"></a>00192 };
+<a name="l00193"></a>00193 
+<a name="l00195"></a>00195 
+<a name="l00196"></a><a class="code" href="a00150.html">00196</a> <span class="keyword">class </span><a class="code" href="a00150.html">pipeline</a> {
+<a name="l00197"></a>00197 <span class="keyword">public</span>:
+<a name="l00199"></a>00199     __TBB_EXPORTED_METHOD <a class="code" href="a00150.html#596dc3beba27099c4c8581cb419e1a59">pipeline</a>();
+<a name="l00200"></a>00200 
+<a name="l00203"></a>00203     <span class="keyword">virtual</span> __TBB_EXPORTED_METHOD <a class="code" href="a00150.html#49513c6c24f9d5bbbb27edca5efe01c9">~pipeline</a>();
+<a name="l00204"></a>00204 
+<a name="l00206"></a>00206     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00150.html#38fb5c9c8395dd6f89a4ae2011a83e0d">add_filter</a>( <a class="code" href="a00139.html">filter</a>& filter_ );
+<a name="l00207"></a>00207 
+<a name="l00209"></a>00209     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00150.html#f627616049b3fe36801f37ee40403ef8">run</a>( size_t max_number_of_live_tokens );
+<a name="l00210"></a>00210 
+<a name="l00211"></a>00211 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00213"></a>00213 <span class="preprocessor">    void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context );</span>
+<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00215"></a>00215 <span class="preprocessor"></span>
+<a name="l00217"></a>00217     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00150.html#2c84aef5b834b555ee220b176e25931e">clear</a>();
+<a name="l00218"></a>00218 
+<a name="l00219"></a>00219 <span class="keyword">private</span>:
+<a name="l00220"></a>00220     <span class="keyword">friend</span> <span class="keyword">class </span>internal::stage_task;
+<a name="l00221"></a>00221     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_root_task;
+<a name="l00222"></a>00222     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00139.html">filter</a>;
+<a name="l00223"></a>00223     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00175.html">thread_bound_filter</a>;
+<a name="l00224"></a>00224     <span class="keyword">friend</span> <span class="keyword">class </span>internal::pipeline_cleaner;
 <a name="l00225"></a>00225 
-<a name="l00227"></a>00227     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
+<a name="l00227"></a>00227     <a class="code" href="a00139.html">filter</a>* filter_list;
 <a name="l00228"></a>00228 
-<a name="l00230"></a>00230     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_destroy();
-<a name="l00231"></a>00231 };
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233 __TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex)
+<a name="l00230"></a>00230     <a class="code" href="a00139.html">filter</a>* filter_end;
+<a name="l00231"></a>00231 
+<a name="l00233"></a>00233     <a class="code" href="a00166.html">task</a>* end_counter;
 <a name="l00234"></a>00234 
-<a name="l00235"></a>00235 } <span class="comment">// namespace tbb </span>
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_recursive_mutex_H */</span>
+<a name="l00236"></a>00236     <a class="code" href="a00117.html">atomic<internal::Token></a> input_tokens;
+<a name="l00237"></a>00237 
+<a name="l00239"></a>00239     <a class="code" href="a00117.html">atomic<internal::Token></a> token_counter;
+<a name="l00240"></a>00240 
+<a name="l00242"></a>00242     <span class="keywordtype">bool</span> end_of_input;
+<a name="l00243"></a>00243 
+<a name="l00245"></a>00245     <span class="keywordtype">bool</span> has_thread_bound_filters;
+<a name="l00246"></a>00246 
+<a name="l00248"></a>00248     <span class="keywordtype">void</span> remove_filter( <a class="code" href="a00139.html">filter</a>& filter_ );
+<a name="l00249"></a>00249 
+<a name="l00251"></a>00251     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD inject_token( <a class="code" href="a00166.html">task</a>& <span class="keyword">self</span> );
+<a name="l00252"></a>00252 
+<a name="l00253"></a>00253 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00255"></a>00255 <span class="preprocessor">    void clear_filters();</span>
+<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00257"></a>00257 <span class="preprocessor"></span>};
+<a name="l00258"></a>00258 
+<a name="l00259"></a>00259 } <span class="comment">// tbb</span>
+<a name="l00260"></a>00260 
+<a name="l00261"></a>00261 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_pipeline_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00348.html b/doc/html/a00348.html
index b97bcfa..231211e 100644
--- a/doc/html/a00348.html
+++ b/doc/html/a00348.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>scalable_allocator.h Source File</title>
+<title>queuing_mutex.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>scalable_allocator.h</h1><a href="a00206.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>queuing_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,153 +39,80 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_scalable_allocator_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_scalable_allocator_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_queuing_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_mutex_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <stddef.h></span> <span class="comment">/* Need ptrdiff_t and size_t from here. */</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="preprocessor">#if !defined(__cplusplus) && __ICC==1100</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 991)</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#ifdef __cplusplus</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
-<a name="l00034"></a>00034 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="preprocessor">#if _MSC_VER >= 1400</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC   __cdecl</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size);
-<a name="l00045"></a>00045 
-<a name="l00048"></a>00048 <span class="keywordtype">void</span>   __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (<span class="keywordtype">void</span>* ptr);
-<a name="l00049"></a>00049 
-<a name="l00052"></a>00052 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size);
-<a name="l00053"></a>00053 
-<a name="l00056"></a>00056 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size);
+<a name="l00024"></a>00024 <span class="preprocessor">#include <cstring></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_profiling.h"</span>
+<a name="l00027"></a>00027 
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
+<a name="l00029"></a>00029 
+<a name="l00031"></a>00031 
+<a name="l00032"></a><a class="code" href="a00152.html">00032</a> <span class="keyword">class </span><a class="code" href="a00152.html">queuing_mutex</a> {
+<a name="l00033"></a>00033 <span class="keyword">public</span>:
+<a name="l00035"></a><a class="code" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">00035</a>     <a class="code" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">queuing_mutex</a>() {
+<a name="l00036"></a>00036         q_tail = NULL;
+<a name="l00037"></a>00037 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span>        internal_construct();
+<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span>    }
+<a name="l00041"></a>00041 
+<a name="l00043"></a>00043 
+<a name="l00045"></a><a class="code" href="a00153.html">00045</a>     <span class="keyword">class </span><a class="code" href="a00153.html">scoped_lock</a>: internal::no_copy {
+<a name="l00047"></a>00047         <span class="keywordtype">void</span> initialize() {
+<a name="l00048"></a>00048             <a class="code" href="a00142.html">mutex</a> = NULL;
+<a name="l00049"></a>00049 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span>            internal::poison_pointer(next);
+<a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00052"></a>00052         }
+<a name="l00053"></a>00053     <span class="keyword">public</span>:
+<a name="l00055"></a>00055 
+<a name="l00056"></a><a class="code" href="a00153.html#db0fa3967491014572e24d6607bdc971">00056</a>         <a class="code" href="a00153.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>() {initialize();}
 <a name="l00057"></a>00057 
-<a name="l00060"></a>00060 <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (<span class="keywordtype">void</span>** memptr, size_t alignment, size_t size);
-<a name="l00061"></a>00061 
-<a name="l00064"></a>00064 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment);
-<a name="l00065"></a>00065 
-<a name="l00068"></a>00068 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size, size_t alignment);
+<a name="l00059"></a>00059 
+<a name="l00060"></a><a class="code" href="a00153.html#9b51ef972f5618ac17caadb58841ab6d">00060</a>         <a class="code" href="a00153.html#db0fa3967491014572e24d6607bdc971">scoped_lock</a>( <a class="code" href="a00152.html">queuing_mutex</a>& m ) {
+<a name="l00061"></a>00061             initialize();
+<a name="l00062"></a>00062             <a class="code" href="a00153.html#533e4fc8355ee321206a0609c42d909d">acquire</a>(m);
+<a name="l00063"></a>00063         }
+<a name="l00064"></a>00064 
+<a name="l00066"></a><a class="code" href="a00153.html#ac2c576a93570957d694192a5f491443">00066</a>         <a class="code" href="a00153.html#ac2c576a93570957d694192a5f491443">~scoped_lock</a>() {
+<a name="l00067"></a>00067             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
+<a name="l00068"></a>00068         }
 <a name="l00069"></a>00069 
-<a name="l00072"></a>00072 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (<span class="keywordtype">void</span>* ptr);
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074 <span class="preprocessor">#ifdef __cplusplus</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span>} <span class="comment">/* extern "C" */</span>
-<a name="l00076"></a>00076 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078 <span class="preprocessor">#ifdef __cplusplus</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>
-<a name="l00080"></a>00080 <span class="preprocessor">#include <new></span>      <span class="comment">/* To use new with the placement argument */</span>
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="comment">/* Ensure that including this header does not cause implicit linkage with TBB */</span>
-<a name="l00083"></a>00083 <span class="preprocessor">#ifndef __TBB_NO_IMPLICIT_LINKAGE</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">    #define __TBB_NO_IMPLICIT_LINKAGE 1</span>
-<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">    #include "tbb_stddef.h"</span>
-<a name="l00086"></a>00086 <span class="preprocessor">    #undef  __TBB_NO_IMPLICIT_LINKAGE</span>
-<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">    #include "tbb_stddef.h"</span>
-<a name="l00089"></a>00089 <span class="preprocessor">#endif</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span>
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092 <span class="keyword">namespace </span>tbb {
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00095"></a>00095 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</span>
-<a name="l00096"></a>00096 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4100)</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00099"></a>00099 <span class="preprocessor"></span>
-<a name="l00101"></a>00101 
-<a name="l00104"></a>00104 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00105"></a><a class="code" href="a00154.html">00105</a> <span class="keyword">class </span><a class="code" href="a00154.html">scalable_allocator</a> {
-<a name="l00106"></a>00106 <span class="keyword">public</span>:
-<a name="l00107"></a>00107     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
-<a name="l00108"></a>00108     <span class="keyword">typedef</span> value_type* pointer;
-<a name="l00109"></a>00109     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
-<a name="l00110"></a>00110     <span class="keyword">typedef</span> value_type& reference;
-<a name="l00111"></a>00111     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
-<a name="l00112"></a>00112     <span class="keyword">typedef</span> size_t size_type;
-<a name="l00113"></a>00113     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00114"></a>00114     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00115"></a>00115         <span class="keyword">typedef</span> <a class="code" href="a00154.html">scalable_allocator<U></a> other;
-<a name="l00116"></a>00116     };
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118     <a class="code" href="a00154.html">scalable_allocator</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00119"></a>00119     <a class="code" href="a00154.html">scalable_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00154.html">scalable_allocator</a>& ) <span class="keywordflow">throw</span>() {}
-<a name="l00120"></a>00120     <span class="keyword">template</span><<span class="keyword">typename</span> U> <a class="code" href="a00154.html">scalable_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00154.html">scalable_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00123"></a>00123     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00124"></a>00124 
-<a name="l00126"></a><a class="code" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">00126</a>     pointer <a class="code" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> =0 ) {
-<a name="l00127"></a>00127         <span class="keywordflow">return</span> static_cast<pointer>( <a class="code" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a>( n * <span class="keyword">sizeof</span>(value_type) ) );
-<a name="l00128"></a>00128     }
-<a name="l00129"></a>00129 
-<a name="l00131"></a><a class="code" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">00131</a>     <span class="keywordtype">void</span> <a class="code" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>( pointer p, size_type ) {
-<a name="l00132"></a>00132         <a class="code" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a>( p );
-<a name="l00133"></a>00133     }
-<a name="l00134"></a>00134 
-<a name="l00136"></a><a class="code" href="a00154.html#880e766f1d913988c21973dbdd874fd5">00136</a>     size_type <a class="code" href="a00154.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const throw() {
-<a name="l00137"></a>00137         size_type absolutemax = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (value_type);
-<a name="l00138"></a>00138         <span class="keywordflow">return</span> (absolutemax > 0 ? absolutemax : 1);
-<a name="l00139"></a>00139     }
-<a name="l00140"></a>00140     <span class="keywordtype">void</span> construct( pointer p, <span class="keyword">const</span> value_type& val ) { <span class="keyword">new</span>(static_cast<void*>(p)) value_type(val); }
-<a name="l00141"></a>00141     <span class="keywordtype">void</span> destroy( pointer p ) {p->~value_type();}
-<a name="l00142"></a>00142 };
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
-<a name="l00147"></a>00147 <span class="preprocessor"></span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="keyword">template</span><>
-<a name="l00151"></a><a class="code" href="a00155.html">00151</a> <span class="keyword">class </span><a class="code" href="a00154.html">scalable_allocator</a><void> {
-<a name="l00152"></a>00152 <span class="keyword">public</span>:
-<a name="l00153"></a>00153     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
-<a name="l00154"></a>00154     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
-<a name="l00155"></a>00155     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
-<a name="l00156"></a>00156     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00157"></a>00157         <span class="keyword">typedef</span> <a class="code" href="a00154.html">scalable_allocator<U></a> other;
-<a name="l00158"></a>00158     };
-<a name="l00159"></a>00159 };
-<a name="l00160"></a>00160 
-<a name="l00161"></a>00161 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00162"></a>00162 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00154.html">scalable_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00154.html">scalable_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00165"></a>00165 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> scalable_allocator<T>&, <span class="keyword">const</span> scalable_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167 } <span class="comment">// namespace tbb</span>
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">    #if __TBB_BUILD && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE)</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">        #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span>
-<a name="l00174"></a>00174 <span class="preprocessor">    #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE</span>
-<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">        #ifdef _DEBUG</span>
-<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc_debug.lib")</span>
-<a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">        #else</span>
-<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc.lib")</span>
-<a name="l00179"></a>00179 <span class="preprocessor"></span><span class="preprocessor">        #endif</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span>
-<a name="l00182"></a>00182 
-<a name="l00183"></a>00183 <span class="preprocessor">#endif</span>
-<a name="l00184"></a>00184 <span class="preprocessor"></span>
-<a name="l00185"></a>00185 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187 <span class="preprocessor">#if !defined(__cplusplus) && __ICC==1100</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00189"></a>00189 <span class="preprocessor"></span><span class="preprocessor">#endif // ICC 11.0 warning 991 is back</span>
-<a name="l00190"></a>00190 <span class="preprocessor"></span>
-<a name="l00191"></a>00191 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_scalable_allocator_H */</span>
+<a name="l00071"></a>00071         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00153.html#533e4fc8355ee321206a0609c42d909d">acquire</a>( <a class="code" href="a00152.html">queuing_mutex</a>& m );
+<a name="l00072"></a>00072 
+<a name="l00074"></a>00074         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00153.html#e5a014fb817599386a87170cf2cf51a9">try_acquire</a>( <a class="code" href="a00152.html">queuing_mutex</a>& m );
+<a name="l00075"></a>00075 
+<a name="l00077"></a>00077         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">release</a>();
+<a name="l00078"></a>00078 
+<a name="l00079"></a>00079     <span class="keyword">private</span>:
+<a name="l00081"></a>00081         <a class="code" href="a00152.html">queuing_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
+<a name="l00082"></a>00082 
+<a name="l00084"></a>00084         <a class="code" href="a00153.html">scoped_lock</a> *next;
+<a name="l00085"></a>00085 
+<a name="l00087"></a>00087 
+<a name="l00090"></a>00090         internal::uintptr going;
+<a name="l00091"></a>00091     };
+<a name="l00092"></a>00092 
+<a name="l00093"></a>00093     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095     <span class="comment">// Mutex traits</span>
+<a name="l00096"></a>00096     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+<a name="l00097"></a>00097     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+<a name="l00098"></a>00098     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
+<a name="l00099"></a>00099 
+<a name="l00100"></a>00100     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+<a name="l00101"></a>00101 <span class="keyword">private</span>:
+<a name="l00103"></a>00103     <a class="code" href="a00117.html">atomic<scoped_lock*></a> q_tail;
+<a name="l00104"></a>00104 
+<a name="l00105"></a>00105 };
+<a name="l00106"></a>00106 
+<a name="l00107"></a>00107 __TBB_DEFINE_PROFILING_SET_NAME(queuing_mutex)
+<a name="l00108"></a>00108 
+<a name="l00109"></a>00109 } <span class="comment">// namespace tbb</span>
+<a name="l00110"></a>00110 
+<a name="l00111"></a>00111 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00349.html b/doc/html/a00349.html
index 2deb090..0192598 100644
--- a/doc/html/a00349.html
+++ b/doc/html/a00349.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>spin_mutex.h Source File</title>
+<title>queuing_rw_mutex.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>spin_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>queuing_rw_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,148 +39,112 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_spin_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_mutex_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_queuing_rw_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_queuing_rw_mutex_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include <cstddef></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <new></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "aligned_space.h"</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="keyword">namespace </span>tbb {
-<a name="l00032"></a>00032 
-<a name="l00034"></a>00034 
-<a name="l00039"></a><a class="code" href="a00157.html">00039</a> <span class="keyword">class </span><a class="code" href="a00157.html">spin_mutex</a> {
-<a name="l00041"></a>00041     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> flag;
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043 <span class="keyword">public</span>:
-<a name="l00045"></a>00045 
-<a name="l00046"></a><a class="code" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">00046</a>     <a class="code" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>() : flag(0) {
-<a name="l00047"></a>00047 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span>        internal_construct();
-<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>    }
-<a name="l00051"></a>00051 
-<a name="l00053"></a><a class="code" href="a00158.html">00053</a>     <span class="keyword">class </span><a class="code" href="a00158.html">scoped_lock</a> : internal::no_copy {
-<a name="l00054"></a>00054     <span class="keyword">private</span>:
-<a name="l00056"></a>00056         <a class="code" href="a00157.html">spin_mutex</a>* my_mutex; 
-<a name="l00057"></a>00057 
-<a name="l00059"></a>00059         internal::uintptr my_unlock_value;
-<a name="l00060"></a>00060 
-<a name="l00062"></a>00062         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00157.html">spin_mutex</a>& m );
-<a name="l00063"></a>00063 
-<a name="l00065"></a>00065         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00157.html">spin_mutex</a>& m );
-<a name="l00066"></a>00066 
-<a name="l00068"></a>00068         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
+<a name="l00024"></a>00024 <span class="preprocessor">#include <cstring></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_profiling.h"</span>
+<a name="l00027"></a>00027 
+<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
+<a name="l00029"></a>00029 
+<a name="l00031"></a>00031 
+<a name="l00034"></a><a class="code" href="a00154.html">00034</a> <span class="keyword">class </span><a class="code" href="a00154.html">queuing_rw_mutex</a> {
+<a name="l00035"></a>00035 <span class="keyword">public</span>:
+<a name="l00037"></a><a class="code" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">00037</a>     <a class="code" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">queuing_rw_mutex</a>() {
+<a name="l00038"></a>00038         q_tail = NULL;
+<a name="l00039"></a>00039 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span>        internal_construct();
+<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
+<a name="l00042"></a>00042 <span class="preprocessor"></span>    }
+<a name="l00043"></a>00043 
+<a name="l00045"></a><a class="code" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">00045</a>     <a class="code" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">~queuing_rw_mutex</a>() {
+<a name="l00046"></a>00046 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span>        __TBB_ASSERT( !q_tail, <span class="stringliteral">"destruction of an acquired mutex"</span>);
+<a name="l00048"></a>00048 <span class="preprocessor">#endif</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span>    }
+<a name="l00050"></a>00050 
+<a name="l00051"></a>00051     <span class="keyword">class </span>scoped_lock;
+<a name="l00052"></a>00052     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+<a name="l00053"></a>00053 
+<a name="l00055"></a>00055 
+<a name="l00057"></a><a class="code" href="a00155.html">00057</a>     <span class="keyword">class </span><a class="code" href="a00155.html">scoped_lock</a>: internal::no_copy {
+<a name="l00059"></a>00059         <span class="keywordtype">void</span> initialize() {
+<a name="l00060"></a>00060             <a class="code" href="a00142.html">mutex</a> = NULL;
+<a name="l00061"></a>00061 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00062"></a>00062 <span class="preprocessor"></span>            state = 0xFF; <span class="comment">// Set to invalid state</span>
+<a name="l00063"></a>00063             internal::poison_pointer(next);
+<a name="l00064"></a>00064             internal::poison_pointer(prev);
+<a name="l00065"></a>00065 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00066"></a>00066         }
+<a name="l00067"></a>00067     <span class="keyword">public</span>:
 <a name="l00069"></a>00069 
-<a name="l00070"></a>00070         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00157.html">spin_mutex</a>;
+<a name="l00070"></a><a class="code" href="a00155.html#c62e365be7bcbba091c9ea7454a4d22c">00070</a>         <a class="code" href="a00155.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>() {initialize();}
 <a name="l00071"></a>00071 
-<a name="l00072"></a>00072     <span class="keyword">public</span>:
-<a name="l00074"></a><a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">00074</a>         <a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>() : my_mutex(NULL), my_unlock_value(0) {}
-<a name="l00075"></a>00075 
-<a name="l00077"></a><a class="code" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">00077</a>         <a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) { 
-<a name="l00078"></a>00078 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>            my_mutex=NULL;
-<a name="l00080"></a>00080             internal_acquire(m);
-<a name="l00081"></a>00081 <span class="preprocessor">#else</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00083"></a>00083             my_mutex=&m;
-<a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00085"></a>00085         }
+<a name="l00073"></a>00073 
+<a name="l00074"></a><a class="code" href="a00155.html#fbb8798792d3aebb136c46fc63d2529e">00074</a>         <a class="code" href="a00155.html#c62e365be7bcbba091c9ea7454a4d22c">scoped_lock</a>( <a class="code" href="a00154.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> ) {
+<a name="l00075"></a>00075             initialize();
+<a name="l00076"></a>00076             <a class="code" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>(m,write);
+<a name="l00077"></a>00077         }
+<a name="l00078"></a>00078 
+<a name="l00080"></a><a class="code" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">00080</a>         <a class="code" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">~scoped_lock</a>() {
+<a name="l00081"></a>00081             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00155.html#67ae221109ddc69510ab593874e435d4">release</a>();
+<a name="l00082"></a>00082         }
+<a name="l00083"></a>00083 
+<a name="l00085"></a>00085         <span class="keywordtype">void</span> <a class="code" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">acquire</a>( <a class="code" href="a00154.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
 <a name="l00086"></a>00086 
-<a name="l00088"></a><a class="code" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">00088</a>         <span class="keywordtype">void</span> <a class="code" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) {
-<a name="l00089"></a>00089 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span>            internal_acquire(m);
-<a name="l00091"></a>00091 <span class="preprocessor">#else</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00093"></a>00093             my_mutex = &m;
-<a name="l00094"></a>00094 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00095"></a>00095         }
+<a name="l00088"></a>00088         <span class="keywordtype">bool</span> <a class="code" href="a00155.html#2e4ff6c9ec2fee6682f95290d1f42baa">try_acquire</a>( <a class="code" href="a00154.html">queuing_rw_mutex</a>& m, <span class="keywordtype">bool</span> write=<span class="keyword">true</span> );
+<a name="l00089"></a>00089 
+<a name="l00091"></a>00091         <span class="keywordtype">void</span> <a class="code" href="a00155.html#67ae221109ddc69510ab593874e435d4">release</a>();
+<a name="l00092"></a>00092 
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095         <span class="keywordtype">bool</span> <a class="code" href="a00155.html#11ba1da4a722c9e6f73339a52c487e82">upgrade_to_writer</a>();
 <a name="l00096"></a>00096 
-<a name="l00098"></a>00098 
-<a name="l00099"></a><a class="code" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">00099</a>         <span class="keywordtype">bool</span> <a class="code" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) {
-<a name="l00100"></a>00100 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00101"></a>00101 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire(m);
-<a name="l00102"></a>00102 <span class="preprocessor">#else</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = __TBB_TryLockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
-<a name="l00104"></a>00104             <span class="keywordflow">if</span>( result ) {
-<a name="l00105"></a>00105                 my_unlock_value = 0;
-<a name="l00106"></a>00106                 my_mutex = &m;
-<a name="l00107"></a>00107             }
-<a name="l00108"></a>00108             <span class="keywordflow">return</span> result;
-<a name="l00109"></a>00109 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
-<a name="l00110"></a>00110         }
+<a name="l00098"></a>00098         <span class="keywordtype">bool</span> <a class="code" href="a00155.html#0d2f93edf7b15ec4bcee138823220c52">downgrade_to_reader</a>();
+<a name="l00099"></a>00099 
+<a name="l00100"></a>00100     <span class="keyword">private</span>:
+<a name="l00102"></a>00102         <a class="code" href="a00154.html">queuing_rw_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
+<a name="l00103"></a>00103 
+<a name="l00105"></a>00105         <a class="code" href="a00155.html">scoped_lock</a> * prev, * next;
+<a name="l00106"></a>00106 
+<a name="l00107"></a>00107         <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state_t;
+<a name="l00108"></a>00108 
+<a name="l00110"></a>00110         <a class="code" href="a00117.html">atomic<state_t></a> state;
 <a name="l00111"></a>00111 
-<a name="l00113"></a><a class="code" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">00113</a>         <span class="keywordtype">void</span> <a class="code" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>() {
-<a name="l00114"></a>00114 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span>            internal_release();
-<a name="l00116"></a>00116 <span class="preprocessor">#else</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span>            __TBB_store_with_release(my_mutex-><a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
-<a name="l00118"></a>00118             my_mutex = NULL;
-<a name="l00119"></a>00119 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00120"></a>00120         }
+<a name="l00113"></a>00113 
+<a name="l00114"></a>00114         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> going;
+<a name="l00115"></a>00115 
+<a name="l00117"></a>00117         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> internal_lock;
+<a name="l00118"></a>00118 
+<a name="l00120"></a>00120         <span class="keywordtype">void</span> acquire_internal_lock();
 <a name="l00121"></a>00121 
-<a name="l00123"></a><a class="code" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">00123</a>         <a class="code" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>() {
-<a name="l00124"></a>00124             <span class="keywordflow">if</span>( my_mutex ) {
-<a name="l00125"></a>00125 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00126"></a>00126 <span class="preprocessor"></span>                internal_release();
-<a name="l00127"></a>00127 <span class="preprocessor">#else</span>
-<a name="l00128"></a>00128 <span class="preprocessor"></span>                __TBB_store_with_release(my_mutex-><a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
-<a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00130"></a>00130             }
-<a name="l00131"></a>00131         }
-<a name="l00132"></a>00132     };
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
+<a name="l00123"></a>00123 
+<a name="l00124"></a>00124         <span class="keywordtype">bool</span> try_acquire_internal_lock();
+<a name="l00125"></a>00125 
+<a name="l00127"></a>00127         <span class="keywordtype">void</span> release_internal_lock();
+<a name="l00128"></a>00128 
+<a name="l00130"></a>00130         <span class="keywordtype">void</span> wait_for_release_of_internal_lock();
+<a name="l00131"></a>00131 
+<a name="l00133"></a>00133         <span class="keywordtype">void</span> unblock_or_wait_on_internal_lock( uintptr_t );
+<a name="l00134"></a>00134     };
 <a name="l00135"></a>00135 
-<a name="l00136"></a>00136     <span class="comment">// Mutex traits</span>
-<a name="l00137"></a>00137     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
-<a name="l00138"></a>00138     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
-<a name="l00139"></a>00139     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141     <span class="comment">// ISO C++0x compatibility methods</span>
+<a name="l00136"></a>00136     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
+<a name="l00137"></a>00137 
+<a name="l00138"></a>00138     <span class="comment">// Mutex traits</span>
+<a name="l00139"></a>00139     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;
+<a name="l00140"></a>00140     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
+<a name="l00141"></a>00141     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">true</span>;
 <a name="l00142"></a>00142 
-<a name="l00144"></a><a class="code" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">00144</a>     <span class="keywordtype">void</span> <a class="code" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">lock</a>() {
-<a name="l00145"></a>00145 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00147"></a>00147         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00158.html">scoped_lock</a>(*<span class="keyword">this</span>);
-<a name="l00148"></a>00148 <span class="preprocessor">#else</span>
-<a name="l00149"></a>00149 <span class="preprocessor"></span>        __TBB_LockByte(flag);
-<a name="l00150"></a>00150 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS*/</span>
-<a name="l00151"></a>00151     }
+<a name="l00143"></a>00143 <span class="keyword">private</span>:
+<a name="l00145"></a>00145     <a class="code" href="a00117.html">atomic<scoped_lock*></a> q_tail;
+<a name="l00146"></a>00146 
+<a name="l00147"></a>00147 };
+<a name="l00148"></a>00148 
+<a name="l00149"></a>00149 __TBB_DEFINE_PROFILING_SET_NAME(queuing_rw_mutex)
+<a name="l00150"></a>00150 
+<a name="l00151"></a>00151 } <span class="comment">// namespace tbb</span>
 <a name="l00152"></a>00152 
-<a name="l00154"></a>00154 
-<a name="l00155"></a><a class="code" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">00155</a>     <span class="keywordtype">bool</span> <a class="code" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a>() {
-<a name="l00156"></a>00156 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00157"></a>00157 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00158"></a>00158         <span class="keywordflow">return</span> (<span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00158.html">scoped_lock</a>)->internal_try_acquire(*<span class="keyword">this</span>);
-<a name="l00159"></a>00159 <span class="preprocessor">#else</span>
-<a name="l00160"></a>00160 <span class="preprocessor"></span>        <span class="keywordflow">return</span> __TBB_TryLockByte(flag);
-<a name="l00161"></a>00161 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS*/</span>
-<a name="l00162"></a>00162     }
-<a name="l00163"></a>00163 
-<a name="l00165"></a><a class="code" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">00165</a>     <span class="keywordtype">void</span> <a class="code" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a>() {
-<a name="l00166"></a>00166 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00168"></a>00168         <a class="code" href="a00158.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
-<a name="l00169"></a>00169         s.<a class="code" href="a00158.html#d968921bed018503214f36e09007ee7b">my_mutex</a> = <span class="keyword">this</span>;
-<a name="l00170"></a>00170         s.<a class="code" href="a00158.html#0821c9dc231cd41586306fd54f701873">my_unlock_value</a> = 0;
-<a name="l00171"></a>00171         s.<a class="code" href="a00158.html#8f4d19aa2d6d112034d281eed0dab5fa">internal_release</a>();
-<a name="l00172"></a>00172 <span class="preprocessor">#else</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span>        __TBB_store_with_release(flag, 0);
-<a name="l00174"></a>00174 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
-<a name="l00175"></a>00175     }
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
-<a name="l00178"></a>00178 };
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180 __TBB_DEFINE_PROFILING_SET_NAME(spin_mutex)
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182 } <span class="comment">// namespace tbb</span>
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_spin_mutex_H */</span>
+<a name="l00153"></a>00153 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_queuing_rw_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00350.html b/doc/html/a00350.html
index cc37f5d..20b0b3f 100644
--- a/doc/html/a00350.html
+++ b/doc/html/a00350.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>spin_rw_mutex.h Source File</title>
+<title>recursive_mutex.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>spin_rw_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>recursive_mutex.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,174 +39,203 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_spin_rw_mutex_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_spin_rw_mutex_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_recursive_mutex_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_recursive_mutex_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_machine.h"</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_profiling.h"</span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030 <span class="keyword">class </span>spin_rw_mutex_v3;
-<a name="l00031"></a>00031 <span class="keyword">typedef</span> spin_rw_mutex_v3 spin_rw_mutex;
-<a name="l00032"></a>00032 
+<a name="l00024"></a>00024 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00025"></a>00025 <span class="preprocessor"></span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include <windows.h></span>
+<a name="l00027"></a>00027 <span class="preprocessor">#if !defined(_WIN32_WINNT)</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="comment">// The following Windows API function is declared explicitly;</span>
+<a name="l00029"></a>00029 <span class="comment">// otherwise any user would have to specify /D_WIN32_WINNT=0x0400</span>
+<a name="l00030"></a>00030 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION );
+<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
+<a name="l00032"></a>00032 <span class="preprocessor"></span>
+<a name="l00033"></a>00033 <span class="preprocessor">#else </span><span class="comment">/* if not _WIN32||_WIN64 */</span>
 <a name="l00034"></a>00034 
-<a name="l00035"></a><a class="code" href="a00159.html">00035</a> <span class="keyword">class </span><a class="code" href="a00159.html">spin_rw_mutex_v3</a> {
-<a name="l00037"></a>00037 
-<a name="l00039"></a>00039     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_acquire_writer();
+<a name="l00035"></a>00035 <span class="preprocessor">#include <pthread.h></span>
+<a name="l00036"></a>00036 <span class="keyword">namespace </span>tbb { <span class="keyword">namespace </span>internal {
+<a name="l00037"></a>00037 <span class="comment">// Use this internal TBB function to throw an exception</span>
+<a name="l00038"></a>00038   <span class="keyword">extern</span> <span class="keywordtype">void</span> handle_perror( <span class="keywordtype">int</span> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span>* what );
+<a name="l00039"></a>00039 } } <span class="comment">//namespaces</span>
 <a name="l00040"></a>00040 
+<a name="l00041"></a>00041 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
 <a name="l00042"></a>00042 
-<a name="l00043"></a>00043     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release_writer();
-<a name="l00044"></a>00044 
-<a name="l00046"></a>00046     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire_reader();
+<a name="l00043"></a>00043 <span class="preprocessor">#include <new></span>
+<a name="l00044"></a>00044 <span class="preprocessor">#include "aligned_space.h"</span>
+<a name="l00045"></a>00045 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include "tbb_profiling.h"</span>
 <a name="l00047"></a>00047 
-<a name="l00049"></a>00049     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_upgrade();
+<a name="l00048"></a>00048 <span class="keyword">namespace </span>tbb {
 <a name="l00050"></a>00050 
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_downgrade();
-<a name="l00054"></a>00054 
-<a name="l00056"></a>00056     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release_reader();
-<a name="l00057"></a>00057 
-<a name="l00059"></a>00059     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire_writer();
-<a name="l00060"></a>00060 
-<a name="l00062"></a>00062     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire_reader();
-<a name="l00063"></a>00063 
-<a name="l00065"></a>00065 <span class="keyword">public</span>:
-<a name="l00067"></a><a class="code" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">00067</a>     <a class="code" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>() : state(0) {
-<a name="l00068"></a>00068 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span>        internal_construct();
-<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span>    }
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00075"></a><a class="code" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">00075</a> <span class="preprocessor">    ~spin_rw_mutex_v3() {</span>
-<a name="l00076"></a>00076 <span class="preprocessor"></span>        __TBB_ASSERT( !state, <span class="stringliteral">"destruction of an acquired mutex"</span>);
-<a name="l00077"></a>00077     };
-<a name="l00078"></a>00078 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00079"></a>00079 
-<a name="l00081"></a>00081 
-<a name="l00083"></a><a class="code" href="a00160.html">00083</a>     <span class="keyword">class </span><a class="code" href="a00160.html">scoped_lock</a> : internal::no_copy {
-<a name="l00084"></a>00084     <span class="keyword">public</span>:
-<a name="l00086"></a>00086 
-<a name="l00087"></a><a class="code" href="a00160.html#d6ea60dee5563f702379bf5e51aa8806">00087</a>         <a class="code" href="a00160.html">scoped_lock</a>() : <a class="code" href="a00142.html">mutex</a>(NULL) {}
-<a name="l00088"></a>00088 
-<a name="l00090"></a>00090 
-<a name="l00091"></a><a class="code" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">00091</a>         <a class="code" href="a00160.html">scoped_lock</a>( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) : <a class="code" href="a00142.html">mutex</a>(NULL) {
-<a name="l00092"></a>00092             <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>(m, write);
-<a name="l00093"></a>00093         }
+<a name="l00052"></a><a class="code" href="a00156.html">00052</a> <span class="keyword">class </span><a class="code" href="a00156.html">recursive_mutex</a> {
+<a name="l00053"></a>00053 <span class="keyword">public</span>:
+<a name="l00055"></a><a class="code" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">00055</a>     <a class="code" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">recursive_mutex</a>() {
+<a name="l00056"></a>00056 <span class="preprocessor">#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span>        internal_construct();
+<a name="l00058"></a>00058 <span class="preprocessor">#else</span>
+<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00060"></a>00060 <span class="preprocessor"></span>        InitializeCriticalSection(&impl);
+<a name="l00061"></a>00061 <span class="preprocessor">  #else</span>
+<a name="l00062"></a>00062 <span class="preprocessor"></span>        pthread_mutexattr_t mtx_attr;
+<a name="l00063"></a>00063         <span class="keywordtype">int</span> error_code = pthread_mutexattr_init( &mtx_attr );
+<a name="l00064"></a>00064         <span class="keywordflow">if</span>( error_code )
+<a name="l00065"></a>00065             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutexattr_init failed"</span>);
+<a name="l00066"></a>00066 
+<a name="l00067"></a>00067         pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE );
+<a name="l00068"></a>00068         error_code = pthread_mutex_init( &impl, &mtx_attr );
+<a name="l00069"></a>00069         <span class="keywordflow">if</span>( error_code )
+<a name="l00070"></a>00070             tbb::internal::handle_perror(error_code,<span class="stringliteral">"recursive_mutex: pthread_mutex_init failed"</span>);
+<a name="l00071"></a>00071 
+<a name="l00072"></a>00072         pthread_mutexattr_destroy( &mtx_attr );
+<a name="l00073"></a>00073 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64*/</span>
+<a name="l00074"></a>00074 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00075"></a>00075     };
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077     ~<a class="code" href="a00156.html">recursive_mutex</a>() {
+<a name="l00078"></a>00078 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span>        internal_destroy();
+<a name="l00080"></a>00080 <span class="preprocessor">#else</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00082"></a>00082 <span class="preprocessor"></span>        DeleteCriticalSection(&impl);
+<a name="l00083"></a>00083 <span class="preprocessor">  #else</span>
+<a name="l00084"></a>00084 <span class="preprocessor"></span>        pthread_mutex_destroy(&impl); 
+<a name="l00085"></a>00085 
+<a name="l00086"></a>00086 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00087"></a>00087 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00088"></a>00088     };
+<a name="l00089"></a>00089 
+<a name="l00090"></a>00090     <span class="keyword">class </span>scoped_lock;
+<a name="l00091"></a>00091     <span class="keyword">friend</span> <span class="keyword">class </span>scoped_lock;
+<a name="l00092"></a>00092 
 <a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">00096</a>         ~<a class="code" href="a00160.html">scoped_lock</a>() {
-<a name="l00097"></a>00097             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>();
-<a name="l00098"></a>00098         }
-<a name="l00099"></a>00099 
-<a name="l00101"></a><a class="code" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">00101</a>         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
-<a name="l00102"></a>00102             __TBB_ASSERT( !<a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
-<a name="l00103"></a>00103             is_writer = write; 
-<a name="l00104"></a>00104             <a class="code" href="a00142.html">mutex</a> = &m;
-<a name="l00105"></a>00105             <span class="keywordflow">if</span>( write ) <a class="code" href="a00142.html">mutex</a>->internal_acquire_writer();
-<a name="l00106"></a>00106             <span class="keywordflow">else</span>        <a class="code" href="a00142.html">mutex</a>->internal_acquire_reader();
+<a name="l00096"></a><a class="code" href="a00157.html">00096</a>     <span class="keyword">class </span><a class="code" href="a00157.html">scoped_lock</a>: internal::no_copy {
+<a name="l00097"></a>00097     <span class="keyword">public</span>:
+<a name="l00099"></a><a class="code" href="a00157.html#d82d4d36fbf9727a493d26ae50855fe7">00099</a>         <a class="code" href="a00157.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>() : my_mutex(NULL) {};
+<a name="l00100"></a>00100 
+<a name="l00102"></a><a class="code" href="a00157.html#dec17713c4c1321ac8fec66816d0c602">00102</a>         <a class="code" href="a00157.html#d82d4d36fbf9727a493d26ae50855fe7">scoped_lock</a>( <a class="code" href="a00156.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00103"></a>00103 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00104"></a>00104 <span class="preprocessor"></span>            my_mutex = &mutex; 
+<a name="l00105"></a>00105 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00106"></a>00106             <a class="code" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( mutex );
 <a name="l00107"></a>00107         }
 <a name="l00108"></a>00108 
-<a name="l00110"></a>00110 
-<a name="l00111"></a><a class="code" href="a00160.html#3f0b1e3f2efab63336400348bd070226">00111</a>         <span class="keywordtype">bool</span> upgrade_to_writer() {
-<a name="l00112"></a>00112             __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
-<a name="l00113"></a>00113             __TBB_ASSERT( !is_writer, <span class="stringliteral">"not a reader"</span> );
-<a name="l00114"></a>00114             is_writer = <span class="keyword">true</span>; 
-<a name="l00115"></a>00115             <span class="keywordflow">return</span> <a class="code" href="a00142.html">mutex</a>->internal_upgrade();
-<a name="l00116"></a>00116         }
-<a name="l00117"></a>00117 
-<a name="l00119"></a><a class="code" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">00119</a>         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
-<a name="l00120"></a>00120             __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
-<a name="l00121"></a>00121             <a class="code" href="a00159.html">spin_rw_mutex</a> *m = <a class="code" href="a00142.html">mutex</a>; 
-<a name="l00122"></a>00122             <a class="code" href="a00142.html">mutex</a> = NULL;
-<a name="l00123"></a>00123 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) m->internal_release_writer();
-<a name="l00125"></a>00125             <span class="keywordflow">else</span>            m->internal_release_reader();
-<a name="l00126"></a>00126 <span class="preprocessor">#else</span>
-<a name="l00127"></a>00127 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) __TBB_AtomicAND( &m-><a class="code" href="a00159.html#621b900d5fef23d2e401aabcbb777c76">state</a>, READERS ); 
-<a name="l00128"></a>00128             <span class="keywordflow">else</span>            __TBB_FetchAndAddWrelease( &m-><a class="code" href="a00159.html#621b900d5fef23d2e401aabcbb777c76">state</a>, -(intptr_t)ONE_READER);
-<a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00130"></a>00130         }
-<a name="l00131"></a>00131 
-<a name="l00133"></a><a class="code" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">00133</a>         <span class="keywordtype">bool</span> downgrade_to_reader() {
-<a name="l00134"></a>00134 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00135"></a>00135 <span class="preprocessor"></span>            __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
-<a name="l00136"></a>00136             __TBB_ASSERT( is_writer, <span class="stringliteral">"not a writer"</span> );
-<a name="l00137"></a>00137             <a class="code" href="a00142.html">mutex</a>->internal_downgrade();
-<a name="l00138"></a>00138 <span class="preprocessor">#else</span>
-<a name="l00139"></a>00139 <span class="preprocessor"></span>            __TBB_FetchAndAddW( &<a class="code" href="a00142.html">mutex</a>->state, ((intptr_t)ONE_READER-WRITER));
-<a name="l00140"></a>00140 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00141"></a>00141             is_writer = <span class="keyword">false</span>;
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143             <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145 
-<a name="l00147"></a><a class="code" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">00147</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
-<a name="l00148"></a>00148             __TBB_ASSERT( !<a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
-<a name="l00149"></a>00149             <span class="keywordtype">bool</span> result;
-<a name="l00150"></a>00150             is_writer = write; 
-<a name="l00151"></a>00151             result = write? m.internal_try_acquire_writer()
-<a name="l00152"></a>00152                           : m.internal_try_acquire_reader();
-<a name="l00153"></a>00153             <span class="keywordflow">if</span>( result ) 
-<a name="l00154"></a>00154                 <a class="code" href="a00142.html">mutex</a> = &m;
-<a name="l00155"></a>00155             <span class="keywordflow">return</span> result;
-<a name="l00156"></a>00156         }
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <span class="keyword">private</span>:
-<a name="l00160"></a>00160         <a class="code" href="a00159.html">spin_rw_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
-<a name="l00161"></a>00161 
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         <span class="keywordtype">bool</span> is_writer;
-<a name="l00165"></a>00165     };
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167     <span class="comment">// Mutex traits</span>
-<a name="l00168"></a>00168     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">true</span>;
-<a name="l00169"></a>00169     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">false</span>;
-<a name="l00170"></a>00170     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172     <span class="comment">// ISO C++0x compatibility methods</span>
-<a name="l00173"></a>00173 
-<a name="l00175"></a><a class="code" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">00175</a>     <span class="keywordtype">void</span> lock() {internal_acquire_writer();}
-<a name="l00176"></a>00176 
-<a name="l00178"></a>00178 
-<a name="l00179"></a><a class="code" href="a00159.html#088bb256be794cc47d3b83791632fdfc">00179</a>     <span class="keywordtype">bool</span> try_lock() {<span class="keywordflow">return</span> internal_try_acquire_writer();}
-<a name="l00180"></a>00180 
-<a name="l00182"></a><a class="code" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">00182</a>     <span class="keywordtype">void</span> unlock() {
-<a name="l00183"></a>00183 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00184"></a>00184 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( state&WRITER ) internal_release_writer();
-<a name="l00185"></a>00185         <span class="keywordflow">else</span>               internal_release_reader();
-<a name="l00186"></a>00186 <span class="preprocessor">#else</span>
-<a name="l00187"></a>00187 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( state&WRITER ) __TBB_AtomicAND( &state, READERS ); 
-<a name="l00188"></a>00188         <span class="keywordflow">else</span>               __TBB_FetchAndAddWrelease( &state, -(intptr_t)ONE_READER);
-<a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00190"></a>00190     }
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192     <span class="comment">// Methods for reader locks that resemble ISO C++0x compatibility methods.</span>
-<a name="l00193"></a>00193 
-<a name="l00195"></a><a class="code" href="a00159.html#13f799708ac4ca437a16be202e263e18">00195</a>     <span class="keywordtype">void</span> lock_read() {internal_acquire_reader();}
-<a name="l00196"></a>00196 
+<a name="l00110"></a><a class="code" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">00110</a>         <a class="code" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">~scoped_lock</a>() {
+<a name="l00111"></a>00111             <span class="keywordflow">if</span>( my_mutex ) 
+<a name="l00112"></a>00112                 <a class="code" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>();
+<a name="l00113"></a>00113         }
+<a name="l00114"></a>00114 
+<a name="l00116"></a><a class="code" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">00116</a>         <span class="keywordtype">void</span> <a class="code" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">acquire</a>( <a class="code" href="a00156.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00117"></a>00117 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00118"></a>00118 <span class="preprocessor"></span>            internal_acquire( mutex );
+<a name="l00119"></a>00119 <span class="preprocessor">#else</span>
+<a name="l00120"></a>00120 <span class="preprocessor"></span>            my_mutex = &mutex;
+<a name="l00121"></a>00121             mutex.<a class="code" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>();
+<a name="l00122"></a>00122 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00123"></a>00123         }
+<a name="l00124"></a>00124 
+<a name="l00126"></a><a class="code" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">00126</a>         <span class="keywordtype">bool</span> <a class="code" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">try_acquire</a>( <a class="code" href="a00156.html">recursive_mutex</a>& <a class="code" href="a00142.html">mutex</a> ) {
+<a name="l00127"></a>00127 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00128"></a>00128 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire( mutex );
+<a name="l00129"></a>00129 <span class="preprocessor">#else</span>
+<a name="l00130"></a>00130 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = mutex.<a class="code" href="a00156.html#86e719b0afee25704af11ab97694d240">try_lock</a>();
+<a name="l00131"></a>00131             <span class="keywordflow">if</span>( result )
+<a name="l00132"></a>00132                 my_mutex = &mutex;
+<a name="l00133"></a>00133             <span class="keywordflow">return</span> result;
+<a name="l00134"></a>00134 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00135"></a>00135         }
+<a name="l00136"></a>00136 
+<a name="l00138"></a><a class="code" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">00138</a>         <span class="keywordtype">void</span> <a class="code" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">release</a>() {
+<a name="l00139"></a>00139 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00140"></a>00140 <span class="preprocessor"></span>            internal_release();
+<a name="l00141"></a>00141 <span class="preprocessor">#else</span>
+<a name="l00142"></a>00142 <span class="preprocessor"></span>            my_mutex-><a class="code" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>();
+<a name="l00143"></a>00143             my_mutex = NULL;
+<a name="l00144"></a>00144 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00145"></a>00145         }
+<a name="l00146"></a>00146 
+<a name="l00147"></a>00147     <span class="keyword">private</span>:
+<a name="l00149"></a>00149         <a class="code" href="a00156.html">recursive_mutex</a>* my_mutex;
+<a name="l00150"></a>00150 
+<a name="l00152"></a>00152         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00156.html">recursive_mutex</a>& m );
+<a name="l00153"></a>00153 
+<a name="l00155"></a>00155         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00156.html">recursive_mutex</a>& m );
+<a name="l00156"></a>00156 
+<a name="l00158"></a>00158         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
+<a name="l00159"></a>00159 
+<a name="l00160"></a>00160         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00156.html">recursive_mutex</a>;
+<a name="l00161"></a>00161     };
+<a name="l00162"></a>00162 
+<a name="l00163"></a>00163     <span class="comment">// Mutex traits</span>
+<a name="l00164"></a>00164     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_rw_mutex = <span class="keyword">false</span>;
+<a name="l00165"></a>00165     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_recursive_mutex = <span class="keyword">true</span>;
+<a name="l00166"></a>00166     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_fair_mutex = <span class="keyword">false</span>;
+<a name="l00167"></a>00167 
+<a name="l00168"></a>00168     <span class="comment">// C++0x compatibility interface</span>
+<a name="l00169"></a>00169     
+<a name="l00171"></a><a class="code" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">00171</a>     <span class="keywordtype">void</span> <a class="code" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">lock</a>() {
+<a name="l00172"></a>00172 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00173"></a>00173 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00174"></a>00174         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00157.html">scoped_lock</a>(*<span class="keyword">this</span>);
+<a name="l00175"></a>00175 <span class="preprocessor">#else</span>
+<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00177"></a>00177 <span class="preprocessor"></span>        EnterCriticalSection(&impl);
+<a name="l00178"></a>00178 <span class="preprocessor">  #else</span>
+<a name="l00179"></a>00179 <span class="preprocessor"></span>        pthread_mutex_lock(&impl);
+<a name="l00180"></a>00180 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00181"></a>00181 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00182"></a>00182     }
+<a name="l00183"></a>00183 
+<a name="l00185"></a>00185 
+<a name="l00186"></a><a class="code" href="a00156.html#86e719b0afee25704af11ab97694d240">00186</a>     <span class="keywordtype">bool</span> <a class="code" href="a00156.html#86e719b0afee25704af11ab97694d240">try_lock</a>() {
+<a name="l00187"></a>00187 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00188"></a>00188 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00189"></a>00189         <span class="keywordflow">return</span> (<span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00157.html">scoped_lock</a>)->internal_try_acquire(*<span class="keyword">this</span>);
+<a name="l00190"></a>00190 <span class="preprocessor">#else        </span>
+<a name="l00191"></a>00191 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00192"></a>00192 <span class="preprocessor"></span>        <span class="keywordflow">return</span> TryEnterCriticalSection(&impl)!=0;
+<a name="l00193"></a>00193 <span class="preprocessor">  #else</span>
+<a name="l00194"></a>00194 <span class="preprocessor"></span>        <span class="keywordflow">return</span> pthread_mutex_trylock(&impl)==0;
+<a name="l00195"></a>00195 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00196"></a>00196 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00197"></a>00197     }
 <a name="l00198"></a>00198 
-<a name="l00199"></a><a class="code" href="a00159.html#b8667415869013f840d976aa406d385a">00199</a>     <span class="keywordtype">bool</span> try_lock_read() {<span class="keywordflow">return</span> internal_try_acquire_reader();}
-<a name="l00200"></a>00200 
-<a name="l00201"></a>00201 <span class="keyword">private</span>:
-<a name="l00202"></a>00202     <span class="keyword">typedef</span> intptr_t state_t;
-<a name="l00203"></a>00203     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER = 1;
-<a name="l00204"></a>00204     <span class="keyword">static</span> <span class="keyword">const</span> state_t WRITER_PENDING = 2;
-<a name="l00205"></a>00205     <span class="keyword">static</span> <span class="keyword">const</span> state_t READERS = ~(WRITER | WRITER_PENDING);
-<a name="l00206"></a>00206     <span class="keyword">static</span> <span class="keyword">const</span> state_t ONE_READER = 4;
-<a name="l00207"></a>00207     <span class="keyword">static</span> <span class="keyword">const</span> state_t BUSY = WRITER | READERS;
-<a name="l00209"></a>00209 
-<a name="l00212"></a>00212     state_t state;
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
-<a name="l00215"></a>00215 };
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 __TBB_DEFINE_PROFILING_SET_NAME(spin_rw_mutex)
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219 } <span class="comment">// namespace tbb</span>
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_spin_rw_mutex_H */</span>
+<a name="l00200"></a><a class="code" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">00200</a>     <span class="keywordtype">void</span> <a class="code" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">unlock</a>() {
+<a name="l00201"></a>00201 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00202"></a>00202 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
+<a name="l00203"></a>00203         <a class="code" href="a00157.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
+<a name="l00204"></a>00204         s.<a class="code" href="a00157.html#3efd10a49e2435ea5215b49907f93ba2">my_mutex</a> = <span class="keyword">this</span>;
+<a name="l00205"></a>00205         s.<a class="code" href="a00157.html#43ed37cec508072e53a52113c8040137">internal_release</a>();
+<a name="l00206"></a>00206 <span class="preprocessor">#else</span>
+<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">  #if _WIN32||_WIN64</span>
+<a name="l00208"></a>00208 <span class="preprocessor"></span>        LeaveCriticalSection(&impl);
+<a name="l00209"></a>00209 <span class="preprocessor">  #else</span>
+<a name="l00210"></a>00210 <span class="preprocessor"></span>        pthread_mutex_unlock(&impl);
+<a name="l00211"></a>00211 <span class="preprocessor">  #endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00212"></a>00212 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00213"></a>00213     }
+<a name="l00214"></a>00214 
+<a name="l00215"></a>00215 <span class="keyword">private</span>:
+<a name="l00216"></a>00216 <span class="preprocessor">#if _WIN32||_WIN64</span>
+<a name="l00217"></a>00217 <span class="preprocessor"></span>    CRITICAL_SECTION impl;
+<a name="l00218"></a>00218     <span class="keyword">enum</span> state_t {
+<a name="l00219"></a>00219         INITIALIZED=0x1234,
+<a name="l00220"></a>00220         DESTROYED=0x789A,
+<a name="l00221"></a>00221     } state;
+<a name="l00222"></a>00222 <span class="preprocessor">#else</span>
+<a name="l00223"></a>00223 <span class="preprocessor"></span>    pthread_mutex_t impl;
+<a name="l00224"></a>00224 <span class="preprocessor">#endif </span><span class="comment">/* _WIN32||_WIN64 */</span>
+<a name="l00225"></a>00225 
+<a name="l00227"></a>00227     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_construct();
+<a name="l00228"></a>00228 
+<a name="l00230"></a>00230     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_destroy();
+<a name="l00231"></a>00231 };
+<a name="l00232"></a>00232 
+<a name="l00233"></a>00233 __TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex)
+<a name="l00234"></a>00234 
+<a name="l00235"></a>00235 } <span class="comment">// namespace tbb </span>
+<a name="l00236"></a>00236 
+<a name="l00237"></a>00237 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_recursive_mutex_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00351.html b/doc/html/a00351.html
index c562166..ccc4fc9 100644
--- a/doc/html/a00351.html
+++ b/doc/html/a00351.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>task.h Source File</title>
+<title>scalable_allocator.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>task.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>scalable_allocator.h</h1><a href="a00210.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,612 +39,155 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_scalable_allocator_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_scalable_allocator_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_machine.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include <stddef.h></span> <span class="comment">/* Need ptrdiff_t and size_t from here. */</span>
 <a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="keyword">namespace </span>tbb {
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="keyword">class </span>task;
-<a name="l00034"></a>00034 <span class="keyword">class </span>task_list;
+<a name="l00027"></a>00027 <span class="preprocessor">#if !defined(__cplusplus) && __ICC==1100</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (push)</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 991)</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span>
+<a name="l00032"></a>00032 <span class="preprocessor">#ifdef __cplusplus</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
+<a name="l00034"></a>00034 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
 <a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="keyword">class </span>task_group_context;
-<a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00039"></a>00039 
-<a name="l00041"></a>00041 <span class="keyword">namespace </span>internal {
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043     <span class="keyword">class </span>scheduler: no_copy {
-<a name="l00044"></a>00044     <span class="keyword">public</span>:
-<a name="l00046"></a>00046         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn( task& first, task*& next ) = 0;
-<a name="l00047"></a>00047 
-<a name="l00049"></a>00049         <span class="keyword">virtual</span> <span class="keywordtype">void</span> wait_for_all( task& parent, task* child ) = 0;
-<a name="l00050"></a>00050 
-<a name="l00052"></a>00052         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn_root_and_wait( task& first, task*& next ) = 0;
+<a name="l00036"></a>00036 <span class="preprocessor">#if _MSC_VER >= 1400</span>
+<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC   __cdecl</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span>
+<a name="l00044"></a>00044 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a> (size_t size);
+<a name="l00045"></a>00045 
+<a name="l00048"></a>00048 <span class="keywordtype">void</span>   __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a> (<span class="keywordtype">void</span>* ptr);
+<a name="l00049"></a>00049 
+<a name="l00052"></a>00052 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size);
 <a name="l00053"></a>00053 
-<a name="l00055"></a>00055         <span class="comment">//  Have to have it just to shut up overzealous compilation warnings</span>
-<a name="l00056"></a>00056         <span class="keyword">virtual</span> ~scheduler() = 0;
-<a name="l00057"></a>00057     };
-<a name="l00058"></a>00058 
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061     <span class="keyword">typedef</span> intptr reference_count;
-<a name="l00062"></a>00062 
-<a name="l00064"></a>00064     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> affinity_id;
+<a name="l00056"></a>00056 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_calloc</a> (size_t nobj, size_t size);
+<a name="l00057"></a>00057 
+<a name="l00060"></a>00060 <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#g05dcec987480bb2c82ecdead6a085899">scalable_posix_memalign</a> (<span class="keywordtype">void</span>** memptr, size_t alignment, size_t size);
+<a name="l00061"></a>00061 
+<a name="l00064"></a>00064 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_aligned_malloc</a> (size_t size, size_t alignment);
 <a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span>    <span class="keyword">struct </span>context_list_node_t {
-<a name="l00068"></a>00068         context_list_node_t *my_prev,
-<a name="l00069"></a>00069                             *my_next;
-<a name="l00070"></a>00070     };
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072     <span class="keyword">class </span>allocate_root_with_context_proxy: no_assign {
-<a name="l00073"></a>00073         task_group_context& my_context;
-<a name="l00074"></a>00074     <span class="keyword">public</span>:
-<a name="l00075"></a>00075         allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {}
-<a name="l00076"></a>00076         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00077"></a>00077         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00078"></a>00078     };
-<a name="l00079"></a>00079 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081     <span class="keyword">class </span>allocate_root_proxy: no_assign {
-<a name="l00082"></a>00082     <span class="keyword">public</span>:
-<a name="l00083"></a>00083         <span class="keyword">static</span> task& __TBB_EXPORTED_FUNC allocate( size_t size );
-<a name="l00084"></a>00084         <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC free( task& );
-<a name="l00085"></a>00085     };
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087     <span class="keyword">class </span>allocate_continuation_proxy: no_assign {
-<a name="l00088"></a>00088     <span class="keyword">public</span>:
-<a name="l00089"></a>00089         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00090"></a>00090         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00091"></a>00091     };
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093     <span class="keyword">class </span>allocate_child_proxy: no_assign {
-<a name="l00094"></a>00094     <span class="keyword">public</span>:
-<a name="l00095"></a>00095         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00096"></a>00096         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00097"></a>00097     };
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099     <span class="keyword">class </span>allocate_additional_child_of_proxy: no_assign {
-<a name="l00100"></a>00100         task& <span class="keyword">self</span>;
-<a name="l00101"></a>00101         task& parent;
-<a name="l00102"></a>00102     <span class="keyword">public</span>:
-<a name="l00103"></a>00103         allocate_additional_child_of_proxy( task& self_, task& parent_ ) : self(self_), parent(parent_) {}
-<a name="l00104"></a>00104         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
-<a name="l00105"></a>00105         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
-<a name="l00106"></a>00106     };
+<a name="l00068"></a>00068 <span class="keywordtype">void</span> * __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_aligned_realloc</a> (<span class="keywordtype">void</span>* ptr, size_t size, size_t alignment);
+<a name="l00069"></a>00069 
+<a name="l00072"></a>00072 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_aligned_free</a> (<span class="keywordtype">void</span>* ptr);
+<a name="l00073"></a>00073 
+<a name="l00078"></a>00078 size_t __TBB_EXPORTED_FUNC <a class="code" href="a00235.html#g0965ce1b4b7835f92869c7fd867265f7">scalable_msize</a> (<span class="keywordtype">void</span>* ptr);
+<a name="l00079"></a>00079 
+<a name="l00080"></a>00080 <span class="preprocessor">#ifdef __cplusplus</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span>} <span class="comment">/* extern "C" */</span>
+<a name="l00082"></a>00082 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+<a name="l00083"></a>00083 
+<a name="l00084"></a>00084 <span class="preprocessor">#ifdef __cplusplus</span>
+<a name="l00085"></a>00085 <span class="preprocessor"></span>
+<a name="l00086"></a>00086 <span class="preprocessor">#include <new></span>      <span class="comment">/* To use new with the placement argument */</span>
+<a name="l00087"></a>00087 
+<a name="l00088"></a>00088 <span class="comment">/* Ensure that including this header does not cause implicit linkage with TBB */</span>
+<a name="l00089"></a>00089 <span class="preprocessor">#ifndef __TBB_NO_IMPLICIT_LINKAGE</span>
+<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">    #define __TBB_NO_IMPLICIT_LINKAGE 1</span>
+<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">    #include "tbb_stddef.h"</span>
+<a name="l00092"></a>00092 <span class="preprocessor">    #undef  __TBB_NO_IMPLICIT_LINKAGE</span>
+<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">    #include "tbb_stddef.h"</span>
+<a name="l00095"></a>00095 <span class="preprocessor">#endif</span>
+<a name="l00096"></a>00096 <span class="preprocessor"></span>
+<a name="l00097"></a>00097 
+<a name="l00098"></a>00098 <span class="keyword">namespace </span>tbb {
+<a name="l00099"></a>00099 
+<a name="l00100"></a>00100 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l00101"></a>00101 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</span>
+<a name="l00102"></a>00102 <span class="preprocessor">    #pragma warning (push)</span>
+<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4100)</span>
+<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00105"></a>00105 <span class="preprocessor"></span>
 <a name="l00107"></a>00107 
-<a name="l00108"></a>00108     <span class="keyword">class </span>task_group_base;
-<a name="l00109"></a>00109 
-<a name="l00111"></a>00111 
-<a name="l00116"></a>00116     <span class="keyword">class </span>task_prefix {
-<a name="l00117"></a>00117     <span class="keyword">private</span>:
-<a name="l00118"></a>00118         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00162.html">tbb::task</a>;
-<a name="l00119"></a>00119         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00164.html">tbb::task_list</a>;
-<a name="l00120"></a>00120         <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
-<a name="l00121"></a>00121         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
-<a name="l00122"></a>00122         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
-<a name="l00123"></a>00123         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
-<a name="l00124"></a>00124         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
-<a name="l00125"></a>00125         <span class="keyword">friend</span> <span class="keyword">class </span>internal::task_group_base;
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00129"></a>00129 <span class="preprocessor"></span>
-<a name="l00132"></a>00132 <span class="preprocessor">        task_group_context  *context;</span>
-<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00134"></a>00134         
-<a name="l00136"></a>00136 
-<a name="l00141"></a>00141         scheduler* origin;
-<a name="l00142"></a>00142 
-<a name="l00144"></a>00144         scheduler* owner;
-<a name="l00145"></a>00145 
-<a name="l00147"></a>00147 
-<a name="l00150"></a>00150         <a class="code" href="a00162.html">tbb::task</a>* parent;
-<a name="l00151"></a>00151 
-<a name="l00153"></a>00153 
-<a name="l00157"></a>00157         reference_count ref_count;
-<a name="l00158"></a>00158 
-<a name="l00160"></a>00160         <span class="keywordtype">int</span> depth;
-<a name="l00161"></a>00161 
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state;
-<a name="l00165"></a>00165 
-<a name="l00167"></a>00167 
-<a name="l00171"></a>00171         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> extra_state;
+<a name="l00110"></a>00110 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00111"></a><a class="code" href="a00158.html">00111</a> <span class="keyword">class </span><a class="code" href="a00158.html">scalable_allocator</a> {
+<a name="l00112"></a>00112 <span class="keyword">public</span>:
+<a name="l00113"></a>00113     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
+<a name="l00114"></a>00114     <span class="keyword">typedef</span> value_type* pointer;
+<a name="l00115"></a>00115     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
+<a name="l00116"></a>00116     <span class="keyword">typedef</span> value_type& reference;
+<a name="l00117"></a>00117     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
+<a name="l00118"></a>00118     <span class="keyword">typedef</span> size_t size_type;
+<a name="l00119"></a>00119     <span class="keyword">typedef</span> ptrdiff_t difference_type;
+<a name="l00120"></a>00120     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
+<a name="l00121"></a>00121         <span class="keyword">typedef</span> <a class="code" href="a00158.html">scalable_allocator<U></a> other;
+<a name="l00122"></a>00122     };
+<a name="l00123"></a>00123 
+<a name="l00124"></a>00124     <a class="code" href="a00158.html">scalable_allocator</a>() <span class="keywordflow">throw</span>() {}
+<a name="l00125"></a>00125     <a class="code" href="a00158.html">scalable_allocator</a>( <span class="keyword">const</span> <a class="code" href="a00158.html">scalable_allocator</a>& ) <span class="keywordflow">throw</span>() {}
+<a name="l00126"></a>00126     <span class="keyword">template</span><<span class="keyword">typename</span> U> <a class="code" href="a00158.html">scalable_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00158.html">scalable_allocator<U></a>&) <span class="keywordflow">throw</span>() {}
+<a name="l00127"></a>00127 
+<a name="l00128"></a>00128     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+<a name="l00129"></a>00129     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
+<a name="l00130"></a>00130 
+<a name="l00132"></a><a class="code" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">00132</a>     pointer <a class="code" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> =0 ) {
+<a name="l00133"></a>00133         <span class="keywordflow">return</span> static_cast<pointer>( <a class="code" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_malloc</a>( n * <span class="keyword">sizeof</span>(value_type) ) );
+<a name="l00134"></a>00134     }
+<a name="l00135"></a>00135 
+<a name="l00137"></a><a class="code" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">00137</a>     <span class="keywordtype">void</span> <a class="code" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">deallocate</a>( pointer p, size_type ) {
+<a name="l00138"></a>00138         <a class="code" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_free</a>( p );
+<a name="l00139"></a>00139     }
+<a name="l00140"></a>00140 
+<a name="l00142"></a><a class="code" href="a00158.html#880e766f1d913988c21973dbdd874fd5">00142</a>     size_type <a class="code" href="a00158.html#880e766f1d913988c21973dbdd874fd5">max_size</a>() const throw() {
+<a name="l00143"></a>00143         size_type absolutemax = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (value_type);
+<a name="l00144"></a>00144         <span class="keywordflow">return</span> (absolutemax > 0 ? absolutemax : 1);
+<a name="l00145"></a>00145     }
+<a name="l00146"></a>00146     <span class="keywordtype">void</span> construct( pointer p, <span class="keyword">const</span> value_type& val ) { <span class="keyword">new</span>(static_cast<void*>(p)) value_type(val); }
+<a name="l00147"></a>00147     <span class="keywordtype">void</span> destroy( pointer p ) {p->~value_type();}
+<a name="l00148"></a>00148 };
+<a name="l00149"></a>00149 
+<a name="l00150"></a>00150 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
+<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
+<a name="l00153"></a>00153 <span class="preprocessor"></span>
+<a name="l00155"></a>00155 
+<a name="l00156"></a>00156 <span class="keyword">template</span><>
+<a name="l00157"></a><a class="code" href="a00159.html">00157</a> <span class="keyword">class </span><a class="code" href="a00158.html">scalable_allocator</a><void> {
+<a name="l00158"></a>00158 <span class="keyword">public</span>:
+<a name="l00159"></a>00159     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
+<a name="l00160"></a>00160     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
+<a name="l00161"></a>00161     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
+<a name="l00162"></a>00162     <span class="keyword">template</span><<span class="keyword">class</span> U> <span class="keyword">struct </span>rebind {
+<a name="l00163"></a>00163         <span class="keyword">typedef</span> <a class="code" href="a00158.html">scalable_allocator<U></a> other;
+<a name="l00164"></a>00164     };
+<a name="l00165"></a>00165 };
+<a name="l00166"></a>00166 
+<a name="l00167"></a>00167 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00168"></a>00168 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00158.html">scalable_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00158.html">scalable_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+<a name="l00169"></a>00169 
+<a name="l00170"></a>00170 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00171"></a>00171 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> scalable_allocator<T>&, <span class="keyword">const</span> scalable_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
 <a name="l00172"></a>00172 
-<a name="l00173"></a>00173         affinity_id affinity;
+<a name="l00173"></a>00173 } <span class="comment">// namespace tbb</span>
 <a name="l00174"></a>00174 
-<a name="l00176"></a>00176         <a class="code" href="a00162.html">tbb::task</a>* next;
-<a name="l00177"></a>00177 
-<a name="l00179"></a>00179         <a class="code" href="a00162.html">tbb::task</a>& task() {<span class="keywordflow">return</span> *reinterpret_cast<tbb::task*>(<span class="keyword">this</span>+1);}
-<a name="l00180"></a>00180     };
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182 } <span class="comment">// namespace internal</span>
-<a name="l00184"></a>00184 <span class="comment"></span>
-<a name="l00185"></a>00185 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00186"></a>00186 <span class="preprocessor"></span>
-<a name="l00187"></a>00187 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span>    <span class="keyword">class </span>tbb_exception;
-<a name="l00189"></a>00189 <span class="preprocessor">#else</span>
-<a name="l00190"></a>00190 <span class="preprocessor"></span>    <span class="keyword">namespace </span>internal {
-<a name="l00191"></a>00191         <span class="keyword">class </span>tbb_exception_ptr;
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
-<a name="l00194"></a>00194 
-<a name="l00196"></a>00196 
-<a name="l00216"></a><a class="code" href="a00163.html">00216</a> <span class="keyword">class </span><a class="code" href="a00163.html">task_group_context</a> : internal::no_copy
-<a name="l00217"></a>00217 {
-<a name="l00218"></a>00218 <span class="keyword">private</span>:
-<a name="l00219"></a>00219 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span>    <span class="keyword">typedef</span> <a class="code" href="a00168.html">tbb_exception</a> <a class="code" href="a00168.html">exception_container_type</a>;
-<a name="l00221"></a>00221 <span class="preprocessor">#else</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span>    <span class="keyword">typedef</span> <a class="code" href="a00169.html">internal::tbb_exception_ptr</a> <a class="code" href="a00168.html">exception_container_type</a>;
-<a name="l00223"></a>00223 <span class="preprocessor">#endif</span>
-<a name="l00224"></a>00224 <span class="preprocessor"></span>
-<a name="l00225"></a>00225     <span class="keyword">enum</span> version_traits_word_layout {
-<a name="l00226"></a>00226         traits_offset = 16,
-<a name="l00227"></a>00227         version_mask = 0xFFFF,
-<a name="l00228"></a>00228         traits_mask = 0xFFFFul << traits_offset
-<a name="l00229"></a>00229     };
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231 <span class="keyword">public</span>:
-<a name="l00232"></a>00232     <span class="keyword">enum</span> kind_type {
-<a name="l00233"></a>00233         isolated,
-<a name="l00234"></a>00234         bound
-<a name="l00235"></a>00235     };
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237     <span class="keyword">enum</span> traits_type {
-<a name="l00238"></a>00238         exact_exception = 0x0001ul << traits_offset,
-<a name="l00239"></a>00239         no_cancellation = 0x0002ul << traits_offset,
-<a name="l00240"></a>00240         concurrent_wait = 0x0004ul << traits_offset,
-<a name="l00241"></a>00241 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
-<a name="l00242"></a>00242 <span class="preprocessor"></span>        default_traits = 0
-<a name="l00243"></a>00243 <span class="preprocessor">#else</span>
-<a name="l00244"></a>00244 <span class="preprocessor"></span>        default_traits = exact_exception
-<a name="l00245"></a>00245 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
-<a name="l00246"></a>00246     };
-<a name="l00247"></a>00247 
-<a name="l00248"></a>00248 <span class="keyword">private</span>:
-<a name="l00249"></a>00249     <span class="keyword">union </span>{
-<a name="l00251"></a>00251         kind_type my_kind;
-<a name="l00252"></a>00252         uintptr_t _my_kind_aligner;
-<a name="l00253"></a>00253     };
-<a name="l00254"></a>00254 
-<a name="l00256"></a>00256     <a class="code" href="a00163.html">task_group_context</a> *my_parent;
-<a name="l00257"></a>00257 
-<a name="l00259"></a>00259 
-<a name="l00261"></a>00261     internal::context_list_node_t my_node;
-<a name="l00262"></a>00262 
-<a name="l00264"></a>00264 
-<a name="l00267"></a>00267     <span class="keywordtype">char</span> _leading_padding[internal::NFS_MaxLineSize - 
-<a name="l00268"></a>00268                     2 * <span class="keyword">sizeof</span>(uintptr_t)- <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*) - <span class="keyword">sizeof</span>(internal::context_list_node_t)];
-<a name="l00269"></a>00269     
-<a name="l00271"></a>00271     uintptr_t my_cancellation_requested;
-<a name="l00272"></a>00272     
-<a name="l00274"></a>00274 
-<a name="l00277"></a>00277     uintptr_t  my_version_and_traits;
-<a name="l00278"></a>00278 
-<a name="l00280"></a>00280     <a class="code" href="a00168.html">exception_container_type</a> *my_exception;
-<a name="l00281"></a>00281 
-<a name="l00283"></a>00283 
-<a name="l00286"></a>00286     <span class="keywordtype">void</span> *my_owner;
-<a name="l00287"></a>00287 
-<a name="l00289"></a>00289 
-<a name="l00290"></a>00290     <span class="keywordtype">char</span> _trailing_padding[internal::NFS_MaxLineSize - <span class="keyword">sizeof</span>(intptr_t) - 2 * <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*)];
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292 <span class="keyword">public</span>:
-<a name="l00294"></a>00294 
-<a name="l00321"></a><a class="code" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">00321</a>     <a class="code" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a> ( kind_type relation_with_parent = bound,
-<a name="l00322"></a>00322                          uintptr_t traits = default_traits )
-<a name="l00323"></a>00323         : my_kind(relation_with_parent)
-<a name="l00324"></a>00324         , my_version_and_traits(1 | traits)
-<a name="l00325"></a>00325     {
-<a name="l00326"></a>00326         <a class="code" href="a00163.html#49a55352084fd44b8863d182e839e6dc">init</a>();
-<a name="l00327"></a>00327     }
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329     __TBB_EXPORTED_METHOD ~<a class="code" href="a00163.html">task_group_context</a> ();
-<a name="l00330"></a>00330 
-<a name="l00332"></a>00332 
-<a name="l00339"></a>00339     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00163.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ();
-<a name="l00340"></a>00340 
-<a name="l00342"></a>00342 
-<a name="l00349"></a>00349     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00163.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ();
-<a name="l00350"></a>00350 
-<a name="l00352"></a>00352     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00163.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () <span class="keyword">const</span>;
-<a name="l00353"></a>00353 
-<a name="l00355"></a>00355 
-<a name="l00361"></a>00361     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00163.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a> ();
-<a name="l00362"></a>00362 
-<a name="l00363"></a>00363 <span class="keyword">protected</span>:
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00163.html#49a55352084fd44b8863d182e839e6dc">init</a> ();
-<a name="l00367"></a>00367 
-<a name="l00368"></a>00368 <span class="keyword">private</span>:
-<a name="l00369"></a>00369     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00162.html">task</a>;
-<a name="l00370"></a>00370     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
-<a name="l00371"></a>00371 
-<a name="l00372"></a>00372     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_required = bound;
-<a name="l00373"></a>00373     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_completed = kind_type(bound+1);
-<a name="l00374"></a>00374 
-<a name="l00377"></a>00377     <span class="keywordtype">void</span> propagate_cancellation_from_ancestors ();
-<a name="l00378"></a>00378 
-<a name="l00380"></a>00380     <span class="keywordtype">bool</span> is_alive () { 
-<a name="l00381"></a>00381 <span class="preprocessor">#if TBB_USE_DEBUG</span>
-<a name="l00382"></a>00382 <span class="preprocessor"></span>        <span class="keywordflow">return</span> my_version_and_traits != 0xDeadBeef;
-<a name="l00383"></a>00383 <span class="preprocessor">#else</span>
-<a name="l00384"></a>00384 <span class="preprocessor"></span>        <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00385"></a>00385 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_DEBUG */</span>
-<a name="l00386"></a>00386     }
-<a name="l00387"></a>00387 }; <span class="comment">// class task_group_context</span>
-<a name="l00388"></a>00388 
-<a name="l00389"></a>00389 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00390"></a>00390 
-<a name="l00392"></a>00392 
-<a name="l00393"></a><a class="code" href="a00162.html">00393</a> <span class="keyword">class </span><a class="code" href="a00162.html">task</a>: internal::no_copy {
-<a name="l00395"></a>00395     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_ref_count( <span class="keywordtype">int</span> count );
-<a name="l00396"></a>00396 
-<a name="l00398"></a>00398     internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count();
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400 <span class="keyword">protected</span>:
-<a name="l00402"></a><a class="code" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">00402</a>     <a class="code" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>() {prefix().extra_state=1;}
-<a name="l00403"></a>00403 
-<a name="l00404"></a>00404 <span class="keyword">public</span>:
-<a name="l00406"></a><a class="code" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">00406</a>     <span class="keyword">virtual</span> <a class="code" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">~task</a>() {}
-<a name="l00407"></a>00407 
-<a name="l00409"></a>00409     <span class="keyword">virtual</span> <a class="code" href="a00162.html">task</a>* <a class="code" href="a00162.html#22c298cd40937a431a06777423f002f6">execute</a>() = 0;
-<a name="l00410"></a>00410 
-<a name="l00412"></a><a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e">00412</a>     <span class="keyword">enum</span> <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> {
-<a name="l00414"></a>00414         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>,
-<a name="l00416"></a>00416         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>,
-<a name="l00418"></a>00418         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>,
-<a name="l00420"></a>00420         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>,
-<a name="l00422"></a>00422         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>,
-<a name="l00424"></a>00424         <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
-<a name="l00425"></a>00425     };
-<a name="l00426"></a>00426 
-<a name="l00427"></a>00427     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00428"></a>00428     <span class="comment">// Allocating tasks</span>
-<a name="l00429"></a>00429     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00430"></a>00430 
-<a name="l00432"></a><a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">00432</a>     <span class="keyword">static</span> internal::allocate_root_proxy <a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>() {
-<a name="l00433"></a>00433         <span class="keywordflow">return</span> internal::allocate_root_proxy();
-<a name="l00434"></a>00434     }
-<a name="l00435"></a>00435 
-<a name="l00436"></a>00436 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00438"></a><a class="code" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">00438</a> <span class="preprocessor">    static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) {</span>
-<a name="l00439"></a>00439 <span class="preprocessor"></span>        <span class="keywordflow">return</span> internal::allocate_root_with_context_proxy(ctx);
-<a name="l00440"></a>00440     }
-<a name="l00441"></a>00441 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00442"></a>00442 
-<a name="l00444"></a>00444 
-<a name="l00445"></a><a class="code" href="a00162.html#1434c79a5138993269d034008bff7329">00445</a>     internal::allocate_continuation_proxy& allocate_continuation() {
-<a name="l00446"></a>00446         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_continuation_proxy*>(<span class="keyword">this</span>);
-<a name="l00447"></a>00447     }
-<a name="l00448"></a>00448 
-<a name="l00450"></a><a class="code" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">00450</a>     internal::allocate_child_proxy& allocate_child() {
-<a name="l00451"></a>00451         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_child_proxy*>(<span class="keyword">this</span>);
-<a name="l00452"></a>00452     }
-<a name="l00453"></a>00453 
-<a name="l00455"></a>00455 
-<a name="l00457"></a><a class="code" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">00457</a>     internal::allocate_additional_child_of_proxy allocate_additional_child_of( <a class="code" href="a00162.html">task</a>& t ) {
-<a name="l00458"></a>00458         <span class="keywordflow">return</span> internal::allocate_additional_child_of_proxy(*<span class="keyword">this</span>,t);
-<a name="l00459"></a>00459     }
-<a name="l00460"></a>00460 
-<a name="l00462"></a>00462 
-<a name="l00466"></a>00466     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD destroy( <a class="code" href="a00162.html">task</a>& victim );
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00469"></a>00469     <span class="comment">// Recycling of tasks</span>
-<a name="l00470"></a>00470     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00471"></a>00471 
-<a name="l00473"></a>00473 
-<a name="l00479"></a><a class="code" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">00479</a>     <span class="keywordtype">void</span> recycle_as_continuation() {
-<a name="l00480"></a>00480         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
-<a name="l00481"></a>00481         prefix().state = allocated;
-<a name="l00482"></a>00482     }
-<a name="l00483"></a>00483 
-<a name="l00485"></a>00485 
-<a name="l00486"></a><a class="code" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">00486</a>     <span class="keywordtype">void</span> recycle_as_safe_continuation() {
-<a name="l00487"></a>00487         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
-<a name="l00488"></a>00488         prefix().state = recycle;
-<a name="l00489"></a>00489     }
-<a name="l00490"></a>00490 
-<a name="l00492"></a><a class="code" href="a00162.html#db399855177438bbc9cc61d508dae8d2">00492</a>     <span class="keywordtype">void</span> recycle_as_child_of( <a class="code" href="a00162.html">task</a>& new_parent ) {
-<a name="l00493"></a>00493         internal::task_prefix& p = prefix();
-<a name="l00494"></a>00494         __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, <span class="stringliteral">"execute not running, or already recycled"</span> );
-<a name="l00495"></a>00495         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled as a child"</span> );
-<a name="l00496"></a>00496         __TBB_ASSERT( p.parent==NULL, <span class="stringliteral">"parent must be null"</span> );
-<a name="l00497"></a>00497         __TBB_ASSERT( new_parent.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state<=recycle, <span class="stringliteral">"corrupt parent's state"</span> );
-<a name="l00498"></a>00498         __TBB_ASSERT( new_parent.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state!=freed, <span class="stringliteral">"parent already freed"</span> );
-<a name="l00499"></a>00499         p.state = allocated;
-<a name="l00500"></a>00500         p.parent = &new_parent;
-<a name="l00501"></a>00501         p.<a class="code" href="a00162.html#7653ceef53a188d05b5c779e1104b698">depth</a> = new_parent.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().depth+1;
-<a name="l00502"></a>00502 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00503"></a>00503 <span class="preprocessor"></span>        p.context = new_parent.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().context;
-<a name="l00504"></a>00504 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00505"></a>00505     }
-<a name="l00506"></a>00506 
-<a name="l00508"></a>00508 
-<a name="l00509"></a><a class="code" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">00509</a>     <span class="keywordtype">void</span> recycle_to_reexecute() {
-<a name="l00510"></a>00510         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running, or already recycled"</span> );
-<a name="l00511"></a>00511         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled for reexecution"</span> );
-<a name="l00512"></a>00512         prefix().state = reexecute;
-<a name="l00513"></a>00513     }
-<a name="l00514"></a>00514 
-<a name="l00515"></a>00515 <span class="preprocessor">#if __TBB_TASK_DEQUE</span>
-<a name="l00516"></a>00516 <span class="preprocessor"></span>    <span class="comment">// All depth-related methods are obsolete, and are retained for the sake </span>
-<a name="l00517"></a>00517     <span class="comment">// of backward source compatibility only</span>
-<a name="l00518"></a>00518     intptr_t depth()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 0;}
-<a name="l00519"></a>00519     <span class="keywordtype">void</span> set_depth( intptr_t ) {}
-<a name="l00520"></a>00520     <span class="keywordtype">void</span> add_to_depth( <span class="keywordtype">int</span> ) {}
-<a name="l00521"></a>00521 
-<a name="l00522"></a>00522 <span class="preprocessor">#else </span><span class="comment">/* !__TBB_TASK_DEQUE */</span>
-<a name="l00524"></a>00524 
-<a name="l00525"></a><a class="code" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">00525</a>     typedef internal::intptr depth_type;
-<a name="l00526"></a>00526 
-<a name="l00528"></a><a class="code" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">00528</a>     depth_type depth()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().depth;}
-<a name="l00529"></a>00529 
-<a name="l00531"></a>00531 
-<a name="l00532"></a><a class="code" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">00532</a>     <span class="keywordtype">void</span> set_depth( depth_type new_depth ) {
-<a name="l00533"></a>00533         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
-<a name="l00534"></a>00534         __TBB_ASSERT( new_depth>=0, <span class="stringliteral">"depth cannot be negative"</span> );
-<a name="l00535"></a>00535         __TBB_ASSERT( new_depth==<span class="keywordtype">int</span>(new_depth), <span class="stringliteral">"integer overflow error"</span>);
-<a name="l00536"></a>00536         prefix().depth = int(new_depth);
-<a name="l00537"></a>00537     }
-<a name="l00538"></a>00538 
-<a name="l00540"></a>00540 
-<a name="l00541"></a><a class="code" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">00541</a>     <span class="keywordtype">void</span> add_to_depth( <span class="keywordtype">int</span> delta ) {
-<a name="l00542"></a>00542         __TBB_ASSERT( state()!=ready, <span class="stringliteral">"cannot change depth of ready task"</span> );
-<a name="l00543"></a>00543         __TBB_ASSERT( prefix().depth>=-delta, <span class="stringliteral">"depth cannot be negative"</span> );
-<a name="l00544"></a>00544         prefix().depth+=delta;
-<a name="l00545"></a>00545     }
-<a name="l00546"></a>00546 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_TASK_DEQUE */</span>
-<a name="l00547"></a>00547 
-<a name="l00548"></a>00548     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00549"></a>00549     <span class="comment">// Spawning and blocking</span>
-<a name="l00550"></a>00550     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00551"></a>00551 
-<a name="l00553"></a><a class="code" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">00553</a>     <span class="keywordtype">void</span> set_ref_count( <span class="keywordtype">int</span> count ) {
-<a name="l00554"></a>00554 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00555"></a>00555 <span class="preprocessor"></span>        internal_set_ref_count(count);
-<a name="l00556"></a>00556 <span class="preprocessor">#else</span>
-<a name="l00557"></a>00557 <span class="preprocessor"></span>        prefix().ref_count = count;
-<a name="l00558"></a>00558 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00559"></a>00559     }
-<a name="l00560"></a>00560 
-<a name="l00562"></a>00562 
-<a name="l00563"></a><a class="code" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">00563</a>     <span class="keywordtype">void</span> increment_ref_count() {
-<a name="l00564"></a>00564         __TBB_FetchAndIncrementWacquire( &prefix().ref_count );
-<a name="l00565"></a>00565     }
-<a name="l00566"></a>00566 
-<a name="l00568"></a>00568 
-<a name="l00569"></a><a class="code" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">00569</a>     <span class="keywordtype">int</span> decrement_ref_count() {
-<a name="l00570"></a>00570 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
-<a name="l00571"></a>00571 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(internal_decrement_ref_count());
-<a name="l00572"></a>00572 <span class="preprocessor">#else</span>
-<a name="l00573"></a>00573 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(__TBB_FetchAndDecrementWrelease( &prefix().ref_count ))-1;
-<a name="l00574"></a>00574 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
-<a name="l00575"></a>00575     }
-<a name="l00576"></a>00576 
-<a name="l00578"></a>00578 
-<a name="l00582"></a><a class="code" href="a00162.html#f7737143d458f1ed1c0d7da3971d9e6b">00582</a>     <span class="keywordtype">void</span> spawn( <a class="code" href="a00162.html">task</a>& child ) {
-<a name="l00583"></a>00583 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00584"></a>00584 <span class="preprocessor"></span>        __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00585"></a>00585 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00586"></a>00586         prefix().owner->spawn( child, child.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
-<a name="l00587"></a>00587     }
-<a name="l00588"></a>00588 
-<a name="l00590"></a>00590 
-<a name="l00591"></a>00591     <span class="keywordtype">void</span> spawn( <a class="code" href="a00164.html">task_list</a>& list );
-<a name="l00592"></a>00592 
-<a name="l00594"></a><a class="code" href="a00162.html#3ce28ca9baa771cfc37ecd72e69c4f3c">00594</a>     <span class="keywordtype">void</span> spawn_and_wait_for_all( <a class="code" href="a00162.html">task</a>& child ) {
-<a name="l00595"></a>00595 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00596"></a>00596 <span class="preprocessor"></span>        __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00597"></a>00597 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00598"></a>00598         prefix().owner->wait_for_all( *<span class="keyword">this</span>, &child );
-<a name="l00599"></a>00599     }
-<a name="l00600"></a>00600 
-<a name="l00602"></a>00602     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD spawn_and_wait_for_all( <a class="code" href="a00164.html">task_list</a>& list );
-<a name="l00603"></a>00603 
-<a name="l00605"></a>00605 
-<a name="l00607"></a><a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">00607</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00162.html">task</a>& root ) {
-<a name="l00608"></a>00608 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00609"></a>00609 <span class="preprocessor"></span>        __TBB_ASSERT( root.<a class="code" href="a00162.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>(), <span class="stringliteral">"root not owned by current thread"</span> );
-<a name="l00610"></a>00610 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00611"></a>00611         root.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().owner->spawn_root_and_wait( root, root.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
-<a name="l00612"></a>00612     }
-<a name="l00613"></a>00613 
-<a name="l00615"></a>00615 
-<a name="l00617"></a>00617     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00164.html">task_list</a>& root_list );
-<a name="l00618"></a>00618 
-<a name="l00620"></a>00620 
-<a name="l00621"></a><a class="code" href="a00162.html#53d2615ad9c38859b4c8080936600283">00621</a>     <span class="keywordtype">void</span> wait_for_all() {
-<a name="l00622"></a>00622 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00623"></a>00623 <span class="preprocessor"></span>        __TBB_ASSERT( is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00624"></a>00624 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00625"></a>00625         prefix().owner->wait_for_all( *<span class="keyword">this</span>, NULL );
-<a name="l00626"></a>00626     }
-<a name="l00627"></a>00627 
-<a name="l00629"></a>00629     <span class="keyword">static</span> <a class="code" href="a00162.html">task</a>& __TBB_EXPORTED_FUNC <span class="keyword">self</span>();
-<a name="l00630"></a>00630 
-<a name="l00632"></a><a class="code" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">00632</a>     <a class="code" href="a00162.html">task</a>* parent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().parent;}
-<a name="l00633"></a>00633 
-<a name="l00634"></a>00634 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00636"></a><a class="code" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">00636</a> <span class="preprocessor">    task_group_context* context() {return prefix().context;}</span>
-<a name="l00637"></a>00637 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>   
-<a name="l00638"></a>00638 
-<a name="l00640"></a><a class="code" href="a00162.html#f9169402702f56bf519448aaf34450aa">00640</a>     <span class="keywordtype">bool</span> is_stolen_task()<span class="keyword"> const </span>{
-<a name="l00641"></a>00641         internal::task_prefix& p = prefix();
-<a name="l00642"></a>00642         internal::task_prefix& q = parent()->prefix();
-<a name="l00643"></a>00643         <span class="keywordflow">return</span> p.owner!=q.owner;
-<a name="l00644"></a>00644     }
-<a name="l00645"></a>00645 
-<a name="l00646"></a>00646     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00647"></a>00647     <span class="comment">// Debugging</span>
-<a name="l00648"></a>00648     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00649"></a>00649 
-<a name="l00651"></a><a class="code" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">00651</a>     <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a> state()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00162.html#4a3c415562d17905390ea5b49d12293e">state_type</a>(prefix().state);}
-<a name="l00652"></a>00652 
-<a name="l00654"></a><a class="code" href="a00162.html#ad774f55eaec008ae02b236423209ced">00654</a>     <span class="keywordtype">int</span> ref_count()<span class="keyword"> const </span>{
-<a name="l00655"></a>00655 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00656"></a>00656 <span class="preprocessor"></span>        internal::reference_count ref_count = prefix().ref_count;
-<a name="l00657"></a>00657         __TBB_ASSERT( ref_count==<span class="keywordtype">int</span>(ref_count), <span class="stringliteral">"integer overflow error"</span>);
-<a name="l00658"></a>00658 <span class="preprocessor">#endif</span>
-<a name="l00659"></a>00659 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(prefix().ref_count);
-<a name="l00660"></a>00660     }
-<a name="l00661"></a>00661 
-<a name="l00663"></a>00663     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD is_owned_by_current_thread() <span class="keyword">const</span>;
-<a name="l00664"></a>00664 
-<a name="l00665"></a>00665     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00666"></a>00666     <span class="comment">// Affinity</span>
-<a name="l00667"></a>00667     <span class="comment">//------------------------------------------------------------------------</span>
-<a name="l00668"></a>00668  
-<a name="l00670"></a>00670 
-<a name="l00671"></a><a class="code" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">00671</a>     <span class="keyword">typedef</span> internal::affinity_id affinity_id;
-<a name="l00672"></a>00672 
-<a name="l00674"></a><a class="code" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">00674</a>     <span class="keywordtype">void</span> set_affinity( affinity_id <span class="keywordtype">id</span> ) {prefix().affinity = id;}
-<a name="l00675"></a>00675 
-<a name="l00677"></a><a class="code" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">00677</a>     affinity_id affinity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().affinity;}
-<a name="l00678"></a>00678 
-<a name="l00680"></a>00680 
-<a name="l00684"></a>00684     <span class="keyword">virtual</span> <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD note_affinity( affinity_id <span class="keywordtype">id</span> );
-<a name="l00685"></a>00685 
-<a name="l00686"></a>00686 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00688"></a>00688 <span class="preprocessor"></span>
-<a name="l00689"></a><a class="code" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">00689</a> <span class="preprocessor">    bool cancel_group_execution () { return prefix().context->cancel_group_execution(); }</span>
-<a name="l00690"></a>00690 <span class="preprocessor"></span>
-<a name="l00692"></a><a class="code" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">00692</a>     <span class="keywordtype">bool</span> is_cancelled ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prefix().context->is_group_execution_cancelled(); }
-<a name="l00693"></a>00693 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00694"></a>00694 
-<a name="l00695"></a>00695 <span class="keyword">private</span>:
-<a name="l00696"></a>00696     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00164.html">task_list</a>;
-<a name="l00697"></a>00697     <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
-<a name="l00698"></a>00698     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
-<a name="l00699"></a>00699 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00700"></a>00700 <span class="preprocessor"></span>    <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
-<a name="l00701"></a>00701 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00702"></a>00702     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
-<a name="l00703"></a>00703     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
-<a name="l00704"></a>00704     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
-<a name="l00705"></a>00705     
-<a name="l00706"></a>00706     <span class="keyword">friend</span> <span class="keyword">class </span>internal::task_group_base;
-<a name="l00707"></a>00707 
-<a name="l00709"></a>00709 
-<a name="l00710"></a>00710     internal::task_prefix& prefix( internal::version_tag* = NULL )<span class="keyword"> const </span>{
-<a name="l00711"></a>00711         <span class="keywordflow">return</span> reinterpret_cast<internal::task_prefix*>(const_cast<task*>(<span class="keyword">this</span>))[-1];
-<a name="l00712"></a>00712     }
-<a name="l00713"></a>00713 }; <span class="comment">// class task</span>
-<a name="l00714"></a>00714 
-<a name="l00716"></a>00716 
-<a name="l00717"></a><a class="code" href="a00137.html">00717</a> <span class="keyword">class </span><a class="code" href="a00137.html">empty_task</a>: <span class="keyword">public</span> <a class="code" href="a00162.html">task</a> {
-<a name="l00718"></a>00718     <span class="comment">/*override*/</span> <a class="code" href="a00162.html">task</a>* execute() {
-<a name="l00719"></a>00719         <span class="keywordflow">return</span> NULL;
-<a name="l00720"></a>00720     }
-<a name="l00721"></a>00721 };
-<a name="l00722"></a>00722 
-<a name="l00724"></a>00724 
-<a name="l00726"></a><a class="code" href="a00164.html">00726</a> <span class="keyword">class </span><a class="code" href="a00164.html">task_list</a>: internal::no_copy {
-<a name="l00727"></a>00727 <span class="keyword">private</span>:
-<a name="l00728"></a>00728     <a class="code" href="a00162.html">task</a>* first;
-<a name="l00729"></a>00729     <a class="code" href="a00162.html">task</a>** next_ptr;
-<a name="l00730"></a>00730     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00162.html">task</a>;
-<a name="l00731"></a>00731 <span class="keyword">public</span>:
-<a name="l00733"></a><a class="code" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">00733</a>     <a class="code" href="a00164.html">task_list</a>() : first(NULL), next_ptr(&first) {}
-<a name="l00734"></a>00734 
-<a name="l00736"></a><a class="code" href="a00164.html#6d438f1499a02db1e59c24ab6043e5ba">00736</a>     ~<a class="code" href="a00164.html">task_list</a>() {}
-<a name="l00737"></a>00737 
-<a name="l00739"></a><a class="code" href="a00164.html#f3ac31e092814b90929f81bb30441959">00739</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !first;}
-<a name="l00740"></a>00740 
-<a name="l00742"></a><a class="code" href="a00164.html#4cd34756bc4763dafb8c84838a0124ff">00742</a>     <span class="keywordtype">void</span> push_back( <a class="code" href="a00162.html">task</a>& <a class="code" href="a00162.html">task</a> ) {
-<a name="l00743"></a>00743         task.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next = NULL;
-<a name="l00744"></a>00744         *next_ptr = &task;
-<a name="l00745"></a>00745         next_ptr = &task.<a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
-<a name="l00746"></a>00746     }
-<a name="l00747"></a>00747 
-<a name="l00749"></a><a class="code" href="a00164.html#5fe85df5ed524418389d34051750347d">00749</a>     <a class="code" href="a00162.html">task</a>& pop_front() {
-<a name="l00750"></a>00750         __TBB_ASSERT( !empty(), <span class="stringliteral">"attempt to pop item from empty task_list"</span> );
-<a name="l00751"></a>00751         <a class="code" href="a00162.html">task</a>* result = first;
-<a name="l00752"></a>00752         first = result-><a class="code" href="a00162.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
-<a name="l00753"></a>00753         <span class="keywordflow">if</span>( !first ) next_ptr = &first;
-<a name="l00754"></a>00754         <span class="keywordflow">return</span> *result;
-<a name="l00755"></a>00755     }
-<a name="l00756"></a>00756 
-<a name="l00758"></a><a class="code" href="a00164.html#fce446ee13e025969945328f3ff59b95">00758</a>     <span class="keywordtype">void</span> clear() {
-<a name="l00759"></a>00759         first=NULL;
-<a name="l00760"></a>00760         next_ptr=&first;
-<a name="l00761"></a>00761     }
-<a name="l00762"></a>00762 };
-<a name="l00763"></a>00763 
-<a name="l00764"></a><a class="code" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">00764</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> task::spawn( <a class="code" href="a00164.html">task_list</a>& list ) {
-<a name="l00765"></a>00765 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00766"></a>00766 <span class="preprocessor"></span>    __TBB_ASSERT( <a class="code" href="a00162.html#c26718b3b247cd13deb1a741902e7105">is_owned_by_current_thread</a>(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00767"></a>00767 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00768"></a>00768     <span class="keywordflow">if</span>( <a class="code" href="a00162.html">task</a>* t = list.<a class="code" href="a00164.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
-<a name="l00769"></a>00769         prefix().owner->spawn( *t, *list.<a class="code" href="a00164.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
-<a name="l00770"></a>00770         list.<a class="code" href="a00164.html#fce446ee13e025969945328f3ff59b95">clear</a>();
-<a name="l00771"></a>00771     }
-<a name="l00772"></a>00772 }
-<a name="l00773"></a>00773 
-<a name="l00774"></a><a class="code" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">00774</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00162.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( <a class="code" href="a00164.html">task_list</a>& root_list ) {
-<a name="l00775"></a>00775     <span class="keywordflow">if</span>( <a class="code" href="a00162.html">task</a>* t = root_list.<a class="code" href="a00164.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
-<a name="l00776"></a>00776 <span class="preprocessor">#if !__TBB_RELAXED_OWNERSHIP</span>
-<a name="l00777"></a>00777 <span class="preprocessor"></span>        __TBB_ASSERT( t->is_owned_by_current_thread(), <span class="stringliteral">"'this' not owned by current thread"</span> );
-<a name="l00778"></a>00778 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00779"></a>00779         t->prefix().owner->spawn_root_and_wait( *t, *root_list.<a class="code" href="a00164.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
-<a name="l00780"></a>00780         root_list.<a class="code" href="a00164.html#fce446ee13e025969945328f3ff59b95">clear</a>();
-<a name="l00781"></a>00781     }
-<a name="l00782"></a>00782 }
-<a name="l00783"></a>00783 
-<a name="l00784"></a>00784 } <span class="comment">// namespace tbb</span>
-<a name="l00785"></a>00785 
-<a name="l00786"></a>00786 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_root_proxy& ) {
-<a name="l00787"></a>00787     <span class="keywordflow">return</span> &tbb::internal::allocate_root_proxy::allocate(bytes);
-<a name="l00788"></a>00788 }
-<a name="l00789"></a>00789 
-<a name="l00790"></a>00790 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_root_proxy& ) {
-<a name="l00791"></a>00791     tbb::internal::allocate_root_proxy::free( *static_cast<tbb::task*>(task) );
-<a name="l00792"></a>00792 }
-<a name="l00793"></a>00793 
-<a name="l00794"></a>00794 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00795"></a>00795 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_root_with_context_proxy& p ) {
-<a name="l00796"></a>00796     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00797"></a>00797 }
-<a name="l00798"></a>00798 
-<a name="l00799"></a>00799 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_root_with_context_proxy& p ) {
-<a name="l00800"></a>00800     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00801"></a>00801 }
-<a name="l00802"></a>00802 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00803"></a>00803 
-<a name="l00804"></a>00804 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_continuation_proxy& p ) {
-<a name="l00805"></a>00805     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00806"></a>00806 }
-<a name="l00807"></a>00807 
-<a name="l00808"></a>00808 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_continuation_proxy& p ) {
-<a name="l00809"></a>00809     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00810"></a>00810 }
-<a name="l00811"></a>00811 
-<a name="l00812"></a>00812 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_child_proxy& p ) {
-<a name="l00813"></a>00813     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00814"></a>00814 }
-<a name="l00815"></a>00815 
-<a name="l00816"></a>00816 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_child_proxy& p ) {
-<a name="l00817"></a>00817     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00818"></a>00818 }
-<a name="l00819"></a>00819 
-<a name="l00820"></a>00820 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_additional_child_of_proxy& p ) {
-<a name="l00821"></a>00821     <span class="keywordflow">return</span> &p.allocate(bytes);
-<a name="l00822"></a>00822 }
-<a name="l00823"></a>00823 
-<a name="l00824"></a>00824 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_additional_child_of_proxy& p ) {
-<a name="l00825"></a>00825     p.free( *static_cast<tbb::task*>(task) );
-<a name="l00826"></a>00826 }
-<a name="l00827"></a>00827 
-<a name="l00828"></a>00828 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_H */</span>
+<a name="l00175"></a>00175 <span class="preprocessor">#if _MSC_VER</span>
+<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">    #if __TBB_BUILD && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE)</span>
+<a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">        #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1</span>
+<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00179"></a>00179 <span class="preprocessor"></span>
+<a name="l00180"></a>00180 <span class="preprocessor">    #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE</span>
+<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">        #ifdef _DEBUG</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc_debug.lib")</span>
+<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">        #else</span>
+<a name="l00184"></a>00184 <span class="preprocessor"></span><span class="preprocessor">            #pragma comment(lib, "tbbmalloc.lib")</span>
+<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">        #endif</span>
+<a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00187"></a>00187 <span class="preprocessor"></span>
+<a name="l00188"></a>00188 
+<a name="l00189"></a>00189 <span class="preprocessor">#endif</span>
+<a name="l00190"></a>00190 <span class="preprocessor"></span>
+<a name="l00191"></a>00191 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+<a name="l00192"></a>00192 
+<a name="l00193"></a>00193 <span class="preprocessor">#if !defined(__cplusplus) && __ICC==1100</span>
+<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
+<a name="l00195"></a>00195 <span class="preprocessor"></span><span class="preprocessor">#endif // ICC 11.0 warning 991 is back</span>
+<a name="l00196"></a>00196 <span class="preprocessor"></span>
+<a name="l00197"></a>00197 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_scalable_allocator_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00349.html b/doc/html/a00352.html
similarity index 84%
copy from doc/html/a00349.html
copy to doc/html/a00352.html
index 2deb090..684cc98 100644
--- a/doc/html/a00349.html
+++ b/doc/html/a00352.html
@@ -52,59 +52,59 @@
 <a name="l00031"></a>00031 <span class="keyword">namespace </span>tbb {
 <a name="l00032"></a>00032 
 <a name="l00034"></a>00034 
-<a name="l00039"></a><a class="code" href="a00157.html">00039</a> <span class="keyword">class </span><a class="code" href="a00157.html">spin_mutex</a> {
+<a name="l00039"></a><a class="code" href="a00161.html">00039</a> <span class="keyword">class </span><a class="code" href="a00161.html">spin_mutex</a> {
 <a name="l00041"></a>00041     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> flag;
 <a name="l00042"></a>00042 
 <a name="l00043"></a>00043 <span class="keyword">public</span>:
 <a name="l00045"></a>00045 
-<a name="l00046"></a><a class="code" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">00046</a>     <a class="code" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>() : flag(0) {
+<a name="l00046"></a><a class="code" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">00046</a>     <a class="code" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">spin_mutex</a>() : flag(0) {
 <a name="l00047"></a>00047 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
 <a name="l00048"></a>00048 <span class="preprocessor"></span>        internal_construct();
 <a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
 <a name="l00050"></a>00050 <span class="preprocessor"></span>    }
 <a name="l00051"></a>00051 
-<a name="l00053"></a><a class="code" href="a00158.html">00053</a>     <span class="keyword">class </span><a class="code" href="a00158.html">scoped_lock</a> : internal::no_copy {
+<a name="l00053"></a><a class="code" href="a00162.html">00053</a>     <span class="keyword">class </span><a class="code" href="a00162.html">scoped_lock</a> : internal::no_copy {
 <a name="l00054"></a>00054     <span class="keyword">private</span>:
-<a name="l00056"></a>00056         <a class="code" href="a00157.html">spin_mutex</a>* my_mutex; 
+<a name="l00056"></a>00056         <a class="code" href="a00161.html">spin_mutex</a>* my_mutex; 
 <a name="l00057"></a>00057 
 <a name="l00059"></a>00059         internal::uintptr my_unlock_value;
 <a name="l00060"></a>00060 
-<a name="l00062"></a>00062         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00157.html">spin_mutex</a>& m );
+<a name="l00062"></a>00062         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_acquire( <a class="code" href="a00161.html">spin_mutex</a>& m );
 <a name="l00063"></a>00063 
-<a name="l00065"></a>00065         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00157.html">spin_mutex</a>& m );
+<a name="l00065"></a>00065         <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire( <a class="code" href="a00161.html">spin_mutex</a>& m );
 <a name="l00066"></a>00066 
 <a name="l00068"></a>00068         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_release();
 <a name="l00069"></a>00069 
-<a name="l00070"></a>00070         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00157.html">spin_mutex</a>;
+<a name="l00070"></a>00070         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00161.html">spin_mutex</a>;
 <a name="l00071"></a>00071 
 <a name="l00072"></a>00072     <span class="keyword">public</span>:
-<a name="l00074"></a><a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">00074</a>         <a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>() : my_mutex(NULL), my_unlock_value(0) {}
+<a name="l00074"></a><a class="code" href="a00162.html#29ae680ae7f5e685c2e15535b9c855b3">00074</a>         <a class="code" href="a00162.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>() : my_mutex(NULL), my_unlock_value(0) {}
 <a name="l00075"></a>00075 
-<a name="l00077"></a><a class="code" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">00077</a>         <a class="code" href="a00158.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) { 
+<a name="l00077"></a><a class="code" href="a00162.html#5ce6807050a9e8f87bcb4a65dccb12ef">00077</a>         <a class="code" href="a00162.html#29ae680ae7f5e685c2e15535b9c855b3">scoped_lock</a>( <a class="code" href="a00161.html">spin_mutex</a>& m ) { 
 <a name="l00078"></a>00078 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00079"></a>00079 <span class="preprocessor"></span>            my_mutex=NULL;
 <a name="l00080"></a>00080             internal_acquire(m);
 <a name="l00081"></a>00081 <span class="preprocessor">#else</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
+<a name="l00082"></a>00082 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00161.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
 <a name="l00083"></a>00083             my_mutex=&m;
 <a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
 <a name="l00085"></a>00085         }
 <a name="l00086"></a>00086 
-<a name="l00088"></a><a class="code" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">00088</a>         <span class="keywordtype">void</span> <a class="code" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) {
+<a name="l00088"></a><a class="code" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">00088</a>         <span class="keywordtype">void</span> <a class="code" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">acquire</a>( <a class="code" href="a00161.html">spin_mutex</a>& m ) {
 <a name="l00089"></a>00089 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00090"></a>00090 <span class="preprocessor"></span>            internal_acquire(m);
 <a name="l00091"></a>00091 <span class="preprocessor">#else</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
+<a name="l00092"></a>00092 <span class="preprocessor"></span>            my_unlock_value = __TBB_LockByte(m.<a class="code" href="a00161.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
 <a name="l00093"></a>00093             my_mutex = &m;
 <a name="l00094"></a>00094 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
 <a name="l00095"></a>00095         }
 <a name="l00096"></a>00096 
 <a name="l00098"></a>00098 
-<a name="l00099"></a><a class="code" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">00099</a>         <span class="keywordtype">bool</span> <a class="code" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>( <a class="code" href="a00157.html">spin_mutex</a>& m ) {
+<a name="l00099"></a><a class="code" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">00099</a>         <span class="keywordtype">bool</span> <a class="code" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">try_acquire</a>( <a class="code" href="a00161.html">spin_mutex</a>& m ) {
 <a name="l00100"></a>00100 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00101"></a>00101 <span class="preprocessor"></span>            <span class="keywordflow">return</span> internal_try_acquire(m);
 <a name="l00102"></a>00102 <span class="preprocessor">#else</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = __TBB_TryLockByte(m.<a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
+<a name="l00103"></a>00103 <span class="preprocessor"></span>            <span class="keywordtype">bool</span> result = __TBB_TryLockByte(m.<a class="code" href="a00161.html#81b0b05fb71280ce0c79708e82569d86">flag</a>);
 <a name="l00104"></a>00104             <span class="keywordflow">if</span>( result ) {
 <a name="l00105"></a>00105                 my_unlock_value = 0;
 <a name="l00106"></a>00106                 my_mutex = &m;
@@ -113,21 +113,21 @@
 <a name="l00109"></a>00109 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/</span>
 <a name="l00110"></a>00110         }
 <a name="l00111"></a>00111 
-<a name="l00113"></a><a class="code" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">00113</a>         <span class="keywordtype">void</span> <a class="code" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>() {
+<a name="l00113"></a><a class="code" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">00113</a>         <span class="keywordtype">void</span> <a class="code" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">release</a>() {
 <a name="l00114"></a>00114 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00115"></a>00115 <span class="preprocessor"></span>            internal_release();
 <a name="l00116"></a>00116 <span class="preprocessor">#else</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span>            __TBB_store_with_release(my_mutex-><a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
+<a name="l00117"></a>00117 <span class="preprocessor"></span>            __TBB_store_with_release(my_mutex-><a class="code" href="a00161.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
 <a name="l00118"></a>00118             my_mutex = NULL;
 <a name="l00119"></a>00119 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
 <a name="l00120"></a>00120         }
 <a name="l00121"></a>00121 
-<a name="l00123"></a><a class="code" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">00123</a>         <a class="code" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>() {
+<a name="l00123"></a><a class="code" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">00123</a>         <a class="code" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">~scoped_lock</a>() {
 <a name="l00124"></a>00124             <span class="keywordflow">if</span>( my_mutex ) {
 <a name="l00125"></a>00125 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00126"></a>00126 <span class="preprocessor"></span>                internal_release();
 <a name="l00127"></a>00127 <span class="preprocessor">#else</span>
-<a name="l00128"></a>00128 <span class="preprocessor"></span>                __TBB_store_with_release(my_mutex-><a class="code" href="a00157.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
+<a name="l00128"></a>00128 <span class="preprocessor"></span>                __TBB_store_with_release(my_mutex-><a class="code" href="a00161.html#81b0b05fb71280ce0c79708e82569d86">flag</a>, static_cast<unsigned char>(my_unlock_value));
 <a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
 <a name="l00130"></a>00130             }
 <a name="l00131"></a>00131         }
@@ -142,32 +142,32 @@
 <a name="l00140"></a>00140 
 <a name="l00141"></a>00141     <span class="comment">// ISO C++0x compatibility methods</span>
 <a name="l00142"></a>00142 
-<a name="l00144"></a><a class="code" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">00144</a>     <span class="keywordtype">void</span> <a class="code" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">lock</a>() {
+<a name="l00144"></a><a class="code" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">00144</a>     <span class="keywordtype">void</span> <a class="code" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">lock</a>() {
 <a name="l00145"></a>00145 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
 <a name="l00146"></a>00146 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00147"></a>00147         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00158.html">scoped_lock</a>(*<span class="keyword">this</span>);
+<a name="l00147"></a>00147         <span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00162.html">scoped_lock</a>(*<span class="keyword">this</span>);
 <a name="l00148"></a>00148 <span class="preprocessor">#else</span>
 <a name="l00149"></a>00149 <span class="preprocessor"></span>        __TBB_LockByte(flag);
 <a name="l00150"></a>00150 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS*/</span>
 <a name="l00151"></a>00151     }
 <a name="l00152"></a>00152 
 <a name="l00154"></a>00154 
-<a name="l00155"></a><a class="code" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">00155</a>     <span class="keywordtype">bool</span> <a class="code" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a>() {
+<a name="l00155"></a><a class="code" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">00155</a>     <span class="keywordtype">bool</span> <a class="code" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">try_lock</a>() {
 <a name="l00156"></a>00156 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
 <a name="l00157"></a>00157 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00158"></a>00158         <span class="keywordflow">return</span> (<span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00158.html">scoped_lock</a>)->internal_try_acquire(*<span class="keyword">this</span>);
+<a name="l00158"></a>00158         <span class="keywordflow">return</span> (<span class="keyword">new</span>(tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>()) <a class="code" href="a00162.html">scoped_lock</a>)->internal_try_acquire(*<span class="keyword">this</span>);
 <a name="l00159"></a>00159 <span class="preprocessor">#else</span>
 <a name="l00160"></a>00160 <span class="preprocessor"></span>        <span class="keywordflow">return</span> __TBB_TryLockByte(flag);
 <a name="l00161"></a>00161 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS*/</span>
 <a name="l00162"></a>00162     }
 <a name="l00163"></a>00163 
-<a name="l00165"></a><a class="code" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">00165</a>     <span class="keywordtype">void</span> <a class="code" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a>() {
+<a name="l00165"></a><a class="code" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">00165</a>     <span class="keywordtype">void</span> <a class="code" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">unlock</a>() {
 <a name="l00166"></a>00166 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
 <a name="l00167"></a>00167 <span class="preprocessor"></span>        <a class="code" href="a00116.html">aligned_space<scoped_lock,1></a> tmp;
-<a name="l00168"></a>00168         <a class="code" href="a00158.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
-<a name="l00169"></a>00169         s.<a class="code" href="a00158.html#d968921bed018503214f36e09007ee7b">my_mutex</a> = <span class="keyword">this</span>;
-<a name="l00170"></a>00170         s.<a class="code" href="a00158.html#0821c9dc231cd41586306fd54f701873">my_unlock_value</a> = 0;
-<a name="l00171"></a>00171         s.<a class="code" href="a00158.html#8f4d19aa2d6d112034d281eed0dab5fa">internal_release</a>();
+<a name="l00168"></a>00168         <a class="code" href="a00162.html">scoped_lock</a>& s = *tmp.<a class="code" href="a00116.html#0d702fc6b9e9d061ace3501b3c861cdf">begin</a>();
+<a name="l00169"></a>00169         s.<a class="code" href="a00162.html#d968921bed018503214f36e09007ee7b">my_mutex</a> = <span class="keyword">this</span>;
+<a name="l00170"></a>00170         s.<a class="code" href="a00162.html#0821c9dc231cd41586306fd54f701873">my_unlock_value</a> = 0;
+<a name="l00171"></a>00171         s.<a class="code" href="a00162.html#8f4d19aa2d6d112034d281eed0dab5fa">internal_release</a>();
 <a name="l00172"></a>00172 <span class="preprocessor">#else</span>
 <a name="l00173"></a>00173 <span class="preprocessor"></span>        __TBB_store_with_release(flag, 0);
 <a name="l00174"></a>00174 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS */</span>
diff --git a/doc/html/a00350.html b/doc/html/a00353.html
similarity index 89%
copy from doc/html/a00350.html
copy to doc/html/a00353.html
index cc37f5d..6b80feb 100644
--- a/doc/html/a00350.html
+++ b/doc/html/a00353.html
@@ -52,7 +52,7 @@
 <a name="l00031"></a>00031 <span class="keyword">typedef</span> spin_rw_mutex_v3 spin_rw_mutex;
 <a name="l00032"></a>00032 
 <a name="l00034"></a>00034 
-<a name="l00035"></a><a class="code" href="a00159.html">00035</a> <span class="keyword">class </span><a class="code" href="a00159.html">spin_rw_mutex_v3</a> {
+<a name="l00035"></a><a class="code" href="a00163.html">00035</a> <span class="keyword">class </span><a class="code" href="a00163.html">spin_rw_mutex_v3</a> {
 <a name="l00037"></a>00037 
 <a name="l00039"></a>00039     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_acquire_writer();
 <a name="l00040"></a>00040 
@@ -73,34 +73,34 @@
 <a name="l00062"></a>00062     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD internal_try_acquire_reader();
 <a name="l00063"></a>00063 
 <a name="l00065"></a>00065 <span class="keyword">public</span>:
-<a name="l00067"></a><a class="code" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">00067</a>     <a class="code" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>() : state(0) {
+<a name="l00067"></a><a class="code" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">00067</a>     <a class="code" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">spin_rw_mutex_v3</a>() : state(0) {
 <a name="l00068"></a>00068 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS</span>
 <a name="l00069"></a>00069 <span class="preprocessor"></span>        internal_construct();
 <a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
 <a name="l00071"></a>00071 <span class="preprocessor"></span>    }
 <a name="l00072"></a>00072 
 <a name="l00073"></a>00073 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00075"></a><a class="code" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">00075</a> <span class="preprocessor">    ~spin_rw_mutex_v3() {</span>
+<a name="l00075"></a><a class="code" href="a00163.html#9a815fb2759e55072ed413f1b6970cf3">00075</a> <span class="preprocessor">    ~spin_rw_mutex_v3() {</span>
 <a name="l00076"></a>00076 <span class="preprocessor"></span>        __TBB_ASSERT( !state, <span class="stringliteral">"destruction of an acquired mutex"</span>);
 <a name="l00077"></a>00077     };
 <a name="l00078"></a>00078 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
 <a name="l00079"></a>00079 
 <a name="l00081"></a>00081 
-<a name="l00083"></a><a class="code" href="a00160.html">00083</a>     <span class="keyword">class </span><a class="code" href="a00160.html">scoped_lock</a> : internal::no_copy {
+<a name="l00083"></a><a class="code" href="a00164.html">00083</a>     <span class="keyword">class </span><a class="code" href="a00164.html">scoped_lock</a> : internal::no_copy {
 <a name="l00084"></a>00084     <span class="keyword">public</span>:
 <a name="l00086"></a>00086 
-<a name="l00087"></a><a class="code" href="a00160.html#d6ea60dee5563f702379bf5e51aa8806">00087</a>         <a class="code" href="a00160.html">scoped_lock</a>() : <a class="code" href="a00142.html">mutex</a>(NULL) {}
+<a name="l00087"></a><a class="code" href="a00164.html#d6ea60dee5563f702379bf5e51aa8806">00087</a>         <a class="code" href="a00164.html">scoped_lock</a>() : <a class="code" href="a00142.html">mutex</a>(NULL), is_writer(false) {}
 <a name="l00088"></a>00088 
 <a name="l00090"></a>00090 
-<a name="l00091"></a><a class="code" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">00091</a>         <a class="code" href="a00160.html">scoped_lock</a>( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) : <a class="code" href="a00142.html">mutex</a>(NULL) {
-<a name="l00092"></a>00092             <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>(m, write);
+<a name="l00091"></a><a class="code" href="a00164.html#42a92d4f8fdde425b111cfa8a9228071">00091</a>         <a class="code" href="a00164.html">scoped_lock</a>( <a class="code" href="a00163.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) : <a class="code" href="a00142.html">mutex</a>(NULL) {
+<a name="l00092"></a>00092             <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>(m, write);
 <a name="l00093"></a>00093         }
 <a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">00096</a>         ~<a class="code" href="a00160.html">scoped_lock</a>() {
-<a name="l00097"></a>00097             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>();
+<a name="l00096"></a><a class="code" href="a00164.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">00096</a>         ~<a class="code" href="a00164.html">scoped_lock</a>() {
+<a name="l00097"></a>00097             <span class="keywordflow">if</span>( <a class="code" href="a00142.html">mutex</a> ) <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>();
 <a name="l00098"></a>00098         }
 <a name="l00099"></a>00099 
-<a name="l00101"></a><a class="code" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">00101</a>         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
+<a name="l00101"></a><a class="code" href="a00164.html#b0b646ec5be02a127d159bbb7ca65353">00101</a>         <span class="keywordtype">void</span> <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">acquire</a>( <a class="code" href="a00163.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
 <a name="l00102"></a>00102             __TBB_ASSERT( !<a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
 <a name="l00103"></a>00103             is_writer = write; 
 <a name="l00104"></a>00104             <a class="code" href="a00142.html">mutex</a> = &m;
@@ -109,27 +109,27 @@
 <a name="l00107"></a>00107         }
 <a name="l00108"></a>00108 
 <a name="l00110"></a>00110 
-<a name="l00111"></a><a class="code" href="a00160.html#3f0b1e3f2efab63336400348bd070226">00111</a>         <span class="keywordtype">bool</span> upgrade_to_writer() {
+<a name="l00111"></a><a class="code" href="a00164.html#3f0b1e3f2efab63336400348bd070226">00111</a>         <span class="keywordtype">bool</span> upgrade_to_writer() {
 <a name="l00112"></a>00112             __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
 <a name="l00113"></a>00113             __TBB_ASSERT( !is_writer, <span class="stringliteral">"not a reader"</span> );
 <a name="l00114"></a>00114             is_writer = <span class="keyword">true</span>; 
 <a name="l00115"></a>00115             <span class="keywordflow">return</span> <a class="code" href="a00142.html">mutex</a>->internal_upgrade();
 <a name="l00116"></a>00116         }
 <a name="l00117"></a>00117 
-<a name="l00119"></a><a class="code" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">00119</a>         <span class="keywordtype">void</span> <a class="code" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
+<a name="l00119"></a><a class="code" href="a00164.html#61b14d00a78185c9b2d206ebfc379124">00119</a>         <span class="keywordtype">void</span> <a class="code" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">release</a>() {
 <a name="l00120"></a>00120             __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
-<a name="l00121"></a>00121             <a class="code" href="a00159.html">spin_rw_mutex</a> *m = <a class="code" href="a00142.html">mutex</a>; 
+<a name="l00121"></a>00121             <a class="code" href="a00163.html">spin_rw_mutex</a> *m = <a class="code" href="a00142.html">mutex</a>; 
 <a name="l00122"></a>00122             <a class="code" href="a00142.html">mutex</a> = NULL;
 <a name="l00123"></a>00123 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00124"></a>00124 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) m->internal_release_writer();
 <a name="l00125"></a>00125             <span class="keywordflow">else</span>            m->internal_release_reader();
 <a name="l00126"></a>00126 <span class="preprocessor">#else</span>
-<a name="l00127"></a>00127 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) __TBB_AtomicAND( &m-><a class="code" href="a00159.html#621b900d5fef23d2e401aabcbb777c76">state</a>, READERS ); 
-<a name="l00128"></a>00128             <span class="keywordflow">else</span>            __TBB_FetchAndAddWrelease( &m-><a class="code" href="a00159.html#621b900d5fef23d2e401aabcbb777c76">state</a>, -(intptr_t)ONE_READER);
+<a name="l00127"></a>00127 <span class="preprocessor"></span>            <span class="keywordflow">if</span>( is_writer ) __TBB_AtomicAND( &m-><a class="code" href="a00163.html#621b900d5fef23d2e401aabcbb777c76">state</a>, READERS ); 
+<a name="l00128"></a>00128             <span class="keywordflow">else</span>            __TBB_FetchAndAddWrelease( &m-><a class="code" href="a00163.html#621b900d5fef23d2e401aabcbb777c76">state</a>, -(intptr_t)ONE_READER);
 <a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
 <a name="l00130"></a>00130         }
 <a name="l00131"></a>00131 
-<a name="l00133"></a><a class="code" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">00133</a>         <span class="keywordtype">bool</span> downgrade_to_reader() {
+<a name="l00133"></a><a class="code" href="a00164.html#c2c2c38a08cb9080e87099fac3e5bc94">00133</a>         <span class="keywordtype">bool</span> downgrade_to_reader() {
 <a name="l00134"></a>00134 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00135"></a>00135 <span class="preprocessor"></span>            __TBB_ASSERT( <a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"lock is not acquired"</span> );
 <a name="l00136"></a>00136             __TBB_ASSERT( is_writer, <span class="stringliteral">"not a writer"</span> );
@@ -142,7 +142,7 @@
 <a name="l00143"></a>00143             <span class="keywordflow">return</span> <span class="keyword">true</span>;
 <a name="l00144"></a>00144         }
 <a name="l00145"></a>00145 
-<a name="l00147"></a><a class="code" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">00147</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00159.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
+<a name="l00147"></a><a class="code" href="a00164.html#9879626968d9b9a04cd2ec0fb2e84ae1">00147</a>         <span class="keywordtype">bool</span> try_acquire( <a class="code" href="a00163.html">spin_rw_mutex</a>& m, <span class="keywordtype">bool</span> write = <span class="keyword">true</span> ) {
 <a name="l00148"></a>00148             __TBB_ASSERT( !<a class="code" href="a00142.html">mutex</a>, <span class="stringliteral">"holding mutex already"</span> );
 <a name="l00149"></a>00149             <span class="keywordtype">bool</span> result;
 <a name="l00150"></a>00150             is_writer = write; 
@@ -154,7 +154,7 @@
 <a name="l00156"></a>00156         }
 <a name="l00157"></a>00157 
 <a name="l00158"></a>00158     <span class="keyword">private</span>:
-<a name="l00160"></a>00160         <a class="code" href="a00159.html">spin_rw_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
+<a name="l00160"></a>00160         <a class="code" href="a00163.html">spin_rw_mutex</a>* <a class="code" href="a00142.html">mutex</a>;
 <a name="l00161"></a>00161 
 <a name="l00163"></a>00163 
 <a name="l00164"></a>00164         <span class="keywordtype">bool</span> is_writer;
@@ -167,12 +167,12 @@
 <a name="l00171"></a>00171 
 <a name="l00172"></a>00172     <span class="comment">// ISO C++0x compatibility methods</span>
 <a name="l00173"></a>00173 
-<a name="l00175"></a><a class="code" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">00175</a>     <span class="keywordtype">void</span> lock() {internal_acquire_writer();}
+<a name="l00175"></a><a class="code" href="a00163.html#4007d6e1523dbc3c2bb7f889ab789a8a">00175</a>     <span class="keywordtype">void</span> lock() {internal_acquire_writer();}
 <a name="l00176"></a>00176 
 <a name="l00178"></a>00178 
-<a name="l00179"></a><a class="code" href="a00159.html#088bb256be794cc47d3b83791632fdfc">00179</a>     <span class="keywordtype">bool</span> try_lock() {<span class="keywordflow">return</span> internal_try_acquire_writer();}
+<a name="l00179"></a><a class="code" href="a00163.html#088bb256be794cc47d3b83791632fdfc">00179</a>     <span class="keywordtype">bool</span> try_lock() {<span class="keywordflow">return</span> internal_try_acquire_writer();}
 <a name="l00180"></a>00180 
-<a name="l00182"></a><a class="code" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">00182</a>     <span class="keywordtype">void</span> unlock() {
+<a name="l00182"></a><a class="code" href="a00163.html#f9f52ead2098eb5fb12da59d5ae53b55">00182</a>     <span class="keywordtype">void</span> unlock() {
 <a name="l00183"></a>00183 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
 <a name="l00184"></a>00184 <span class="preprocessor"></span>        <span class="keywordflow">if</span>( state&WRITER ) internal_release_writer();
 <a name="l00185"></a>00185         <span class="keywordflow">else</span>               internal_release_reader();
@@ -184,10 +184,10 @@
 <a name="l00191"></a>00191 
 <a name="l00192"></a>00192     <span class="comment">// Methods for reader locks that resemble ISO C++0x compatibility methods.</span>
 <a name="l00193"></a>00193 
-<a name="l00195"></a><a class="code" href="a00159.html#13f799708ac4ca437a16be202e263e18">00195</a>     <span class="keywordtype">void</span> lock_read() {internal_acquire_reader();}
+<a name="l00195"></a><a class="code" href="a00163.html#13f799708ac4ca437a16be202e263e18">00195</a>     <span class="keywordtype">void</span> lock_read() {internal_acquire_reader();}
 <a name="l00196"></a>00196 
 <a name="l00198"></a>00198 
-<a name="l00199"></a><a class="code" href="a00159.html#b8667415869013f840d976aa406d385a">00199</a>     <span class="keywordtype">bool</span> try_lock_read() {<span class="keywordflow">return</span> internal_try_acquire_reader();}
+<a name="l00199"></a><a class="code" href="a00163.html#b8667415869013f840d976aa406d385a">00199</a>     <span class="keywordtype">bool</span> try_lock_read() {<span class="keywordflow">return</span> internal_try_acquire_reader();}
 <a name="l00200"></a>00200 
 <a name="l00201"></a>00201 <span class="keyword">private</span>:
 <a name="l00202"></a>00202     <span class="keyword">typedef</span> intptr_t state_t;
diff --git a/doc/html/a00354.html b/doc/html/a00354.html
new file mode 100644
index 0000000..9ffb04a
--- /dev/null
+++ b/doc/html/a00354.html
@@ -0,0 +1,611 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>task.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="files.html"><span>File List</span></a></li>
+    <li><a href="globals.html"><span>File Members</span></a></li>
+  </ul></div>
+<h1>task.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
+<a name="l00003"></a>00003 <span class="comment"></span>
+<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+<a name="l00018"></a>00018 <span class="comment">    writing.</span>
+<a name="l00019"></a>00019 <span class="comment">*/</span>
+<a name="l00020"></a>00020 
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "tbb_machine.h"</span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
+<a name="l00028"></a>00028 
+<a name="l00029"></a>00029 <span class="keyword">class </span>task;
+<a name="l00030"></a>00030 <span class="keyword">class </span>task_list;
+<a name="l00031"></a>00031 
+<a name="l00032"></a>00032 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="keyword">class </span>task_group_context;
+<a name="l00034"></a>00034 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00035"></a>00035 
+<a name="l00037"></a>00037 <span class="keyword">namespace </span>internal {
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039     <span class="keyword">class </span>scheduler: no_copy {
+<a name="l00040"></a>00040     <span class="keyword">public</span>:
+<a name="l00042"></a>00042         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn( task& first, task*& next ) = 0;
+<a name="l00043"></a>00043 
+<a name="l00045"></a>00045         <span class="keyword">virtual</span> <span class="keywordtype">void</span> wait_for_all( task& parent, task* child ) = 0;
+<a name="l00046"></a>00046 
+<a name="l00048"></a>00048         <span class="keyword">virtual</span> <span class="keywordtype">void</span> spawn_root_and_wait( task& first, task*& next ) = 0;
+<a name="l00049"></a>00049 
+<a name="l00051"></a>00051         <span class="comment">//  Have to have it just to shut up overzealous compilation warnings</span>
+<a name="l00052"></a>00052         <span class="keyword">virtual</span> ~scheduler() = 0;
+<a name="l00053"></a>00053     };
+<a name="l00054"></a>00054 
+<a name="l00056"></a>00056 
+<a name="l00057"></a>00057     <span class="keyword">typedef</span> intptr reference_count;
+<a name="l00058"></a>00058 
+<a name="l00060"></a>00060     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> affinity_id;
+<a name="l00061"></a>00061 
+<a name="l00062"></a>00062 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span>    <span class="keyword">struct </span>context_list_node_t {
+<a name="l00064"></a>00064         context_list_node_t *my_prev,
+<a name="l00065"></a>00065                             *my_next;
+<a name="l00066"></a>00066     };
+<a name="l00067"></a>00067 
+<a name="l00068"></a>00068     <span class="keyword">class </span>allocate_root_with_context_proxy: no_assign {
+<a name="l00069"></a>00069         task_group_context& my_context;
+<a name="l00070"></a>00070     <span class="keyword">public</span>:
+<a name="l00071"></a>00071         allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {}
+<a name="l00072"></a>00072         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
+<a name="l00073"></a>00073         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
+<a name="l00074"></a>00074     };
+<a name="l00075"></a>00075 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077     <span class="keyword">class </span>allocate_root_proxy: no_assign {
+<a name="l00078"></a>00078     <span class="keyword">public</span>:
+<a name="l00079"></a>00079         <span class="keyword">static</span> task& __TBB_EXPORTED_FUNC allocate( size_t size );
+<a name="l00080"></a>00080         <span class="keyword">static</span> <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC free( task& );
+<a name="l00081"></a>00081     };
+<a name="l00082"></a>00082 
+<a name="l00083"></a>00083     <span class="keyword">class </span>allocate_continuation_proxy: no_assign {
+<a name="l00084"></a>00084     <span class="keyword">public</span>:
+<a name="l00085"></a>00085         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
+<a name="l00086"></a>00086         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
+<a name="l00087"></a>00087     };
+<a name="l00088"></a>00088 
+<a name="l00089"></a>00089     <span class="keyword">class </span>allocate_child_proxy: no_assign {
+<a name="l00090"></a>00090     <span class="keyword">public</span>:
+<a name="l00091"></a>00091         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
+<a name="l00092"></a>00092         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
+<a name="l00093"></a>00093     };
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095     <span class="keyword">class </span>allocate_additional_child_of_proxy: no_assign {
+<a name="l00096"></a>00096         task& <span class="keyword">self</span>;
+<a name="l00097"></a>00097         task& parent;
+<a name="l00098"></a>00098     <span class="keyword">public</span>:
+<a name="l00099"></a>00099         allocate_additional_child_of_proxy( task& self_, task& parent_ ) : self(self_), parent(parent_) {}
+<a name="l00100"></a>00100         task& __TBB_EXPORTED_METHOD allocate( size_t size ) <span class="keyword">const</span>;
+<a name="l00101"></a>00101         <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD free( task& ) <span class="keyword">const</span>;
+<a name="l00102"></a>00102     };
+<a name="l00103"></a>00103 
+<a name="l00104"></a>00104     <span class="keyword">class </span>task_group_base;
+<a name="l00105"></a>00105 
+<a name="l00107"></a>00107 
+<a name="l00112"></a>00112     <span class="keyword">class </span>task_prefix {
+<a name="l00113"></a>00113     <span class="keyword">private</span>:
+<a name="l00114"></a>00114         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00166.html">tbb::task</a>;
+<a name="l00115"></a>00115         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00168.html">tbb::task_list</a>;
+<a name="l00116"></a>00116         <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
+<a name="l00117"></a>00117         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
+<a name="l00118"></a>00118         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
+<a name="l00119"></a>00119         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
+<a name="l00120"></a>00120         <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
+<a name="l00121"></a>00121         <span class="keyword">friend</span> <span class="keyword">class </span>internal::task_group_base;
+<a name="l00122"></a>00122 
+<a name="l00123"></a>00123 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00125"></a>00125 <span class="preprocessor"></span>
+<a name="l00128"></a>00128 <span class="preprocessor">        task_group_context  *context;</span>
+<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00130"></a>00130         
+<a name="l00132"></a>00132 
+<a name="l00137"></a>00137         scheduler* origin;
+<a name="l00138"></a>00138 
+<a name="l00140"></a>00140         scheduler* owner;
+<a name="l00141"></a>00141 
+<a name="l00143"></a>00143 
+<a name="l00146"></a>00146         <a class="code" href="a00166.html">tbb::task</a>* parent;
+<a name="l00147"></a>00147 
+<a name="l00149"></a>00149 
+<a name="l00153"></a>00153         reference_count ref_count;
+<a name="l00154"></a>00154 
+<a name="l00156"></a>00156 
+<a name="l00157"></a>00157         <span class="keywordtype">int</span> depth;
+<a name="l00158"></a>00158 
+<a name="l00160"></a>00160 
+<a name="l00161"></a>00161         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> state;
+<a name="l00162"></a>00162 
+<a name="l00164"></a>00164 
+<a name="l00168"></a>00168         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> extra_state;
+<a name="l00169"></a>00169 
+<a name="l00170"></a>00170         affinity_id affinity;
+<a name="l00171"></a>00171 
+<a name="l00173"></a>00173         <a class="code" href="a00166.html">tbb::task</a>* next;
+<a name="l00174"></a>00174 
+<a name="l00176"></a>00176         <a class="code" href="a00166.html">tbb::task</a>& task() {<span class="keywordflow">return</span> *reinterpret_cast<tbb::task*>(<span class="keyword">this</span>+1);}
+<a name="l00177"></a>00177     };
+<a name="l00178"></a>00178 
+<a name="l00179"></a>00179 } <span class="comment">// namespace internal</span>
+<a name="l00181"></a>00181 <span class="comment"></span>
+<a name="l00182"></a>00182 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00183"></a>00183 <span class="preprocessor"></span>
+<a name="l00184"></a>00184 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
+<a name="l00185"></a>00185 <span class="preprocessor"></span>    <span class="keyword">class </span>tbb_exception;
+<a name="l00186"></a>00186 <span class="preprocessor">#else</span>
+<a name="l00187"></a>00187 <span class="preprocessor"></span>    <span class="keyword">namespace </span>internal {
+<a name="l00188"></a>00188         <span class="keyword">class </span>tbb_exception_ptr;
+<a name="l00189"></a>00189     }
+<a name="l00190"></a>00190 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
+<a name="l00191"></a>00191 
+<a name="l00193"></a>00193 
+<a name="l00213"></a><a class="code" href="a00167.html">00213</a> <span class="keyword">class </span><a class="code" href="a00167.html">task_group_context</a> : internal::no_copy
+<a name="l00214"></a>00214 {
+<a name="l00215"></a>00215 <span class="keyword">private</span>:
+<a name="l00216"></a>00216 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
+<a name="l00217"></a>00217 <span class="preprocessor"></span>    <span class="keyword">typedef</span> <a class="code" href="a00172.html">tbb_exception</a> <a class="code" href="a00172.html">exception_container_type</a>;
+<a name="l00218"></a>00218 <span class="preprocessor">#else</span>
+<a name="l00219"></a>00219 <span class="preprocessor"></span>    <span class="keyword">typedef</span> <a class="code" href="a00173.html">internal::tbb_exception_ptr</a> <a class="code" href="a00172.html">exception_container_type</a>;
+<a name="l00220"></a>00220 <span class="preprocessor">#endif</span>
+<a name="l00221"></a>00221 <span class="preprocessor"></span>
+<a name="l00222"></a>00222     <span class="keyword">enum</span> version_traits_word_layout {
+<a name="l00223"></a>00223         traits_offset = 16,
+<a name="l00224"></a>00224         version_mask = 0xFFFF,
+<a name="l00225"></a>00225         traits_mask = 0xFFFFul << traits_offset
+<a name="l00226"></a>00226     };
+<a name="l00227"></a>00227 
+<a name="l00228"></a>00228 <span class="keyword">public</span>:
+<a name="l00229"></a>00229     <span class="keyword">enum</span> kind_type {
+<a name="l00230"></a>00230         isolated,
+<a name="l00231"></a>00231         bound
+<a name="l00232"></a>00232     };
+<a name="l00233"></a>00233 
+<a name="l00234"></a>00234     <span class="keyword">enum</span> traits_type {
+<a name="l00235"></a>00235         exact_exception = 0x0001ul << traits_offset,
+<a name="l00236"></a>00236         no_cancellation = 0x0002ul << traits_offset,
+<a name="l00237"></a>00237         concurrent_wait = 0x0004ul << traits_offset,
+<a name="l00238"></a>00238 <span class="preprocessor">#if TBB_USE_CAPTURED_EXCEPTION</span>
+<a name="l00239"></a>00239 <span class="preprocessor"></span>        default_traits = 0
+<a name="l00240"></a>00240 <span class="preprocessor">#else</span>
+<a name="l00241"></a>00241 <span class="preprocessor"></span>        default_traits = exact_exception
+<a name="l00242"></a>00242 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
+<a name="l00243"></a>00243     };
+<a name="l00244"></a>00244 
+<a name="l00245"></a>00245 <span class="keyword">private</span>:
+<a name="l00246"></a>00246     <span class="keyword">union </span>{
+<a name="l00248"></a>00248         kind_type my_kind;
+<a name="l00249"></a>00249         uintptr_t _my_kind_aligner;
+<a name="l00250"></a>00250     };
+<a name="l00251"></a>00251 
+<a name="l00253"></a>00253     <a class="code" href="a00167.html">task_group_context</a> *my_parent;
+<a name="l00254"></a>00254 
+<a name="l00256"></a>00256 
+<a name="l00258"></a>00258     internal::context_list_node_t my_node;
+<a name="l00259"></a>00259 
+<a name="l00261"></a>00261 
+<a name="l00264"></a>00264     <span class="keywordtype">char</span> _leading_padding[internal::NFS_MaxLineSize - 
+<a name="l00265"></a>00265                     2 * <span class="keyword">sizeof</span>(uintptr_t)- <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*) - <span class="keyword">sizeof</span>(internal::context_list_node_t)];
+<a name="l00266"></a>00266     
+<a name="l00268"></a>00268     uintptr_t my_cancellation_requested;
+<a name="l00269"></a>00269     
+<a name="l00271"></a>00271 
+<a name="l00274"></a>00274     uintptr_t  my_version_and_traits;
+<a name="l00275"></a>00275 
+<a name="l00277"></a>00277     <a class="code" href="a00172.html">exception_container_type</a> *my_exception;
+<a name="l00278"></a>00278 
+<a name="l00280"></a>00280 
+<a name="l00283"></a>00283     <span class="keywordtype">void</span> *my_owner;
+<a name="l00284"></a>00284 
+<a name="l00286"></a>00286 
+<a name="l00287"></a>00287     <span class="keywordtype">char</span> _trailing_padding[internal::NFS_MaxLineSize - <span class="keyword">sizeof</span>(intptr_t) - 2 * <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*)];
+<a name="l00288"></a>00288 
+<a name="l00289"></a>00289 <span class="keyword">public</span>:
+<a name="l00291"></a>00291 
+<a name="l00318"></a><a class="code" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">00318</a>     <a class="code" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">task_group_context</a> ( kind_type relation_with_parent = bound,
+<a name="l00319"></a>00319                          uintptr_t traits = default_traits )
+<a name="l00320"></a>00320         : my_kind(relation_with_parent)
+<a name="l00321"></a>00321         , my_version_and_traits(1 | traits)
+<a name="l00322"></a>00322     {
+<a name="l00323"></a>00323         <a class="code" href="a00167.html#49a55352084fd44b8863d182e839e6dc">init</a>();
+<a name="l00324"></a>00324     }
+<a name="l00325"></a>00325 
+<a name="l00326"></a>00326     __TBB_EXPORTED_METHOD ~<a class="code" href="a00167.html">task_group_context</a> ();
+<a name="l00327"></a>00327 
+<a name="l00329"></a>00329 
+<a name="l00336"></a>00336     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00167.html#6d30d16bf1cd22f86c6afaf29c2b430c">reset</a> ();
+<a name="l00337"></a>00337 
+<a name="l00339"></a>00339 
+<a name="l00346"></a>00346     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00167.html#8bcdfdf4e6bfb76125b6de15c00b571d">cancel_group_execution</a> ();
+<a name="l00347"></a>00347 
+<a name="l00349"></a>00349     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD <a class="code" href="a00167.html#4db72f16210b0a991b2c134d6763a4cc">is_group_execution_cancelled</a> () <span class="keyword">const</span>;
+<a name="l00350"></a>00350 
+<a name="l00352"></a>00352 
+<a name="l00358"></a>00358     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00167.html#d97c8a03615594b71b4ef06ff75cf561">register_pending_exception</a> ();
+<a name="l00359"></a>00359 
+<a name="l00360"></a>00360 <span class="keyword">protected</span>:
+<a name="l00362"></a>00362 
+<a name="l00363"></a>00363     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00167.html#49a55352084fd44b8863d182e839e6dc">init</a> ();
+<a name="l00364"></a>00364 
+<a name="l00365"></a>00365 <span class="keyword">private</span>:
+<a name="l00366"></a>00366     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00166.html">task</a>;
+<a name="l00367"></a>00367     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
+<a name="l00368"></a>00368 
+<a name="l00369"></a>00369     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_required = bound;
+<a name="l00370"></a>00370     <span class="keyword">static</span> <span class="keyword">const</span> kind_type binding_completed = kind_type(bound+1);
+<a name="l00371"></a>00371 
+<a name="l00374"></a>00374     <span class="keywordtype">void</span> propagate_cancellation_from_ancestors ();
+<a name="l00375"></a>00375 
+<a name="l00377"></a>00377     <span class="keywordtype">bool</span> is_alive () { 
+<a name="l00378"></a>00378 <span class="preprocessor">#if TBB_USE_DEBUG</span>
+<a name="l00379"></a>00379 <span class="preprocessor"></span>        <span class="keywordflow">return</span> my_version_and_traits != 0xDeadBeef;
+<a name="l00380"></a>00380 <span class="preprocessor">#else</span>
+<a name="l00381"></a>00381 <span class="preprocessor"></span>        <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00382"></a>00382 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_DEBUG */</span>
+<a name="l00383"></a>00383     }
+<a name="l00384"></a>00384 }; <span class="comment">// class task_group_context</span>
+<a name="l00385"></a>00385 
+<a name="l00386"></a>00386 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00387"></a>00387 
+<a name="l00389"></a>00389 
+<a name="l00390"></a><a class="code" href="a00166.html">00390</a> <span class="keyword">class </span><a class="code" href="a00166.html">task</a>: internal::no_copy {
+<a name="l00392"></a>00392     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD internal_set_ref_count( <span class="keywordtype">int</span> count );
+<a name="l00393"></a>00393 
+<a name="l00395"></a>00395     internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count();
+<a name="l00396"></a>00396 
+<a name="l00397"></a>00397 <span class="keyword">protected</span>:
+<a name="l00399"></a><a class="code" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">00399</a>     <a class="code" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>() {prefix().extra_state=1;}
+<a name="l00400"></a>00400 
+<a name="l00401"></a>00401 <span class="keyword">public</span>:
+<a name="l00403"></a><a class="code" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">00403</a>     <span class="keyword">virtual</span> <a class="code" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">~task</a>() {}
+<a name="l00404"></a>00404 
+<a name="l00406"></a>00406     <span class="keyword">virtual</span> <a class="code" href="a00166.html">task</a>* <a class="code" href="a00166.html#22c298cd40937a431a06777423f002f6">execute</a>() = 0;
+<a name="l00407"></a>00407 
+<a name="l00409"></a><a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e">00409</a>     <span class="keyword">enum</span> <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> {
+<a name="l00411"></a>00411         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">executing</a>,
+<a name="l00413"></a>00413         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">reexecute</a>,
+<a name="l00415"></a>00415         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">ready</a>,
+<a name="l00417"></a>00417         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">allocated</a>,
+<a name="l00419"></a>00419         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">freed</a>,
+<a name="l00421"></a>00421         <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">recycle</a>
+<a name="l00422"></a>00422     };
+<a name="l00423"></a>00423 
+<a name="l00424"></a>00424     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00425"></a>00425     <span class="comment">// Allocating tasks</span>
+<a name="l00426"></a>00426     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00427"></a>00427 
+<a name="l00429"></a><a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">00429</a>     <span class="keyword">static</span> internal::allocate_root_proxy <a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">allocate_root</a>() {
+<a name="l00430"></a>00430         <span class="keywordflow">return</span> internal::allocate_root_proxy();
+<a name="l00431"></a>00431     }
+<a name="l00432"></a>00432 
+<a name="l00433"></a>00433 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00435"></a><a class="code" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">00435</a> <span class="preprocessor">    static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) {</span>
+<a name="l00436"></a>00436 <span class="preprocessor"></span>        <span class="keywordflow">return</span> internal::allocate_root_with_context_proxy(ctx);
+<a name="l00437"></a>00437     }
+<a name="l00438"></a>00438 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00439"></a>00439 
+<a name="l00441"></a>00441 
+<a name="l00442"></a><a class="code" href="a00166.html#1434c79a5138993269d034008bff7329">00442</a>     internal::allocate_continuation_proxy& allocate_continuation() {
+<a name="l00443"></a>00443         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_continuation_proxy*>(<span class="keyword">this</span>);
+<a name="l00444"></a>00444     }
+<a name="l00445"></a>00445 
+<a name="l00447"></a><a class="code" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">00447</a>     internal::allocate_child_proxy& allocate_child() {
+<a name="l00448"></a>00448         <span class="keywordflow">return</span> *reinterpret_cast<internal::allocate_child_proxy*>(<span class="keyword">this</span>);
+<a name="l00449"></a>00449     }
+<a name="l00450"></a>00450 
+<a name="l00452"></a>00452 
+<a name="l00454"></a><a class="code" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">00454</a>     internal::allocate_additional_child_of_proxy allocate_additional_child_of( <a class="code" href="a00166.html">task</a>& t ) {
+<a name="l00455"></a>00455         <span class="keywordflow">return</span> internal::allocate_additional_child_of_proxy(*<span class="keyword">this</span>,t);
+<a name="l00456"></a>00456     }
+<a name="l00457"></a>00457 
+<a name="l00459"></a>00459 
+<a name="l00463"></a>00463     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD destroy( <a class="code" href="a00166.html">task</a>& victim );
+<a name="l00464"></a>00464 
+<a name="l00465"></a>00465     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00466"></a>00466     <span class="comment">// Recycling of tasks</span>
+<a name="l00467"></a>00467     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00468"></a>00468 
+<a name="l00470"></a>00470 
+<a name="l00476"></a><a class="code" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">00476</a>     <span class="keywordtype">void</span> recycle_as_continuation() {
+<a name="l00477"></a>00477         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
+<a name="l00478"></a>00478         prefix().state = allocated;
+<a name="l00479"></a>00479     }
+<a name="l00480"></a>00480 
+<a name="l00482"></a>00482 
+<a name="l00483"></a><a class="code" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">00483</a>     <span class="keywordtype">void</span> recycle_as_safe_continuation() {
+<a name="l00484"></a>00484         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running?"</span> );
+<a name="l00485"></a>00485         prefix().state = recycle;
+<a name="l00486"></a>00486     }
+<a name="l00487"></a>00487 
+<a name="l00489"></a><a class="code" href="a00166.html#db399855177438bbc9cc61d508dae8d2">00489</a>     <span class="keywordtype">void</span> recycle_as_child_of( <a class="code" href="a00166.html">task</a>& new_parent ) {
+<a name="l00490"></a>00490         internal::task_prefix& p = prefix();
+<a name="l00491"></a>00491         __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, <span class="stringliteral">"execute not running, or already recycled"</span> );
+<a name="l00492"></a>00492         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled as a child"</span> );
+<a name="l00493"></a>00493         __TBB_ASSERT( p.parent==NULL, <span class="stringliteral">"parent must be null"</span> );
+<a name="l00494"></a>00494         __TBB_ASSERT( new_parent.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state<=recycle, <span class="stringliteral">"corrupt parent's state"</span> );
+<a name="l00495"></a>00495         __TBB_ASSERT( new_parent.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().state!=freed, <span class="stringliteral">"parent already freed"</span> );
+<a name="l00496"></a>00496         p.state = allocated;
+<a name="l00497"></a>00497         p.parent = &new_parent;
+<a name="l00498"></a>00498 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00499"></a>00499 <span class="preprocessor"></span>        p.<a class="code" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">context</a> = new_parent.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().context;
+<a name="l00500"></a>00500 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00501"></a>00501     }
+<a name="l00502"></a>00502 
+<a name="l00504"></a>00504 
+<a name="l00505"></a><a class="code" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">00505</a>     <span class="keywordtype">void</span> recycle_to_reexecute() {
+<a name="l00506"></a>00506         __TBB_ASSERT( prefix().state==executing, <span class="stringliteral">"execute not running, or already recycled"</span> );
+<a name="l00507"></a>00507         __TBB_ASSERT( prefix().ref_count==0, <span class="stringliteral">"no child tasks allowed when recycled for reexecution"</span> );
+<a name="l00508"></a>00508         prefix().state = reexecute;
+<a name="l00509"></a>00509     }
+<a name="l00510"></a>00510 
+<a name="l00511"></a>00511     <span class="comment">// All depth-related methods are obsolete, and are retained for the sake </span>
+<a name="l00512"></a>00512     <span class="comment">// of backward source compatibility only</span>
+<a name="l00513"></a>00513     intptr_t depth()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 0;}
+<a name="l00514"></a>00514     <span class="keywordtype">void</span> set_depth( intptr_t ) {}
+<a name="l00515"></a>00515     <span class="keywordtype">void</span> add_to_depth( <span class="keywordtype">int</span> ) {}
+<a name="l00516"></a>00516 
+<a name="l00517"></a>00517 
+<a name="l00518"></a>00518     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00519"></a>00519     <span class="comment">// Spawning and blocking</span>
+<a name="l00520"></a>00520     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00521"></a>00521 
+<a name="l00523"></a><a class="code" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">00523</a>     <span class="keywordtype">void</span> set_ref_count( <span class="keywordtype">int</span> count ) {
+<a name="l00524"></a>00524 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
+<a name="l00525"></a>00525 <span class="preprocessor"></span>        internal_set_ref_count(count);
+<a name="l00526"></a>00526 <span class="preprocessor">#else</span>
+<a name="l00527"></a>00527 <span class="preprocessor"></span>        prefix().ref_count = count;
+<a name="l00528"></a>00528 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
+<a name="l00529"></a>00529     }
+<a name="l00530"></a>00530 
+<a name="l00532"></a>00532 
+<a name="l00533"></a><a class="code" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">00533</a>     <span class="keywordtype">void</span> increment_ref_count() {
+<a name="l00534"></a>00534         __TBB_FetchAndIncrementWacquire( &prefix().ref_count );
+<a name="l00535"></a>00535     }
+<a name="l00536"></a>00536 
+<a name="l00538"></a>00538 
+<a name="l00539"></a><a class="code" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">00539</a>     <span class="keywordtype">int</span> decrement_ref_count() {
+<a name="l00540"></a>00540 <span class="preprocessor">#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT</span>
+<a name="l00541"></a>00541 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(internal_decrement_ref_count());
+<a name="l00542"></a>00542 <span class="preprocessor">#else</span>
+<a name="l00543"></a>00543 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(__TBB_FetchAndDecrementWrelease( &prefix().ref_count ))-1;
+<a name="l00544"></a>00544 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */</span>
+<a name="l00545"></a>00545     }
+<a name="l00546"></a>00546 
+<a name="l00548"></a>00548 
+<a name="l00552"></a><a class="code" href="a00166.html#f7737143d458f1ed1c0d7da3971d9e6b">00552</a>     <span class="keywordtype">void</span> spawn( <a class="code" href="a00166.html">task</a>& child ) {
+<a name="l00553"></a>00553         prefix().owner->spawn( child, child.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
+<a name="l00554"></a>00554     }
+<a name="l00555"></a>00555 
+<a name="l00557"></a>00557     <span class="keywordtype">void</span> spawn( <a class="code" href="a00168.html">task_list</a>& list );
+<a name="l00558"></a>00558 
+<a name="l00560"></a><a class="code" href="a00166.html#3ce28ca9baa771cfc37ecd72e69c4f3c">00560</a>     <span class="keywordtype">void</span> spawn_and_wait_for_all( <a class="code" href="a00166.html">task</a>& child ) {
+<a name="l00561"></a>00561         prefix().owner->wait_for_all( *<span class="keyword">this</span>, &child );
+<a name="l00562"></a>00562     }
+<a name="l00563"></a>00563 
+<a name="l00565"></a>00565     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD spawn_and_wait_for_all( <a class="code" href="a00168.html">task_list</a>& list );
+<a name="l00566"></a>00566 
+<a name="l00568"></a>00568 
+<a name="l00570"></a><a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">00570</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00166.html">task</a>& root ) {
+<a name="l00571"></a>00571         root.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().owner->spawn_root_and_wait( root, root.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next );
+<a name="l00572"></a>00572     }
+<a name="l00573"></a>00573 
+<a name="l00575"></a>00575 
+<a name="l00577"></a>00577     <span class="keyword">static</span> <span class="keywordtype">void</span> spawn_root_and_wait( <a class="code" href="a00168.html">task_list</a>& root_list );
+<a name="l00578"></a>00578 
+<a name="l00580"></a>00580 
+<a name="l00581"></a><a class="code" href="a00166.html#53d2615ad9c38859b4c8080936600283">00581</a>     <span class="keywordtype">void</span> wait_for_all() {
+<a name="l00582"></a>00582         prefix().owner->wait_for_all( *<span class="keyword">this</span>, NULL );
+<a name="l00583"></a>00583     }
+<a name="l00584"></a>00584 
+<a name="l00586"></a>00586     <span class="keyword">static</span> <a class="code" href="a00166.html">task</a>& __TBB_EXPORTED_FUNC <span class="keyword">self</span>();
+<a name="l00587"></a>00587 
+<a name="l00589"></a><a class="code" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">00589</a>     <a class="code" href="a00166.html">task</a>* parent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().parent;}
+<a name="l00590"></a>00590 
+<a name="l00591"></a>00591 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00593"></a><a class="code" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">00593</a> <span class="preprocessor">    task_group_context* context() {return prefix().context;}</span>
+<a name="l00594"></a>00594 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>   
+<a name="l00595"></a>00595 
+<a name="l00597"></a><a class="code" href="a00166.html#f9169402702f56bf519448aaf34450aa">00597</a>     <span class="keywordtype">bool</span> is_stolen_task()<span class="keyword"> const </span>{
+<a name="l00598"></a>00598         internal::task_prefix& p = prefix();
+<a name="l00599"></a>00599         internal::task_prefix& q = parent()->prefix();
+<a name="l00600"></a>00600         <span class="keywordflow">return</span> p.owner!=q.owner;
+<a name="l00601"></a>00601     }
+<a name="l00602"></a>00602 
+<a name="l00603"></a>00603     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00604"></a>00604     <span class="comment">// Debugging</span>
+<a name="l00605"></a>00605     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00606"></a>00606 
+<a name="l00608"></a><a class="code" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">00608</a>     <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a> state()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="a00166.html#4a3c415562d17905390ea5b49d12293e">state_type</a>(prefix().state);}
+<a name="l00609"></a>00609 
+<a name="l00611"></a><a class="code" href="a00166.html#ad774f55eaec008ae02b236423209ced">00611</a>     <span class="keywordtype">int</span> ref_count()<span class="keyword"> const </span>{
+<a name="l00612"></a>00612 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00613"></a>00613 <span class="preprocessor"></span>        internal::reference_count ref_count = prefix().ref_count;
+<a name="l00614"></a>00614         __TBB_ASSERT( ref_count==<span class="keywordtype">int</span>(ref_count), <span class="stringliteral">"integer overflow error"</span>);
+<a name="l00615"></a>00615 <span class="preprocessor">#endif</span>
+<a name="l00616"></a>00616 <span class="preprocessor"></span>        <span class="keywordflow">return</span> int(prefix().ref_count);
+<a name="l00617"></a>00617     }
+<a name="l00618"></a>00618 
+<a name="l00620"></a>00620     <span class="keywordtype">bool</span> __TBB_EXPORTED_METHOD is_owned_by_current_thread() <span class="keyword">const</span>;
+<a name="l00621"></a>00621 
+<a name="l00622"></a>00622     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00623"></a>00623     <span class="comment">// Affinity</span>
+<a name="l00624"></a>00624     <span class="comment">//------------------------------------------------------------------------</span>
+<a name="l00625"></a>00625  
+<a name="l00627"></a>00627 
+<a name="l00628"></a><a class="code" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">00628</a>     <span class="keyword">typedef</span> internal::affinity_id affinity_id;
+<a name="l00629"></a>00629 
+<a name="l00631"></a><a class="code" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">00631</a>     <span class="keywordtype">void</span> set_affinity( affinity_id <span class="keywordtype">id</span> ) {prefix().affinity = id;}
+<a name="l00632"></a>00632 
+<a name="l00634"></a><a class="code" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">00634</a>     affinity_id affinity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> prefix().affinity;}
+<a name="l00635"></a>00635 
+<a name="l00637"></a>00637 
+<a name="l00641"></a>00641     <span class="keyword">virtual</span> <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD note_affinity( affinity_id <span class="keywordtype">id</span> );
+<a name="l00642"></a>00642 
+<a name="l00643"></a>00643 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00645"></a>00645 <span class="preprocessor"></span>
+<a name="l00646"></a><a class="code" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">00646</a> <span class="preprocessor">    bool cancel_group_execution () { return prefix().context->cancel_group_execution(); }</span>
+<a name="l00647"></a>00647 <span class="preprocessor"></span>
+<a name="l00649"></a><a class="code" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">00649</a>     <span class="keywordtype">bool</span> is_cancelled ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prefix().context->is_group_execution_cancelled(); }
+<a name="l00650"></a>00650 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00651"></a>00651 
+<a name="l00652"></a>00652 <span class="keyword">private</span>:
+<a name="l00653"></a>00653     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00168.html">task_list</a>;
+<a name="l00654"></a>00654     <span class="keyword">friend</span> <span class="keyword">class </span>internal::scheduler;
+<a name="l00655"></a>00655     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_proxy;
+<a name="l00656"></a>00656 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00657"></a>00657 <span class="preprocessor"></span>    <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_root_with_context_proxy;
+<a name="l00658"></a>00658 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00659"></a>00659     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_continuation_proxy;
+<a name="l00660"></a>00660     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_child_proxy;
+<a name="l00661"></a>00661     <span class="keyword">friend</span> <span class="keyword">class </span>internal::allocate_additional_child_of_proxy;
+<a name="l00662"></a>00662     
+<a name="l00663"></a>00663     <span class="keyword">friend</span> <span class="keyword">class </span>internal::task_group_base;
+<a name="l00664"></a>00664 
+<a name="l00666"></a>00666 
+<a name="l00667"></a>00667     internal::task_prefix& prefix( internal::version_tag* = NULL )<span class="keyword"> const </span>{
+<a name="l00668"></a>00668         <span class="keywordflow">return</span> reinterpret_cast<internal::task_prefix*>(const_cast<task*>(<span class="keyword">this</span>))[-1];
+<a name="l00669"></a>00669     }
+<a name="l00670"></a>00670 }; <span class="comment">// class task</span>
+<a name="l00671"></a>00671 
+<a name="l00673"></a>00673 
+<a name="l00674"></a><a class="code" href="a00137.html">00674</a> <span class="keyword">class </span><a class="code" href="a00137.html">empty_task</a>: <span class="keyword">public</span> <a class="code" href="a00166.html">task</a> {
+<a name="l00675"></a>00675     <span class="comment">/*override*/</span> <a class="code" href="a00166.html">task</a>* execute() {
+<a name="l00676"></a>00676         <span class="keywordflow">return</span> NULL;
+<a name="l00677"></a>00677     }
+<a name="l00678"></a>00678 };
+<a name="l00679"></a>00679 
+<a name="l00681"></a>00681 
+<a name="l00683"></a><a class="code" href="a00168.html">00683</a> <span class="keyword">class </span><a class="code" href="a00168.html">task_list</a>: internal::no_copy {
+<a name="l00684"></a>00684 <span class="keyword">private</span>:
+<a name="l00685"></a>00685     <a class="code" href="a00166.html">task</a>* first;
+<a name="l00686"></a>00686     <a class="code" href="a00166.html">task</a>** next_ptr;
+<a name="l00687"></a>00687     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00166.html">task</a>;
+<a name="l00688"></a>00688 <span class="keyword">public</span>:
+<a name="l00690"></a><a class="code" href="a00168.html#416341c2047eaef50417b41eaf7e9de6">00690</a>     <a class="code" href="a00168.html">task_list</a>() : first(NULL), next_ptr(&first) {}
+<a name="l00691"></a>00691 
+<a name="l00693"></a><a class="code" href="a00168.html#6d438f1499a02db1e59c24ab6043e5ba">00693</a>     ~<a class="code" href="a00168.html">task_list</a>() {}
+<a name="l00694"></a>00694 
+<a name="l00696"></a><a class="code" href="a00168.html#f3ac31e092814b90929f81bb30441959">00696</a>     <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{<span class="keywordflow">return</span> !first;}
+<a name="l00697"></a>00697 
+<a name="l00699"></a><a class="code" href="a00168.html#4cd34756bc4763dafb8c84838a0124ff">00699</a>     <span class="keywordtype">void</span> push_back( <a class="code" href="a00166.html">task</a>& <a class="code" href="a00166.html">task</a> ) {
+<a name="l00700"></a>00700         task.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next = NULL;
+<a name="l00701"></a>00701         *next_ptr = &task;
+<a name="l00702"></a>00702         next_ptr = &task.<a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
+<a name="l00703"></a>00703     }
+<a name="l00704"></a>00704 
+<a name="l00706"></a><a class="code" href="a00168.html#5fe85df5ed524418389d34051750347d">00706</a>     <a class="code" href="a00166.html">task</a>& pop_front() {
+<a name="l00707"></a>00707         __TBB_ASSERT( !empty(), <span class="stringliteral">"attempt to pop item from empty task_list"</span> );
+<a name="l00708"></a>00708         <a class="code" href="a00166.html">task</a>* result = first;
+<a name="l00709"></a>00709         first = result-><a class="code" href="a00166.html#ac578940848e9dc8b4f1f2bcf17b627d">prefix</a>().next;
+<a name="l00710"></a>00710         <span class="keywordflow">if</span>( !first ) next_ptr = &first;
+<a name="l00711"></a>00711         <span class="keywordflow">return</span> *result;
+<a name="l00712"></a>00712     }
+<a name="l00713"></a>00713 
+<a name="l00715"></a><a class="code" href="a00168.html#fce446ee13e025969945328f3ff59b95">00715</a>     <span class="keywordtype">void</span> clear() {
+<a name="l00716"></a>00716         first=NULL;
+<a name="l00717"></a>00717         next_ptr=&first;
+<a name="l00718"></a>00718     }
+<a name="l00719"></a>00719 };
+<a name="l00720"></a>00720 
+<a name="l00721"></a><a class="code" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">00721</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> task::spawn( <a class="code" href="a00168.html">task_list</a>& list ) {
+<a name="l00722"></a>00722     <span class="keywordflow">if</span>( <a class="code" href="a00166.html">task</a>* t = list.<a class="code" href="a00168.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
+<a name="l00723"></a>00723         prefix().owner->spawn( *t, *list.<a class="code" href="a00168.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
+<a name="l00724"></a>00724         list.<a class="code" href="a00168.html#fce446ee13e025969945328f3ff59b95">clear</a>();
+<a name="l00725"></a>00725     }
+<a name="l00726"></a>00726 }
+<a name="l00727"></a>00727 
+<a name="l00728"></a><a class="code" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">00728</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00166.html#ce8ce689c26a4ddf343829bc3c73290a">task::spawn_root_and_wait</a>( <a class="code" href="a00168.html">task_list</a>& root_list ) {
+<a name="l00729"></a>00729     <span class="keywordflow">if</span>( <a class="code" href="a00166.html">task</a>* t = root_list.<a class="code" href="a00168.html#78fcc389819ee34427d510f7d8cb8b1e">first</a> ) {
+<a name="l00730"></a>00730         t->prefix().owner->spawn_root_and_wait( *t, *root_list.<a class="code" href="a00168.html#21553a32bcd08f980aa28f61254307da">next_ptr</a> );
+<a name="l00731"></a>00731         root_list.<a class="code" href="a00168.html#fce446ee13e025969945328f3ff59b95">clear</a>();
+<a name="l00732"></a>00732     }
+<a name="l00733"></a>00733 }
+<a name="l00734"></a>00734 
+<a name="l00735"></a>00735 } <span class="comment">// namespace tbb</span>
+<a name="l00736"></a>00736 
+<a name="l00737"></a>00737 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_root_proxy& ) {
+<a name="l00738"></a>00738     <span class="keywordflow">return</span> &tbb::internal::allocate_root_proxy::allocate(bytes);
+<a name="l00739"></a>00739 }
+<a name="l00740"></a>00740 
+<a name="l00741"></a>00741 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_root_proxy& ) {
+<a name="l00742"></a>00742     tbb::internal::allocate_root_proxy::free( *static_cast<tbb::task*>(task) );
+<a name="l00743"></a>00743 }
+<a name="l00744"></a>00744 
+<a name="l00745"></a>00745 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00746"></a>00746 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_root_with_context_proxy& p ) {
+<a name="l00747"></a>00747     <span class="keywordflow">return</span> &p.allocate(bytes);
+<a name="l00748"></a>00748 }
+<a name="l00749"></a>00749 
+<a name="l00750"></a>00750 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_root_with_context_proxy& p ) {
+<a name="l00751"></a>00751     p.free( *static_cast<tbb::task*>(task) );
+<a name="l00752"></a>00752 }
+<a name="l00753"></a>00753 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00754"></a>00754 
+<a name="l00755"></a>00755 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_continuation_proxy& p ) {
+<a name="l00756"></a>00756     <span class="keywordflow">return</span> &p.allocate(bytes);
+<a name="l00757"></a>00757 }
+<a name="l00758"></a>00758 
+<a name="l00759"></a>00759 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_continuation_proxy& p ) {
+<a name="l00760"></a>00760     p.free( *static_cast<tbb::task*>(task) );
+<a name="l00761"></a>00761 }
+<a name="l00762"></a>00762 
+<a name="l00763"></a>00763 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_child_proxy& p ) {
+<a name="l00764"></a>00764     <span class="keywordflow">return</span> &p.allocate(bytes);
+<a name="l00765"></a>00765 }
+<a name="l00766"></a>00766 
+<a name="l00767"></a>00767 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_child_proxy& p ) {
+<a name="l00768"></a>00768     p.free( *static_cast<tbb::task*>(task) );
+<a name="l00769"></a>00769 }
+<a name="l00770"></a>00770 
+<a name="l00771"></a>00771 <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new( size_t bytes, <span class="keyword">const</span> tbb::internal::allocate_additional_child_of_proxy& p ) {
+<a name="l00772"></a>00772     <span class="keywordflow">return</span> &p.allocate(bytes);
+<a name="l00773"></a>00773 }
+<a name="l00774"></a>00774 
+<a name="l00775"></a>00775 <span class="keyword">inline</span> <span class="keywordtype">void</span> operator delete( <span class="keywordtype">void</span>* task, <span class="keyword">const</span> tbb::internal::allocate_additional_child_of_proxy& p ) {
+<a name="l00776"></a>00776     p.free( *static_cast<tbb::task*>(task) );
+<a name="l00777"></a>00777 }
+<a name="l00778"></a>00778 
+<a name="l00779"></a>00779 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00360.html b/doc/html/a00360.html
deleted file mode 100644
index 7b69551..0000000
--- a/doc/html/a00360.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>task_group.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>task_group.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_group_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_group_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "task.h"</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00029"></a>00029 <span class="keyword">class </span>task_handle {
-<a name="l00030"></a>00030     F my_func;
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="keyword">public</span>:
-<a name="l00033"></a>00033     task_handle( <span class="keyword">const</span> F& f ) : my_func(f) {}
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035     <span class="keywordtype">void</span> operator()() { my_func(); }
-<a name="l00036"></a>00036 };
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 <span class="keyword">enum</span> task_group_status {
-<a name="l00039"></a>00039     not_complete,
-<a name="l00040"></a>00040     complete,
-<a name="l00041"></a>00041     canceled
-<a name="l00042"></a>00042 };
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="keyword">namespace </span>internal {
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">// Suppress gratuitous warnings from icc 11.0 when lambda expressions are used in instances of function_task.</span>
-<a name="l00047"></a>00047 <span class="comment">//#pragma warning(disable: 588)</span>
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00050"></a>00050 <span class="keyword">class </span>function_task : <span class="keyword">public</span> task {
-<a name="l00051"></a>00051     F my_func;
-<a name="l00052"></a>00052     <span class="comment">/*override*/</span> <a class="code" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>* execute() {
-<a name="l00053"></a>00053         my_func();
-<a name="l00054"></a>00054         <span class="keywordflow">return</span> NULL;
-<a name="l00055"></a>00055     }
-<a name="l00056"></a>00056 <span class="keyword">public</span>:
-<a name="l00057"></a>00057     function_task( <span class="keyword">const</span> F& f ) : my_func(f) {}
-<a name="l00058"></a>00058 };
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00061"></a>00061 <span class="keyword">class </span>task_handle_task : <span class="keyword">public</span> task {
-<a name="l00062"></a>00062     task_handle<F>& my_handle;
-<a name="l00063"></a>00063     <span class="comment">/*override*/</span> <a class="code" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>* execute() {
-<a name="l00064"></a>00064         my_handle();
-<a name="l00065"></a>00065         <span class="keywordflow">return</span> NULL;
-<a name="l00066"></a>00066     }
-<a name="l00067"></a>00067 <span class="keyword">public</span>:
-<a name="l00068"></a>00068     task_handle_task( task_handle<F>& h ) : my_handle(h) {}
-<a name="l00069"></a>00069 };
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071 <span class="keyword">class </span>task_group_base : internal::no_copy {
-<a name="l00072"></a>00072 <span class="keyword">protected</span>:
-<a name="l00073"></a>00073     empty_task* my_root;
-<a name="l00074"></a>00074     task_group_context my_context;
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076 <span class="preprocessor">#if __TBB_RELAXED_OWNERSHIP</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span>    task& owner () { <span class="keywordflow">return</span> *my_root; }
-<a name="l00078"></a>00078 <span class="preprocessor">#else</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span>    task& owner () { <span class="keywordflow">return</span> <a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>(); }
-<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span>
-<a name="l00082"></a>00082     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00083"></a>00083     task_group_status internal_run_and_wait( F& f ) {
-<a name="l00084"></a>00084         <span class="keywordflow">try</span> {
-<a name="l00085"></a>00085             <span class="keywordflow">if</span> ( !my_context.is_group_execution_cancelled() )
-<a name="l00086"></a>00086                 f();
-<a name="l00087"></a>00087         } <span class="keywordflow">catch</span> ( ... ) {
-<a name="l00088"></a>00088             my_context.register_pending_exception();
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090         <span class="keywordflow">return</span> wait();
-<a name="l00091"></a>00091     }
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093     <span class="keyword">template</span><<span class="keyword">typename</span> F, <span class="keyword">typename</span> Task>
-<a name="l00094"></a>00094     <span class="keywordtype">void</span> internal_run( F& f ) {
-<a name="l00095"></a>00095         owner().spawn( *<span class="keyword">new</span>( owner().allocate_additional_child_of(*my_root) ) Task(f) );
-<a name="l00096"></a>00096     }
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098 <span class="keyword">public</span>:
-<a name="l00099"></a>00099     task_group_base( uintptr_t traits = 0 )
-<a name="l00100"></a>00100         : my_context(task_group_context::bound, task_group_context::default_traits | traits)
-<a name="l00101"></a>00101     {
-<a name="l00102"></a>00102         my_root = <span class="keyword">new</span>( <a class="code" href="a00162.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>(my_context) ) empty_task;
-<a name="l00103"></a>00103         my_root->set_ref_count(1);
-<a name="l00104"></a>00104     }
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00107"></a>00107     <span class="keywordtype">void</span> run( task_handle<F>& h ) {
-<a name="l00108"></a>00108         internal_run< task_handle<F>, internal::task_handle_task<F> >( h );
-<a name="l00109"></a>00109     }
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111     task_group_status wait() {
-<a name="l00112"></a>00112         <span class="keywordflow">try</span> {
-<a name="l00113"></a>00113             owner().prefix().owner->wait_for_all( *my_root, NULL );
-<a name="l00114"></a>00114         } <span class="keywordflow">catch</span> ( ... ) {
-<a name="l00115"></a>00115             my_context.reset();
-<a name="l00116"></a>00116             <span class="keywordflow">throw</span>;
-<a name="l00117"></a>00117         }
-<a name="l00118"></a>00118         <span class="keywordflow">if</span> ( my_context.is_group_execution_cancelled() ) {
-<a name="l00119"></a>00119             my_context.reset();
-<a name="l00120"></a>00120             <span class="keywordflow">return</span> canceled;
-<a name="l00121"></a>00121         }
-<a name="l00122"></a>00122         <span class="keywordflow">return</span> complete;
-<a name="l00123"></a>00123     }
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125     <span class="keywordtype">bool</span> is_canceling() {
-<a name="l00126"></a>00126         <span class="keywordflow">return</span> my_context.is_group_execution_cancelled();
-<a name="l00127"></a>00127     }
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129     <span class="keywordtype">void</span> cancel() {
-<a name="l00130"></a>00130         my_context.cancel_group_execution();
-<a name="l00131"></a>00131     }
-<a name="l00132"></a>00132 }; <span class="comment">// class task_group_base</span>
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134 } <span class="comment">// namespace internal</span>
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="keyword">class </span>task_group : <span class="keyword">public</span> internal::task_group_base {
-<a name="l00137"></a>00137 <span class="keyword">public</span>:
-<a name="l00138"></a>00138     task_group () : task_group_base( task_group_context::concurrent_wait ) {}
-<a name="l00139"></a>00139 
-<a name="l00140"></a>00140     ~task_group() <span class="keyword">try</span> {
-<a name="l00141"></a>00141         __TBB_ASSERT( my_root->ref_count() != 0, NULL );
-<a name="l00142"></a>00142         <span class="keywordflow">if</span>( my_root->ref_count() > 1 )
-<a name="l00143"></a>00143             my_root->wait_for_all();
-<a name="l00144"></a>00144         owner().destroy(*my_root);
-<a name="l00145"></a>00145     }
-<a name="l00146"></a>00146     <span class="keywordflow">catch</span> (...) {
-<a name="l00147"></a>00147         owner().destroy(*my_root);
-<a name="l00148"></a>00148         <span class="keywordflow">throw</span>;
-<a name="l00149"></a>00149     }
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151     <span class="keyword">using</span> task_group_base::run;
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00154"></a>00154     <span class="keywordtype">void</span> run( <span class="keyword">const</span> F& f ) {
-<a name="l00155"></a>00155         internal_run< const F, internal::function_task<F> >( f );
-<a name="l00156"></a>00156     }
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00159"></a>00159     task_group_status run_and_wait( <span class="keyword">const</span> F& f ) {
-<a name="l00160"></a>00160         <span class="keywordflow">return</span> internal_run_and_wait<const F>( f );
-<a name="l00161"></a>00161     }
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00164"></a>00164     task_group_status run_and_wait( F& f ) {
-<a name="l00165"></a>00165         <span class="keywordflow">return</span> internal_run_and_wait<F>( f );
-<a name="l00166"></a>00166     }
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168 }; <span class="comment">// class task_group</span>
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170 <span class="keyword">class </span>missing_wait : <span class="keyword">public</span> std::exception {
-<a name="l00171"></a>00171 <span class="keyword">public</span>:
-<a name="l00172"></a>00172     <span class="comment">/*override*/</span> 
-<a name="l00173"></a>00173     <span class="keyword">const</span> <span class="keywordtype">char</span>* what() const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"wait() was not called on the structured_task_group"</span>; }
-<a name="l00174"></a>00174 };
-<a name="l00175"></a>00175 
-<a name="l00176"></a>00176 <span class="keyword">class </span>structured_task_group : <span class="keyword">public</span> internal::task_group_base {
-<a name="l00177"></a>00177 <span class="keyword">public</span>:
-<a name="l00178"></a>00178     ~structured_task_group() {
-<a name="l00179"></a>00179         <span class="keywordflow">if</span>( my_root->ref_count() > 1 ) {
-<a name="l00180"></a>00180             <span class="keywordtype">bool</span> stack_unwinding_in_progress = std::uncaught_exception();
-<a name="l00181"></a>00181             <span class="comment">// Always attempt to do proper cleanup to avoid inevitable memory corruption </span>
-<a name="l00182"></a>00182             <span class="comment">// in case of missing wait (for the sake of better testability & debuggability)</span>
-<a name="l00183"></a>00183             <span class="keywordflow">if</span> ( !is_canceling() )
-<a name="l00184"></a>00184                 cancel();
-<a name="l00185"></a>00185             my_root->wait_for_all();
-<a name="l00186"></a>00186             owner().destroy(*my_root);
-<a name="l00187"></a>00187             <span class="keywordflow">if</span> ( !stack_unwinding_in_progress )
-<a name="l00188"></a>00188                 <span class="keywordflow">throw</span> missing_wait();
-<a name="l00189"></a>00189         }
-<a name="l00190"></a>00190         <span class="keywordflow">else</span>
-<a name="l00191"></a>00191             owner().destroy(*my_root);
-<a name="l00192"></a>00192     }
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194     <span class="keyword">template</span><<span class="keyword">typename</span> F>
-<a name="l00195"></a>00195     task_group_status run_and_wait ( task_handle<F>& h ) {
-<a name="l00196"></a>00196         <span class="keywordflow">return</span> internal_run_and_wait< task_handle<F> >( h );
-<a name="l00197"></a>00197     }
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199     task_group_status wait() {
-<a name="l00200"></a>00200         __TBB_ASSERT ( my_root->ref_count() != 0, <span class="stringliteral">"wait() can be called only once during the structured_task_group lifetime"</span> );
-<a name="l00201"></a>00201         <span class="keywordflow">return</span> task_group_base::wait();
-<a name="l00202"></a>00202     }
-<a name="l00203"></a>00203 }; <span class="comment">// class structured_task_group</span>
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205 <span class="keyword">inline</span> 
-<a name="l00206"></a>00206 <span class="keywordtype">bool</span> is_current_task_group_canceling() {
-<a name="l00207"></a>00207     <span class="keywordflow">return</span> <a class="code" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>();
-<a name="l00208"></a>00208 }
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210 } <span class="comment">// namespace tbb</span>
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_group_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00363.html b/doc/html/a00363.html
new file mode 100644
index 0000000..0213dbe
--- /dev/null
+++ b/doc/html/a00363.html
@@ -0,0 +1,250 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>task_group.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main Page</span></a></li>
+    <li><a href="modules.html"><span>Modules</span></a></li>
+    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="files.html"><span>File List</span></a></li>
+    <li><a href="globals.html"><span>File Members</span></a></li>
+  </ul></div>
+<h1>task_group.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
+<a name="l00003"></a>00003 <span class="comment"></span>
+<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
+<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
+<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
+<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
+<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
+<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
+<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
+<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
+<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
+<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
+<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
+<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
+<a name="l00018"></a>00018 <span class="comment">    writing.</span>
+<a name="l00019"></a>00019 <span class="comment">*/</span>
+<a name="l00020"></a>00020 
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_group_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_group_H</span>
+<a name="l00023"></a>00023 <span class="preprocessor"></span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "task.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include <exception></span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="keyword">namespace </span>tbb {
+<a name="l00028"></a>00028 
+<a name="l00029"></a>00029 <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00030"></a>00030 <span class="keyword">class </span>task_handle {
+<a name="l00031"></a>00031     F my_func;
+<a name="l00032"></a>00032 
+<a name="l00033"></a>00033 <span class="keyword">public</span>:
+<a name="l00034"></a>00034     task_handle( <span class="keyword">const</span> F& f ) : my_func(f) {}
+<a name="l00035"></a>00035 
+<a name="l00036"></a>00036     <span class="keywordtype">void</span> operator()() { my_func(); }
+<a name="l00037"></a>00037 };
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039 <span class="keyword">enum</span> task_group_status {
+<a name="l00040"></a>00040     not_complete,
+<a name="l00041"></a>00041     complete,
+<a name="l00042"></a>00042     canceled
+<a name="l00043"></a>00043 };
+<a name="l00044"></a>00044 
+<a name="l00045"></a>00045 <span class="keyword">namespace </span>internal {
+<a name="l00046"></a>00046 
+<a name="l00047"></a>00047 <span class="comment">// Suppress gratuitous warnings from icc 11.0 when lambda expressions are used in instances of function_task.</span>
+<a name="l00048"></a>00048 <span class="comment">//#pragma warning(disable: 588)</span>
+<a name="l00049"></a>00049 
+<a name="l00050"></a>00050 <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00051"></a>00051 <span class="keyword">class </span>function_task : <span class="keyword">public</span> task {
+<a name="l00052"></a>00052     F my_func;
+<a name="l00053"></a>00053     <span class="comment">/*override*/</span> <a class="code" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>* execute() {
+<a name="l00054"></a>00054         my_func();
+<a name="l00055"></a>00055         <span class="keywordflow">return</span> NULL;
+<a name="l00056"></a>00056     }
+<a name="l00057"></a>00057 <span class="keyword">public</span>:
+<a name="l00058"></a>00058     function_task( <span class="keyword">const</span> F& f ) : my_func(f) {}
+<a name="l00059"></a>00059 };
+<a name="l00060"></a>00060 
+<a name="l00061"></a>00061 <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00062"></a>00062 <span class="keyword">class </span>task_handle_task : <span class="keyword">public</span> task {
+<a name="l00063"></a>00063     task_handle<F>& my_handle;
+<a name="l00064"></a>00064     <span class="comment">/*override*/</span> <a class="code" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">task</a>* execute() {
+<a name="l00065"></a>00065         my_handle();
+<a name="l00066"></a>00066         <span class="keywordflow">return</span> NULL;
+<a name="l00067"></a>00067     }
+<a name="l00068"></a>00068 <span class="keyword">public</span>:
+<a name="l00069"></a>00069     task_handle_task( task_handle<F>& h ) : my_handle(h) {}
+<a name="l00070"></a>00070 };
+<a name="l00071"></a>00071 
+<a name="l00072"></a>00072 <span class="keyword">class </span>task_group_base : internal::no_copy {
+<a name="l00073"></a>00073 <span class="keyword">protected</span>:
+<a name="l00074"></a>00074     empty_task* my_root;
+<a name="l00075"></a>00075     task_group_context my_context;
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077     task& owner () { <span class="keywordflow">return</span> *my_root; }
+<a name="l00078"></a>00078 
+<a name="l00079"></a>00079     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00080"></a>00080     task_group_status internal_run_and_wait( F& f ) {
+<a name="l00081"></a>00081         <span class="keywordflow">try</span> {
+<a name="l00082"></a>00082             <span class="keywordflow">if</span> ( !my_context.is_group_execution_cancelled() )
+<a name="l00083"></a>00083                 f();
+<a name="l00084"></a>00084         } <span class="keywordflow">catch</span> ( ... ) {
+<a name="l00085"></a>00085             my_context.register_pending_exception();
+<a name="l00086"></a>00086         }
+<a name="l00087"></a>00087         <span class="keywordflow">return</span> wait();
+<a name="l00088"></a>00088     }
+<a name="l00089"></a>00089 
+<a name="l00090"></a>00090     <span class="keyword">template</span><<span class="keyword">typename</span> F, <span class="keyword">typename</span> Task>
+<a name="l00091"></a>00091     <span class="keywordtype">void</span> internal_run( F& f ) {
+<a name="l00092"></a>00092         owner().spawn( *<span class="keyword">new</span>( owner().allocate_additional_child_of(*my_root) ) Task(f) );
+<a name="l00093"></a>00093     }
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095 <span class="keyword">public</span>:
+<a name="l00096"></a>00096     task_group_base( uintptr_t traits = 0 )
+<a name="l00097"></a>00097         : my_context(task_group_context::bound, task_group_context::default_traits | traits)
+<a name="l00098"></a>00098     {
+<a name="l00099"></a>00099         my_root = <span class="keyword">new</span>( <a class="code" href="a00166.html#23acb0da0afd690da797f9f882027d34">task::allocate_root</a>(my_context) ) empty_task;
+<a name="l00100"></a>00100         my_root->set_ref_count(1);
+<a name="l00101"></a>00101     }
+<a name="l00102"></a>00102 
+<a name="l00103"></a>00103     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00104"></a>00104     <span class="keywordtype">void</span> run( task_handle<F>& h ) {
+<a name="l00105"></a>00105         internal_run< task_handle<F>, internal::task_handle_task<F> >( h );
+<a name="l00106"></a>00106     }
+<a name="l00107"></a>00107 
+<a name="l00108"></a>00108     task_group_status wait() {
+<a name="l00109"></a>00109         <span class="keywordflow">try</span> {
+<a name="l00110"></a>00110             owner().prefix().owner->wait_for_all( *my_root, NULL );
+<a name="l00111"></a>00111         } <span class="keywordflow">catch</span> ( ... ) {
+<a name="l00112"></a>00112             my_context.reset();
+<a name="l00113"></a>00113             <span class="keywordflow">throw</span>;
+<a name="l00114"></a>00114         }
+<a name="l00115"></a>00115         <span class="keywordflow">if</span> ( my_context.is_group_execution_cancelled() ) {
+<a name="l00116"></a>00116             my_context.reset();
+<a name="l00117"></a>00117             <span class="keywordflow">return</span> canceled;
+<a name="l00118"></a>00118         }
+<a name="l00119"></a>00119         <span class="keywordflow">return</span> complete;
+<a name="l00120"></a>00120     }
+<a name="l00121"></a>00121 
+<a name="l00122"></a>00122     <span class="keywordtype">bool</span> is_canceling() {
+<a name="l00123"></a>00123         <span class="keywordflow">return</span> my_context.is_group_execution_cancelled();
+<a name="l00124"></a>00124     }
+<a name="l00125"></a>00125 
+<a name="l00126"></a>00126     <span class="keywordtype">void</span> cancel() {
+<a name="l00127"></a>00127         my_context.cancel_group_execution();
+<a name="l00128"></a>00128     }
+<a name="l00129"></a>00129 }; <span class="comment">// class task_group_base</span>
+<a name="l00130"></a>00130 
+<a name="l00131"></a>00131 } <span class="comment">// namespace internal</span>
+<a name="l00132"></a>00132 
+<a name="l00133"></a>00133 <span class="keyword">class </span>task_group : <span class="keyword">public</span> internal::task_group_base {
+<a name="l00134"></a>00134 <span class="keyword">public</span>:
+<a name="l00135"></a>00135     task_group () : task_group_base( task_group_context::concurrent_wait ) {}
+<a name="l00136"></a>00136 
+<a name="l00137"></a>00137     ~task_group() <span class="keyword">try</span> {
+<a name="l00138"></a>00138         __TBB_ASSERT( my_root->ref_count() != 0, NULL );
+<a name="l00139"></a>00139         <span class="keywordflow">if</span>( my_root->ref_count() > 1 )
+<a name="l00140"></a>00140             my_root->wait_for_all();
+<a name="l00141"></a>00141         owner().destroy(*my_root);
+<a name="l00142"></a>00142     }
+<a name="l00143"></a>00143     <span class="keywordflow">catch</span> (...) {
+<a name="l00144"></a>00144         owner().destroy(*my_root);
+<a name="l00145"></a>00145         <span class="keywordflow">throw</span>;
+<a name="l00146"></a>00146     }
+<a name="l00147"></a>00147 
+<a name="l00148"></a>00148 <span class="preprocessor">#if __SUNPRO_CC</span>
+<a name="l00149"></a>00149 <span class="preprocessor"></span>    <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00150"></a>00150     <span class="keywordtype">void</span> run( task_handle<F>& h ) {
+<a name="l00151"></a>00151         internal_run< task_handle<F>, internal::task_handle_task<F> >( h );
+<a name="l00152"></a>00152     }
+<a name="l00153"></a>00153 <span class="preprocessor">#else</span>
+<a name="l00154"></a>00154 <span class="preprocessor"></span>    <span class="keyword">using</span> task_group_base::run;
+<a name="l00155"></a>00155 <span class="preprocessor">#endif</span>
+<a name="l00156"></a>00156 <span class="preprocessor"></span>
+<a name="l00157"></a>00157     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00158"></a>00158     <span class="keywordtype">void</span> run( <span class="keyword">const</span> F& f ) {
+<a name="l00159"></a>00159         internal_run< const F, internal::function_task<F> >( f );
+<a name="l00160"></a>00160     }
+<a name="l00161"></a>00161 
+<a name="l00162"></a>00162     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00163"></a>00163     task_group_status run_and_wait( <span class="keyword">const</span> F& f ) {
+<a name="l00164"></a>00164         <span class="keywordflow">return</span> internal_run_and_wait<const F>( f );
+<a name="l00165"></a>00165     }
+<a name="l00166"></a>00166 
+<a name="l00167"></a>00167     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00168"></a>00168     task_group_status run_and_wait( task_handle<F>& h ) {
+<a name="l00169"></a>00169       <span class="keywordflow">return</span> internal_run_and_wait< task_handle<F> >( h );
+<a name="l00170"></a>00170     }
+<a name="l00171"></a>00171 }; <span class="comment">// class task_group</span>
+<a name="l00172"></a>00172 
+<a name="l00173"></a>00173 <span class="keyword">class </span>missing_wait : <span class="keyword">public</span> std::exception {
+<a name="l00174"></a>00174 <span class="keyword">public</span>:
+<a name="l00175"></a>00175     <span class="comment">/*override*/</span> 
+<a name="l00176"></a>00176     <span class="keyword">const</span> <span class="keywordtype">char</span>* what() const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"wait() was not called on the structured_task_group"</span>; }
+<a name="l00177"></a>00177 };
+<a name="l00178"></a>00178 
+<a name="l00179"></a>00179 <span class="keyword">class </span>structured_task_group : <span class="keyword">public</span> internal::task_group_base {
+<a name="l00180"></a>00180 <span class="keyword">public</span>:
+<a name="l00181"></a>00181     ~structured_task_group() {
+<a name="l00182"></a>00182         <span class="keywordflow">if</span>( my_root->ref_count() > 1 ) {
+<a name="l00183"></a>00183             <span class="keywordtype">bool</span> stack_unwinding_in_progress = std::uncaught_exception();
+<a name="l00184"></a>00184             <span class="comment">// Always attempt to do proper cleanup to avoid inevitable memory corruption </span>
+<a name="l00185"></a>00185             <span class="comment">// in case of missing wait (for the sake of better testability & debuggability)</span>
+<a name="l00186"></a>00186             <span class="keywordflow">if</span> ( !is_canceling() )
+<a name="l00187"></a>00187                 cancel();
+<a name="l00188"></a>00188             my_root->wait_for_all();
+<a name="l00189"></a>00189             owner().destroy(*my_root);
+<a name="l00190"></a>00190             <span class="keywordflow">if</span> ( !stack_unwinding_in_progress )
+<a name="l00191"></a>00191                 <span class="keywordflow">throw</span> missing_wait();
+<a name="l00192"></a>00192         }
+<a name="l00193"></a>00193         <span class="keywordflow">else</span>
+<a name="l00194"></a>00194             owner().destroy(*my_root);
+<a name="l00195"></a>00195     }
+<a name="l00196"></a>00196 
+<a name="l00197"></a>00197     <span class="keyword">template</span><<span class="keyword">typename</span> F>
+<a name="l00198"></a>00198     task_group_status run_and_wait ( task_handle<F>& h ) {
+<a name="l00199"></a>00199         <span class="keywordflow">return</span> internal_run_and_wait< task_handle<F> >( h );
+<a name="l00200"></a>00200     }
+<a name="l00201"></a>00201 
+<a name="l00202"></a>00202     task_group_status wait() {
+<a name="l00203"></a>00203         __TBB_ASSERT ( my_root->ref_count() != 0, <span class="stringliteral">"wait() can be called only once during the structured_task_group lifetime"</span> );
+<a name="l00204"></a>00204         <span class="keywordflow">return</span> task_group_base::wait();
+<a name="l00205"></a>00205     }
+<a name="l00206"></a>00206 }; <span class="comment">// class structured_task_group</span>
+<a name="l00207"></a>00207 
+<a name="l00208"></a>00208 <span class="keyword">inline</span> 
+<a name="l00209"></a>00209 <span class="keywordtype">bool</span> is_current_task_group_canceling() {
+<a name="l00210"></a>00210     <span class="keywordflow">return</span> <a class="code" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">task::self</a>().<a class="code" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">is_cancelled</a>();
+<a name="l00211"></a>00211 }
+<a name="l00212"></a>00212 
+<a name="l00213"></a>00213 <span class="keyword">template</span><<span class="keyword">class</span> F>
+<a name="l00214"></a>00214 task_handle<F> make_task( <span class="keyword">const</span> F& f ) {
+<a name="l00215"></a>00215     <span class="keywordflow">return</span> task_handle<F>( f );
+<a name="l00216"></a>00216 }
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218 } <span class="comment">// namespace tbb</span>
+<a name="l00219"></a>00219 
+<a name="l00220"></a>00220 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_group_H */</span>
+</pre></div><hr>
+<p></p>
+Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
+<p></p>
+Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
+registered trademarks or trademarks of Intel Corporation or its
+subsidiaries in the United States and other countries.
+<p></p>
+* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00368.html b/doc/html/a00368.html
deleted file mode 100644
index e2cc58d..0000000
--- a/doc/html/a00368.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>task_scheduler_init.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>task_scheduler_init.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_init_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_init_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="keyword">typedef</span> std::size_t stack_size_type;
-<a name="l00029"></a>00029 
-<a name="l00031"></a>00031 <span class="keyword">namespace </span>internal {
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034     <span class="keyword">class </span>scheduler;
-<a name="l00035"></a>00035 } <span class="comment">// namespace internal</span>
-<a name="l00037"></a>00037 <span class="comment"></span>
-<a name="l00039"></a>00039 
-<a name="l00042"></a><a class="code" href="a00165.html">00042</a> <span class="keyword">class </span><a class="code" href="a00165.html">task_scheduler_init</a>: internal::no_copy {
-<a name="l00044"></a>00044     internal::scheduler* my_scheduler;
-<a name="l00045"></a>00045 <span class="keyword">public</span>:
-<a name="l00046"></a>00046 
-<a name="l00048"></a><a class="code" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">00048</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1;
-<a name="l00049"></a>00049 
-<a name="l00051"></a><a class="code" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">00051</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2;
-<a name="l00052"></a>00052 
-<a name="l00054"></a>00054 
-<a name="l00062"></a>00062     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00165.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> );
-<a name="l00063"></a>00063 
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00165.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads, stack_size_type thread_stack_size );
-<a name="l00067"></a>00067 
-<a name="l00069"></a>00069     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
-<a name="l00070"></a>00070 
-<a name="l00072"></a><a class="code" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">00072</a>     <a class="code" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)  {
-<a name="l00073"></a>00073         <a class="code" href="a00165.html#d476053cc712e572554823492a5229ce">initialize</a>( number_of_threads, thread_stack_size );
-<a name="l00074"></a>00074     }
-<a name="l00075"></a>00075 
-<a name="l00077"></a><a class="code" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">00077</a>     <a class="code" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>() {
-<a name="l00078"></a>00078         <span class="keywordflow">if</span>( my_scheduler ) 
-<a name="l00079"></a>00079             <a class="code" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
-<a name="l00080"></a>00080         internal::poison_pointer( my_scheduler );
-<a name="l00081"></a>00081     }
-<a name="l00083"></a>00083 
-<a name="l00090"></a>00090     <span class="keyword">static</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00165.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ();
-<a name="l00091"></a>00091 
-<a name="l00093"></a><a class="code" href="a00165.html#12752282977029f23416642bc03e8b74">00093</a>     <span class="keywordtype">bool</span> <a class="code" href="a00165.html#12752282977029f23416642bc03e8b74">is_active</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_scheduler != NULL; }
-<a name="l00094"></a>00094 };
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096 } <span class="comment">// namespace tbb</span>
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_init_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00371.html b/doc/html/a00371.html
index 3de030a..c63fa9c 100644
--- a/doc/html/a00371.html
+++ b/doc/html/a00371.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb.h Source File</title>
+<title>task_scheduler_init.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>tbb.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>task_scheduler_init.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,46 +39,55 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_tbb_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_init_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_init_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include "aligned_space.h"</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include "blocked_range.h"</span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include "blocked_range2d.h"</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#include "blocked_range3d.h"</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#include "cache_aligned_allocator.h"</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#include "concurrent_hash_map.h"</span>
-<a name="l00039"></a>00039 <span class="preprocessor">#include "concurrent_queue.h"</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#include "concurrent_vector.h"</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#include "enumerable_thread_specific.h"</span>
-<a name="l00042"></a>00042 <span class="preprocessor">#include "mutex.h"</span>
-<a name="l00043"></a>00043 <span class="preprocessor">#include "null_mutex.h"</span>
-<a name="l00044"></a>00044 <span class="preprocessor">#include "null_rw_mutex.h"</span>
-<a name="l00045"></a>00045 <span class="preprocessor">#include "parallel_do.h"</span>
-<a name="l00046"></a>00046 <span class="preprocessor">#include "parallel_for.h"</span>
-<a name="l00047"></a>00047 <span class="preprocessor">#include "parallel_for_each.h"</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#include "parallel_invoke.h"</span>
-<a name="l00049"></a>00049 <span class="preprocessor">#include "parallel_reduce.h"</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include "parallel_scan.h"</span>
-<a name="l00051"></a>00051 <span class="preprocessor">#include "parallel_sort.h"</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#include "partitioner.h"</span>
-<a name="l00053"></a>00053 <span class="preprocessor">#include "pipeline.h"</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#include "queuing_mutex.h"</span>
-<a name="l00055"></a>00055 <span class="preprocessor">#include "queuing_rw_mutex.h"</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#include "recursive_mutex.h"</span>
-<a name="l00057"></a>00057 <span class="preprocessor">#include "spin_mutex.h"</span>
-<a name="l00058"></a>00058 <span class="preprocessor">#include "spin_rw_mutex.h"</span>
-<a name="l00059"></a>00059 <span class="preprocessor">#include "task.h"</span>
-<a name="l00060"></a>00060 <span class="preprocessor">#include "task_group.h"</span>
-<a name="l00061"></a>00061 <span class="preprocessor">#include "task_scheduler_init.h"</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#include "task_scheduler_observer.h"</span>
-<a name="l00063"></a>00063 <span class="preprocessor">#include "tbb_allocator.h"</span>
-<a name="l00064"></a>00064 <span class="preprocessor">#include "tbb_exception.h"</span>
-<a name="l00065"></a>00065 <span class="preprocessor">#include "tbb_thread.h"</span>
-<a name="l00066"></a>00066 <span class="preprocessor">#include "tick_count.h"</span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 
+<a name="l00026"></a>00026 <span class="keyword">namespace </span>tbb {
+<a name="l00027"></a>00027 
+<a name="l00028"></a>00028 <span class="keyword">typedef</span> std::size_t stack_size_type;
+<a name="l00029"></a>00029 
+<a name="l00031"></a>00031 <span class="keyword">namespace </span>internal {
+<a name="l00033"></a>00033 
+<a name="l00034"></a>00034     <span class="keyword">class </span>scheduler;
+<a name="l00035"></a>00035 } <span class="comment">// namespace internal</span>
+<a name="l00037"></a>00037 <span class="comment"></span>
+<a name="l00039"></a>00039 
+<a name="l00042"></a><a class="code" href="a00169.html">00042</a> <span class="keyword">class </span><a class="code" href="a00169.html">task_scheduler_init</a>: internal::no_copy {
+<a name="l00044"></a>00044     internal::scheduler* my_scheduler;
+<a name="l00045"></a>00045 <span class="keyword">public</span>:
+<a name="l00046"></a>00046 
+<a name="l00048"></a><a class="code" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">00048</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> = -1;
+<a name="l00049"></a>00049 
+<a name="l00051"></a><a class="code" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">00051</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">deferred</a> = -2;
+<a name="l00052"></a>00052 
+<a name="l00054"></a>00054 
+<a name="l00062"></a>00062     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00169.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a> );
+<a name="l00063"></a>00063 
+<a name="l00065"></a>00065 
+<a name="l00066"></a>00066     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00169.html#d476053cc712e572554823492a5229ce">initialize</a>( <span class="keywordtype">int</span> number_of_threads, stack_size_type thread_stack_size );
 <a name="l00067"></a>00067 
-<a name="l00068"></a>00068 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_H */</span>
+<a name="l00069"></a>00069     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
+<a name="l00070"></a>00070 
+<a name="l00072"></a><a class="code" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">00072</a>     <a class="code" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">task_scheduler_init</a>( <span class="keywordtype">int</span> number_of_threads=<a class="code" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">automatic</a>, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)  {
+<a name="l00073"></a>00073         <a class="code" href="a00169.html#d476053cc712e572554823492a5229ce">initialize</a>( number_of_threads, thread_stack_size );
+<a name="l00074"></a>00074     }
+<a name="l00075"></a>00075 
+<a name="l00077"></a><a class="code" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">00077</a>     <a class="code" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">~task_scheduler_init</a>() {
+<a name="l00078"></a>00078         <span class="keywordflow">if</span>( my_scheduler ) 
+<a name="l00079"></a>00079             <a class="code" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">terminate</a>();
+<a name="l00080"></a>00080         internal::poison_pointer( my_scheduler );
+<a name="l00081"></a>00081     }
+<a name="l00083"></a>00083 
+<a name="l00090"></a>00090     <span class="keyword">static</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00169.html#ba00714c33a41a3c2216f48613971cab">default_num_threads</a> ();
+<a name="l00091"></a>00091 
+<a name="l00093"></a><a class="code" href="a00169.html#12752282977029f23416642bc03e8b74">00093</a>     <span class="keywordtype">bool</span> <a class="code" href="a00169.html#12752282977029f23416642bc03e8b74">is_active</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> my_scheduler != NULL; }
+<a name="l00094"></a>00094 };
+<a name="l00095"></a>00095 
+<a name="l00096"></a>00096 } <span class="comment">// namespace tbb</span>
+<a name="l00097"></a>00097 
+<a name="l00098"></a>00098 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_init_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00372.html b/doc/html/a00372.html
index d496f47..87886d1 100644
--- a/doc/html/a00372.html
+++ b/doc/html/a00372.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb_allocator.h Source File</title>
+<title>task_scheduler_observer.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>tbb_allocator.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>task_scheduler_observer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,157 +39,46 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_tbb_allocator_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_allocator_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_observer_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_observer_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include <new></span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <cstring></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00027"></a>00027 
+<a name="l00024"></a>00024 <span class="preprocessor">#include "atomic.h"</span>
+<a name="l00025"></a>00025 
+<a name="l00026"></a>00026 <span class="preprocessor">#if __TBB_SCHEDULER_OBSERVER</span>
+<a name="l00027"></a>00027 <span class="preprocessor"></span>
 <a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
 <a name="l00029"></a>00029 
-<a name="l00031"></a>00031 <span class="keyword">namespace </span>internal {
-<a name="l00032"></a>00032 
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC deallocate_via_handler_v3( <span class="keywordtype">void</span> *p );
-<a name="l00036"></a>00036 
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039     <span class="keywordtype">void</span>* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n );
-<a name="l00040"></a>00040 
-<a name="l00042"></a>00042     <span class="keywordtype">bool</span> __TBB_EXPORTED_FUNC is_malloc_used_v3();
-<a name="l00043"></a>00043 }
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>    <span class="comment">// Workaround for erroneous "unreferenced parameter" warning in method destroy.</span>
-<a name="l00048"></a>00048 <span class="preprocessor">    #pragma warning (push)</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4100)</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span>
+<a name="l00030"></a>00030 <span class="keyword">namespace </span>internal {
+<a name="l00031"></a>00031 
+<a name="l00032"></a>00032 <span class="keyword">class </span>observer_proxy;
+<a name="l00033"></a>00033 
+<a name="l00034"></a>00034 <span class="keyword">class </span>task_scheduler_observer_v3 {
+<a name="l00035"></a>00035     <span class="keyword">friend</span> <span class="keyword">class </span>observer_proxy;
+<a name="l00036"></a>00036     observer_proxy* my_proxy;
+<a name="l00037"></a>00037     atomic<intptr> my_busy_count;
+<a name="l00038"></a>00038 <span class="keyword">public</span>:
+<a name="l00040"></a>00040     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD observe( <span class="keywordtype">bool</span> state=<span class="keyword">true</span> );
+<a name="l00041"></a>00041 
+<a name="l00043"></a>00043     <span class="keywordtype">bool</span> is_observing()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_proxy!=NULL;}
+<a name="l00044"></a>00044 
+<a name="l00046"></a>00046     task_scheduler_observer_v3() : my_proxy(NULL) {my_busy_count=0;}
+<a name="l00047"></a>00047 
+<a name="l00049"></a>00049     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_entry( <span class="keywordtype">bool</span> <span class="comment">/*is_worker*/</span> ) {} 
+<a name="l00050"></a>00050 
+<a name="l00052"></a>00052     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_exit( <span class="keywordtype">bool</span> <span class="comment">/*is_worker*/</span> ) {}
 <a name="l00053"></a>00053 
-<a name="l00058"></a>00058 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00059"></a><a class="code" href="a00166.html">00059</a> <span class="keyword">class </span><a class="code" href="a00166.html">tbb_allocator</a> {
-<a name="l00060"></a>00060 <span class="keyword">public</span>:
-<a name="l00061"></a>00061     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
-<a name="l00062"></a>00062     <span class="keyword">typedef</span> value_type* pointer;
-<a name="l00063"></a>00063     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type* const_pointer;
-<a name="l00064"></a>00064     <span class="keyword">typedef</span> value_type& reference;
-<a name="l00065"></a>00065     <span class="keyword">typedef</span> <span class="keyword">const</span> value_type& const_reference;
-<a name="l00066"></a>00066     <span class="keyword">typedef</span> size_t size_type;
-<a name="l00067"></a>00067     <span class="keyword">typedef</span> ptrdiff_t difference_type;
-<a name="l00068"></a>00068     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00069"></a>00069         <span class="keyword">typedef</span> <a class="code" href="a00166.html">tbb_allocator<U></a> other;
-<a name="l00070"></a>00070     };
-<a name="l00071"></a>00071 
-<a name="l00073"></a><a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">00073</a>     <span class="keyword">enum</span> <a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> {
-<a name="l00074"></a>00074         scalable, 
-<a name="l00075"></a>00075         standard
-<a name="l00076"></a>00076     };
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078     <a class="code" href="a00166.html">tbb_allocator</a>() throw() {}
-<a name="l00079"></a>00079     tbb_allocator( <span class="keyword">const</span> tbb_allocator& ) throw() {}
-<a name="l00080"></a>00080     <span class="keyword">template</span><<span class="keyword">typename</span> U> tbb_allocator(<span class="keyword">const</span> tbb_allocator<U>&) throw() {}
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00083"></a>00083     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
-<a name="l00084"></a>00084     
-<a name="l00086"></a><a class="code" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">00086</a>     pointer <a class="code" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> = 0) {
-<a name="l00087"></a>00087         <span class="keywordflow">return</span> pointer(internal::allocate_via_handler_v3( n * <span class="keyword">sizeof</span>(value_type) ));
-<a name="l00088"></a>00088     }
-<a name="l00089"></a>00089 
-<a name="l00091"></a><a class="code" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">00091</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>( pointer p, size_type ) {
-<a name="l00092"></a>00092         internal::deallocate_via_handler_v3(p);        
-<a name="l00093"></a>00093     }
-<a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">00096</a>     size_type <a class="code" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const throw() {
-<a name="l00097"></a>00097         size_type max = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (value_type);
-<a name="l00098"></a>00098         <span class="keywordflow">return</span> (max > 0 ? max : 1);
-<a name="l00099"></a>00099     }
-<a name="l00100"></a>00100     
-<a name="l00102"></a><a class="code" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">00102</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>( pointer p, <span class="keyword">const</span> value_type& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) value_type(value);}
-<a name="l00103"></a>00103 
-<a name="l00105"></a><a class="code" href="a00166.html#ef133522bf55f05a605bee0763208281">00105</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#ef133522bf55f05a605bee0763208281">destroy</a>( pointer p ) {p->~value_type();}
-<a name="l00106"></a>00106 
-<a name="l00108"></a><a class="code" href="a00166.html#78701e7454ef8e1a25b5acd364367080">00108</a>     <span class="keyword">static</span> <a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> <a class="code" href="a00166.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>() {
-<a name="l00109"></a>00109         <span class="keywordflow">return</span> internal::is_malloc_used_v3() ? standard : scalable;
-<a name="l00110"></a>00110     }
-<a name="l00111"></a>00111 };
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113 <span class="preprocessor">#if _MSC_VER && !defined(__INTEL_COMPILER)</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#endif // warning 4100 is back</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="keyword">template</span><> 
-<a name="l00120"></a><a class="code" href="a00167.html">00120</a> <span class="keyword">class </span><a class="code" href="a00166.html">tbb_allocator</a><void> {
-<a name="l00121"></a>00121 <span class="keyword">public</span>:
-<a name="l00122"></a>00122     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
-<a name="l00123"></a>00123     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
-<a name="l00124"></a>00124     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
-<a name="l00125"></a>00125     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00126"></a>00126         <span class="keyword">typedef</span> <a class="code" href="a00166.html">tbb_allocator<U></a> other;
-<a name="l00127"></a>00127     };
-<a name="l00128"></a>00128 };
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00131"></a>00131 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00166.html">tbb_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00166.html">tbb_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00134"></a>00134 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> tbb_allocator<T>&, <span class="keyword">const</span> tbb_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
-<a name="l00135"></a>00135 
-<a name="l00137"></a>00137 
-<a name="l00142"></a>00142 <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">template</span><<span class="keyword">typename</span> X> <span class="keyword">class </span>Allocator = tbb_allocator>
-<a name="l00143"></a><a class="code" href="a00175.html">00143</a> <span class="keyword">class </span><a class="code" href="a00175.html">zero_allocator</a> : <span class="keyword">public</span> Allocator<T>
-<a name="l00144"></a>00144 {
-<a name="l00145"></a>00145 <span class="keyword">public</span>:
-<a name="l00146"></a>00146     <span class="keyword">typedef</span> Allocator<T> base_allocator_type;
-<a name="l00147"></a>00147     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::value_type value_type;
-<a name="l00148"></a>00148     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::pointer pointer;
-<a name="l00149"></a>00149     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::const_pointer const_pointer;
-<a name="l00150"></a>00150     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::reference reference;
-<a name="l00151"></a>00151     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::const_reference const_reference;
-<a name="l00152"></a>00152     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::size_type size_type;
-<a name="l00153"></a>00153     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::difference_type difference_type;
-<a name="l00154"></a>00154     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00155"></a>00155         <span class="keyword">typedef</span> <a class="code" href="a00175.html">zero_allocator<U, Allocator></a> other;
-<a name="l00156"></a>00156     };
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <a class="code" href="a00175.html">zero_allocator</a>() <span class="keywordflow">throw</span>() { }
-<a name="l00159"></a>00159     <a class="code" href="a00175.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator</a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( a ) { }
-<a name="l00160"></a>00160     <span class="keyword">template</span><<span class="keyword">typename</span> U>
-<a name="l00161"></a>00161     <a class="code" href="a00175.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<U></a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( Allocator<U>( a ) ) { }
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163     pointer allocate(<span class="keyword">const</span> size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span> *hint = 0 ) {
-<a name="l00164"></a>00164         pointer ptr = base_allocator_type::allocate( n, hint );
-<a name="l00165"></a>00165         std::memset( ptr, 0, n * <span class="keyword">sizeof</span>(value_type) );
-<a name="l00166"></a>00166         <span class="keywordflow">return</span> ptr;
-<a name="l00167"></a>00167     }
-<a name="l00168"></a>00168 };
-<a name="l00169"></a>00169 
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172 <span class="keyword">template</span><<span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>Allocator> 
-<a name="l00173"></a><a class="code" href="a00176.html">00173</a> <span class="keyword">class </span><a class="code" href="a00175.html">zero_allocator</a><void, Allocator> : <span class="keyword">public</span> Allocator<void> {
-<a name="l00174"></a>00174 <span class="keyword">public</span>:
-<a name="l00175"></a>00175     <span class="keyword">typedef</span> Allocator<void> base_allocator_type;
-<a name="l00176"></a>00176     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::value_type value_type;
-<a name="l00177"></a>00177     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::pointer pointer;
-<a name="l00178"></a>00178     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::const_pointer const_pointer;
-<a name="l00179"></a>00179     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00180"></a>00180         <span class="keyword">typedef</span> <a class="code" href="a00175.html">zero_allocator<U, Allocator></a> other;
-<a name="l00181"></a>00181     };
-<a name="l00182"></a>00182 };
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="keyword">template</span><<span class="keyword">typename</span> T1, <span class="keyword">template</span><<span class="keyword">typename</span> X1> <span class="keyword">class </span>B1, <span class="keyword">typename</span> T2, <span class="keyword">template</span><<span class="keyword">typename</span> X2> <span class="keyword">class </span>B2>
-<a name="l00185"></a>00185 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<T1,B1></a> &a, <span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<T2,B2></a> &b) {
-<a name="l00186"></a>00186     <span class="keywordflow">return</span> static_cast< B1<T1> >(a) == <span class="keyword">static_cast</span>< B2<T2> >(b);
-<a name="l00187"></a>00187 }
-<a name="l00188"></a>00188 <span class="keyword">template</span><<span class="keyword">typename</span> T1, <span class="keyword">template</span><<span class="keyword">typename</span> X1> <span class="keyword">class </span>B1, <span class="keyword">typename</span> T2, <span class="keyword">template</span><<span class="keyword">typename</span> X2> <span class="keyword">class </span>B2>
-<a name="l00189"></a>00189 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> zero_allocator<T1,B1> &a, <span class="keyword">const</span> zero_allocator<T2,B2> &b) {
-<a name="l00190"></a>00190     <span class="keywordflow">return</span> static_cast< B1<T1> >(a) != <span class="keyword">static_cast</span>< B2<T2> >(b);
-<a name="l00191"></a>00191 }
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193 } <span class="comment">// namespace tbb </span>
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_allocator_H */</span>
+<a name="l00055"></a>00055     <span class="keyword">virtual</span> ~task_scheduler_observer_v3() {observe(<span class="keyword">false</span>);}
+<a name="l00056"></a>00056 };
+<a name="l00057"></a>00057 
+<a name="l00058"></a>00058 } <span class="comment">// namespace internal</span>
+<a name="l00059"></a>00059 
+<a name="l00060"></a>00060 <span class="keyword">typedef</span> internal::task_scheduler_observer_v3 task_scheduler_observer;
+<a name="l00061"></a>00061 
+<a name="l00062"></a>00062 } <span class="comment">// namespace tbb</span>
+<a name="l00063"></a>00063 
+<a name="l00064"></a>00064 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
+<a name="l00065"></a>00065 
+<a name="l00066"></a>00066 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_observer_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00371.html b/doc/html/a00374.html
similarity index 100%
copy from doc/html/a00371.html
copy to doc/html/a00374.html
diff --git a/doc/html/a00372.html b/doc/html/a00375.html
similarity index 88%
copy from doc/html/a00372.html
copy to doc/html/a00375.html
index d496f47..051ae73 100644
--- a/doc/html/a00372.html
+++ b/doc/html/a00375.html
@@ -67,7 +67,7 @@
 <a name="l00051"></a>00051 <span class="preprocessor"></span>
 <a name="l00053"></a>00053 
 <a name="l00058"></a>00058 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00059"></a><a class="code" href="a00166.html">00059</a> <span class="keyword">class </span><a class="code" href="a00166.html">tbb_allocator</a> {
+<a name="l00059"></a><a class="code" href="a00170.html">00059</a> <span class="keyword">class </span><a class="code" href="a00170.html">tbb_allocator</a> {
 <a name="l00060"></a>00060 <span class="keyword">public</span>:
 <a name="l00061"></a>00061     <span class="keyword">typedef</span> <span class="keyword">typename</span> internal::allocator_type<T>::value_type value_type;
 <a name="l00062"></a>00062     <span class="keyword">typedef</span> value_type* pointer;
@@ -77,39 +77,39 @@
 <a name="l00066"></a>00066     <span class="keyword">typedef</span> size_t size_type;
 <a name="l00067"></a>00067     <span class="keyword">typedef</span> ptrdiff_t difference_type;
 <a name="l00068"></a>00068     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00069"></a>00069         <span class="keyword">typedef</span> <a class="code" href="a00166.html">tbb_allocator<U></a> other;
+<a name="l00069"></a>00069         <span class="keyword">typedef</span> <a class="code" href="a00170.html">tbb_allocator<U></a> other;
 <a name="l00070"></a>00070     };
 <a name="l00071"></a>00071 
-<a name="l00073"></a><a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">00073</a>     <span class="keyword">enum</span> <a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> {
+<a name="l00073"></a><a class="code" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">00073</a>     <span class="keyword">enum</span> <a class="code" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> {
 <a name="l00074"></a>00074         scalable, 
 <a name="l00075"></a>00075         standard
 <a name="l00076"></a>00076     };
 <a name="l00077"></a>00077 
-<a name="l00078"></a>00078     <a class="code" href="a00166.html">tbb_allocator</a>() throw() {}
+<a name="l00078"></a>00078     <a class="code" href="a00170.html">tbb_allocator</a>() throw() {}
 <a name="l00079"></a>00079     tbb_allocator( <span class="keyword">const</span> tbb_allocator& ) throw() {}
 <a name="l00080"></a>00080     <span class="keyword">template</span><<span class="keyword">typename</span> U> tbb_allocator(<span class="keyword">const</span> tbb_allocator<U>&) throw() {}
 <a name="l00081"></a>00081 
 <a name="l00082"></a>00082     pointer address(reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
 <a name="l00083"></a>00083     const_pointer address(const_reference x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> &x;}
 <a name="l00084"></a>00084     
-<a name="l00086"></a><a class="code" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">00086</a>     pointer <a class="code" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> = 0) {
+<a name="l00086"></a><a class="code" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">00086</a>     pointer <a class="code" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">allocate</a>( size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="comment">/*hint*/</span> = 0) {
 <a name="l00087"></a>00087         <span class="keywordflow">return</span> pointer(internal::allocate_via_handler_v3( n * <span class="keyword">sizeof</span>(value_type) ));
 <a name="l00088"></a>00088     }
 <a name="l00089"></a>00089 
-<a name="l00091"></a><a class="code" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">00091</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>( pointer p, size_type ) {
+<a name="l00091"></a><a class="code" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">00091</a>     <span class="keywordtype">void</span> <a class="code" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">deallocate</a>( pointer p, size_type ) {
 <a name="l00092"></a>00092         internal::deallocate_via_handler_v3(p);        
 <a name="l00093"></a>00093     }
 <a name="l00094"></a>00094 
-<a name="l00096"></a><a class="code" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">00096</a>     size_type <a class="code" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const throw() {
+<a name="l00096"></a><a class="code" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">00096</a>     size_type <a class="code" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">max_size</a>() const throw() {
 <a name="l00097"></a>00097         size_type max = static_cast<size_type>(-1) / <span class="keyword">sizeof</span> (value_type);
 <a name="l00098"></a>00098         <span class="keywordflow">return</span> (max > 0 ? max : 1);
 <a name="l00099"></a>00099     }
 <a name="l00100"></a>00100     
-<a name="l00102"></a><a class="code" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">00102</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>( pointer p, <span class="keyword">const</span> value_type& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) value_type(value);}
+<a name="l00102"></a><a class="code" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">00102</a>     <span class="keywordtype">void</span> <a class="code" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">construct</a>( pointer p, <span class="keyword">const</span> value_type& value ) {<span class="keyword">new</span>(static_cast<void*>(p)) value_type(value);}
 <a name="l00103"></a>00103 
-<a name="l00105"></a><a class="code" href="a00166.html#ef133522bf55f05a605bee0763208281">00105</a>     <span class="keywordtype">void</span> <a class="code" href="a00166.html#ef133522bf55f05a605bee0763208281">destroy</a>( pointer p ) {p->~value_type();}
+<a name="l00105"></a><a class="code" href="a00170.html#ef133522bf55f05a605bee0763208281">00105</a>     <span class="keywordtype">void</span> <a class="code" href="a00170.html#ef133522bf55f05a605bee0763208281">destroy</a>( pointer p ) {p->~value_type();}
 <a name="l00106"></a>00106 
-<a name="l00108"></a><a class="code" href="a00166.html#78701e7454ef8e1a25b5acd364367080">00108</a>     <span class="keyword">static</span> <a class="code" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> <a class="code" href="a00166.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>() {
+<a name="l00108"></a><a class="code" href="a00170.html#78701e7454ef8e1a25b5acd364367080">00108</a>     <span class="keyword">static</span> <a class="code" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">malloc_type</a> <a class="code" href="a00170.html#78701e7454ef8e1a25b5acd364367080">allocator_type</a>() {
 <a name="l00109"></a>00109         <span class="keywordflow">return</span> internal::is_malloc_used_v3() ? standard : scalable;
 <a name="l00110"></a>00110     }
 <a name="l00111"></a>00111 };
@@ -120,25 +120,25 @@
 <a name="l00116"></a>00116 <span class="preprocessor"></span>
 <a name="l00118"></a>00118 
 <a name="l00119"></a>00119 <span class="keyword">template</span><> 
-<a name="l00120"></a><a class="code" href="a00167.html">00120</a> <span class="keyword">class </span><a class="code" href="a00166.html">tbb_allocator</a><void> {
+<a name="l00120"></a><a class="code" href="a00171.html">00120</a> <span class="keyword">class </span><a class="code" href="a00170.html">tbb_allocator</a><void> {
 <a name="l00121"></a>00121 <span class="keyword">public</span>:
 <a name="l00122"></a>00122     <span class="keyword">typedef</span> <span class="keywordtype">void</span>* pointer;
 <a name="l00123"></a>00123     <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* const_pointer;
 <a name="l00124"></a>00124     <span class="keyword">typedef</span> <span class="keywordtype">void</span> value_type;
 <a name="l00125"></a>00125     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00126"></a>00126         <span class="keyword">typedef</span> <a class="code" href="a00166.html">tbb_allocator<U></a> other;
+<a name="l00126"></a>00126         <span class="keyword">typedef</span> <a class="code" href="a00170.html">tbb_allocator<U></a> other;
 <a name="l00127"></a>00127     };
 <a name="l00128"></a>00128 };
 <a name="l00129"></a>00129 
 <a name="l00130"></a>00130 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00131"></a>00131 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00166.html">tbb_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00166.html">tbb_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
+<a name="l00131"></a>00131 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00170.html">tbb_allocator<T></a>&, <span class="keyword">const</span> <a class="code" href="a00170.html">tbb_allocator<U></a>& ) {<span class="keywordflow">return</span> <span class="keyword">true</span>;}
 <a name="l00132"></a>00132 
 <a name="l00133"></a>00133 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
 <a name="l00134"></a>00134 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> tbb_allocator<T>&, <span class="keyword">const</span> tbb_allocator<U>& ) {<span class="keywordflow">return</span> <span class="keyword">false</span>;}
 <a name="l00135"></a>00135 
 <a name="l00137"></a>00137 
 <a name="l00142"></a>00142 <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">template</span><<span class="keyword">typename</span> X> <span class="keyword">class </span>Allocator = tbb_allocator>
-<a name="l00143"></a><a class="code" href="a00175.html">00143</a> <span class="keyword">class </span><a class="code" href="a00175.html">zero_allocator</a> : <span class="keyword">public</span> Allocator<T>
+<a name="l00143"></a><a class="code" href="a00179.html">00143</a> <span class="keyword">class </span><a class="code" href="a00179.html">zero_allocator</a> : <span class="keyword">public</span> Allocator<T>
 <a name="l00144"></a>00144 {
 <a name="l00145"></a>00145 <span class="keyword">public</span>:
 <a name="l00146"></a>00146     <span class="keyword">typedef</span> Allocator<T> base_allocator_type;
@@ -150,13 +150,13 @@
 <a name="l00152"></a>00152     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::size_type size_type;
 <a name="l00153"></a>00153     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::difference_type difference_type;
 <a name="l00154"></a>00154     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00155"></a>00155         <span class="keyword">typedef</span> <a class="code" href="a00175.html">zero_allocator<U, Allocator></a> other;
+<a name="l00155"></a>00155         <span class="keyword">typedef</span> <a class="code" href="a00179.html">zero_allocator<U, Allocator></a> other;
 <a name="l00156"></a>00156     };
 <a name="l00157"></a>00157 
-<a name="l00158"></a>00158     <a class="code" href="a00175.html">zero_allocator</a>() <span class="keywordflow">throw</span>() { }
-<a name="l00159"></a>00159     <a class="code" href="a00175.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator</a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( a ) { }
+<a name="l00158"></a>00158     <a class="code" href="a00179.html">zero_allocator</a>() <span class="keywordflow">throw</span>() { }
+<a name="l00159"></a>00159     <a class="code" href="a00179.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00179.html">zero_allocator</a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( a ) { }
 <a name="l00160"></a>00160     <span class="keyword">template</span><<span class="keyword">typename</span> U>
-<a name="l00161"></a>00161     <a class="code" href="a00175.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<U></a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( Allocator<U>( a ) ) { }
+<a name="l00161"></a>00161     <a class="code" href="a00179.html">zero_allocator</a>(<span class="keyword">const</span> <a class="code" href="a00179.html">zero_allocator<U></a> &a) <span class="keywordflow">throw</span>() : base_allocator_type( Allocator<U>( a ) ) { }
 <a name="l00162"></a>00162 
 <a name="l00163"></a>00163     pointer allocate(<span class="keyword">const</span> size_type n, <span class="keyword">const</span> <span class="keywordtype">void</span> *hint = 0 ) {
 <a name="l00164"></a>00164         pointer ptr = base_allocator_type::allocate( n, hint );
@@ -167,19 +167,19 @@
 <a name="l00169"></a>00169 
 <a name="l00171"></a>00171 
 <a name="l00172"></a>00172 <span class="keyword">template</span><<span class="keyword">template</span><<span class="keyword">typename</span> T> <span class="keyword">class </span>Allocator> 
-<a name="l00173"></a><a class="code" href="a00176.html">00173</a> <span class="keyword">class </span><a class="code" href="a00175.html">zero_allocator</a><void, Allocator> : <span class="keyword">public</span> Allocator<void> {
+<a name="l00173"></a><a class="code" href="a00180.html">00173</a> <span class="keyword">class </span><a class="code" href="a00179.html">zero_allocator</a><void, Allocator> : <span class="keyword">public</span> Allocator<void> {
 <a name="l00174"></a>00174 <span class="keyword">public</span>:
 <a name="l00175"></a>00175     <span class="keyword">typedef</span> Allocator<void> base_allocator_type;
 <a name="l00176"></a>00176     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::value_type value_type;
 <a name="l00177"></a>00177     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::pointer pointer;
 <a name="l00178"></a>00178     <span class="keyword">typedef</span> <span class="keyword">typename</span> base_allocator_type::const_pointer const_pointer;
 <a name="l00179"></a>00179     <span class="keyword">template</span><<span class="keyword">typename</span> U> <span class="keyword">struct </span>rebind {
-<a name="l00180"></a>00180         <span class="keyword">typedef</span> <a class="code" href="a00175.html">zero_allocator<U, Allocator></a> other;
+<a name="l00180"></a>00180         <span class="keyword">typedef</span> <a class="code" href="a00179.html">zero_allocator<U, Allocator></a> other;
 <a name="l00181"></a>00181     };
 <a name="l00182"></a>00182 };
 <a name="l00183"></a>00183 
 <a name="l00184"></a>00184 <span class="keyword">template</span><<span class="keyword">typename</span> T1, <span class="keyword">template</span><<span class="keyword">typename</span> X1> <span class="keyword">class </span>B1, <span class="keyword">typename</span> T2, <span class="keyword">template</span><<span class="keyword">typename</span> X2> <span class="keyword">class </span>B2>
-<a name="l00185"></a>00185 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<T1,B1></a> &a, <span class="keyword">const</span> <a class="code" href="a00175.html">zero_allocator<T2,B2></a> &b) {
+<a name="l00185"></a>00185 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="a00179.html">zero_allocator<T1,B1></a> &a, <span class="keyword">const</span> <a class="code" href="a00179.html">zero_allocator<T2,B2></a> &b) {
 <a name="l00186"></a>00186     <span class="keywordflow">return</span> static_cast< B1<T1> >(a) == <span class="keyword">static_cast</span>< B2<T2> >(b);
 <a name="l00187"></a>00187 }
 <a name="l00188"></a>00188 <span class="keyword">template</span><<span class="keyword">typename</span> T1, <span class="keyword">template</span><<span class="keyword">typename</span> X1> <span class="keyword">class </span>B1, <span class="keyword">typename</span> T2, <span class="keyword">template</span><<span class="keyword">typename</span> X2> <span class="keyword">class </span>B2>
diff --git a/doc/html/a00377.html b/doc/html/a00377.html
deleted file mode 100644
index 4591196..0000000
--- a/doc/html/a00377.html
+++ /dev/null
@@ -1,254 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb_exception.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>tbb_exception.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_exception_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_exception_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include <stdexcept></span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="preprocessor">#if __TBB_EXCEPTIONS && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC)</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#error The current compilation environment does not support exception handling. Please set __TBB_EXCEPTIONS to 0 in tbb_config.h</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span>
-<a name="l00031"></a>00031 <span class="keyword">namespace </span>tbb {
-<a name="l00032"></a>00032 
-<a name="l00034"></a><a class="code" href="a00121.html">00034</a> <span class="keyword">class </span><a class="code" href="a00121.html">bad_last_alloc</a> : <span class="keyword">public</span> std::bad_alloc {
-<a name="l00035"></a>00035 <span class="keyword">public</span>:
-<a name="l00036"></a>00036     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <span class="stringliteral">"bad allocation in previous or concurrent attempt"</span>; }
-<a name="l00037"></a>00037     <span class="keyword">virtual</span> ~<a class="code" href="a00121.html">bad_last_alloc</a>() <span class="keywordflow">throw</span>() {}
-<a name="l00038"></a>00038 };
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 <span class="keyword">namespace </span>internal {
-<a name="l00041"></a>00041 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4() ;
-<a name="l00042"></a>00042 } <span class="comment">// namespace internal</span>
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 } <span class="comment">// namespace tbb</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_allocator.h"</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#include <exception></span>
-<a name="l00049"></a>00049 <span class="preprocessor">#include <typeinfo></span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include <new></span>
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="keyword">namespace </span>tbb {
-<a name="l00053"></a>00053 
-<a name="l00055"></a>00055 
-<a name="l00075"></a><a class="code" href="a00168.html">00075</a> <span class="keyword">class </span><a class="code" href="a00168.html">tbb_exception</a> : <span class="keyword">public</span> std::exception {
-<a name="l00076"></a>00076 <span class="keyword">public</span>:
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079     <span class="keyword">virtual</span> <a class="code" href="a00168.html">tbb_exception</a>* <a class="code" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> () <span class="keywordflow">throw</span>() = 0;
-<a name="l00080"></a>00080     
-<a name="l00082"></a>00082 
-<a name="l00084"></a>00084     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> () <span class="keywordflow">throw</span>() = 0;
-<a name="l00085"></a>00085 
-<a name="l00087"></a>00087 
-<a name="l00091"></a>00091     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> () = 0;
-<a name="l00092"></a>00092 
-<a name="l00094"></a>00094     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00168.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
-<a name="l00095"></a>00095 
-<a name="l00097"></a>00097     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
-<a name="l00098"></a>00098 };
-<a name="l00099"></a>00099 
-<a name="l00101"></a>00101 
-<a name="l00105"></a><a class="code" href="a00127.html">00105</a> <span class="keyword">class </span><a class="code" href="a00127.html">captured_exception</a> : <span class="keyword">public</span> <a class="code" href="a00168.html">tbb_exception</a>
-<a name="l00106"></a>00106 {
-<a name="l00107"></a>00107 <span class="keyword">public</span>:
-<a name="l00108"></a>00108     <a class="code" href="a00127.html">captured_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src )
-<a name="l00109"></a>00109         : my_dynamic(<span class="keyword">false</span>)
-<a name="l00110"></a>00110     {
-<a name="l00111"></a>00111         set(src.<a class="code" href="a00127.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00127.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
-<a name="l00112"></a>00112     }
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114     <a class="code" href="a00127.html">captured_exception</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* info )
-<a name="l00115"></a>00115         : my_dynamic(<span class="keyword">false</span>)
-<a name="l00116"></a>00116     {
-<a name="l00117"></a>00117         set(name, info);
-<a name="l00118"></a>00118     }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120     __TBB_EXPORTED_METHOD ~<a class="code" href="a00127.html">captured_exception</a> () <span class="keywordflow">throw</span>() {
-<a name="l00121"></a>00121         clear();
-<a name="l00122"></a>00122     }
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124     <a class="code" href="a00127.html">captured_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src ) {
-<a name="l00125"></a>00125         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
-<a name="l00126"></a>00126             clear();
-<a name="l00127"></a>00127             set(src.<a class="code" href="a00127.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00127.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00130"></a>00130     }
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132     <span class="comment">/*override*/</span> 
-<a name="l00133"></a>00133     <a class="code" href="a00127.html">captured_exception</a>* <a class="code" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move</a> () <span class="keywordflow">throw</span>();
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135     <span class="comment">/*override*/</span> 
-<a name="l00136"></a>00136     <span class="keywordtype">void</span> <a class="code" href="a00127.html#667812a82f1525e968c52593dea0ef4c">destroy</a> () <span class="keywordflow">throw</span>();
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138     <span class="comment">/*override*/</span> 
-<a name="l00139"></a><a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">00139</a>     <span class="keywordtype">void</span> <a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () { <span class="keywordflow">throw</span> *<span class="keyword">this</span>; }
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141     <span class="comment">/*override*/</span> 
-<a name="l00142"></a>00142     <span class="keyword">const</span> <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const throw();
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144     <span class="comment">/*override*/</span> 
-<a name="l00145"></a>00145     const <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const throw();
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147 private:
-<a name="l00149"></a>00149     <a class="code" href="a00127.html">captured_exception</a>() {}
-<a name="l00150"></a>00150 
-<a name="l00152"></a>00152     <span class="keyword">static</span> captured_exception* allocate ( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* info );
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154     <span class="keywordtype">void</span> set ( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* info ) <span class="keywordflow">throw</span>();
-<a name="l00155"></a>00155     <span class="keywordtype">void</span> clear () throw();
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157     <span class="keywordtype">bool</span> my_dynamic;
-<a name="l00158"></a>00158     const <span class="keywordtype">char</span>* my_exception_name;
-<a name="l00159"></a>00159     const <span class="keywordtype">char</span>* my_exception_info;
-<a name="l00160"></a>00160 };
-<a name="l00161"></a>00161 
-<a name="l00163"></a>00163 
-<a name="l00167"></a>00167 template<typename ExceptionData>
-<a name="l00168"></a><a class="code" href="a00141.html">00168</a> class <a class="code" href="a00141.html">movable_exception</a> : public <a class="code" href="a00168.html">tbb_exception</a>
-<a name="l00169"></a>00169 {
-<a name="l00170"></a>00170     <span class="keyword">typedef</span> <a class="code" href="a00141.html">movable_exception<ExceptionData></a> <a class="code" href="a00141.html">self_type</a>;
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172 <span class="keyword">public</span>:
-<a name="l00173"></a>00173     <a class="code" href="a00141.html">movable_exception</a> ( <span class="keyword">const</span> ExceptionData& data ) 
-<a name="l00174"></a>00174         : my_exception_data(data)
-<a name="l00175"></a>00175         , my_dynamic(<span class="keyword">false</span>)
-<a name="l00176"></a>00176         , my_exception_name(<span class="keyword">typeid</span>(self_type).<a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>())
-<a name="l00177"></a>00177     {}
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179     <a class="code" href="a00141.html">movable_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& src ) <span class="keywordflow">throw</span> () 
-<a name="l00180"></a>00180         : my_exception_data(src.<a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>)
-<a name="l00181"></a>00181         , my_dynamic(<span class="keyword">false</span>)
-<a name="l00182"></a>00182         , my_exception_name(src.<a class="code" href="a00141.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>)
-<a name="l00183"></a>00183     {}
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185     ~<a class="code" href="a00141.html">movable_exception</a> () <span class="keywordflow">throw</span>() {}
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187     <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& src ) {
-<a name="l00188"></a>00188         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
-<a name="l00189"></a>00189             my_exception_data = src.<a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
-<a name="l00190"></a>00190             my_exception_name = src.<a class="code" href="a00141.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>;
-<a name="l00191"></a>00191         }
-<a name="l00192"></a>00192         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
-<a name="l00193"></a>00193     }
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195     ExceptionData& data () <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> my_exception_data; }
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197     <span class="keyword">const</span> ExceptionData& data () <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> my_exception_data; }
-<a name="l00198"></a>00198 
-<a name="l00199"></a><a class="code" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">00199</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a> () const throw() { <span class="keywordflow">return</span> my_exception_name; }
-<a name="l00200"></a>00200 
-<a name="l00201"></a><a class="code" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">00201</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what</a> () const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"tbb::movable_exception"</span>; }
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203     <span class="comment">/*override*/</span> 
-<a name="l00204"></a><a class="code" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">00204</a>     <a class="code" href="a00141.html">movable_exception</a>* <a class="code" href="a00127.html#df6bbb78a362fe862a341e81e2999810">move</a> () throw() {
-<a name="l00205"></a>00205         <span class="keywordtype">void</span>* e = internal::allocate_via_handler_v3(<span class="keyword">sizeof</span>(<a class="code" href="a00141.html">movable_exception</a>));
-<a name="l00206"></a>00206         <span class="keywordflow">if</span> ( e ) {
-<a name="l00207"></a>00207             <span class="keyword">new</span> (e) movable_exception(*<span class="keyword">this</span>);
-<a name="l00208"></a>00208             ((movable_exception*)e)->my_dynamic = <span class="keyword">true</span>;
-<a name="l00209"></a>00209         }
-<a name="l00210"></a>00210         <span class="keywordflow">return</span> (movable_exception*)e;
-<a name="l00211"></a>00211     }
-<a name="l00212"></a>00212     <span class="comment">/*override*/</span> 
-<a name="l00213"></a><a class="code" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">00213</a>     <span class="keywordtype">void</span> <a class="code" href="a00127.html#667812a82f1525e968c52593dea0ef4c">destroy</a> () throw() {
-<a name="l00214"></a>00214         __TBB_ASSERT ( my_dynamic, <span class="stringliteral">"Method destroy can be called only on dynamically allocated movable_exceptions"</span> );
-<a name="l00215"></a>00215         <span class="keywordflow">if</span> ( my_dynamic ) {
-<a name="l00216"></a>00216             this->~<a class="code" href="a00141.html">movable_exception</a>();
-<a name="l00217"></a>00217             internal::deallocate_via_handler_v3(<span class="keyword">this</span>);
-<a name="l00218"></a>00218         }
-<a name="l00219"></a>00219     }
-<a name="l00220"></a>00220     <span class="comment">/*override*/</span> 
-<a name="l00221"></a><a class="code" href="a00141.html#17cffba35811c92b7e65d63506b69602">00221</a>     <span class="keywordtype">void</span> <a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () {
-<a name="l00222"></a>00222         <span class="keywordflow">throw</span> *<span class="keyword">this</span>;
-<a name="l00223"></a>00223     }
-<a name="l00224"></a>00224 
-<a name="l00225"></a>00225 <span class="keyword">protected</span>:
-<a name="l00227"></a><a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">00227</a>     ExceptionData  my_exception_data;
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229 <span class="keyword">private</span>:
-<a name="l00231"></a>00231     <span class="keywordtype">bool</span> my_dynamic;
-<a name="l00232"></a>00232 
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
-<a name="l00236"></a>00236 };
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238 <span class="preprocessor">#if !TBB_USE_CAPTURED_EXCEPTION</span>
-<a name="l00239"></a>00239 <span class="preprocessor"></span><span class="keyword">namespace </span>internal {
-<a name="l00240"></a>00240 
-<a name="l00242"></a>00242 
-<a name="l00244"></a><a class="code" href="a00169.html">00244</a> <span class="keyword">class </span><a class="code" href="a00169.html">tbb_exception_ptr</a> {
-<a name="l00245"></a>00245     std::exception_ptr  my_ptr;
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247 <span class="keyword">public</span>:
-<a name="l00248"></a>00248     <span class="keyword">static</span> <a class="code" href="a00169.html">tbb_exception_ptr</a>* allocate ();
-<a name="l00249"></a>00249     <span class="keyword">static</span> <a class="code" href="a00169.html">tbb_exception_ptr</a>* allocate ( <span class="keyword">const</span> <a class="code" href="a00168.html">tbb_exception</a>& );
-<a name="l00250"></a>00250     <span class="keyword">static</span> <a class="code" href="a00169.html">tbb_exception_ptr</a>* allocate ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& );
-<a name="l00251"></a>00251     
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254     <span class="keywordtype">void</span> <a class="code" href="a00127.html#667812a82f1525e968c52593dea0ef4c">destroy</a> () <span class="keywordflow">throw</span>();
-<a name="l00255"></a>00255 
-<a name="l00257"></a><a class="code" href="a00169.html#292832fd5c523e3d8081a22247840a1d">00257</a>     <span class="keywordtype">void</span> <a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () { std::rethrow_exception(my_ptr); }
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259 <span class="keyword">private</span>:
-<a name="l00260"></a>00260     <a class="code" href="a00169.html">tbb_exception_ptr</a> ( <span class="keyword">const</span> std::exception_ptr& src ) : my_ptr(src) {}
-<a name="l00261"></a>00261     tbb_exception_ptr ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src ) : my_ptr(std::copy_exception(src)) {}
-<a name="l00262"></a>00262 }; <span class="comment">// class tbb::internal::tbb_exception_ptr</span>
-<a name="l00263"></a>00263 
-<a name="l00264"></a>00264 } <span class="comment">// namespace internal</span>
-<a name="l00265"></a>00265 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267 } <span class="comment">// namespace tbb</span>
-<a name="l00268"></a>00268 
-<a name="l00269"></a>00269 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_exception_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00378.html b/doc/html/a00378.html
deleted file mode 100644
index 88ca0c2..0000000
--- a/doc/html/a00378.html
+++ /dev/null
@@ -1,604 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb_machine.h Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.4.7 -->
-<div class="tabs">
-  <ul>
-    <li><a href="index.html"><span>Main Page</span></a></li>
-    <li><a href="modules.html"><span>Modules</span></a></li>
-    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-    <li><a href="annotated.html"><span>Classes</span></a></li>
-    <li id="current"><a href="files.html"><span>Files</span></a></li>
-    <li><a href="pages.html"><span>Related Pages</span></a></li>
-  </ul></div>
-<div class="tabs">
-  <ul>
-    <li><a href="files.html"><span>File List</span></a></li>
-    <li><a href="globals.html"><span>File Members</span></a></li>
-  </ul></div>
-<h1>tbb_machine.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
-<a name="l00003"></a>00003 <span class="comment"></span>
-<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
-<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
-<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
-<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
-<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
-<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
-<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
-<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
-<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
-<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
-<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
-<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
-<a name="l00018"></a>00018 <span class="comment">    writing.</span>
-<a name="l00019"></a>00019 <span class="comment">*/</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_machine_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_machine_H</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span>
-<a name="l00028"></a>00028 <span class="preprocessor">#ifdef _MANAGED</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(push, off)</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#if __MINGW32__</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00034"></a>00034 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> __declspec(dllimport) int __stdcall SwitchToThread( <span class="keywordtype">void</span> );
-<a name="l00035"></a>00035 <span class="preprocessor">#define __TBB_Yield()  SwitchToThread()</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#elif defined(_M_IX86)</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_ia32.h"</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#elif defined(_M_AMD64) </span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_intel64.h"</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#else</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#error Unsupported platform</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 <span class="preprocessor">#ifdef _MANAGED</span>
-<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(pop)</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>
-<a name="l00048"></a>00048 <span class="preprocessor">#elif __linux__ || __FreeBSD__</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span>
-<a name="l00050"></a>00050 <span class="preprocessor">#if __i386__</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#elif __ia64__</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia64.h"</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span>
-<a name="l00058"></a>00058 <span class="preprocessor">#elif __APPLE__</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span>
-<a name="l00060"></a>00060 <span class="preprocessor">#if __i386__</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
-<a name="l00064"></a>00064 <span class="preprocessor">#elif __POWERPC__</span>
-<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#include "machine/mac_ppc.h"</span>
-<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span>
-<a name="l00068"></a>00068 <span class="preprocessor">#elif _AIX</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span>
-<a name="l00070"></a>00070 <span class="preprocessor">#include "machine/ibm_aix51.h"</span>
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072 <span class="preprocessor">#elif __sun || __SUNPRO_CC</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span>
-<a name="l00074"></a>00074 <span class="preprocessor">#define __asm__ asm </span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define __volatile__ volatile</span>
-<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#if __i386  || __i386__</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
-<a name="l00078"></a>00078 <span class="preprocessor">#elif __x86_64__</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
-<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span>
-<a name="l00082"></a>00082 <span class="preprocessor">#endif</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span>
-<a name="l00084"></a>00084 <span class="preprocessor">#if    !defined(__TBB_CompareAndSwap4) \</span>
-<a name="l00085"></a>00085 <span class="preprocessor">    || !defined(__TBB_CompareAndSwap8) \</span>
-<a name="l00086"></a>00086 <span class="preprocessor">    || !defined(__TBB_Yield)           \</span>
-<a name="l00087"></a>00087 <span class="preprocessor">    || !defined(__TBB_release_consistency_helper)</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#error Minimal requirements for tbb_machine.h not satisfied </span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span>
-<a name="l00091"></a>00091 <span class="preprocessor">#ifndef __TBB_load_with_acquire</span>
-<a name="l00093"></a>00093 <span class="preprocessor">    template<typename T></span>
-<a name="l00094"></a>00094 <span class="preprocessor"></span>    <span class="keyword">inline</span> T __TBB_load_with_acquire(<span class="keyword">const</span> <span class="keyword">volatile</span> T& location) {
-<a name="l00095"></a>00095         T temp = location;
-<a name="l00096"></a>00096         __TBB_release_consistency_helper();
-<a name="l00097"></a>00097         <span class="keywordflow">return</span> temp;
-<a name="l00098"></a>00098     }
-<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span>
-<a name="l00101"></a>00101 <span class="preprocessor">#ifndef __TBB_store_with_release</span>
-<a name="l00103"></a>00103 <span class="preprocessor">    template<typename T, typename V></span>
-<a name="l00104"></a>00104 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_store_with_release(<span class="keyword">volatile</span> T& location, V value) {
-<a name="l00105"></a>00105         __TBB_release_consistency_helper();
-<a name="l00106"></a>00106         location = T(value); 
-<a name="l00107"></a>00107     }
-<a name="l00108"></a>00108 <span class="preprocessor">#endif</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span>
-<a name="l00110"></a>00110 <span class="preprocessor">#ifndef __TBB_Pause</span>
-<a name="l00111"></a>00111 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Pause(int32_t) {
-<a name="l00112"></a>00112         __TBB_Yield();
-<a name="l00113"></a>00113     }
-<a name="l00114"></a>00114 <span class="preprocessor">#endif</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span>
-<a name="l00116"></a>00116 <span class="keyword">namespace </span>tbb {
-<a name="l00117"></a>00117 <span class="keyword">namespace </span>internal {
-<a name="l00118"></a>00118 
-<a name="l00120"></a>00120 
-<a name="l00121"></a><a class="code" href="a00119.html">00121</a> <span class="keyword">class </span><a class="code" href="a00119.html">atomic_backoff</a> {
-<a name="l00123"></a>00123 
-<a name="l00125"></a>00125     <span class="keyword">static</span> <span class="keyword">const</span> int32_t LOOPS_BEFORE_YIELD = 16;
-<a name="l00126"></a>00126     int32_t count;
-<a name="l00127"></a>00127 <span class="keyword">public</span>:
-<a name="l00128"></a>00128     <a class="code" href="a00119.html">atomic_backoff</a>() : count(1) {}
-<a name="l00129"></a>00129 
-<a name="l00131"></a><a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">00131</a>     <span class="keywordtype">void</span> <a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>() {
-<a name="l00132"></a>00132         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
-<a name="l00133"></a>00133             __TBB_Pause(count);
-<a name="l00134"></a>00134             <span class="comment">// Pause twice as long the next time.</span>
-<a name="l00135"></a>00135             count*=2;
-<a name="l00136"></a>00136         } <span class="keywordflow">else</span> {
-<a name="l00137"></a>00137             <span class="comment">// Pause is so long that we might as well yield CPU to scheduler.</span>
-<a name="l00138"></a>00138             __TBB_Yield();
-<a name="l00139"></a>00139         }
-<a name="l00140"></a>00140     }
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142     <span class="comment">// pause for a few times and then return false immediately.</span>
-<a name="l00143"></a>00143     <span class="keywordtype">bool</span> bounded_pause() {
-<a name="l00144"></a>00144         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
-<a name="l00145"></a>00145             __TBB_Pause(count);
-<a name="l00146"></a>00146             <span class="comment">// Pause twice as long the next time.</span>
-<a name="l00147"></a>00147             count*=2;
-<a name="l00148"></a>00148             <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00149"></a>00149         } <span class="keywordflow">else</span> {
-<a name="l00150"></a>00150             <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152     }
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154     <span class="keywordtype">void</span> reset() {
-<a name="l00155"></a>00155         count = 1;
-<a name="l00156"></a>00156     }
-<a name="l00157"></a>00157 };
-<a name="l00158"></a>00158 
-<a name="l00160"></a>00160 
-<a name="l00161"></a>00161 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00162"></a>00162 <span class="keywordtype">void</span> spin_wait_while_eq( <span class="keyword">const</span> <span class="keyword">volatile</span> T& location, U value ) {
-<a name="l00163"></a>00163     atomic_backoff backoff;
-<a name="l00164"></a>00164     <span class="keywordflow">while</span>( location==value ) backoff.pause();
-<a name="l00165"></a>00165 }
-<a name="l00166"></a>00166 
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
-<a name="l00170"></a>00170 <span class="keywordtype">void</span> spin_wait_until_eq( <span class="keyword">const</span> <span class="keyword">volatile</span> T& location, <span class="keyword">const</span> U value ) {
-<a name="l00171"></a>00171     atomic_backoff backoff;
-<a name="l00172"></a>00172     <span class="keywordflow">while</span>( location!=value ) backoff.pause();
-<a name="l00173"></a>00173 }
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175 <span class="comment">// T should be unsigned, otherwise sign propagation will break correctness of bit manipulations.</span>
-<a name="l00176"></a>00176 <span class="comment">// S should be either 1 or 2, for the mask calculation to work correctly.</span>
-<a name="l00177"></a>00177 <span class="comment">// Together, these rules limit applicability of Masked CAS to unsigned char and unsigned short.</span>
-<a name="l00178"></a>00178 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00179"></a>00179 <span class="keyword">inline</span> T __TBB_MaskedCompareAndSwap (<span class="keyword">volatile</span> T *ptr, T value, T comparand ) {
-<a name="l00180"></a>00180     <span class="keyword">volatile</span> uint32_t * base = (uint32_t*)( (uintptr_t)ptr & ~(uintptr_t)0x3 );
-<a name="l00181"></a>00181 <span class="preprocessor">#if __TBB_BIG_ENDIAN</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*( 4-S - (uintptr_t(ptr) & 0x3) ) );
-<a name="l00183"></a>00183 <span class="preprocessor">#else</span>
-<a name="l00184"></a>00184 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*((uintptr_t)ptr & 0x3) );
-<a name="l00185"></a>00185 <span class="preprocessor">#endif</span>
-<a name="l00186"></a>00186 <span class="preprocessor"></span>    <span class="keyword">const</span> uint32_t mask = ( (1<<(S*8)) - 1 )<<bitoffset;
-<a name="l00187"></a>00187     atomic_backoff b;
-<a name="l00188"></a>00188     uint32_t result;
-<a name="l00189"></a>00189     <span class="keywordflow">for</span>(;;) {
-<a name="l00190"></a>00190         result = *base; <span class="comment">// reload the base value which might change during the pause</span>
-<a name="l00191"></a>00191         uint32_t old_value = ( result & ~mask ) | ( comparand << bitoffset );
-<a name="l00192"></a>00192         uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
-<a name="l00193"></a>00193         <span class="comment">// __TBB_CompareAndSwap4 presumed to have full fence. </span>
-<a name="l00194"></a>00194         result = __TBB_CompareAndSwap4( base, new_value, old_value );
-<a name="l00195"></a>00195         <span class="keywordflow">if</span>(  result==old_value               <span class="comment">// CAS succeeded</span>
-<a name="l00196"></a>00196           || ((result^old_value)&mask)!=0 )  <span class="comment">// CAS failed and the bits of interest have changed</span>
-<a name="l00197"></a>00197             <span class="keywordflow">break</span>;
-<a name="l00198"></a>00198         <span class="keywordflow">else</span>                                 <span class="comment">// CAS failed but the bits of interest left unchanged</span>
-<a name="l00199"></a>00199             b.pause();
-<a name="l00200"></a>00200     }
-<a name="l00201"></a>00201     <span class="keywordflow">return</span> T((result & mask) >> bitoffset);
-<a name="l00202"></a>00202 }
-<a name="l00203"></a>00203 
-<a name="l00204"></a>00204 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00205"></a>00205 <span class="keyword">inline</span> T __TBB_CompareAndSwapGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value, T comparand ) { 
-<a name="l00206"></a>00206     <span class="keywordflow">return</span> __TBB_CompareAndSwapW((T *)ptr,value,comparand);
-<a name="l00207"></a>00207 }
-<a name="l00208"></a>00208 
-<a name="l00209"></a>00209 <span class="keyword">template</span><>
-<a name="l00210"></a>00210 <span class="keyword">inline</span> uint8_t __TBB_CompareAndSwapGeneric <1,uint8_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint8_t value, uint8_t comparand ) {
-<a name="l00211"></a>00211 #ifdef __TBB_CompareAndSwap1
-<a name="l00212"></a>00212     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(ptr,value,comparand);
-<a name="l00213"></a>00213 <span class="preprocessor">#else</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<1,uint8_t>((<span class="keyword">volatile</span> uint8_t *)ptr,value,comparand);
-<a name="l00215"></a>00215 <span class="preprocessor">#endif</span>
-<a name="l00216"></a>00216 <span class="preprocessor"></span>}
-<a name="l00217"></a>00217 
-<a name="l00218"></a>00218 <span class="keyword">template</span><>
-<a name="l00219"></a>00219 <span class="keyword">inline</span> uint16_t __TBB_CompareAndSwapGeneric <2,uint16_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint16_t value, uint16_t comparand ) {
-<a name="l00220"></a>00220 #ifdef __TBB_CompareAndSwap2
-<a name="l00221"></a>00221     <span class="keywordflow">return</span> __TBB_CompareAndSwap2(ptr,value,comparand);
-<a name="l00222"></a>00222 <span class="preprocessor">#else</span>
-<a name="l00223"></a>00223 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<2,uint16_t>((<span class="keyword">volatile</span> uint16_t *)ptr,value,comparand);
-<a name="l00224"></a>00224 <span class="preprocessor">#endif</span>
-<a name="l00225"></a>00225 <span class="preprocessor"></span>}
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227 <span class="keyword">template</span><>
-<a name="l00228"></a>00228 <span class="keyword">inline</span> uint32_t __TBB_CompareAndSwapGeneric <4,uint32_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint32_t value, uint32_t comparand ) { 
-<a name="l00229"></a>00229     <span class="keywordflow">return</span> __TBB_CompareAndSwap4(ptr,value,comparand);
-<a name="l00230"></a>00230 }
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232 <span class="keyword">template</span><>
-<a name="l00233"></a>00233 <span class="keyword">inline</span> uint64_t __TBB_CompareAndSwapGeneric <8,uint64_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint64_t value, uint64_t comparand ) { 
-<a name="l00234"></a>00234     <span class="keywordflow">return</span> __TBB_CompareAndSwap8(ptr,value,comparand);
-<a name="l00235"></a>00235 }
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00238"></a>00238 <span class="keyword">inline</span> T __TBB_FetchAndAddGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T addend) {
-<a name="l00239"></a>00239     atomic_backoff b;
-<a name="l00240"></a>00240     T result;
-<a name="l00241"></a>00241     <span class="keywordflow">for</span>(;;) {
-<a name="l00242"></a>00242         result = *reinterpret_cast<volatile T *>(ptr);
-<a name="l00243"></a>00243         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence. </span>
-<a name="l00244"></a>00244         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result ) 
-<a name="l00245"></a>00245             <span class="keywordflow">break</span>;
-<a name="l00246"></a>00246         b.pause();
-<a name="l00247"></a>00247     }
-<a name="l00248"></a>00248     <span class="keywordflow">return</span> result;
-<a name="l00249"></a>00249 }
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
-<a name="l00252"></a>00252 <span class="keyword">inline</span> T __TBB_FetchAndStoreGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value) {
-<a name="l00253"></a>00253     atomic_backoff b;
-<a name="l00254"></a>00254     T result;
-<a name="l00255"></a>00255     <span class="keywordflow">for</span>(;;) {
-<a name="l00256"></a>00256         result = *reinterpret_cast<volatile T *>(ptr);
-<a name="l00257"></a>00257         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence.</span>
-<a name="l00258"></a>00258         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result ) 
-<a name="l00259"></a>00259             <span class="keywordflow">break</span>;
-<a name="l00260"></a>00260         b.pause();
-<a name="l00261"></a>00261     }
-<a name="l00262"></a>00262     <span class="keywordflow">return</span> result;
-<a name="l00263"></a>00263 }
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265 <span class="comment">// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as </span>
-<a name="l00266"></a>00266 <span class="comment">// strict as type T.  Type type should have a trivial default constructor and destructor, so that</span>
-<a name="l00267"></a>00267 <span class="comment">// arrays of that type can be declared without initializers.  </span>
-<a name="l00268"></a>00268 <span class="comment">// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands</span>
-<a name="l00269"></a>00269 <span class="comment">// to a type bigger than T.</span>
-<a name="l00270"></a>00270 <span class="comment">// The default definition here works on machines where integers are naturally aligned and the</span>
-<a name="l00271"></a>00271 <span class="comment">// strictest alignment is 16.</span>
-<a name="l00272"></a>00272 <span class="preprocessor">#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict</span>
-<a name="l00273"></a>00273 <span class="preprocessor"></span>
-<a name="l00274"></a>00274 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
-<a name="l00275"></a>00275 <span class="preprocessor"></span><span class="keyword">struct </span>__TBB_machine_type_with_strictest_alignment {
-<a name="l00276"></a>00276     <span class="keywordtype">int</span> member[4];
-<a name="l00277"></a>00277 } __attribute__((aligned(16)));
-<a name="l00278"></a>00278 <span class="preprocessor">#elif _MSC_VER</span>
-<a name="l00279"></a>00279 <span class="preprocessor"></span>__declspec(align(16)) struct __TBB_machine_type_with_strictest_alignment {
-<a name="l00280"></a>00280     <span class="keywordtype">int</span> member[4];
-<a name="l00281"></a>00281 };
-<a name="l00282"></a>00282 <span class="preprocessor">#else</span>
-<a name="l00283"></a>00283 <span class="preprocessor"></span><span class="preprocessor">#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) or __TBB_machine_type_with_strictest_alignment</span>
-<a name="l00284"></a>00284 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00285"></a>00285 <span class="preprocessor"></span>
-<a name="l00286"></a>00286 <span class="keyword">template</span><size_t N> <span class="keyword">struct </span>type_with_alignment {__TBB_machine_type_with_strictest_alignment member;};
-<a name="l00287"></a>00287 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<1> { <span class="keywordtype">char</span> member; };
-<a name="l00288"></a>00288 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<2> { uint16_t member; };
-<a name="l00289"></a>00289 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<4> { uint32_t member; };
-<a name="l00290"></a>00290 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<8> { uint64_t member; };
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292 <span class="preprocessor">#if _MSC_VER||defined(__GNUC__)&&__GNUC__==3 && __GNUC_MINOR__<=2  </span>
-<a name="l00294"></a>00294 <span class="preprocessor"></span>
-<a name="l00296"></a>00296 <span class="preprocessor">template<size_t Size, typename T> </span>
-<a name="l00297"></a><a class="code" href="a00174.html">00297</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="a00174.html">work_around_alignment_bug</a> {
-<a name="l00298"></a>00298 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00299"></a>00299 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof(T);
-<a name="l00300"></a>00300 <span class="preprocessor">#else</span>
-<a name="l00301"></a>00301 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof__(T);
-<a name="l00302"></a>00302 <span class="preprocessor">#endif</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span>};
-<a name="l00304"></a>00304 <span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<tbb::internal::work_around_alignment_bug<sizeof(T),T>::alignment></span>
-<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#elif __GNUC__ || __SUNPRO_CC</span>
-<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__alignof__(T)></span>
-<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) __TBB_machine_type_with_strictest_alignment</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#endif  </span><span class="comment">/* ____TBB_TypeWithAlignmentAtLeastAsStrict */</span>
-<a name="l00311"></a>00311 
-<a name="l00312"></a>00312 } <span class="comment">// namespace internal</span>
-<a name="l00313"></a>00313 } <span class="comment">// namespace tbb</span>
-<a name="l00314"></a>00314 
-<a name="l00315"></a>00315 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1</span>
-<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t></span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span>
-<a name="l00319"></a>00319 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2 </span>
-<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2 tbb::internal::__TBB_CompareAndSwapGeneric<2,uint16_t></span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00322"></a>00322 <span class="preprocessor"></span>
-<a name="l00323"></a>00323 <span class="preprocessor">#ifndef __TBB_CompareAndSwapW</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwapW tbb::internal::__TBB_CompareAndSwapGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00326"></a>00326 <span class="preprocessor"></span>
-<a name="l00327"></a>00327 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1</span>
-<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1 tbb::internal::__TBB_FetchAndAddGeneric<1,uint8_t></span>
-<a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00330"></a>00330 <span class="preprocessor"></span>
-<a name="l00331"></a>00331 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2</span>
-<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2 tbb::internal::__TBB_FetchAndAddGeneric<2,uint16_t></span>
-<a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00334"></a>00334 <span class="preprocessor"></span>
-<a name="l00335"></a>00335 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4</span>
-<a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4 tbb::internal::__TBB_FetchAndAddGeneric<4,uint32_t></span>
-<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00338"></a>00338 <span class="preprocessor"></span>
-<a name="l00339"></a>00339 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8</span>
-<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8 tbb::internal::__TBB_FetchAndAddGeneric<8,uint64_t></span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00342"></a>00342 <span class="preprocessor"></span>
-<a name="l00343"></a>00343 <span class="preprocessor">#ifndef __TBB_FetchAndAddW</span>
-<a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddW tbb::internal::__TBB_FetchAndAddGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00346"></a>00346 <span class="preprocessor"></span>
-<a name="l00347"></a>00347 <span class="preprocessor">#ifndef __TBB_FetchAndStore1</span>
-<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,uint8_t></span>
-<a name="l00349"></a>00349 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00350"></a>00350 <span class="preprocessor"></span>
-<a name="l00351"></a>00351 <span class="preprocessor">#ifndef __TBB_FetchAndStore2</span>
-<a name="l00352"></a>00352 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,uint16_t></span>
-<a name="l00353"></a>00353 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00354"></a>00354 <span class="preprocessor"></span>
-<a name="l00355"></a>00355 <span class="preprocessor">#ifndef __TBB_FetchAndStore4</span>
-<a name="l00356"></a>00356 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,uint32_t></span>
-<a name="l00357"></a>00357 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00358"></a>00358 <span class="preprocessor"></span>
-<a name="l00359"></a>00359 <span class="preprocessor">#ifndef __TBB_FetchAndStore8</span>
-<a name="l00360"></a>00360 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,uint64_t></span>
-<a name="l00361"></a>00361 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00362"></a>00362 <span class="preprocessor"></span>
-<a name="l00363"></a>00363 <span class="preprocessor">#ifndef __TBB_FetchAndStoreW</span>
-<a name="l00364"></a>00364 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStoreW tbb::internal::__TBB_FetchAndStoreGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
-<a name="l00365"></a>00365 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00366"></a>00366 <span class="preprocessor"></span>
-<a name="l00367"></a>00367 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00368"></a>00368 <span class="preprocessor"></span>
-<a name="l00369"></a>00369 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00370"></a>00370 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1__TBB_full_fence __TBB_CompareAndSwap1</span>
-<a name="l00371"></a>00371 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00372"></a>00372 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1acquire</span>
-<a name="l00373"></a>00373 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1acquire __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00374"></a>00374 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00375"></a>00375 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1release</span>
-<a name="l00376"></a>00376 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1release __TBB_CompareAndSwap1__TBB_full_fence</span>
-<a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00378"></a>00378 <span class="preprocessor"></span>
-<a name="l00379"></a>00379 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2__TBB_full_fence</span>
-<a name="l00380"></a>00380 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2__TBB_full_fence __TBB_CompareAndSwap2</span>
-<a name="l00381"></a>00381 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2acquire</span>
-<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2acquire __TBB_CompareAndSwap2__TBB_full_fence</span>
-<a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00385"></a>00385 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2release</span>
-<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2release __TBB_CompareAndSwap2__TBB_full_fence</span>
-<a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00388"></a>00388 <span class="preprocessor"></span>
-<a name="l00389"></a>00389 <span class="preprocessor">#ifndef __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00390"></a>00390 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4__TBB_full_fence __TBB_CompareAndSwap4</span>
-<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00392"></a>00392 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4acquire</span>
-<a name="l00393"></a>00393 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4acquire __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4release</span>
-<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4release __TBB_CompareAndSwap4__TBB_full_fence</span>
-<a name="l00397"></a>00397 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
-<a name="l00398"></a>00398 <span class="preprocessor"></span>
-<a name="l00399"></a>00399 <span class="preprocessor">#ifndef __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8__TBB_full_fence __TBB_CompareAndSwap8</span>
-<a name="l00401"></a>00401 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8acquire</span>
-<a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8acquire __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8release</span>
-<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8release __TBB_CompareAndSwap8__TBB_full_fence</span>
-<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00408"></a>00408 <span class="preprocessor"></span>
-<a name="l00409"></a>00409 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1__TBB_full_fence __TBB_FetchAndAdd1</span>
-<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1acquire</span>
-<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1acquire __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00414"></a>00414 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00415"></a>00415 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1release</span>
-<a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1release __TBB_FetchAndAdd1__TBB_full_fence</span>
-<a name="l00417"></a>00417 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00418"></a>00418 <span class="preprocessor"></span>
-<a name="l00419"></a>00419 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00420"></a>00420 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2__TBB_full_fence __TBB_FetchAndAdd2</span>
-<a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2acquire</span>
-<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2acquire __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2release</span>
-<a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2release __TBB_FetchAndAdd2__TBB_full_fence</span>
-<a name="l00427"></a>00427 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00428"></a>00428 <span class="preprocessor"></span>
-<a name="l00429"></a>00429 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00430"></a>00430 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4__TBB_full_fence __TBB_FetchAndAdd4</span>
-<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4acquire</span>
-<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4acquire __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4release</span>
-<a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4release __TBB_FetchAndAdd4__TBB_full_fence</span>
-<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00438"></a>00438 <span class="preprocessor"></span>
-<a name="l00439"></a>00439 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00440"></a>00440 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8__TBB_full_fence __TBB_FetchAndAdd8</span>
-<a name="l00441"></a>00441 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8acquire</span>
-<a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8acquire __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00444"></a>00444 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8release</span>
-<a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8release __TBB_FetchAndAdd8__TBB_full_fence</span>
-<a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00448"></a>00448 <span class="preprocessor"></span>
-<a name="l00449"></a>00449 <span class="preprocessor">#ifndef __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00450"></a>00450 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1__TBB_full_fence __TBB_FetchAndStore1</span>
-<a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1acquire</span>
-<a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1acquire __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00454"></a>00454 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00455"></a>00455 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1release</span>
-<a name="l00456"></a>00456 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1release __TBB_FetchAndStore1__TBB_full_fence</span>
-<a name="l00457"></a>00457 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00458"></a>00458 <span class="preprocessor"></span>
-<a name="l00459"></a>00459 <span class="preprocessor">#ifndef __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00460"></a>00460 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2__TBB_full_fence __TBB_FetchAndStore2</span>
-<a name="l00461"></a>00461 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00462"></a>00462 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2acquire</span>
-<a name="l00463"></a>00463 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2acquire __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00464"></a>00464 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00465"></a>00465 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2release</span>
-<a name="l00466"></a>00466 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2release __TBB_FetchAndStore2__TBB_full_fence</span>
-<a name="l00467"></a>00467 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00468"></a>00468 <span class="preprocessor"></span>
-<a name="l00469"></a>00469 <span class="preprocessor">#ifndef __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00470"></a>00470 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4__TBB_full_fence __TBB_FetchAndStore4</span>
-<a name="l00471"></a>00471 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00472"></a>00472 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4acquire</span>
-<a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4acquire __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00475"></a>00475 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4release</span>
-<a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4release __TBB_FetchAndStore4__TBB_full_fence</span>
-<a name="l00477"></a>00477 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00478"></a>00478 <span class="preprocessor"></span>
-<a name="l00479"></a>00479 <span class="preprocessor">#ifndef __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00480"></a>00480 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8__TBB_full_fence __TBB_FetchAndStore8</span>
-<a name="l00481"></a>00481 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00482"></a>00482 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8acquire</span>
-<a name="l00483"></a>00483 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8acquire __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00484"></a>00484 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00485"></a>00485 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8release</span>
-<a name="l00486"></a>00486 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8release __TBB_FetchAndStore8__TBB_full_fence</span>
-<a name="l00487"></a>00487 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00488"></a>00488 <span class="preprocessor"></span>
-<a name="l00489"></a>00489 <span class="preprocessor">#endif // __TBB_DECL_FENCED_ATOMICS</span>
-<a name="l00490"></a>00490 <span class="preprocessor"></span>
-<a name="l00491"></a>00491 <span class="comment">// Special atomic functions</span>
-<a name="l00492"></a>00492 <span class="preprocessor">#ifndef __TBB_FetchAndAddWrelease</span>
-<a name="l00493"></a>00493 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddWrelease __TBB_FetchAndAddW</span>
-<a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00495"></a>00495 <span class="preprocessor"></span>
-<a name="l00496"></a>00496 <span class="preprocessor">#ifndef __TBB_FetchAndIncrementWacquire</span>
-<a name="l00497"></a>00497 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)</span>
-<a name="l00498"></a>00498 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00499"></a>00499 <span class="preprocessor"></span>
-<a name="l00500"></a>00500 <span class="preprocessor">#ifndef __TBB_FetchAndDecrementWrelease</span>
-<a name="l00501"></a>00501 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1))</span>
-<a name="l00502"></a>00502 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00503"></a>00503 <span class="preprocessor"></span>
-<a name="l00504"></a>00504 <span class="preprocessor">#if __TBB_WORDSIZE==4</span>
-<a name="l00505"></a>00505 <span class="preprocessor"></span><span class="comment">// On 32-bit platforms, "atomic.h" requires definition of __TBB_Store8 and __TBB_Load8</span>
-<a name="l00506"></a>00506 <span class="preprocessor">#ifndef __TBB_Store8</span>
-<a name="l00507"></a>00507 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Store8 (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, int64_t value) {
-<a name="l00508"></a>00508     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
-<a name="l00509"></a>00509     <span class="keywordflow">for</span>(;;) {
-<a name="l00510"></a>00510         int64_t result = *(int64_t *)ptr;
-<a name="l00511"></a>00511         <span class="keywordflow">if</span>( __TBB_CompareAndSwap8(ptr,value,result)==result ) <span class="keywordflow">break</span>;
-<a name="l00512"></a>00512         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
-<a name="l00513"></a>00513     }
-<a name="l00514"></a>00514 }
-<a name="l00515"></a>00515 <span class="preprocessor">#endif</span>
-<a name="l00516"></a>00516 <span class="preprocessor"></span>
-<a name="l00517"></a>00517 <span class="preprocessor">#ifndef __TBB_Load8</span>
-<a name="l00518"></a>00518 <span class="preprocessor"></span><span class="keyword">inline</span> int64_t __TBB_Load8 (<span class="keyword">const</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr) {
-<a name="l00519"></a>00519     int64_t result = *(int64_t *)ptr;
-<a name="l00520"></a>00520     result = __TBB_CompareAndSwap8((<span class="keyword">volatile</span> <span class="keywordtype">void</span> *)ptr,result,result);
-<a name="l00521"></a>00521     <span class="keywordflow">return</span> result;
-<a name="l00522"></a>00522 }
-<a name="l00523"></a>00523 <span class="preprocessor">#endif</span>
-<a name="l00524"></a>00524 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
-<a name="l00525"></a>00525 
-<a name="l00526"></a>00526 <span class="preprocessor">#ifndef __TBB_Log2</span>
-<a name="l00527"></a>00527 <span class="preprocessor"></span><span class="keyword">inline</span> intptr_t __TBB_Log2( uintptr_t x ) {
-<a name="l00528"></a>00528     <span class="keywordflow">if</span>( x==0 ) <span class="keywordflow">return</span> -1;
-<a name="l00529"></a>00529     intptr_t result = 0;
-<a name="l00530"></a>00530     uintptr_t tmp;
-<a name="l00531"></a>00531 <span class="preprocessor">#if __TBB_WORDSIZE>=8</span>
-<a name="l00532"></a>00532 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>32) ) { x=tmp; result += 32; }
-<a name="l00533"></a>00533 <span class="preprocessor">#endif</span>
-<a name="l00534"></a>00534 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>16) ) { x=tmp; result += 16; }
-<a name="l00535"></a>00535     <span class="keywordflow">if</span>( (tmp = x>>8) )  { x=tmp; result += 8; }
-<a name="l00536"></a>00536     <span class="keywordflow">if</span>( (tmp = x>>4) )  { x=tmp; result += 4; }
-<a name="l00537"></a>00537     <span class="keywordflow">if</span>( (tmp = x>>2) )  { x=tmp; result += 2; }
-<a name="l00538"></a>00538     <span class="keywordflow">return</span> (x&2)? result+1: result;
-<a name="l00539"></a>00539 }
-<a name="l00540"></a>00540 <span class="preprocessor">#endif</span>
-<a name="l00541"></a>00541 <span class="preprocessor"></span>
-<a name="l00542"></a>00542 <span class="preprocessor">#ifndef __TBB_AtomicOR</span>
-<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_AtomicOR( <span class="keyword">volatile</span> <span class="keywordtype">void</span> *operand, uintptr_t addend ) {
-<a name="l00544"></a>00544     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
-<a name="l00545"></a>00545     <span class="keywordflow">for</span>(;;) {
-<a name="l00546"></a>00546         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
-<a name="l00547"></a>00547         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
-<a name="l00548"></a>00548         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
-<a name="l00549"></a>00549         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
-<a name="l00550"></a>00550     }
-<a name="l00551"></a>00551 }
-<a name="l00552"></a>00552 <span class="preprocessor">#endif</span>
-<a name="l00553"></a>00553 <span class="preprocessor"></span>
-<a name="l00554"></a>00554 <span class="preprocessor">#ifndef __TBB_AtomicAND</span>
-<a name="l00555"></a>00555 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_AtomicAND( <span class="keyword">volatile</span> <span class="keywordtype">void</span> *operand, uintptr_t addend ) {
-<a name="l00556"></a>00556     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
-<a name="l00557"></a>00557     <span class="keywordflow">for</span>(;;) {
-<a name="l00558"></a>00558         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
-<a name="l00559"></a>00559         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
-<a name="l00560"></a>00560         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
-<a name="l00561"></a>00561         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
-<a name="l00562"></a>00562     }
-<a name="l00563"></a>00563 }
-<a name="l00564"></a>00564 <span class="preprocessor">#endif</span>
-<a name="l00565"></a>00565 <span class="preprocessor"></span>
-<a name="l00566"></a>00566 <span class="preprocessor">#ifndef __TBB_TryLockByte</span>
-<a name="l00567"></a>00567 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> __TBB_TryLockByte( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> &flag ) {
-<a name="l00568"></a>00568     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(&flag,1,0)==0;
-<a name="l00569"></a>00569 }
-<a name="l00570"></a>00570 <span class="preprocessor">#endif</span>
-<a name="l00571"></a>00571 <span class="preprocessor"></span>
-<a name="l00572"></a>00572 <span class="preprocessor">#ifndef __TBB_LockByte</span>
-<a name="l00573"></a>00573 <span class="preprocessor"></span><span class="keyword">inline</span> uintptr_t __TBB_LockByte( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>& flag ) {
-<a name="l00574"></a>00574     <span class="keywordflow">if</span> ( !__TBB_TryLockByte(flag) ) {
-<a name="l00575"></a>00575         <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
-<a name="l00576"></a>00576         <span class="keywordflow">do</span> {
-<a name="l00577"></a>00577             b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
-<a name="l00578"></a>00578         } <span class="keywordflow">while</span> ( !__TBB_TryLockByte(flag) );
-<a name="l00579"></a>00579     }
-<a name="l00580"></a>00580     <span class="keywordflow">return</span> 0;
-<a name="l00581"></a>00581 }
-<a name="l00582"></a>00582 <span class="preprocessor">#endif</span>
-<a name="l00583"></a>00583 <span class="preprocessor"></span>
-<a name="l00584"></a>00584 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_machine_H */</span>
-</pre></div><hr>
-<p></p>
-Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
-<p></p>
-Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
-registered trademarks or trademarks of Intel Corporation or its
-subsidiaries in the United States and other countries.
-<p></p>
-* Other names and brands may be claimed as the property of others.
diff --git a/doc/html/a00376.html b/doc/html/a00379.html
similarity index 74%
rename from doc/html/a00376.html
rename to doc/html/a00379.html
index 881fb63..cdfa209 100644
--- a/doc/html/a00376.html
+++ b/doc/html/a00379.html
@@ -85,76 +85,70 @@
 <a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_SCHEDULER_OBSERVER 1</span>
 <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
 <a name="l00077"></a>00077 
-<a name="l00078"></a>00078 <span class="preprocessor">#ifndef __TBB_TASK_SCHEDULER_AUTO_INIT</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TASK_SCHEDULER_AUTO_INIT 1</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_TASK_SCHEDULER_AUTO_INIT */</span>
+<a name="l00078"></a>00078 <span class="preprocessor">#ifndef __TBB_NEW_ITT_NOTIFY</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NEW_ITT_NOTIFY 1</span>
+<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !__TBB_NEW_ITT_NOTIFY */</span>
 <a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="preprocessor">#ifndef __TBB_TASK_DEQUE</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TASK_DEQUE 1</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !__TBB_TASK_DEQUE */</span>
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086 <span class="preprocessor">#if __TBB_TASK_DEQUE</span>
-<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_RELAXED_OWNERSHIP</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_RELAXED_OWNERSHIP 1</span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !__TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00090"></a>00090 <span class="preprocessor">#else</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#ifdef __TBB_RELAXED_OWNERSHIP</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#undef __TBB_RELAXED_OWNERSHIP</span>
-<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_RELAXED_OWNERSHIP */</span>
-<a name="l00094"></a>00094 <span class="preprocessor">#endif </span><span class="comment">/* !__TBB_TASK_DEQUE */</span>
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096 <span class="preprocessor">#ifndef __TBB_NEW_ITT_NOTIFY</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_NEW_ITT_NOTIFY 1</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !__TBB_NEW_ITT_NOTIFY */</span>
+<a name="l00082"></a>00082 
+<a name="l00083"></a>00083 <span class="comment">/* TODO: The following condition should be extended as soon as new compilers/runtimes </span>
+<a name="l00084"></a>00084 <span class="comment">         with std::exception_ptr support appear. */</span>
+<a name="l00085"></a>00085 <span class="preprocessor">#define __TBB_EXCEPTION_PTR_PRESENT  (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && (__GNUC__==4 && __GNUC_MINOR__>=4))</span>
+<a name="l00086"></a>00086 <span class="preprocessor"></span>
+<a name="l00087"></a>00087 
+<a name="l00088"></a>00088 <span class="preprocessor">#ifndef TBB_USE_CAPTURED_EXCEPTION</span>
+<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">    #if __TBB_EXCEPTION_PTR_PRESENT</span>
+<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">        #define TBB_USE_CAPTURED_EXCEPTION 0</span>
+<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">    #else</span>
+<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">        #define TBB_USE_CAPTURED_EXCEPTION 1</span>
+<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* defined TBB_USE_CAPTURED_EXCEPTION */</span>
+<a name="l00095"></a>00095 <span class="preprocessor">    #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT</span>
+<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">        #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception.</span>
+<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* defined TBB_USE_CAPTURED_EXCEPTION */</span>
 <a name="l00099"></a>00099 
 <a name="l00100"></a>00100 
-<a name="l00101"></a>00101 <span class="comment">/* TODO: The following condition should be extended as soon as new compilers/runtimes </span>
-<a name="l00102"></a>00102 <span class="comment">         with std::exception_ptr support appear. */</span>
-<a name="l00103"></a>00103 <span class="preprocessor">#define __TBB_EXCEPTION_PTR_PRESENT  ( _MSC_VER >= 1600 )</span>
-<a name="l00104"></a>00104 <span class="preprocessor"></span>
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106 <span class="preprocessor">#ifndef TBB_USE_CAPTURED_EXCEPTION</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">    #if __TBB_EXCEPTION_PTR_PRESENT</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">        #define TBB_USE_CAPTURED_EXCEPTION 0</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">    #else</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">        #define TBB_USE_CAPTURED_EXCEPTION 1</span>
-<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* defined TBB_USE_CAPTURED_EXCEPTION */</span>
-<a name="l00113"></a>00113 <span class="preprocessor">    #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">        #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception.</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* defined TBB_USE_CAPTURED_EXCEPTION */</span>
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="preprocessor">#ifndef __TBB_DEFAULT_PARTITIONER</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#if TBB_DEPRECATED</span>
-<a name="l00121"></a>00121 <span class="preprocessor"></span>
-<a name="l00122"></a>00122 <span class="preprocessor">#define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner</span>
-<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00101"></a>00101 <span class="preprocessor">#ifndef __TBB_DEFAULT_PARTITIONER</span>
+<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#if TBB_DEPRECATED</span>
+<a name="l00103"></a>00103 <span class="preprocessor"></span>
+<a name="l00104"></a>00104 <span class="preprocessor">#define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner</span>
+<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00106"></a>00106 <span class="preprocessor"></span>
+<a name="l00107"></a>00107 <span class="preprocessor">#define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner</span>
+<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DEFAULT_PARTITIONER */</span>
+<a name="l00109"></a>00109 <span class="preprocessor">#endif </span><span class="comment">/* !defined(__TBB_DEFAULT_PARTITIONER */</span>
+<a name="l00110"></a>00110 
+<a name="l00113"></a>00113 <span class="preprocessor">#if __GNUC__==4 && __GNUC_MINOR__==4 && !defined(__INTEL_COMPILER)</span>
+<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">    #define __TBB_GCC_WARNING_SUPPRESSION_ENABLED 1</span>
+<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00116"></a>00116 <span class="preprocessor"></span>
+<a name="l00123"></a>00123 <span class="preprocessor">#if defined(_MSC_VER) && _MSC_VER < 0x1500 && !defined(__INTEL_COMPILER)</span>
 <a name="l00124"></a>00124 <span class="preprocessor"></span>
-<a name="l00125"></a>00125 <span class="preprocessor">#define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner</span>
-<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TBB_DEFAULT_PARTITIONER */</span>
-<a name="l00127"></a>00127 <span class="preprocessor">#endif </span><span class="comment">/* !defined(__TBB_DEFAULT_PARTITIONER */</span>
-<a name="l00128"></a>00128 
-<a name="l00137"></a>00137 <span class="preprocessor">#if defined(_MSC_VER) && _MSC_VER < 0x1500 && !defined(__INTEL_COMPILER)</span>
+<a name="l00126"></a>00126 <span class="preprocessor">    #define __TBB_TEMPLATE_FRIENDS_BROKEN 1</span>
+<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00128"></a>00128 <span class="preprocessor"></span>
+<a name="l00129"></a>00129 <span class="preprocessor">#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__</span>
+<a name="l00130"></a>00130 <span class="preprocessor"></span>
+<a name="l00131"></a>00131 <span class="preprocessor">    #define __TBB_EXCEPTION_HANDLING_BROKEN 1</span>
+<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00133"></a>00133 <span class="preprocessor"></span>
+<a name="l00134"></a>00134 <span class="preprocessor">#if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110</span>
+<a name="l00135"></a>00135 <span class="preprocessor"></span>
+<a name="l00136"></a>00136 <span class="preprocessor">    #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1</span>
+<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
 <a name="l00138"></a>00138 <span class="preprocessor"></span>
-<a name="l00140"></a>00140 <span class="preprocessor">    #define __TBB_TEMPLATE_FRIENDS_BROKEN 1</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00142"></a>00142 <span class="preprocessor"></span>
-<a name="l00143"></a>00143 <span class="preprocessor">#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__</span>
-<a name="l00144"></a>00144 <span class="preprocessor"></span>
-<a name="l00145"></a>00145 <span class="preprocessor">    #define __TBB_EXCEPTION_HANDLING_BROKEN 1</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00147"></a>00147 <span class="preprocessor"></span>
-<a name="l00148"></a>00148 <span class="preprocessor">#if __FreeBSD__</span>
-<a name="l00149"></a>00149 <span class="preprocessor"></span>
-<a name="l00151"></a>00151 <span class="preprocessor">    #define __TBB_PRIO_INHERIT_BROKEN 1</span>
+<a name="l00139"></a>00139 <span class="preprocessor">#if __FreeBSD__</span>
+<a name="l00140"></a>00140 <span class="preprocessor"></span>
+<a name="l00142"></a>00142 <span class="preprocessor">    #define __TBB_PRIO_INHERIT_BROKEN 1</span>
+<a name="l00143"></a>00143 <span class="preprocessor"></span>
+<a name="l00146"></a>00146 <span class="preprocessor">    #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1</span>
+<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __FreeBSD__ */</span>
+<a name="l00148"></a>00148 
+<a name="l00149"></a>00149 <span class="preprocessor">#if __LRB__</span>
+<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_config_lrb.h"</span>
+<a name="l00151"></a>00151 <span class="preprocessor">#endif</span>
 <a name="l00152"></a>00152 <span class="preprocessor"></span>
-<a name="l00155"></a>00155 <span class="preprocessor">    #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1</span>
-<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __FreeBSD__ */</span>
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_config_H */</span>
+<a name="l00153"></a>00153 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_config_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00369.html b/doc/html/a00380.html
similarity index 53%
rename from doc/html/a00369.html
rename to doc/html/a00380.html
index 87886d1..96f11a1 100644
--- a/doc/html/a00369.html
+++ b/doc/html/a00380.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>task_scheduler_observer.h Source File</title>
+<title>tbb_config_lrb.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>task_scheduler_observer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>tbb_config_lrb.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,46 +39,22 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_task_scheduler_observer_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_task_scheduler_observer_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_tbb_config_lrb_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_config_lrb_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include "atomic.h"</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="preprocessor">#if __TBB_SCHEDULER_OBSERVER</span>
+<a name="l00024"></a>00024 <span class="preprocessor">#if !__LRB__</span>
+<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">    #error tbb_config_lrb.h should be included only when building for LRB platform</span>
+<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
 <a name="l00027"></a>00027 <span class="preprocessor"></span>
-<a name="l00028"></a>00028 <span class="keyword">namespace </span>tbb {
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030 <span class="keyword">namespace </span>internal {
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="keyword">class </span>observer_proxy;
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034 <span class="keyword">class </span>task_scheduler_observer_v3 {
-<a name="l00035"></a>00035     <span class="keyword">friend</span> <span class="keyword">class </span>observer_proxy;
-<a name="l00036"></a>00036     observer_proxy* my_proxy;
-<a name="l00037"></a>00037     atomic<intptr> my_busy_count;
-<a name="l00038"></a>00038 <span class="keyword">public</span>:
-<a name="l00040"></a>00040     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD observe( <span class="keywordtype">bool</span> state=<span class="keyword">true</span> );
-<a name="l00041"></a>00041 
-<a name="l00043"></a>00043     <span class="keywordtype">bool</span> is_observing()<span class="keyword"> const </span>{<span class="keywordflow">return</span> my_proxy!=NULL;}
-<a name="l00044"></a>00044 
-<a name="l00046"></a>00046     task_scheduler_observer_v3() : my_proxy(NULL) {my_busy_count=0;}
-<a name="l00047"></a>00047 
-<a name="l00049"></a>00049     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_entry( <span class="keywordtype">bool</span> <span class="comment">/*is_worker*/</span> ) {} 
-<a name="l00050"></a>00050 
-<a name="l00052"></a>00052     <span class="keyword">virtual</span> <span class="keywordtype">void</span> on_scheduler_exit( <span class="keywordtype">bool</span> <span class="comment">/*is_worker*/</span> ) {}
-<a name="l00053"></a>00053 
-<a name="l00055"></a>00055     <span class="keyword">virtual</span> ~task_scheduler_observer_v3() {observe(<span class="keyword">false</span>);}
-<a name="l00056"></a>00056 };
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 } <span class="comment">// namespace internal</span>
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="keyword">typedef</span> internal::task_scheduler_observer_v3 task_scheduler_observer;
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062 } <span class="comment">// namespace tbb</span>
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_SCHEDULER_OBSERVER */</span>
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_task_scheduler_observer_H */</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#define __TBB_FLOATING_POINT_BROKEN 1</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span>
+<a name="l00033"></a>00033 <span class="preprocessor">#define __TBB_rel_acq_fence __TBB_release_consistency_helper</span>
+<a name="l00034"></a>00034 <span class="preprocessor"></span>
+<a name="l00035"></a>00035 <span class="preprocessor">#if __TBB_LRB_NATIVE && !__FreeBSD__</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">    #error LRB compiler does not define __FreeBSD__ anymore. Check for the __TBB_XXX_BROKEN defined under __FreeBSD__</span>
+<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !__FreeBSD__ */</span>
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_config_lrb_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00381.html b/doc/html/a00381.html
index 34ef897..73ec534 100644
--- a/doc/html/a00381.html
+++ b/doc/html/a00381.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb_profiling.h Source File</title>
+<title>tbb_exception.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>tbb_profiling.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>tbb_exception.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,81 +39,218 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_profiling_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_profiling_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_exception_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_exception_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="comment">// Check if the tools support is enabled</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#if (_WIN32||_WIN64||__linux__) && TBB_USE_THREADING_TOOLS</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span>
-<a name="l00027"></a>00027 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include <stdlib.h></span>  <span class="comment">/* mbstowcs_s */</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#endif</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_stddef.h"</span>
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="keyword">namespace </span>tbb {
-<a name="l00033"></a>00033     <span class="keyword">namespace </span>internal {
-<a name="l00034"></a>00034 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span>        <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC itt_set_sync_name_v3( <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* name ); 
-<a name="l00036"></a>00036         <span class="keyword">inline</span> size_t multibyte_to_widechar( <span class="keywordtype">wchar_t</span>* wcs, <span class="keyword">const</span> <span class="keywordtype">char</span>* mbs, size_t bufsize) {
-<a name="l00037"></a>00037 <span class="preprocessor">#if _MSC_VER>=1400</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>            size_t len;
-<a name="l00039"></a>00039             mbstowcs_s( &len, wcs, bufsize, mbs, _TRUNCATE );
-<a name="l00040"></a>00040             <span class="keywordflow">return</span> len;   <span class="comment">// mbstowcs_s counts null terminator</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#else</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span>            size_t len = mbstowcs( wcs, mbs, bufsize );
-<a name="l00043"></a>00043             <span class="keywordflow">if</span>(wcs && len!=size_t(-1) )
-<a name="l00044"></a>00044                 wcs[len<bufsize-1? len: bufsize-1] = wchar_t(<span class="charliteral">'\0'</span>);
-<a name="l00045"></a>00045             <span class="keywordflow">return</span> len+1; <span class="comment">// mbstowcs does not count null terminator</span>
-<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>        }
-<a name="l00048"></a>00048 <span class="preprocessor">#else</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span>        <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC itt_set_sync_name_v3( <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* name ); 
-<a name="l00050"></a>00050 <span class="preprocessor">#endif</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span>    } <span class="comment">// namespace internal</span>
-<a name="l00052"></a>00052 } <span class="comment">// namespace tbb</span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include <stdexcept></span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="preprocessor">#if __TBB_EXCEPTIONS && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC)</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#error The current compilation environment does not support exception handling. Please set __TBB_EXCEPTIONS to 0 in tbb_config.h</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span>
+<a name="l00031"></a>00031 <span class="keyword">namespace </span>tbb {
+<a name="l00032"></a>00032 
+<a name="l00034"></a><a class="code" href="a00121.html">00034</a> <span class="keyword">class </span><a class="code" href="a00121.html">bad_last_alloc</a> : <span class="keyword">public</span> std::bad_alloc {
+<a name="l00035"></a>00035 <span class="keyword">public</span>:
+<a name="l00036"></a>00036     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <span class="stringliteral">"bad allocation in previous or concurrent attempt"</span>; }
+<a name="l00037"></a>00037     <span class="keyword">virtual</span> ~<a class="code" href="a00121.html">bad_last_alloc</a>() <span class="keywordflow">throw</span>() {}
+<a name="l00038"></a>00038 };
+<a name="l00039"></a>00039 
+<a name="l00040"></a>00040 <span class="keyword">namespace </span>internal {
+<a name="l00041"></a>00041 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4() ;
+<a name="l00042"></a>00042 } <span class="comment">// namespace internal</span>
+<a name="l00043"></a>00043 
+<a name="l00044"></a>00044 } <span class="comment">// namespace tbb</span>
+<a name="l00045"></a>00045 
+<a name="l00046"></a>00046 <span class="preprocessor">#if __TBB_EXCEPTIONS</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_allocator.h"</span>
+<a name="l00048"></a>00048 <span class="preprocessor">#include <exception></span>
+<a name="l00049"></a>00049 <span class="preprocessor">#include <typeinfo></span>
+<a name="l00050"></a>00050 <span class="preprocessor">#include <new></span>
+<a name="l00051"></a>00051 
+<a name="l00052"></a>00052 <span class="keyword">namespace </span>tbb {
 <a name="l00053"></a>00053 
 <a name="l00055"></a>00055 
-<a name="l00057"></a>00057 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">    #define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)    \</span>
-<a name="l00059"></a>00059 <span class="preprocessor">        namespace profiling {                                                       \</span>
-<a name="l00060"></a>00060 <span class="preprocessor">            inline void set_name( sync_object_type& obj, const wchar_t* name ) {    \</span>
-<a name="l00061"></a>00061 <span class="preprocessor">                tbb::internal::itt_set_sync_name_v3( &obj, name );                  \</span>
-<a name="l00062"></a>00062 <span class="preprocessor">            }                                                                       \</span>
-<a name="l00063"></a>00063 <span class="preprocessor">            inline void set_name( sync_object_type& obj, const char* name ) {       \</span>
-<a name="l00064"></a>00064 <span class="preprocessor">                size_t len = tbb::internal::multibyte_to_widechar(NULL, name, 0);   \</span>
-<a name="l00065"></a>00065 <span class="preprocessor">                wchar_t *wname = new wchar_t[len];                                  \</span>
-<a name="l00066"></a>00066 <span class="preprocessor">                tbb::internal::multibyte_to_widechar(wname, name, len);             \</span>
-<a name="l00067"></a>00067 <span class="preprocessor">                set_name( obj, wname );                                             \</span>
-<a name="l00068"></a>00068 <span class="preprocessor">                delete[] wname;                                                     \</span>
-<a name="l00069"></a>00069 <span class="preprocessor">            }                                                                       \</span>
-<a name="l00070"></a>00070 <span class="preprocessor">        }</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* !WIN */</span>
-<a name="l00072"></a>00072 <span class="preprocessor">    #define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)    \</span>
-<a name="l00073"></a>00073 <span class="preprocessor">        namespace profiling {                                                       \</span>
-<a name="l00074"></a>00074 <span class="preprocessor">            inline void set_name( sync_object_type& obj, const char* name ) {       \</span>
-<a name="l00075"></a>00075 <span class="preprocessor">                tbb::internal::itt_set_sync_name_v3( &obj, name );                  \</span>
-<a name="l00076"></a>00076 <span class="preprocessor">            }                                                                       \</span>
-<a name="l00077"></a>00077 <span class="preprocessor">        }</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !WIN */</span>
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080 <span class="preprocessor">#else </span><span class="comment">/* no tools support */</span>
+<a name="l00075"></a><a class="code" href="a00172.html">00075</a> <span class="keyword">class </span><a class="code" href="a00172.html">tbb_exception</a> : <span class="keyword">public</span> std::exception
+<a name="l00076"></a>00076 {
+<a name="l00080"></a>00080     <span class="keywordtype">void</span>* operator new ( size_t );
 <a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">    #define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)    \</span>
-<a name="l00084"></a>00084 <span class="preprocessor">        namespace profiling {                                               \</span>
-<a name="l00085"></a>00085 <span class="preprocessor">            inline void set_name( sync_object_type&, const wchar_t* ) {}    \</span>
-<a name="l00086"></a>00086 <span class="preprocessor">            inline void set_name( sync_object_type&, const char* ) {}       \</span>
-<a name="l00087"></a>00087 <span class="preprocessor">        }</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* !WIN */</span>
-<a name="l00089"></a>00089 <span class="preprocessor">    #define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)    \</span>
-<a name="l00090"></a>00090 <span class="preprocessor">        namespace profiling {                                               \</span>
-<a name="l00091"></a>00091 <span class="preprocessor">            inline void set_name( sync_object_type&, const char* ) {}       \</span>
-<a name="l00092"></a>00092 <span class="preprocessor">        }</span>
-<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !WIN */</span>
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095 <span class="preprocessor">#endif </span><span class="comment">/* no tools support */</span>
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_profiling_H */</span>
+<a name="l00082"></a>00082 <span class="keyword">public</span>:
+<a name="l00084"></a>00084 
+<a name="l00085"></a>00085     <span class="keyword">virtual</span> <a class="code" href="a00172.html">tbb_exception</a>* <a class="code" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> () <span class="keywordflow">throw</span>() = 0;
+<a name="l00086"></a>00086     
+<a name="l00088"></a>00088 
+<a name="l00090"></a>00090     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> () <span class="keywordflow">throw</span>() = 0;
+<a name="l00091"></a>00091 
+<a name="l00093"></a>00093 
+<a name="l00097"></a>00097     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> () = 0;
+<a name="l00098"></a>00098 
+<a name="l00100"></a>00100     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00172.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
+<a name="l00101"></a>00101 
+<a name="l00103"></a>00103     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
+<a name="l00104"></a>00104 
+<a name="l00111"></a><a class="code" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">00111</a>     <span class="keywordtype">void</span> <a class="code" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete </a>( <span class="keywordtype">void</span>* p ) {
+<a name="l00112"></a>00112         internal::deallocate_via_handler_v3(p);
+<a name="l00113"></a>00113     }
+<a name="l00114"></a>00114 };
+<a name="l00115"></a>00115 
+<a name="l00117"></a>00117 
+<a name="l00121"></a><a class="code" href="a00127.html">00121</a> <span class="keyword">class </span><a class="code" href="a00127.html">captured_exception</a> : <span class="keyword">public</span> <a class="code" href="a00172.html">tbb_exception</a>
+<a name="l00122"></a>00122 {
+<a name="l00123"></a>00123 <span class="keyword">public</span>:
+<a name="l00124"></a>00124     <a class="code" href="a00127.html">captured_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src )
+<a name="l00125"></a>00125         : <a class="code" href="a00172.html">tbb_exception</a>(src), my_dynamic(<span class="keyword">false</span>)
+<a name="l00126"></a>00126     {
+<a name="l00127"></a>00127         set(src.<a class="code" href="a00127.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00127.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
+<a name="l00128"></a>00128     }
+<a name="l00129"></a>00129 
+<a name="l00130"></a>00130     <a class="code" href="a00127.html">captured_exception</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* info )
+<a name="l00131"></a>00131         : my_dynamic(<span class="keyword">false</span>)
+<a name="l00132"></a>00132     {
+<a name="l00133"></a>00133         set(name, info);
+<a name="l00134"></a>00134     }
+<a name="l00135"></a>00135 
+<a name="l00136"></a>00136     __TBB_EXPORTED_METHOD ~<a class="code" href="a00127.html">captured_exception</a> () <span class="keywordflow">throw</span>() {
+<a name="l00137"></a>00137         clear();
+<a name="l00138"></a>00138     }
+<a name="l00139"></a>00139 
+<a name="l00140"></a>00140     <a class="code" href="a00127.html">captured_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src ) {
+<a name="l00141"></a>00141         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
+<a name="l00142"></a>00142             clear();
+<a name="l00143"></a>00143             set(src.<a class="code" href="a00127.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00127.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
+<a name="l00144"></a>00144         }
+<a name="l00145"></a>00145         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00146"></a>00146     }
+<a name="l00147"></a>00147 
+<a name="l00148"></a>00148     <span class="comment">/*override*/</span> 
+<a name="l00149"></a>00149     <a class="code" href="a00127.html">captured_exception</a>* __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#837a50b8f6a800bda225c39d1699643f">move</a> () <span class="keywordflow">throw</span>();
+<a name="l00150"></a>00150 
+<a name="l00151"></a>00151     <span class="comment">/*override*/</span> 
+<a name="l00152"></a>00152     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#93d875d3555502ff6f18513525de204c">destroy</a> () <span class="keywordflow">throw</span>();
+<a name="l00153"></a>00153 
+<a name="l00154"></a>00154     <span class="comment">/*override*/</span> 
+<a name="l00155"></a><a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">00155</a>     <span class="keywordtype">void</span> <a class="code" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () { <span class="keywordflow">throw</span> *<span class="keyword">this</span>; }
+<a name="l00156"></a>00156 
+<a name="l00157"></a>00157     <span class="comment">/*override*/</span> 
+<a name="l00158"></a>00158     <span class="keyword">const</span> <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const throw();
+<a name="l00159"></a>00159 
+<a name="l00160"></a>00160     <span class="comment">/*override*/</span> 
+<a name="l00161"></a>00161     const <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const throw();
+<a name="l00162"></a>00162 
+<a name="l00163"></a>00163     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD set ( const <span class="keywordtype">char</span>* name, const <span class="keywordtype">char</span>* info ) throw();
+<a name="l00164"></a>00164     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD clear () throw();
+<a name="l00165"></a>00165 
+<a name="l00166"></a>00166 private:
+<a name="l00168"></a>00168     <a class="code" href="a00127.html">captured_exception</a>() {}
+<a name="l00169"></a>00169 
+<a name="l00171"></a>00171     <span class="keyword">static</span> captured_exception* allocate ( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span>* info );
+<a name="l00172"></a>00172 
+<a name="l00173"></a>00173     <span class="keywordtype">bool</span> my_dynamic;
+<a name="l00174"></a>00174     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
+<a name="l00175"></a>00175     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_info;
+<a name="l00176"></a>00176 };
+<a name="l00177"></a>00177 
+<a name="l00179"></a>00179 
+<a name="l00183"></a>00183 <span class="keyword">template</span><<span class="keyword">typename</span> ExceptionData>
+<a name="l00184"></a><a class="code" href="a00141.html">00184</a> <span class="keyword">class </span><a class="code" href="a00141.html">movable_exception</a> : <span class="keyword">public</span> <a class="code" href="a00172.html">tbb_exception</a>
+<a name="l00185"></a>00185 {
+<a name="l00186"></a>00186     <span class="keyword">typedef</span> <a class="code" href="a00141.html">movable_exception<ExceptionData></a> <a class="code" href="a00141.html">self_type</a>;
+<a name="l00187"></a>00187 
+<a name="l00188"></a>00188 <span class="keyword">public</span>:
+<a name="l00189"></a>00189     <a class="code" href="a00141.html">movable_exception</a> ( <span class="keyword">const</span> ExceptionData& data ) 
+<a name="l00190"></a>00190         : <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>(data)
+<a name="l00191"></a>00191         , my_dynamic(<span class="keyword">false</span>)
+<a name="l00192"></a>00192         , my_exception_name(<span class="keyword">typeid</span>(<a class="code" href="a00141.html">self_type</a>).<a class="code" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a>())
+<a name="l00193"></a>00193     {}
+<a name="l00194"></a>00194 
+<a name="l00195"></a>00195     <a class="code" href="a00141.html">movable_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& src ) <span class="keywordflow">throw</span> () 
+<a name="l00196"></a>00196         : <a class="code" href="a00172.html">tbb_exception</a>(src)
+<a name="l00197"></a>00197         , <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>(src.<a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>)
+<a name="l00198"></a>00198         , my_dynamic(<span class="keyword">false</span>)
+<a name="l00199"></a>00199         , my_exception_name(src.<a class="code" href="a00141.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>)
+<a name="l00200"></a>00200     {}
+<a name="l00201"></a>00201 
+<a name="l00202"></a>00202     ~<a class="code" href="a00141.html">movable_exception</a> () <span class="keywordflow">throw</span>() {}
+<a name="l00203"></a>00203 
+<a name="l00204"></a>00204     <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& operator= ( <span class="keyword">const</span> <a class="code" href="a00141.html">movable_exception</a>& src ) {
+<a name="l00205"></a>00205         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &src ) {
+<a name="l00206"></a>00206             <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a> = src.<a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
+<a name="l00207"></a>00207             my_exception_name = src.<a class="code" href="a00141.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>;
+<a name="l00208"></a>00208         }
+<a name="l00209"></a>00209         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00210"></a>00210     }
+<a name="l00211"></a>00211 
+<a name="l00212"></a>00212     ExceptionData& data () <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>; }
+<a name="l00213"></a>00213 
+<a name="l00214"></a>00214     <span class="keyword">const</span> ExceptionData& data () <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>; }
+<a name="l00215"></a>00215 
+<a name="l00216"></a><a class="code" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">00216</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a> () const throw() { <span class="keywordflow">return</span> my_exception_name; }
+<a name="l00217"></a>00217 
+<a name="l00218"></a><a class="code" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">00218</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">what</a> () const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"tbb::movable_exception"</span>; }
+<a name="l00219"></a>00219 
+<a name="l00220"></a>00220     <span class="comment">/*override*/</span> 
+<a name="l00221"></a><a class="code" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">00221</a>     <a class="code" href="a00141.html">movable_exception</a>* <a class="code" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">move</a> () throw() {
+<a name="l00222"></a>00222         <span class="keywordtype">void</span>* e = internal::allocate_via_handler_v3(<span class="keyword">sizeof</span>(<a class="code" href="a00141.html">movable_exception</a>));
+<a name="l00223"></a>00223         <span class="keywordflow">if</span> ( e ) {
+<a name="l00224"></a>00224             ::new (e) movable_exception(*<span class="keyword">this</span>);
+<a name="l00225"></a>00225             ((movable_exception*)e)->my_dynamic = <span class="keyword">true</span>;
+<a name="l00226"></a>00226         }
+<a name="l00227"></a>00227         <span class="keywordflow">return</span> (movable_exception*)e;
+<a name="l00228"></a>00228     }
+<a name="l00229"></a>00229     <span class="comment">/*override*/</span> 
+<a name="l00230"></a><a class="code" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">00230</a>     <span class="keywordtype">void</span> <a class="code" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">destroy</a> () throw() {
+<a name="l00231"></a>00231         __TBB_ASSERT ( my_dynamic, <span class="stringliteral">"Method destroy can be called only on dynamically allocated movable_exceptions"</span> );
+<a name="l00232"></a>00232         <span class="keywordflow">if</span> ( my_dynamic ) {
+<a name="l00233"></a>00233             this->~<a class="code" href="a00141.html">movable_exception</a>();
+<a name="l00234"></a>00234             internal::deallocate_via_handler_v3(<span class="keyword">this</span>);
+<a name="l00235"></a>00235         }
+<a name="l00236"></a>00236     }
+<a name="l00237"></a>00237     <span class="comment">/*override*/</span> 
+<a name="l00238"></a><a class="code" href="a00141.html#17cffba35811c92b7e65d63506b69602">00238</a>     <span class="keywordtype">void</span> <a class="code" href="a00141.html#17cffba35811c92b7e65d63506b69602">throw_self</a> () {
+<a name="l00239"></a>00239         <span class="keywordflow">throw</span> *<span class="keyword">this</span>;
+<a name="l00240"></a>00240     }
+<a name="l00241"></a>00241 
+<a name="l00242"></a>00242 <span class="keyword">protected</span>:
+<a name="l00244"></a><a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">00244</a>     ExceptionData  <a class="code" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
+<a name="l00245"></a>00245 
+<a name="l00246"></a>00246 <span class="keyword">private</span>:
+<a name="l00248"></a>00248     <span class="keywordtype">bool</span> my_dynamic;
+<a name="l00249"></a>00249 
+<a name="l00251"></a>00251 
+<a name="l00252"></a>00252     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
+<a name="l00253"></a>00253 };
+<a name="l00254"></a>00254 
+<a name="l00255"></a>00255 <span class="preprocessor">#if !TBB_USE_CAPTURED_EXCEPTION</span>
+<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="keyword">namespace </span>internal {
+<a name="l00257"></a>00257 
+<a name="l00259"></a>00259 
+<a name="l00261"></a><a class="code" href="a00173.html">00261</a> <span class="keyword">class </span><a class="code" href="a00173.html">tbb_exception_ptr</a> {
+<a name="l00262"></a>00262     std::exception_ptr  my_ptr;
+<a name="l00263"></a>00263 
+<a name="l00264"></a>00264 <span class="keyword">public</span>:
+<a name="l00265"></a>00265     <span class="keyword">static</span> <a class="code" href="a00173.html">tbb_exception_ptr</a>* allocate ();
+<a name="l00266"></a>00266     <span class="keyword">static</span> <a class="code" href="a00173.html">tbb_exception_ptr</a>* allocate ( <span class="keyword">const</span> <a class="code" href="a00172.html">tbb_exception</a>& tag );
+<a name="l00268"></a>00268     <span class="keyword">static</span> <a class="code" href="a00173.html">tbb_exception_ptr</a>* allocate ( <a class="code" href="a00127.html">captured_exception</a>& src );
+<a name="l00269"></a>00269     
+<a name="l00271"></a>00271 
+<a name="l00272"></a>00272     <span class="keywordtype">void</span> <a class="code" href="a00173.html#921875bbacd2c8a5f324c7da7a415262">destroy</a> () <span class="keywordflow">throw</span>();
+<a name="l00273"></a>00273 
+<a name="l00275"></a><a class="code" href="a00173.html#292832fd5c523e3d8081a22247840a1d">00275</a>     <span class="keywordtype">void</span> <a class="code" href="a00173.html#292832fd5c523e3d8081a22247840a1d">throw_self</a> () { std::rethrow_exception(my_ptr); }
+<a name="l00276"></a>00276 
+<a name="l00277"></a>00277 <span class="keyword">private</span>:
+<a name="l00278"></a>00278     <a class="code" href="a00173.html">tbb_exception_ptr</a> ( <span class="keyword">const</span> std::exception_ptr& src ) : my_ptr(src) {}
+<a name="l00279"></a>00279     tbb_exception_ptr ( <span class="keyword">const</span> <a class="code" href="a00127.html">captured_exception</a>& src ) : my_ptr(std::copy_exception(src)) {}
+<a name="l00280"></a>00280 }; <span class="comment">// class tbb::internal::tbb_exception_ptr</span>
+<a name="l00281"></a>00281 
+<a name="l00282"></a>00282 } <span class="comment">// namespace internal</span>
+<a name="l00283"></a>00283 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
+<a name="l00284"></a>00284 
+<a name="l00285"></a>00285 } <span class="comment">// namespace tbb</span>
+<a name="l00286"></a>00286 
+<a name="l00287"></a>00287 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_EXCEPTIONS */</span>
+<a name="l00288"></a>00288 
+<a name="l00289"></a>00289 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_exception_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00382.html b/doc/html/a00382.html
index cd0e86e..85a2e39 100644
--- a/doc/html/a00382.html
+++ b/doc/html/a00382.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>tbb_stddef.h Source File</title>
+<title>tbb_machine.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 <link href="tabs.css" rel="stylesheet" type="text/css">
 </head><body>
@@ -19,7 +19,7 @@
     <li><a href="files.html"><span>File List</span></a></li>
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
-<h1>tbb_stddef.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<h1>tbb_machine.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
 <a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.</span>
 <a name="l00003"></a>00003 <span class="comment"></span>
 <a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
@@ -39,182 +39,560 @@
 <a name="l00018"></a>00018 <span class="comment">    writing.</span>
 <a name="l00019"></a>00019 <span class="comment">*/</span>
 <a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_tbb_stddef_H</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_stddef_H</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_machine_H</span>
+<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_machine_H</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
-<a name="l00024"></a>00024 <span class="comment">// Marketing-driven product version</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#define TBB_VERSION_MAJOR 2</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define TBB_VERSION_MINOR 2</span>
+<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
+<a name="l00025"></a>00025 
+<a name="l00026"></a>00026 <span class="preprocessor">#if _WIN32||_WIN64</span>
 <a name="l00027"></a>00027 <span class="preprocessor"></span>
-<a name="l00028"></a>00028 <span class="comment">// Engineering-focused interface version</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#define TBB_INTERFACE_VERSION 4000</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#ifdef _MANAGED</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(push, off)</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
 <a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="comment">// The oldest major interface version still supported</span>
-<a name="l00033"></a>00033 <span class="comment">// To be used in SONAME, manifests, etc.</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#define TBB_COMPATIBLE_INTERFACE_VERSION 2</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span>
-<a name="l00036"></a>00036 <span class="preprocessor">#define __TBB_STRING_AUX(x) #x</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_STRING(x) __TBB_STRING_AUX(x)</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 <span class="comment">// We do not need defines below for resource processing on windows</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#if !defined RC_INVOKED</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span>
-<a name="l00042"></a>00042 <span class="comment">// Define groups for Doxygen documentation</span>
-<a name="l00052"></a>00052 <span class="comment"></span><span class="comment">// Simple text that is displayed on the main page of Doxygen documentation.</span>
-<a name="l00094"></a>00094 <span class="comment"></span><span class="comment">// Define preprocessor symbols used to determine architecture</span>
-<a name="l00095"></a>00095 <span class="preprocessor">#if _WIN32||_WIN64</span>
-<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#   if defined(_M_AMD64)</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_64 1</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#   elif defined(_M_IA64)</span>
-<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_ipf 1</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#   elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support</span>
-<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_32 1</span>
-<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* Assume generic Unix */</span>
-<a name="l00104"></a>00104 <span class="preprocessor">#   if !__linux__ && !__APPLE__</span>
-<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_generic_os 1</span>
-<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#   if __x86_64__</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_64 1</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#   elif __ia64__</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_ipf 1</span>
-<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#   elif __i386__||__i386  // __i386 is for Sun OS</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_x86_32 1</span>
-<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#   else</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#       define __TBB_generic_arch 1</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#   endif</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span>
-<a name="l00118"></a>00118 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="comment">// define the parts of stdint.h that are needed, but put them inside tbb::internal</span>
-<a name="l00120"></a>00120 <span class="keyword">namespace </span>tbb {
-<a name="l00121"></a>00121 <span class="keyword">namespace </span>internal {
-<a name="l00122"></a>00122     <span class="keyword">typedef</span> __int8 int8_t;
-<a name="l00123"></a>00123     <span class="keyword">typedef</span> __int16 int16_t;
-<a name="l00124"></a>00124     <span class="keyword">typedef</span> __int32 int32_t;
-<a name="l00125"></a>00125     <span class="keyword">typedef</span> __int64 int64_t;
-<a name="l00126"></a>00126     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int8 uint8_t;
-<a name="l00127"></a>00127     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int16 uint16_t;
-<a name="l00128"></a>00128     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int32 uint32_t;
-<a name="l00129"></a>00129     <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64 uint64_t;
-<a name="l00130"></a>00130 } <span class="comment">// namespace internal</span>
-<a name="l00131"></a>00131 } <span class="comment">// namespace tbb</span>
-<a name="l00132"></a>00132 <span class="preprocessor">#else</span>
-<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#include <stdint.h></span>
-<a name="l00134"></a>00134 <span class="preprocessor">#endif </span><span class="comment">/* _MSC_VER */</span>
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="preprocessor">#if _MSC_VER >=1400</span>
-<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC   __cdecl</span>
-<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_METHOD __thiscall</span>
-<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_FUNC</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_EXPORTED_METHOD</span>
-<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00143"></a>00143 <span class="preprocessor"></span>
-<a name="l00144"></a>00144 <span class="preprocessor">#include <cstddef></span>      <span class="comment">/* Need size_t and ptrdiff_t (the latter on Windows only) from here. */</span>
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_tbb_windef_H</span>
-<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#include "_tbb_windef.h"</span>
-<a name="l00149"></a>00149 <span class="preprocessor">#undef __TBB_tbb_windef_H</span>
-<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00151"></a>00151 <span class="preprocessor"></span>
-<a name="l00152"></a>00152 <span class="preprocessor">#include "tbb_config.h"</span>
+<a name="l00032"></a>00032 <span class="preprocessor">#if __MINGW32__</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
+<a name="l00034"></a>00034 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> __declspec(dllimport) int __stdcall SwitchToThread( <span class="keywordtype">void</span> );
+<a name="l00035"></a>00035 <span class="preprocessor">#define __TBB_Yield()  SwitchToThread()</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#elif defined(_M_IX86)</span>
+<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_ia32.h"</span>
+<a name="l00038"></a>00038 <span class="preprocessor">#elif defined(_M_AMD64) </span>
+<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#include "machine/windows_intel64.h"</span>
+<a name="l00040"></a>00040 <span class="preprocessor">#else</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#error Unsupported platform</span>
+<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span>
+<a name="l00044"></a>00044 <span class="preprocessor">#ifdef _MANAGED</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#pragma managed(pop)</span>
+<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span>
+<a name="l00048"></a>00048 <span class="preprocessor">#elif __linux__ || __FreeBSD__</span>
+<a name="l00049"></a>00049 <span class="preprocessor"></span>
+<a name="l00050"></a>00050 <span class="preprocessor">#if __i386__</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
+<a name="l00052"></a>00052 <span class="preprocessor">#elif __x86_64__</span>
+<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
+<a name="l00054"></a>00054 <span class="preprocessor">#elif __ia64__</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia64.h"</span>
+<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span>
+<a name="l00058"></a>00058 <span class="preprocessor">#elif __APPLE__</span>
+<a name="l00059"></a>00059 <span class="preprocessor"></span>
+<a name="l00060"></a>00060 <span class="preprocessor">#if __i386__</span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
+<a name="l00062"></a>00062 <span class="preprocessor">#elif __x86_64__</span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
+<a name="l00064"></a>00064 <span class="preprocessor">#elif __POWERPC__</span>
+<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#include "machine/mac_ppc.h"</span>
+<a name="l00066"></a>00066 <span class="preprocessor">#endif</span>
+<a name="l00067"></a>00067 <span class="preprocessor"></span>
+<a name="l00068"></a>00068 <span class="preprocessor">#elif _AIX</span>
+<a name="l00069"></a>00069 <span class="preprocessor"></span>
+<a name="l00070"></a>00070 <span class="preprocessor">#include "machine/ibm_aix51.h"</span>
+<a name="l00071"></a>00071 
+<a name="l00072"></a>00072 <span class="preprocessor">#elif __sun || __SUNPRO_CC</span>
+<a name="l00073"></a>00073 <span class="preprocessor"></span>
+<a name="l00074"></a>00074 <span class="preprocessor">#define __asm__ asm </span>
+<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define __volatile__ volatile</span>
+<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#if __i386  || __i386__</span>
+<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_ia32.h"</span>
+<a name="l00078"></a>00078 <span class="preprocessor">#elif __x86_64__</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#include "machine/linux_intel64.h"</span>
+<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span>
+<a name="l00082"></a>00082 <span class="preprocessor">#endif</span>
+<a name="l00083"></a>00083 <span class="preprocessor"></span>
+<a name="l00084"></a>00084 <span class="preprocessor">#if    !defined(__TBB_CompareAndSwap4) \</span>
+<a name="l00085"></a>00085 <span class="preprocessor">    || !defined(__TBB_CompareAndSwap8) \</span>
+<a name="l00086"></a>00086 <span class="preprocessor">    || !defined(__TBB_Yield)           \</span>
+<a name="l00087"></a>00087 <span class="preprocessor">    || !defined(__TBB_release_consistency_helper)</span>
+<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#error Minimal requirements for tbb_machine.h not satisfied </span>
+<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00090"></a>00090 <span class="preprocessor"></span>
+<a name="l00091"></a>00091 <span class="preprocessor">#ifndef __TBB_load_with_acquire</span>
+<a name="l00093"></a>00093 <span class="preprocessor">    template<typename T></span>
+<a name="l00094"></a>00094 <span class="preprocessor"></span>    <span class="keyword">inline</span> T __TBB_load_with_acquire(<span class="keyword">const</span> <span class="keyword">volatile</span> T& location) {
+<a name="l00095"></a>00095         T temp = location;
+<a name="l00096"></a>00096         __TBB_release_consistency_helper();
+<a name="l00097"></a>00097         <span class="keywordflow">return</span> temp;
+<a name="l00098"></a>00098     }
+<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
+<a name="l00100"></a>00100 <span class="preprocessor"></span>
+<a name="l00101"></a>00101 <span class="preprocessor">#ifndef __TBB_store_with_release</span>
+<a name="l00103"></a>00103 <span class="preprocessor">    template<typename T, typename V></span>
+<a name="l00104"></a>00104 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_store_with_release(<span class="keyword">volatile</span> T& location, V value) {
+<a name="l00105"></a>00105         __TBB_release_consistency_helper();
+<a name="l00106"></a>00106         location = T(value); 
+<a name="l00107"></a>00107     }
+<a name="l00108"></a>00108 <span class="preprocessor">#endif</span>
+<a name="l00109"></a>00109 <span class="preprocessor"></span>
+<a name="l00110"></a>00110 <span class="preprocessor">#ifndef __TBB_Pause</span>
+<a name="l00111"></a>00111 <span class="preprocessor"></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Pause(int32_t) {
+<a name="l00112"></a>00112         __TBB_Yield();
+<a name="l00113"></a>00113     }
+<a name="l00114"></a>00114 <span class="preprocessor">#endif</span>
+<a name="l00115"></a>00115 <span class="preprocessor"></span>
+<a name="l00116"></a>00116 <span class="keyword">namespace </span>tbb {
+<a name="l00117"></a>00117 <span class="keyword">namespace </span>internal {
+<a name="l00118"></a>00118 
+<a name="l00120"></a>00120 
+<a name="l00121"></a><a class="code" href="a00119.html">00121</a> <span class="keyword">class </span><a class="code" href="a00119.html">atomic_backoff</a> {
+<a name="l00123"></a>00123 
+<a name="l00125"></a>00125     <span class="keyword">static</span> <span class="keyword">const</span> int32_t LOOPS_BEFORE_YIELD = 16;
+<a name="l00126"></a>00126     int32_t count;
+<a name="l00127"></a>00127 <span class="keyword">public</span>:
+<a name="l00128"></a>00128     <a class="code" href="a00119.html">atomic_backoff</a>() : count(1) {}
+<a name="l00129"></a>00129 
+<a name="l00131"></a><a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">00131</a>     <span class="keywordtype">void</span> <a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>() {
+<a name="l00132"></a>00132         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
+<a name="l00133"></a>00133             __TBB_Pause(count);
+<a name="l00134"></a>00134             <span class="comment">// Pause twice as long the next time.</span>
+<a name="l00135"></a>00135             count*=2;
+<a name="l00136"></a>00136         } <span class="keywordflow">else</span> {
+<a name="l00137"></a>00137             <span class="comment">// Pause is so long that we might as well yield CPU to scheduler.</span>
+<a name="l00138"></a>00138             __TBB_Yield();
+<a name="l00139"></a>00139         }
+<a name="l00140"></a>00140     }
+<a name="l00141"></a>00141 
+<a name="l00142"></a>00142     <span class="comment">// pause for a few times and then return false immediately.</span>
+<a name="l00143"></a>00143     <span class="keywordtype">bool</span> bounded_pause() {
+<a name="l00144"></a>00144         <span class="keywordflow">if</span>( count<=LOOPS_BEFORE_YIELD ) {
+<a name="l00145"></a>00145             __TBB_Pause(count);
+<a name="l00146"></a>00146             <span class="comment">// Pause twice as long the next time.</span>
+<a name="l00147"></a>00147             count*=2;
+<a name="l00148"></a>00148             <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00149"></a>00149         } <span class="keywordflow">else</span> {
+<a name="l00150"></a>00150             <span class="keywordflow">return</span> <span class="keyword">false</span>;
+<a name="l00151"></a>00151         }
+<a name="l00152"></a>00152     }
 <a name="l00153"></a>00153 
-<a name="l00154"></a>00154 <span class="keyword">namespace </span>tbb {
-<a name="l00156"></a><a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">00156</a>     <span class="keyword">typedef</span> void(*<a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a>)( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> < [...]
-<a name="l00157"></a>00157 }
+<a name="l00154"></a>00154     <span class="keywordtype">void</span> reset() {
+<a name="l00155"></a>00155         count = 1;
+<a name="l00156"></a>00156     }
+<a name="l00157"></a>00157 };
 <a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00160"></a>00160 <span class="preprocessor"></span>
-<a name="l00162"></a>00162 
-<a name="l00165"></a>00165 <span class="preprocessor">#define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))</span>
-<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_ASSERT_EX __TBB_ASSERT</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span>
-<a name="l00168"></a>00168 <span class="keyword">namespace </span>tbb {
-<a name="l00170"></a>00170     <a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a>( <a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler );
-<a name="l00171"></a>00171 
-<a name="l00173"></a>00173 
-<a name="l00176"></a>00176     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> <span class="keywordtype">char</span>* comment );
-<a name="l00177"></a>00177 } <span class="comment">// namespace tbb</span>
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179 <span class="preprocessor">#else</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span>
-<a name="l00182"></a>00182 <span class="preprocessor">#define __TBB_ASSERT(predicate,comment) ((void)0)</span>
-<a name="l00184"></a>00184 <span class="preprocessor">#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))</span>
-<a name="l00185"></a>00185 <span class="preprocessor"></span>
-<a name="l00186"></a>00186 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00187"></a>00187 
-<a name="l00189"></a>00189 <span class="keyword">namespace </span>tbb {
-<a name="l00190"></a>00190 
-<a name="l00192"></a>00192 
-<a name="l00196"></a>00196 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a>();
-<a name="l00197"></a>00197 
-<a name="l00199"></a>00199 
-<a name="l00203"></a><a class="code" href="a00161.html">00203</a> <span class="keyword">class </span><a class="code" href="a00161.html">split</a> {
-<a name="l00204"></a>00204 };
-<a name="l00205"></a>00205 
-<a name="l00210"></a>00210 <span class="keyword">namespace </span>internal {
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212 <span class="keyword">using</span> std::size_t;
-<a name="l00213"></a>00213 
-<a name="l00215"></a>00215 
-<a name="l00217"></a>00217 <span class="keyword">typedef</span> size_t uintptr;
-<a name="l00218"></a>00218 
-<a name="l00220"></a>00220 
-<a name="l00222"></a>00222 <span class="keyword">typedef</span> std::ptrdiff_t intptr;
-<a name="l00223"></a>00223 
-<a name="l00225"></a>00225 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC runtime_warning( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
+<a name="l00160"></a>00160 
+<a name="l00161"></a>00161 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00162"></a>00162 <span class="keywordtype">void</span> spin_wait_while_eq( <span class="keyword">const</span> <span class="keyword">volatile</span> T& location, U value ) {
+<a name="l00163"></a>00163     atomic_backoff backoff;
+<a name="l00164"></a>00164     <span class="keywordflow">while</span>( location==value ) backoff.pause();
+<a name="l00165"></a>00165 }
+<a name="l00166"></a>00166 
+<a name="l00168"></a>00168 
+<a name="l00169"></a>00169 <span class="keyword">template</span><<span class="keyword">typename</span> T, <span class="keyword">typename</span> U>
+<a name="l00170"></a>00170 <span class="keywordtype">void</span> spin_wait_until_eq( <span class="keyword">const</span> <span class="keyword">volatile</span> T& location, <span class="keyword">const</span> U value ) {
+<a name="l00171"></a>00171     atomic_backoff backoff;
+<a name="l00172"></a>00172     <span class="keywordflow">while</span>( location!=value ) backoff.pause();
+<a name="l00173"></a>00173 }
+<a name="l00174"></a>00174 
+<a name="l00175"></a>00175 <span class="comment">// T should be unsigned, otherwise sign propagation will break correctness of bit manipulations.</span>
+<a name="l00176"></a>00176 <span class="comment">// S should be either 1 or 2, for the mask calculation to work correctly.</span>
+<a name="l00177"></a>00177 <span class="comment">// Together, these rules limit applicability of Masked CAS to unsigned char and unsigned short.</span>
+<a name="l00178"></a>00178 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+<a name="l00179"></a>00179 <span class="keyword">inline</span> T __TBB_MaskedCompareAndSwap (<span class="keyword">volatile</span> T *ptr, T value, T comparand ) {
+<a name="l00180"></a>00180     <span class="keyword">volatile</span> uint32_t * base = (uint32_t*)( (uintptr_t)ptr & ~(uintptr_t)0x3 );
+<a name="l00181"></a>00181 <span class="preprocessor">#if __TBB_BIG_ENDIAN</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*( 4-S - (uintptr_t(ptr) & 0x3) ) );
+<a name="l00183"></a>00183 <span class="preprocessor">#else</span>
+<a name="l00184"></a>00184 <span class="preprocessor"></span>    <span class="keyword">const</span> uint8_t bitoffset = uint8_t( 8*((uintptr_t)ptr & 0x3) );
+<a name="l00185"></a>00185 <span class="preprocessor">#endif</span>
+<a name="l00186"></a>00186 <span class="preprocessor"></span>    <span class="keyword">const</span> uint32_t mask = ( (1<<(S*8)) - 1 )<<bitoffset;
+<a name="l00187"></a>00187     atomic_backoff b;
+<a name="l00188"></a>00188     uint32_t result;
+<a name="l00189"></a>00189     <span class="keywordflow">for</span>(;;) {
+<a name="l00190"></a>00190         result = *base; <span class="comment">// reload the base value which might change during the pause</span>
+<a name="l00191"></a>00191         uint32_t old_value = ( result & ~mask ) | ( comparand << bitoffset );
+<a name="l00192"></a>00192         uint32_t new_value = ( result & ~mask ) | ( value << bitoffset );
+<a name="l00193"></a>00193         <span class="comment">// __TBB_CompareAndSwap4 presumed to have full fence. </span>
+<a name="l00194"></a>00194         result = __TBB_CompareAndSwap4( base, new_value, old_value );
+<a name="l00195"></a>00195         <span class="keywordflow">if</span>(  result==old_value               <span class="comment">// CAS succeeded</span>
+<a name="l00196"></a>00196           || ((result^old_value)&mask)!=0 )  <span class="comment">// CAS failed and the bits of interest have changed</span>
+<a name="l00197"></a>00197             <span class="keywordflow">break</span>;
+<a name="l00198"></a>00198         <span class="keywordflow">else</span>                                 <span class="comment">// CAS failed but the bits of interest left unchanged</span>
+<a name="l00199"></a>00199             b.pause();
+<a name="l00200"></a>00200     }
+<a name="l00201"></a>00201     <span class="keywordflow">return</span> T((result & mask) >> bitoffset);
+<a name="l00202"></a>00202 }
+<a name="l00203"></a>00203 
+<a name="l00204"></a>00204 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+<a name="l00205"></a>00205 <span class="keyword">inline</span> T __TBB_CompareAndSwapGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value, T comparand ) { 
+<a name="l00206"></a>00206     <span class="keywordflow">return</span> __TBB_CompareAndSwapW((T *)ptr,value,comparand);
+<a name="l00207"></a>00207 }
+<a name="l00208"></a>00208 
+<a name="l00209"></a>00209 <span class="keyword">template</span><>
+<a name="l00210"></a>00210 <span class="keyword">inline</span> uint8_t __TBB_CompareAndSwapGeneric <1,uint8_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint8_t value, uint8_t comparand ) {
+<a name="l00211"></a>00211 #ifdef __TBB_CompareAndSwap1
+<a name="l00212"></a>00212     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(ptr,value,comparand);
+<a name="l00213"></a>00213 <span class="preprocessor">#else</span>
+<a name="l00214"></a>00214 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<1,uint8_t>((<span class="keyword">volatile</span> uint8_t *)ptr,value,comparand);
+<a name="l00215"></a>00215 <span class="preprocessor">#endif</span>
+<a name="l00216"></a>00216 <span class="preprocessor"></span>}
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218 <span class="keyword">template</span><>
+<a name="l00219"></a>00219 <span class="keyword">inline</span> uint16_t __TBB_CompareAndSwapGeneric <2,uint16_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint16_t value, uint16_t comparand ) {
+<a name="l00220"></a>00220 #ifdef __TBB_CompareAndSwap2
+<a name="l00221"></a>00221     <span class="keywordflow">return</span> __TBB_CompareAndSwap2(ptr,value,comparand);
+<a name="l00222"></a>00222 <span class="preprocessor">#else</span>
+<a name="l00223"></a>00223 <span class="preprocessor"></span>    <span class="keywordflow">return</span> __TBB_MaskedCompareAndSwap<2,uint16_t>((<span class="keyword">volatile</span> uint16_t *)ptr,value,comparand);
+<a name="l00224"></a>00224 <span class="preprocessor">#endif</span>
+<a name="l00225"></a>00225 <span class="preprocessor"></span>}
 <a name="l00226"></a>00226 
-<a name="l00227"></a>00227 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00229"></a>00229 <span class="preprocessor">template<typename T></span>
-<a name="l00230"></a>00230 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
-<a name="l00231"></a>00231     p = reinterpret_cast<T*>(-1);
-<a name="l00232"></a>00232 }
-<a name="l00233"></a>00233 <span class="preprocessor">#else</span>
-<a name="l00234"></a>00234 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00235"></a>00235 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
-<a name="l00236"></a>00236 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00237"></a>00237 
-<a name="l00239"></a>00239 <span class="keyword">class </span>no_assign {
-<a name="l00240"></a>00240     <span class="comment">// Deny assignment</span>
-<a name="l00241"></a>00241     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> no_assign& );
-<a name="l00242"></a>00242 <span class="keyword">public</span>:
-<a name="l00243"></a>00243 <span class="preprocessor">#if __GNUC__</span>
-<a name="l00245"></a>00245 <span class="preprocessor">    no_assign() {}</span>
-<a name="l00246"></a>00246 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00247"></a>00247 };
-<a name="l00248"></a>00248 
-<a name="l00250"></a>00250 <span class="keyword">class </span>no_copy: no_assign {
-<a name="l00252"></a>00252     no_copy( <span class="keyword">const</span> no_copy& );
-<a name="l00253"></a>00253 <span class="keyword">public</span>:
-<a name="l00255"></a>00255     no_copy() {}
-<a name="l00256"></a>00256 };
-<a name="l00257"></a>00257 
-<a name="l00259"></a>00259 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00260"></a>00260 <span class="keyword">struct </span>allocator_type {
-<a name="l00261"></a>00261     <span class="keyword">typedef</span> T value_type;
-<a name="l00262"></a>00262 };
-<a name="l00263"></a>00263 
-<a name="l00264"></a>00264 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00266"></a>00266 <span class="preprocessor">template<typename T></span>
-<a name="l00267"></a>00267 <span class="preprocessor"></span><span class="keyword">struct </span>allocator_type<const T> {
-<a name="l00268"></a>00268     <span class="keyword">typedef</span> T value_type;
-<a name="l00269"></a>00269 };
-<a name="l00270"></a>00270 <span class="preprocessor">#endif</span>
-<a name="l00271"></a>00271 <span class="preprocessor"></span>
-<a name="l00272"></a>00272 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
-<a name="l00275"></a>00275 <span class="comment"></span><span class="keyword">struct </span>version_tag_v3 {};
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277 <span class="keyword">typedef</span> version_tag_v3 version_tag;
-<a name="l00278"></a>00278 
-<a name="l00279"></a>00279 } <span class="comment">// internal</span>
-<a name="l00281"></a>00281 <span class="comment"></span>
-<a name="l00282"></a>00282 } <span class="comment">// tbb</span>
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
-<a name="l00285"></a>00285 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
+<a name="l00227"></a>00227 <span class="keyword">template</span><>
+<a name="l00228"></a>00228 <span class="keyword">inline</span> uint32_t __TBB_CompareAndSwapGeneric <4,uint32_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint32_t value, uint32_t comparand ) { 
+<a name="l00229"></a>00229     <span class="keywordflow">return</span> __TBB_CompareAndSwap4(ptr,value,comparand);
+<a name="l00230"></a>00230 }
+<a name="l00231"></a>00231 
+<a name="l00232"></a>00232 <span class="keyword">template</span><>
+<a name="l00233"></a>00233 <span class="keyword">inline</span> uint64_t __TBB_CompareAndSwapGeneric <8,uint64_t> (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, uint64_t value, uint64_t comparand ) { 
+<a name="l00234"></a>00234     <span class="keywordflow">return</span> __TBB_CompareAndSwap8(ptr,value,comparand);
+<a name="l00235"></a>00235 }
+<a name="l00236"></a>00236 
+<a name="l00237"></a>00237 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+<a name="l00238"></a>00238 <span class="keyword">inline</span> T __TBB_FetchAndAddGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T addend) {
+<a name="l00239"></a>00239     atomic_backoff b;
+<a name="l00240"></a>00240     T result;
+<a name="l00241"></a>00241     <span class="keywordflow">for</span>(;;) {
+<a name="l00242"></a>00242         result = *reinterpret_cast<volatile T *>(ptr);
+<a name="l00243"></a>00243         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence. </span>
+<a name="l00244"></a>00244         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result ) 
+<a name="l00245"></a>00245             <span class="keywordflow">break</span>;
+<a name="l00246"></a>00246         b.pause();
+<a name="l00247"></a>00247     }
+<a name="l00248"></a>00248     <span class="keywordflow">return</span> result;
+<a name="l00249"></a>00249 }
+<a name="l00250"></a>00250 
+<a name="l00251"></a>00251 <span class="keyword">template</span><size_t S, <span class="keyword">typename</span> T>
+<a name="l00252"></a>00252 <span class="keyword">inline</span> T __TBB_FetchAndStoreGeneric (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, T value) {
+<a name="l00253"></a>00253     atomic_backoff b;
+<a name="l00254"></a>00254     T result;
+<a name="l00255"></a>00255     <span class="keywordflow">for</span>(;;) {
+<a name="l00256"></a>00256         result = *reinterpret_cast<volatile T *>(ptr);
+<a name="l00257"></a>00257         <span class="comment">// __TBB_CompareAndSwapGeneric presumed to have full fence.</span>
+<a name="l00258"></a>00258         <span class="keywordflow">if</span>( __TBB_CompareAndSwapGeneric<S,T> ( ptr, value, result )==result ) 
+<a name="l00259"></a>00259             <span class="keywordflow">break</span>;
+<a name="l00260"></a>00260         b.pause();
+<a name="l00261"></a>00261     }
+<a name="l00262"></a>00262     <span class="keywordflow">return</span> result;
+<a name="l00263"></a>00263 }
+<a name="l00264"></a>00264 
+<a name="l00265"></a>00265 <span class="comment">// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as </span>
+<a name="l00266"></a>00266 <span class="comment">// strict as type T.  Type type should have a trivial default constructor and destructor, so that</span>
+<a name="l00267"></a>00267 <span class="comment">// arrays of that type can be declared without initializers.  </span>
+<a name="l00268"></a>00268 <span class="comment">// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands</span>
+<a name="l00269"></a>00269 <span class="comment">// to a type bigger than T.</span>
+<a name="l00270"></a>00270 <span class="comment">// The default definition here works on machines where integers are naturally aligned and the</span>
+<a name="l00271"></a>00271 <span class="comment">// strictest alignment is 16.</span>
+<a name="l00272"></a>00272 <span class="preprocessor">#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict</span>
+<a name="l00273"></a>00273 <span class="preprocessor"></span>
+<a name="l00274"></a>00274 <span class="preprocessor">#if __GNUC__ || __SUNPRO_CC</span>
+<a name="l00275"></a>00275 <span class="preprocessor"></span><span class="keyword">struct </span>__TBB_machine_type_with_strictest_alignment {
+<a name="l00276"></a>00276     <span class="keywordtype">int</span> member[4];
+<a name="l00277"></a>00277 } __attribute__((aligned(16)));
+<a name="l00278"></a>00278 <span class="preprocessor">#elif _MSC_VER</span>
+<a name="l00279"></a>00279 <span class="preprocessor"></span>__declspec(align(16)) struct __TBB_machine_type_with_strictest_alignment {
+<a name="l00280"></a>00280     <span class="keywordtype">int</span> member[4];
+<a name="l00281"></a>00281 };
+<a name="l00282"></a>00282 <span class="preprocessor">#else</span>
+<a name="l00283"></a>00283 <span class="preprocessor"></span><span class="preprocessor">#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) or __TBB_machine_type_with_strictest_alignment</span>
+<a name="l00284"></a>00284 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00285"></a>00285 <span class="preprocessor"></span>
+<a name="l00286"></a>00286 <span class="keyword">template</span><size_t N> <span class="keyword">struct </span>type_with_alignment {__TBB_machine_type_with_strictest_alignment member;};
+<a name="l00287"></a>00287 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<1> { <span class="keywordtype">char</span> member; };
+<a name="l00288"></a>00288 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<2> { uint16_t member; };
+<a name="l00289"></a>00289 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<4> { uint32_t member; };
+<a name="l00290"></a>00290 <span class="keyword">template</span><> <span class="keyword">struct </span>type_with_alignment<8> { uint64_t member; };
+<a name="l00291"></a>00291 
+<a name="l00292"></a>00292 <span class="preprocessor">#if _MSC_VER||defined(__GNUC__)&&__GNUC__==3 && __GNUC_MINOR__<=2  </span>
+<a name="l00294"></a>00294 <span class="preprocessor"></span>
+<a name="l00296"></a>00296 <span class="preprocessor">template<size_t Size, typename T> </span>
+<a name="l00297"></a><a class="code" href="a00178.html">00297</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="a00178.html">work_around_alignment_bug</a> {
+<a name="l00298"></a>00298 <span class="preprocessor">#if _MSC_VER</span>
+<a name="l00299"></a>00299 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof(T);
+<a name="l00300"></a>00300 <span class="preprocessor">#else</span>
+<a name="l00301"></a>00301 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keyword">const</span> size_t alignment = __alignof__(T);
+<a name="l00302"></a>00302 <span class="preprocessor">#endif</span>
+<a name="l00303"></a>00303 <span class="preprocessor"></span>};
+<a name="l00304"></a>00304 <span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<tbb::internal::work_around_alignment_bug<sizeof(T),T>::alignment></span>
+<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#elif __GNUC__ || __SUNPRO_CC</span>
+<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__alignof__(T)></span>
+<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) __TBB_machine_type_with_strictest_alignment</span>
+<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#endif  </span><span class="comment">/* ____TBB_TypeWithAlignmentAtLeastAsStrict */</span>
+<a name="l00311"></a>00311 
+<a name="l00312"></a>00312 } <span class="comment">// namespace internal</span>
+<a name="l00313"></a>00313 } <span class="comment">// namespace tbb</span>
+<a name="l00314"></a>00314 
+<a name="l00315"></a>00315 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1</span>
+<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t></span>
+<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00318"></a>00318 <span class="preprocessor"></span>
+<a name="l00319"></a>00319 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2 </span>
+<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2 tbb::internal::__TBB_CompareAndSwapGeneric<2,uint16_t></span>
+<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00322"></a>00322 <span class="preprocessor"></span>
+<a name="l00323"></a>00323 <span class="preprocessor">#ifndef __TBB_CompareAndSwapW</span>
+<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwapW tbb::internal::__TBB_CompareAndSwapGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00326"></a>00326 <span class="preprocessor"></span>
+<a name="l00327"></a>00327 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1</span>
+<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1 tbb::internal::__TBB_FetchAndAddGeneric<1,uint8_t></span>
+<a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00330"></a>00330 <span class="preprocessor"></span>
+<a name="l00331"></a>00331 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2</span>
+<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2 tbb::internal::__TBB_FetchAndAddGeneric<2,uint16_t></span>
+<a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00334"></a>00334 <span class="preprocessor"></span>
+<a name="l00335"></a>00335 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4</span>
+<a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4 tbb::internal::__TBB_FetchAndAddGeneric<4,uint32_t></span>
+<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00338"></a>00338 <span class="preprocessor"></span>
+<a name="l00339"></a>00339 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8</span>
+<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8 tbb::internal::__TBB_FetchAndAddGeneric<8,uint64_t></span>
+<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00342"></a>00342 <span class="preprocessor"></span>
+<a name="l00343"></a>00343 <span class="preprocessor">#ifndef __TBB_FetchAndAddW</span>
+<a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddW tbb::internal::__TBB_FetchAndAddGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00346"></a>00346 <span class="preprocessor"></span>
+<a name="l00347"></a>00347 <span class="preprocessor">#ifndef __TBB_FetchAndStore1</span>
+<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,uint8_t></span>
+<a name="l00349"></a>00349 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00350"></a>00350 <span class="preprocessor"></span>
+<a name="l00351"></a>00351 <span class="preprocessor">#ifndef __TBB_FetchAndStore2</span>
+<a name="l00352"></a>00352 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,uint16_t></span>
+<a name="l00353"></a>00353 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00354"></a>00354 <span class="preprocessor"></span>
+<a name="l00355"></a>00355 <span class="preprocessor">#ifndef __TBB_FetchAndStore4</span>
+<a name="l00356"></a>00356 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,uint32_t></span>
+<a name="l00357"></a>00357 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00358"></a>00358 <span class="preprocessor"></span>
+<a name="l00359"></a>00359 <span class="preprocessor">#ifndef __TBB_FetchAndStore8</span>
+<a name="l00360"></a>00360 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,uint64_t></span>
+<a name="l00361"></a>00361 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00362"></a>00362 <span class="preprocessor"></span>
+<a name="l00363"></a>00363 <span class="preprocessor">#ifndef __TBB_FetchAndStoreW</span>
+<a name="l00364"></a>00364 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStoreW tbb::internal::__TBB_FetchAndStoreGeneric<sizeof(ptrdiff_t),ptrdiff_t></span>
+<a name="l00365"></a>00365 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00366"></a>00366 <span class="preprocessor"></span>
+<a name="l00367"></a>00367 <span class="preprocessor">#if __TBB_DECL_FENCED_ATOMICS</span>
+<a name="l00368"></a>00368 <span class="preprocessor"></span>
+<a name="l00369"></a>00369 <span class="preprocessor">#ifndef __TBB_CompareAndSwap1__TBB_full_fence</span>
+<a name="l00370"></a>00370 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1__TBB_full_fence __TBB_CompareAndSwap1</span>
+<a name="l00371"></a>00371 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00372"></a>00372 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1acquire</span>
+<a name="l00373"></a>00373 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1acquire __TBB_CompareAndSwap1__TBB_full_fence</span>
+<a name="l00374"></a>00374 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00375"></a>00375 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap1release</span>
+<a name="l00376"></a>00376 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap1release __TBB_CompareAndSwap1__TBB_full_fence</span>
+<a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00378"></a>00378 <span class="preprocessor"></span>
+<a name="l00379"></a>00379 <span class="preprocessor">#ifndef __TBB_CompareAndSwap2__TBB_full_fence</span>
+<a name="l00380"></a>00380 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2__TBB_full_fence __TBB_CompareAndSwap2</span>
+<a name="l00381"></a>00381 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2acquire</span>
+<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2acquire __TBB_CompareAndSwap2__TBB_full_fence</span>
+<a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00385"></a>00385 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap2release</span>
+<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap2release __TBB_CompareAndSwap2__TBB_full_fence</span>
+<a name="l00387"></a>00387 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00388"></a>00388 <span class="preprocessor"></span>
+<a name="l00389"></a>00389 <span class="preprocessor">#ifndef __TBB_CompareAndSwap4__TBB_full_fence</span>
+<a name="l00390"></a>00390 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4__TBB_full_fence __TBB_CompareAndSwap4</span>
+<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00392"></a>00392 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4acquire</span>
+<a name="l00393"></a>00393 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4acquire __TBB_CompareAndSwap4__TBB_full_fence</span>
+<a name="l00394"></a>00394 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00395"></a>00395 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap4release</span>
+<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap4release __TBB_CompareAndSwap4__TBB_full_fence</span>
+<a name="l00397"></a>00397 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
+<a name="l00398"></a>00398 <span class="preprocessor"></span>
+<a name="l00399"></a>00399 <span class="preprocessor">#ifndef __TBB_CompareAndSwap8__TBB_full_fence</span>
+<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8__TBB_full_fence __TBB_CompareAndSwap8</span>
+<a name="l00401"></a>00401 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00402"></a>00402 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8acquire</span>
+<a name="l00403"></a>00403 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8acquire __TBB_CompareAndSwap8__TBB_full_fence</span>
+<a name="l00404"></a>00404 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00405"></a>00405 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_CompareAndSwap8release</span>
+<a name="l00406"></a>00406 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_CompareAndSwap8release __TBB_CompareAndSwap8__TBB_full_fence</span>
+<a name="l00407"></a>00407 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00408"></a>00408 <span class="preprocessor"></span>
+<a name="l00409"></a>00409 <span class="preprocessor">#ifndef __TBB_FetchAndAdd1__TBB_full_fence</span>
+<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1__TBB_full_fence __TBB_FetchAndAdd1</span>
+<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1acquire</span>
+<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1acquire __TBB_FetchAndAdd1__TBB_full_fence</span>
+<a name="l00414"></a>00414 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00415"></a>00415 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd1release</span>
+<a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd1release __TBB_FetchAndAdd1__TBB_full_fence</span>
+<a name="l00417"></a>00417 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00418"></a>00418 <span class="preprocessor"></span>
+<a name="l00419"></a>00419 <span class="preprocessor">#ifndef __TBB_FetchAndAdd2__TBB_full_fence</span>
+<a name="l00420"></a>00420 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2__TBB_full_fence __TBB_FetchAndAdd2</span>
+<a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2acquire</span>
+<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2acquire __TBB_FetchAndAdd2__TBB_full_fence</span>
+<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd2release</span>
+<a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd2release __TBB_FetchAndAdd2__TBB_full_fence</span>
+<a name="l00427"></a>00427 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00428"></a>00428 <span class="preprocessor"></span>
+<a name="l00429"></a>00429 <span class="preprocessor">#ifndef __TBB_FetchAndAdd4__TBB_full_fence</span>
+<a name="l00430"></a>00430 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4__TBB_full_fence __TBB_FetchAndAdd4</span>
+<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4acquire</span>
+<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4acquire __TBB_FetchAndAdd4__TBB_full_fence</span>
+<a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd4release</span>
+<a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd4release __TBB_FetchAndAdd4__TBB_full_fence</span>
+<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00438"></a>00438 <span class="preprocessor"></span>
+<a name="l00439"></a>00439 <span class="preprocessor">#ifndef __TBB_FetchAndAdd8__TBB_full_fence</span>
+<a name="l00440"></a>00440 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8__TBB_full_fence __TBB_FetchAndAdd8</span>
+<a name="l00441"></a>00441 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00442"></a>00442 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8acquire</span>
+<a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8acquire __TBB_FetchAndAdd8__TBB_full_fence</span>
+<a name="l00444"></a>00444 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndAdd8release</span>
+<a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAdd8release __TBB_FetchAndAdd8__TBB_full_fence</span>
+<a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00448"></a>00448 <span class="preprocessor"></span>
+<a name="l00449"></a>00449 <span class="preprocessor">#ifndef __TBB_FetchAndStore1__TBB_full_fence</span>
+<a name="l00450"></a>00450 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1__TBB_full_fence __TBB_FetchAndStore1</span>
+<a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1acquire</span>
+<a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1acquire __TBB_FetchAndStore1__TBB_full_fence</span>
+<a name="l00454"></a>00454 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00455"></a>00455 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore1release</span>
+<a name="l00456"></a>00456 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore1release __TBB_FetchAndStore1__TBB_full_fence</span>
+<a name="l00457"></a>00457 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00458"></a>00458 <span class="preprocessor"></span>
+<a name="l00459"></a>00459 <span class="preprocessor">#ifndef __TBB_FetchAndStore2__TBB_full_fence</span>
+<a name="l00460"></a>00460 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2__TBB_full_fence __TBB_FetchAndStore2</span>
+<a name="l00461"></a>00461 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00462"></a>00462 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2acquire</span>
+<a name="l00463"></a>00463 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2acquire __TBB_FetchAndStore2__TBB_full_fence</span>
+<a name="l00464"></a>00464 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00465"></a>00465 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore2release</span>
+<a name="l00466"></a>00466 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore2release __TBB_FetchAndStore2__TBB_full_fence</span>
+<a name="l00467"></a>00467 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00468"></a>00468 <span class="preprocessor"></span>
+<a name="l00469"></a>00469 <span class="preprocessor">#ifndef __TBB_FetchAndStore4__TBB_full_fence</span>
+<a name="l00470"></a>00470 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4__TBB_full_fence __TBB_FetchAndStore4</span>
+<a name="l00471"></a>00471 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00472"></a>00472 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4acquire</span>
+<a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4acquire __TBB_FetchAndStore4__TBB_full_fence</span>
+<a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00475"></a>00475 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore4release</span>
+<a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore4release __TBB_FetchAndStore4__TBB_full_fence</span>
+<a name="l00477"></a>00477 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00478"></a>00478 <span class="preprocessor"></span>
+<a name="l00479"></a>00479 <span class="preprocessor">#ifndef __TBB_FetchAndStore8__TBB_full_fence</span>
+<a name="l00480"></a>00480 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8__TBB_full_fence __TBB_FetchAndStore8</span>
+<a name="l00481"></a>00481 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00482"></a>00482 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8acquire</span>
+<a name="l00483"></a>00483 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8acquire __TBB_FetchAndStore8__TBB_full_fence</span>
+<a name="l00484"></a>00484 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00485"></a>00485 <span class="preprocessor"></span><span class="preprocessor">#ifndef __TBB_FetchAndStore8release</span>
+<a name="l00486"></a>00486 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndStore8release __TBB_FetchAndStore8__TBB_full_fence</span>
+<a name="l00487"></a>00487 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00488"></a>00488 <span class="preprocessor"></span>
+<a name="l00489"></a>00489 <span class="preprocessor">#endif // __TBB_DECL_FENCED_ATOMICS</span>
+<a name="l00490"></a>00490 <span class="preprocessor"></span>
+<a name="l00491"></a>00491 <span class="comment">// Special atomic functions</span>
+<a name="l00492"></a>00492 <span class="preprocessor">#ifndef __TBB_FetchAndAddWrelease</span>
+<a name="l00493"></a>00493 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndAddWrelease __TBB_FetchAndAddW</span>
+<a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00495"></a>00495 <span class="preprocessor"></span>
+<a name="l00496"></a>00496 <span class="preprocessor">#ifndef __TBB_FetchAndIncrementWacquire</span>
+<a name="l00497"></a>00497 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1)</span>
+<a name="l00498"></a>00498 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00499"></a>00499 <span class="preprocessor"></span>
+<a name="l00500"></a>00500 <span class="preprocessor">#ifndef __TBB_FetchAndDecrementWrelease</span>
+<a name="l00501"></a>00501 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1))</span>
+<a name="l00502"></a>00502 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00503"></a>00503 <span class="preprocessor"></span>
+<a name="l00504"></a>00504 <span class="preprocessor">#if __TBB_WORDSIZE==4</span>
+<a name="l00505"></a>00505 <span class="preprocessor"></span><span class="comment">// On 32-bit platforms, "atomic.h" requires definition of __TBB_Store8 and __TBB_Load8</span>
+<a name="l00506"></a>00506 <span class="preprocessor">#ifndef __TBB_Store8</span>
+<a name="l00507"></a>00507 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_Store8 (<span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr, int64_t value) {
+<a name="l00508"></a>00508     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
+<a name="l00509"></a>00509     <span class="keywordflow">for</span>(;;) {
+<a name="l00510"></a>00510         int64_t result = *(int64_t *)ptr;
+<a name="l00511"></a>00511         <span class="keywordflow">if</span>( __TBB_CompareAndSwap8(ptr,value,result)==result ) <span class="keywordflow">break</span>;
+<a name="l00512"></a>00512         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
+<a name="l00513"></a>00513     }
+<a name="l00514"></a>00514 }
+<a name="l00515"></a>00515 <span class="preprocessor">#endif</span>
+<a name="l00516"></a>00516 <span class="preprocessor"></span>
+<a name="l00517"></a>00517 <span class="preprocessor">#ifndef __TBB_Load8</span>
+<a name="l00518"></a>00518 <span class="preprocessor"></span><span class="keyword">inline</span> int64_t __TBB_Load8 (<span class="keyword">const</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> *ptr) {
+<a name="l00519"></a>00519     int64_t result = *(int64_t *)ptr;
+<a name="l00520"></a>00520     result = __TBB_CompareAndSwap8((<span class="keyword">volatile</span> <span class="keywordtype">void</span> *)ptr,result,result);
+<a name="l00521"></a>00521     <span class="keywordflow">return</span> result;
+<a name="l00522"></a>00522 }
+<a name="l00523"></a>00523 <span class="preprocessor">#endif</span>
+<a name="l00524"></a>00524 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TBB_WORDSIZE==4 */</span>
+<a name="l00525"></a>00525 
+<a name="l00526"></a>00526 <span class="preprocessor">#ifndef __TBB_Log2</span>
+<a name="l00527"></a>00527 <span class="preprocessor"></span><span class="keyword">inline</span> intptr_t __TBB_Log2( uintptr_t x ) {
+<a name="l00528"></a>00528     <span class="keywordflow">if</span>( x==0 ) <span class="keywordflow">return</span> -1;
+<a name="l00529"></a>00529     intptr_t result = 0;
+<a name="l00530"></a>00530     uintptr_t tmp;
+<a name="l00531"></a>00531 <span class="preprocessor">#if __TBB_WORDSIZE>=8</span>
+<a name="l00532"></a>00532 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>32) ) { x=tmp; result += 32; }
+<a name="l00533"></a>00533 <span class="preprocessor">#endif</span>
+<a name="l00534"></a>00534 <span class="preprocessor"></span>    <span class="keywordflow">if</span>( (tmp = x>>16) ) { x=tmp; result += 16; }
+<a name="l00535"></a>00535     <span class="keywordflow">if</span>( (tmp = x>>8) )  { x=tmp; result += 8; }
+<a name="l00536"></a>00536     <span class="keywordflow">if</span>( (tmp = x>>4) )  { x=tmp; result += 4; }
+<a name="l00537"></a>00537     <span class="keywordflow">if</span>( (tmp = x>>2) )  { x=tmp; result += 2; }
+<a name="l00538"></a>00538     <span class="keywordflow">return</span> (x&2)? result+1: result;
+<a name="l00539"></a>00539 }
+<a name="l00540"></a>00540 <span class="preprocessor">#endif</span>
+<a name="l00541"></a>00541 <span class="preprocessor"></span>
+<a name="l00542"></a>00542 <span class="preprocessor">#ifndef __TBB_AtomicOR</span>
+<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_AtomicOR( <span class="keyword">volatile</span> <span class="keywordtype">void</span> *operand, uintptr_t addend ) {
+<a name="l00544"></a>00544     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
+<a name="l00545"></a>00545     <span class="keywordflow">for</span>(;;) {
+<a name="l00546"></a>00546         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
+<a name="l00547"></a>00547         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
+<a name="l00548"></a>00548         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
+<a name="l00549"></a>00549         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
+<a name="l00550"></a>00550     }
+<a name="l00551"></a>00551 }
+<a name="l00552"></a>00552 <span class="preprocessor">#endif</span>
+<a name="l00553"></a>00553 <span class="preprocessor"></span>
+<a name="l00554"></a>00554 <span class="preprocessor">#ifndef __TBB_AtomicAND</span>
+<a name="l00555"></a>00555 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> __TBB_AtomicAND( <span class="keyword">volatile</span> <span class="keywordtype">void</span> *operand, uintptr_t addend ) {
+<a name="l00556"></a>00556     <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
+<a name="l00557"></a>00557     <span class="keywordflow">for</span>(;;) {
+<a name="l00558"></a>00558         uintptr_t tmp = *(<span class="keyword">volatile</span> uintptr_t *)operand;
+<a name="l00559"></a>00559         uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
+<a name="l00560"></a>00560         <span class="keywordflow">if</span>( result==tmp ) <span class="keywordflow">break</span>;
+<a name="l00561"></a>00561         b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
+<a name="l00562"></a>00562     }
+<a name="l00563"></a>00563 }
+<a name="l00564"></a>00564 <span class="preprocessor">#endif</span>
+<a name="l00565"></a>00565 <span class="preprocessor"></span>
+<a name="l00566"></a>00566 <span class="preprocessor">#ifndef __TBB_TryLockByte</span>
+<a name="l00567"></a>00567 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> __TBB_TryLockByte( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> &flag ) {
+<a name="l00568"></a>00568     <span class="keywordflow">return</span> __TBB_CompareAndSwap1(&flag,1,0)==0;
+<a name="l00569"></a>00569 }
+<a name="l00570"></a>00570 <span class="preprocessor">#endif</span>
+<a name="l00571"></a>00571 <span class="preprocessor"></span>
+<a name="l00572"></a>00572 <span class="preprocessor">#ifndef __TBB_LockByte</span>
+<a name="l00573"></a>00573 <span class="preprocessor"></span><span class="keyword">inline</span> uintptr_t __TBB_LockByte( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>& flag ) {
+<a name="l00574"></a>00574     <span class="keywordflow">if</span> ( !__TBB_TryLockByte(flag) ) {
+<a name="l00575"></a>00575         <a class="code" href="a00119.html">tbb::internal::atomic_backoff</a> b;
+<a name="l00576"></a>00576         <span class="keywordflow">do</span> {
+<a name="l00577"></a>00577             b.<a class="code" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">pause</a>();
+<a name="l00578"></a>00578         } <span class="keywordflow">while</span> ( !__TBB_TryLockByte(flag) );
+<a name="l00579"></a>00579     }
+<a name="l00580"></a>00580     <span class="keywordflow">return</span> 0;
+<a name="l00581"></a>00581 }
+<a name="l00582"></a>00582 <span class="preprocessor">#endif</span>
+<a name="l00583"></a>00583 <span class="preprocessor"></span>
+<a name="l00584"></a>00584 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_machine_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00381.html b/doc/html/a00385.html
similarity index 100%
copy from doc/html/a00381.html
copy to doc/html/a00385.html
diff --git a/doc/html/a00382.html b/doc/html/a00386.html
similarity index 83%
copy from doc/html/a00382.html
copy to doc/html/a00386.html
index cd0e86e..d064ee1 100644
--- a/doc/html/a00382.html
+++ b/doc/html/a00386.html
@@ -47,7 +47,7 @@
 <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define TBB_VERSION_MINOR 2</span>
 <a name="l00027"></a>00027 <span class="preprocessor"></span>
 <a name="l00028"></a>00028 <span class="comment">// Engineering-focused interface version</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#define TBB_INTERFACE_VERSION 4000</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#define TBB_INTERFACE_VERSION 4001</span>
 <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000</span>
 <a name="l00031"></a>00031 <span class="preprocessor"></span>
 <a name="l00032"></a>00032 <span class="comment">// The oldest major interface version still supported</span>
@@ -123,7 +123,7 @@
 <a name="l00152"></a>00152 <span class="preprocessor">#include "tbb_config.h"</span>
 <a name="l00153"></a>00153 
 <a name="l00154"></a>00154 <span class="keyword">namespace </span>tbb {
-<a name="l00156"></a><a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">00156</a>     <span class="keyword">typedef</span> void(*<a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a>)( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> < [...]
+<a name="l00156"></a><a class="code" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">00156</a>     <span class="keyword">typedef</span> void(*<a class="code" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a>)( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> < [...]
 <a name="l00157"></a>00157 }
 <a name="l00158"></a>00158 
 <a name="l00159"></a>00159 <span class="preprocessor">#if TBB_USE_ASSERT</span>
@@ -133,10 +133,10 @@
 <a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_ASSERT_EX __TBB_ASSERT</span>
 <a name="l00167"></a>00167 <span class="preprocessor"></span>
 <a name="l00168"></a>00168 <span class="keyword">namespace </span>tbb {
-<a name="l00170"></a>00170     <a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a>( <a class="code" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler );
+<a name="l00170"></a>00170     <a class="code" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> __TBB_EXPORTED_FUNC <a class="code" href="a00229.html#823fa1c15dd829d1d9167157450ddcd9">set_assertion_handler</a>( <a class="code" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">assertion_handler_type</a> new_handler );
 <a name="l00171"></a>00171 
 <a name="l00173"></a>00173 
-<a name="l00176"></a>00176     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> <span class="keywordtype">char</span>* comment );
+<a name="l00176"></a>00176     <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC <a class="code" href="a00229.html#3d1252787be39b4aef311f1cadaff9e8">assertion_failure</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span>* expression, <span class="keyword">const</span> <span class="keywordtype">char</span>* comment );
 <a name="l00177"></a>00177 } <span class="comment">// namespace tbb</span>
 <a name="l00178"></a>00178 
 <a name="l00179"></a>00179 <span class="preprocessor">#else</span>
@@ -149,10 +149,10 @@
 <a name="l00189"></a>00189 <span class="keyword">namespace </span>tbb {
 <a name="l00190"></a>00190 
 <a name="l00192"></a>00192 
-<a name="l00196"></a>00196 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00224.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a>();
+<a name="l00196"></a>00196 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <span class="keywordtype">int</span> __TBB_EXPORTED_FUNC <a class="code" href="a00229.html#a6858b22e90041c9c4669674ff39b056">TBB_runtime_interface_version</a>();
 <a name="l00197"></a>00197 
 <a name="l00199"></a>00199 
-<a name="l00203"></a><a class="code" href="a00161.html">00203</a> <span class="keyword">class </span><a class="code" href="a00161.html">split</a> {
+<a name="l00203"></a><a class="code" href="a00165.html">00203</a> <span class="keyword">class </span><a class="code" href="a00165.html">split</a> {
 <a name="l00204"></a>00204 };
 <a name="l00205"></a>00205 
 <a name="l00210"></a>00210 <span class="keyword">namespace </span>internal {
@@ -165,56 +165,59 @@
 <a name="l00220"></a>00220 
 <a name="l00222"></a>00222 <span class="keyword">typedef</span> std::ptrdiff_t intptr;
 <a name="l00223"></a>00223 
-<a name="l00225"></a>00225 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC runtime_warning( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227 <span class="preprocessor">#if TBB_USE_ASSERT</span>
-<a name="l00229"></a>00229 <span class="preprocessor">template<typename T></span>
-<a name="l00230"></a>00230 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
-<a name="l00231"></a>00231     p = reinterpret_cast<T*>(-1);
-<a name="l00232"></a>00232 }
-<a name="l00233"></a>00233 <span class="preprocessor">#else</span>
-<a name="l00234"></a>00234 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00235"></a>00235 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
-<a name="l00236"></a>00236 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
-<a name="l00237"></a>00237 
-<a name="l00239"></a>00239 <span class="keyword">class </span>no_assign {
-<a name="l00240"></a>00240     <span class="comment">// Deny assignment</span>
-<a name="l00241"></a>00241     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> no_assign& );
-<a name="l00242"></a>00242 <span class="keyword">public</span>:
-<a name="l00243"></a>00243 <span class="preprocessor">#if __GNUC__</span>
-<a name="l00245"></a>00245 <span class="preprocessor">    no_assign() {}</span>
-<a name="l00246"></a>00246 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00247"></a>00247 };
-<a name="l00248"></a>00248 
-<a name="l00250"></a>00250 <span class="keyword">class </span>no_copy: no_assign {
-<a name="l00252"></a>00252     no_copy( <span class="keyword">const</span> no_copy& );
-<a name="l00253"></a>00253 <span class="keyword">public</span>:
-<a name="l00255"></a>00255     no_copy() {}
-<a name="l00256"></a>00256 };
-<a name="l00257"></a>00257 
-<a name="l00259"></a>00259 <span class="keyword">template</span><<span class="keyword">typename</span> T>
-<a name="l00260"></a>00260 <span class="keyword">struct </span>allocator_type {
-<a name="l00261"></a>00261     <span class="keyword">typedef</span> T value_type;
+<a name="l00225"></a>00225 
+<a name="l00228"></a>00228 <span class="keyword">const</span> size_t NFS_MaxLineSize = 128;
+<a name="l00229"></a>00229 
+<a name="l00231"></a>00231 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC runtime_warning( <span class="keyword">const</span> <span class="keywordtype">char</span>* format, ... );
+<a name="l00232"></a>00232 
+<a name="l00233"></a>00233 <span class="preprocessor">#if TBB_USE_ASSERT</span>
+<a name="l00235"></a>00235 <span class="preprocessor">template<typename T></span>
+<a name="l00236"></a>00236 <span class="preprocessor"></span><span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* & p ) {
+<a name="l00237"></a>00237     p = reinterpret_cast<T*>(-1);
+<a name="l00238"></a>00238 }
+<a name="l00239"></a>00239 <span class="preprocessor">#else</span>
+<a name="l00240"></a>00240 <span class="preprocessor"></span><span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00241"></a>00241 <span class="keyword">inline</span> <span class="keywordtype">void</span> poison_pointer( T* ) {<span class="comment">/*do nothing*/</span>}
+<a name="l00242"></a>00242 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
+<a name="l00243"></a>00243 
+<a name="l00245"></a>00245 <span class="keyword">class </span>no_assign {
+<a name="l00246"></a>00246     <span class="comment">// Deny assignment</span>
+<a name="l00247"></a>00247     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> no_assign& );
+<a name="l00248"></a>00248 <span class="keyword">public</span>:
+<a name="l00249"></a>00249 <span class="preprocessor">#if __GNUC__</span>
+<a name="l00251"></a>00251 <span class="preprocessor">    no_assign() {}</span>
+<a name="l00252"></a>00252 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
+<a name="l00253"></a>00253 };
+<a name="l00254"></a>00254 
+<a name="l00256"></a>00256 <span class="keyword">class </span>no_copy: no_assign {
+<a name="l00258"></a>00258     no_copy( <span class="keyword">const</span> no_copy& );
+<a name="l00259"></a>00259 <span class="keyword">public</span>:
+<a name="l00261"></a>00261     no_copy() {}
 <a name="l00262"></a>00262 };
 <a name="l00263"></a>00263 
-<a name="l00264"></a>00264 <span class="preprocessor">#if _MSC_VER</span>
-<a name="l00266"></a>00266 <span class="preprocessor">template<typename T></span>
-<a name="l00267"></a>00267 <span class="preprocessor"></span><span class="keyword">struct </span>allocator_type<const T> {
-<a name="l00268"></a>00268     <span class="keyword">typedef</span> T value_type;
-<a name="l00269"></a>00269 };
-<a name="l00270"></a>00270 <span class="preprocessor">#endif</span>
-<a name="l00271"></a>00271 <span class="preprocessor"></span>
-<a name="l00272"></a>00272 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
-<a name="l00275"></a>00275 <span class="comment"></span><span class="keyword">struct </span>version_tag_v3 {};
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277 <span class="keyword">typedef</span> version_tag_v3 version_tag;
-<a name="l00278"></a>00278 
-<a name="l00279"></a>00279 } <span class="comment">// internal</span>
-<a name="l00281"></a>00281 <span class="comment"></span>
-<a name="l00282"></a>00282 } <span class="comment">// tbb</span>
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
-<a name="l00285"></a>00285 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
+<a name="l00265"></a>00265 <span class="keyword">template</span><<span class="keyword">typename</span> T>
+<a name="l00266"></a>00266 <span class="keyword">struct </span>allocator_type {
+<a name="l00267"></a>00267     <span class="keyword">typedef</span> T value_type;
+<a name="l00268"></a>00268 };
+<a name="l00269"></a>00269 
+<a name="l00270"></a>00270 <span class="preprocessor">#if _MSC_VER</span>
+<a name="l00272"></a>00272 <span class="preprocessor">template<typename T></span>
+<a name="l00273"></a>00273 <span class="preprocessor"></span><span class="keyword">struct </span>allocator_type<const T> {
+<a name="l00274"></a>00274     <span class="keyword">typedef</span> T value_type;
+<a name="l00275"></a>00275 };
+<a name="l00276"></a>00276 <span class="preprocessor">#endif</span>
+<a name="l00277"></a>00277 <span class="preprocessor"></span>
+<a name="l00278"></a>00278 <span class="comment">// Struct to be used as a version tag for inline functions.</span>
+<a name="l00281"></a>00281 <span class="comment"></span><span class="keyword">struct </span>version_tag_v3 {};
+<a name="l00282"></a>00282 
+<a name="l00283"></a>00283 <span class="keyword">typedef</span> version_tag_v3 version_tag;
+<a name="l00284"></a>00284 
+<a name="l00285"></a>00285 } <span class="comment">// internal</span>
+<a name="l00287"></a>00287 <span class="comment"></span>
+<a name="l00288"></a>00288 } <span class="comment">// tbb</span>
+<a name="l00289"></a>00289 
+<a name="l00290"></a>00290 <span class="preprocessor">#endif </span><span class="comment">/* RC_INVOKED */</span>
+<a name="l00291"></a>00291 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_tbb_stddef_H */</span>
 </pre></div><hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/a00387.html b/doc/html/a00391.html
similarity index 100%
rename from doc/html/a00387.html
rename to doc/html/a00391.html
diff --git a/doc/html/a00395.html b/doc/html/a00399.html
similarity index 100%
rename from doc/html/a00395.html
rename to doc/html/a00399.html
diff --git a/doc/html/a00397.html b/doc/html/a00401.html
similarity index 76%
rename from doc/html/a00397.html
rename to doc/html/a00401.html
index a53ea4e..a7f80c1 100644
--- a/doc/html/a00397.html
+++ b/doc/html/a00401.html
@@ -55,51 +55,51 @@
 <a name="l00034"></a>00034 <span class="keyword">namespace </span>tbb {
 <a name="l00035"></a>00035 
 <a name="l00037"></a>00037 
-<a name="l00038"></a><a class="code" href="a00172.html">00038</a> <span class="keyword">class </span><a class="code" href="a00172.html">tick_count</a> {
+<a name="l00038"></a><a class="code" href="a00176.html">00038</a> <span class="keyword">class </span><a class="code" href="a00176.html">tick_count</a> {
 <a name="l00039"></a>00039 <span class="keyword">public</span>:
-<a name="l00041"></a><a class="code" href="a00173.html">00041</a>     <span class="keyword">class </span><a class="code" href="a00173.html">interval_t</a> {
+<a name="l00041"></a><a class="code" href="a00177.html">00041</a>     <span class="keyword">class </span><a class="code" href="a00177.html">interval_t</a> {
 <a name="l00042"></a>00042         <span class="keywordtype">long</span> <span class="keywordtype">long</span> value;
-<a name="l00043"></a>00043         <span class="keyword">explicit</span> <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>( <span class="keywordtype">long</span> <span class="keywordtype">long</span> value_ ) : value(value_) {}
+<a name="l00043"></a>00043         <span class="keyword">explicit</span> <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>( <span class="keywordtype">long</span> <span class="keywordtype">long</span> value_ ) : value(value_) {}
 <a name="l00044"></a>00044     <span class="keyword">public</span>:
-<a name="l00046"></a><a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">00046</a>         <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>() : value(0) {};
+<a name="l00046"></a><a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">00046</a>         <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>() : value(0) {};
 <a name="l00047"></a>00047 
-<a name="l00049"></a>00049         <span class="keyword">explicit</span> <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>( <span class="keywordtype">double</span> sec );
+<a name="l00049"></a>00049         <span class="keyword">explicit</span> <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>( <span class="keywordtype">double</span> sec );
 <a name="l00050"></a>00050 
-<a name="l00052"></a>00052         <span class="keywordtype">double</span> <a class="code" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() <span class="keyword">const</span>;
+<a name="l00052"></a>00052         <span class="keywordtype">double</span> <a class="code" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">seconds</a>() <span class="keyword">const</span>;
 <a name="l00053"></a>00053 
-<a name="l00054"></a>00054         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00172.html">tbb::tick_count</a>;
+<a name="l00054"></a>00054         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00176.html">tbb::tick_count</a>;
 <a name="l00055"></a>00055 
-<a name="l00057"></a>00057         <span class="keyword">friend</span> <a class="code" href="a00173.html">interval_t</a> <a class="code" href="a00173.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t0 );
+<a name="l00057"></a>00057         <span class="keyword">friend</span> <a class="code" href="a00177.html">interval_t</a> <a class="code" href="a00177.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t0 );
 <a name="l00058"></a>00058 
-<a name="l00060"></a><a class="code" href="a00173.html#5871ead1ca230efbe52a5008470e6428">00060</a>         <span class="keyword">friend</span> <a class="code" href="a00173.html">interval_t</a> <a class="code" href="a00173.html#5871ead1ca230efbe52a5008470e6428">operator+</a>( <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& j ) {
-<a name="l00061"></a>00061             <span class="keywordflow">return</span> <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>+j.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
+<a name="l00060"></a><a class="code" href="a00177.html#5871ead1ca230efbe52a5008470e6428">00060</a>         <span class="keyword">friend</span> <a class="code" href="a00177.html">interval_t</a> <a class="code" href="a00177.html#5871ead1ca230efbe52a5008470e6428">operator+</a>( <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& j ) {
+<a name="l00061"></a>00061             <span class="keywordflow">return</span> <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>+j.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
 <a name="l00062"></a>00062         }
 <a name="l00063"></a>00063 
-<a name="l00065"></a><a class="code" href="a00173.html#fa509691e1d689830931e36edd274f76">00065</a>         <span class="keyword">friend</span> <a class="code" href="a00173.html">interval_t</a> <a class="code" href="a00173.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& j ) {
-<a name="l00066"></a>00066             <span class="keywordflow">return</span> <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>-j.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
+<a name="l00065"></a><a class="code" href="a00177.html#fa509691e1d689830931e36edd274f76">00065</a>         <span class="keyword">friend</span> <a class="code" href="a00177.html">interval_t</a> <a class="code" href="a00177.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& i, <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& j ) {
+<a name="l00066"></a>00066             <span class="keywordflow">return</span> <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">interval_t</a>(i.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>-j.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>);
 <a name="l00067"></a>00067         }
 <a name="l00068"></a>00068 
-<a name="l00070"></a><a class="code" href="a00173.html#cd9814947902e26463a69a111530f81b">00070</a>         <a class="code" href="a00173.html">interval_t</a>& <a class="code" href="a00173.html#cd9814947902e26463a69a111530f81b">operator+=</a>( <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& i ) {value += i.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
+<a name="l00070"></a><a class="code" href="a00177.html#cd9814947902e26463a69a111530f81b">00070</a>         <a class="code" href="a00177.html">interval_t</a>& <a class="code" href="a00177.html#cd9814947902e26463a69a111530f81b">operator+=</a>( <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& i ) {value += i.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
 <a name="l00071"></a>00071 
-<a name="l00073"></a><a class="code" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">00073</a>         <a class="code" href="a00173.html">interval_t</a>& <a class="code" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>( <span class="keyword">const</span> <a class="code" href="a00173.html">interval_t</a>& i ) {value -= i.<a class="code" href="a00173.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
+<a name="l00073"></a><a class="code" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">00073</a>         <a class="code" href="a00177.html">interval_t</a>& <a class="code" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">operator-=</a>( <span class="keyword">const</span> <a class="code" href="a00177.html">interval_t</a>& i ) {value -= i.<a class="code" href="a00177.html#beea71acda120af3e3e29f10e8cb5c10">value</a>; <span class="keywordflow">return</span> *<span class="keyword [...]
 <a name="l00074"></a>00074     };
 <a name="l00075"></a>00075     
-<a name="l00077"></a><a class="code" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">00077</a>     <a class="code" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>() : my_count(0) {};
+<a name="l00077"></a><a class="code" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">00077</a>     <a class="code" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">tick_count</a>() : my_count(0) {};
 <a name="l00078"></a>00078 
-<a name="l00080"></a>00080     <span class="keyword">static</span> <a class="code" href="a00172.html">tick_count</a> <a class="code" href="a00172.html#fb7f78ca61cf28398645ace66e284473">now</a>();
+<a name="l00080"></a>00080     <span class="keyword">static</span> <a class="code" href="a00176.html">tick_count</a> <a class="code" href="a00176.html#fb7f78ca61cf28398645ace66e284473">now</a>();
 <a name="l00081"></a>00081     
-<a name="l00083"></a>00083     <span class="keyword">friend</span> interval_t <a class="code" href="a00172.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t0 );
+<a name="l00083"></a>00083     <span class="keyword">friend</span> interval_t <a class="code" href="a00176.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t0 );
 <a name="l00084"></a>00084 
 <a name="l00085"></a>00085 <span class="keyword">private</span>:
 <a name="l00086"></a>00086     <span class="keywordtype">long</span> <span class="keywordtype">long</span> my_count;
 <a name="l00087"></a>00087 };
 <a name="l00088"></a>00088 
-<a name="l00089"></a><a class="code" href="a00172.html#fb7f78ca61cf28398645ace66e284473">00089</a> <span class="keyword">inline</span> <a class="code" href="a00172.html">tick_count</a> <a class="code" href="a00172.html#fb7f78ca61cf28398645ace66e284473">tick_count::now</a>() {
-<a name="l00090"></a>00090     <a class="code" href="a00172.html">tick_count</a> result;
+<a name="l00089"></a><a class="code" href="a00176.html#fb7f78ca61cf28398645ace66e284473">00089</a> <span class="keyword">inline</span> <a class="code" href="a00176.html">tick_count</a> <a class="code" href="a00176.html#fb7f78ca61cf28398645ace66e284473">tick_count::now</a>() {
+<a name="l00090"></a>00090     <a class="code" href="a00176.html">tick_count</a> result;
 <a name="l00091"></a>00091 <span class="preprocessor">#if _WIN32||_WIN64</span>
 <a name="l00092"></a>00092 <span class="preprocessor"></span>    LARGE_INTEGER qpcnt;
 <a name="l00093"></a>00093     QueryPerformanceCounter(&qpcnt);
-<a name="l00094"></a>00094     result.<a class="code" href="a00172.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = qpcnt.QuadPart;
+<a name="l00094"></a>00094     result.<a class="code" href="a00176.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = qpcnt.QuadPart;
 <a name="l00095"></a>00095 <span class="preprocessor">#elif __linux__</span>
 <a name="l00096"></a>00096 <span class="preprocessor"></span>    <span class="keyword">struct </span>timespec ts;
 <a name="l00097"></a>00097 <span class="preprocessor">#if TBB_USE_ASSERT</span>
@@ -107,7 +107,7 @@
 <a name="l00099"></a>00099 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
 <a name="l00100"></a>00100         clock_gettime( CLOCK_REALTIME, &ts );
 <a name="l00101"></a>00101     __TBB_ASSERT( status==0, <span class="stringliteral">"CLOCK_REALTIME not supported"</span> );
-<a name="l00102"></a>00102     result.<a class="code" href="a00172.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = static_cast<long long>(1000000000UL)*static_cast<long long>(ts.tv_sec) + static_cast<long long>(ts.tv_nsec);
+<a name="l00102"></a>00102     result.<a class="code" href="a00176.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = static_cast<long long>(1000000000UL)*static_cast<long long>(ts.tv_sec) + static_cast<long long>(ts.tv_nsec);
 <a name="l00103"></a>00103 <span class="preprocessor">#else </span><span class="comment">/* generic Unix */</span>
 <a name="l00104"></a>00104     <span class="keyword">struct </span>timeval tv;
 <a name="l00105"></a>00105 <span class="preprocessor">#if TBB_USE_ASSERT</span>
@@ -115,12 +115,12 @@
 <a name="l00107"></a>00107 <span class="preprocessor">#endif </span><span class="comment">/* TBB_USE_ASSERT */</span>
 <a name="l00108"></a>00108         gettimeofday(&tv, NULL);
 <a name="l00109"></a>00109     __TBB_ASSERT( status==0, <span class="stringliteral">"gettimeofday failed"</span> );
-<a name="l00110"></a>00110     result.<a class="code" href="a00172.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = static_cast<long long>(1000000)*static_cast<long long>(tv.tv_sec) + static_cast<long long>(tv.tv_usec);
+<a name="l00110"></a>00110     result.<a class="code" href="a00176.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> = static_cast<long long>(1000000)*static_cast<long long>(tv.tv_sec) + static_cast<long long>(tv.tv_usec);
 <a name="l00111"></a>00111 <span class="preprocessor">#endif </span><span class="comment">/*(choice of OS) */</span>
 <a name="l00112"></a>00112     <span class="keywordflow">return</span> result;
 <a name="l00113"></a>00113 }
 <a name="l00114"></a>00114 
-<a name="l00115"></a><a class="code" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">00115</a> <span class="keyword">inline</span> <a class="code" href="a00173.html#75a9a0949f8a8a84d6758835f1b48dad">tick_count::interval_t::interval_t</a>( <span class="keywordtype">double</span> sec )
+<a name="l00115"></a><a class="code" href="a00177.html#1a21a428e00cced2e6a49e0f5f2258bf">00115</a> <span class="keyword">inline</span> <a class="code" href="a00177.html#75a9a0949f8a8a84d6758835f1b48dad">tick_count::interval_t::interval_t</a>( <span class="keywordtype">double</span> sec )
 <a name="l00116"></a>00116 {
 <a name="l00117"></a>00117 <span class="preprocessor">#if _WIN32||_WIN64</span>
 <a name="l00118"></a>00118 <span class="preprocessor"></span>    LARGE_INTEGER qpfreq;
@@ -133,11 +133,11 @@
 <a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* (choice of OS) */</span>
 <a name="l00126"></a>00126 }
 <a name="l00127"></a>00127 
-<a name="l00128"></a><a class="code" href="a00172.html#09dde78a4100800c11bb883d6204b586">00128</a> <span class="keyword">inline</span> <a class="code" href="a00173.html">tick_count::interval_t</a> <a class="code" href="a00172.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00172.html">tick_count</a>& t0 ) {
-<a name="l00129"></a>00129     <span class="keywordflow">return</span> <a class="code" href="a00173.html">tick_count::interval_t</a>( t1.<a class="code" href="a00172.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a>-t0.<a class="code" href="a00172.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> );
+<a name="l00128"></a><a class="code" href="a00176.html#09dde78a4100800c11bb883d6204b586">00128</a> <span class="keyword">inline</span> <a class="code" href="a00177.html">tick_count::interval_t</a> <a class="code" href="a00176.html#09dde78a4100800c11bb883d6204b586">operator-</a>( <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t1, <span class="keyword">const</span> <a class="code" href="a00176.html">tick_count</a>& t0 ) {
+<a name="l00129"></a>00129     <span class="keywordflow">return</span> <a class="code" href="a00177.html">tick_count::interval_t</a>( t1.<a class="code" href="a00176.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a>-t0.<a class="code" href="a00176.html#1ba05ad46dc08bc1bf34bd6cc94e36ec">my_count</a> );
 <a name="l00130"></a>00130 }
 <a name="l00131"></a>00131 
-<a name="l00132"></a><a class="code" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">00132</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">tick_count::interval_t::seconds</a>()<span class="keyword"> const </span>{
+<a name="l00132"></a><a class="code" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">00132</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">tick_count::interval_t::seconds</a>()<span class="keyword"> const </span>{
 <a name="l00133"></a>00133 <span class="preprocessor">#if _WIN32||_WIN64</span>
 <a name="l00134"></a>00134 <span class="preprocessor"></span>    LARGE_INTEGER qpfreq;
 <a name="l00135"></a>00135     QueryPerformanceFrequency(&qpfreq);
diff --git a/doc/html/annotated.html b/doc/html/annotated.html
index 9103f6e..5d0c760 100644
--- a/doc/html/annotated.html
+++ b/doc/html/annotated.html
@@ -50,39 +50,43 @@
   <tr><td class="indexkey"><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a></td><td class="indexvalue">Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread </td></tr>
   <tr><td class="indexkey"><a class="el" href="a00142.html">tbb::mutex</a></td><td class="indexvalue">Wrapper around the platform's native reader-writer lock </td></tr>
   <tr><td class="indexkey"><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a></td><td class="indexvalue">Class the user supplied algorithm body uses to add new tasks </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00145.html">tbb::parallel_while< Body ></a></td><td class="indexvalue">Parallel iteration over a stream, with optional addition of more work </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00146.html">tbb::pipeline</a></td><td class="indexvalue">A processing pipeling that applies filters to items </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00147.html">tbb::pre_scan_tag</a></td><td class="indexvalue">Used to indicate that the initial scan is being performed </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00148.html">tbb::queuing_mutex</a></td><td class="indexvalue">Queuing lock with local-only spinning </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a></td><td class="indexvalue">Reader-writer lock with local-only spinning </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00152.html">tbb::recursive_mutex</a></td><td class="indexvalue">Mutex that allows recursive mutex acquisition </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00156.html">tbb::simple_partitioner</a></td><td class="indexvalue">A simple partitioner </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00157.html">tbb::spin_mutex</a></td><td class="indexvalue">A lock that occupies a single byte </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a></td><td class="indexvalue">Represents acquisition of a mutex </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a></td><td class="indexvalue">Fast, unfair, spinning reader-writer lock with backoff and writer-preference </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00161.html">tbb::split</a></td><td class="indexvalue">Dummy type that distinguishes splitting constructor from copy constructor </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00162.html">tbb::task</a></td><td class="indexvalue">Base class for user-defined tasks </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00163.html">tbb::task_group_context</a></td><td class="indexvalue">Used to form groups of tasks </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00164.html">tbb::task_list</a></td><td class="indexvalue">A list of children </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00165.html">tbb::task_scheduler_init</a></td><td class="indexvalue">Class representing reference to tbb scheduler </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00168.html">tbb::tbb_exception</a></td><td class="indexvalue">Interface to be implemented by all exceptions TBB recognizes and propagates across the threads </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a></td><td class="indexvalue">Exception container that preserves the exact copy of the original exception </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a></td><td class="indexvalue">Hash_compare - default argument </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00171.html">tbb::thread_bound_filter</a></td><td class="indexvalue">A stage in a pipeline served by a user thread </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00172.html">tbb::tick_count</a></td><td class="indexvalue">Absolute timestamp </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00173.html">tbb::tick_count::interval_t</a></td><td class="indexvalue">Relative time interval </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00174.html">tbb::internal::work_around_alignment_bug< Size, T ></a></td><td class="indexvalue">Work around for bug in GNU 3.2 and MSVC compilers </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00144.html">tbb::null_mutex</a></td><td class="indexvalue">A mutex which does nothing </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a></td><td class="indexvalue">Represents acquisition of a mutex </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00146.html">tbb::null_rw_mutex</a></td><td class="indexvalue">A rw mutex which does nothing </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a></td><td class="indexvalue">Represents acquisition of a mutex </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a></td><td class="indexvalue">Class the user supplied algorithm body uses to add new tasks </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00149.html">tbb::parallel_while< Body ></a></td><td class="indexvalue">Parallel iteration over a stream, with optional addition of more work </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00150.html">tbb::pipeline</a></td><td class="indexvalue">A processing pipeling that applies filters to items </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00151.html">tbb::pre_scan_tag</a></td><td class="indexvalue">Used to indicate that the initial scan is being performed </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00152.html">tbb::queuing_mutex</a></td><td class="indexvalue">Queuing lock with local-only spinning </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a></td><td class="indexvalue">Reader-writer lock with local-only spinning </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00156.html">tbb::recursive_mutex</a></td><td class="indexvalue">Mutex that allows recursive mutex acquisition </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00160.html">tbb::simple_partitioner</a></td><td class="indexvalue">A simple partitioner </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00161.html">tbb::spin_mutex</a></td><td class="indexvalue">A lock that occupies a single byte </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a></td><td class="indexvalue">Represents acquisition of a mutex </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a></td><td class="indexvalue">Fast, unfair, spinning reader-writer lock with backoff and writer-preference </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a></td><td class="indexvalue">The scoped locking pattern </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00165.html">tbb::split</a></td><td class="indexvalue">Dummy type that distinguishes splitting constructor from copy constructor </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00166.html">tbb::task</a></td><td class="indexvalue">Base class for user-defined tasks </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00167.html">tbb::task_group_context</a></td><td class="indexvalue">Used to form groups of tasks </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00168.html">tbb::task_list</a></td><td class="indexvalue">A list of children </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00169.html">tbb::task_scheduler_init</a></td><td class="indexvalue">Class representing reference to tbb scheduler </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00172.html">tbb::tbb_exception</a></td><td class="indexvalue">Interface to be implemented by all exceptions TBB recognizes and propagates across the threads </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a></td><td class="indexvalue">Exception container that preserves the exact copy of the original exception </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a></td><td class="indexvalue">Hash_compare - default argument </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00175.html">tbb::thread_bound_filter</a></td><td class="indexvalue">A stage in a pipeline served by a user thread </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00176.html">tbb::tick_count</a></td><td class="indexvalue">Absolute timestamp </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00177.html">tbb::tick_count::interval_t</a></td><td class="indexvalue">Relative time interval </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00178.html">tbb::internal::work_around_alignment_bug< Size, T ></a></td><td class="indexvalue">Work around for bug in GNU 3.2 and MSVC compilers </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a></td><td class="indexvalue">Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a></td><td class="indexvalue">Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1 </td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/files.html b/doc/html/files.html
index 1ef30c3..868637c 100644
--- a/doc/html/files.html
+++ b/doc/html/files.html
@@ -20,52 +20,53 @@
     <li><a href="globals.html"><span>File Members</span></a></li>
   </ul></div>
 <h1>File List</h1>Here is a list of all documented files with brief descriptions:<table>
-  <tr><td class="indexkey"><b>_concurrent_queue_internal.h</b> <a href="a00234.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>_tbb_windef.h</b> <a href="a00250.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>aligned_space.h</b> <a href="a00252.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>atomic.h</b> <a href="a00253.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range.h</b> <a href="a00261.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range2d.h</b> <a href="a00262.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>blocked_range3d.h</b> <a href="a00263.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>cache_aligned_allocator.h</b> <a href="a00264.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>combinable.h</b> <a href="a00266.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_hash_map.h</b> <a href="a00267.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_queue.h</b> <a href="a00276.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>concurrent_vector.h</b> <a href="a00277.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>enumerable_thread_specific.h</b> <a href="a00286.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>mutex.h</b> <a href="a00294.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>null_mutex.h</b> <a href="a00296.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>null_rw_mutex.h</b> <a href="a00299.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_do.h</b> <a href="a00301.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_for.h</b> <a href="a00310.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_for_each.h</b> <a href="a00314.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_invoke.h</b> <a href="a00316.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_reduce.h</b> <a href="a00322.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_scan.h</b> <a href="a00326.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_sort.h</b> <a href="a00331.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>parallel_while.h</b> <a href="a00335.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>partitioner.h</b> <a href="a00339.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>pipeline.h</b> <a href="a00344.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>queuing_mutex.h</b> <a href="a00345.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>queuing_rw_mutex.h</b> <a href="a00346.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>recursive_mutex.h</b> <a href="a00347.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="a00206.html">scalable_allocator.h</a> <a href="a00348.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>spin_mutex.h</b> <a href="a00349.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>spin_rw_mutex.h</b> <a href="a00350.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task.h</b> <a href="a00351.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task_group.h</b> <a href="a00360.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task_scheduler_init.h</b> <a href="a00368.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>task_scheduler_observer.h</b> <a href="a00369.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb.h</b> <a href="a00371.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_allocator.h</b> <a href="a00372.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_config.h</b> <a href="a00376.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_exception.h</b> <a href="a00377.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_machine.h</b> <a href="a00378.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_profiling.h</b> <a href="a00381.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_stddef.h</b> <a href="a00382.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbb_thread.h</b> <a href="a00387.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tbbmalloc_proxy.h</b> <a href="a00395.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><b>tick_count.h</b> <a href="a00397.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>_concurrent_queue_internal.h</b> <a href="a00239.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>_tbb_windef.h</b> <a href="a00255.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>aligned_space.h</b> <a href="a00257.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>atomic.h</b> <a href="a00258.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range.h</b> <a href="a00266.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range2d.h</b> <a href="a00267.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>blocked_range3d.h</b> <a href="a00268.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>cache_aligned_allocator.h</b> <a href="a00269.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>combinable.h</b> <a href="a00271.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_hash_map.h</b> <a href="a00272.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_queue.h</b> <a href="a00282.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>concurrent_vector.h</b> <a href="a00283.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>enumerable_thread_specific.h</b> <a href="a00292.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>mutex.h</b> <a href="a00300.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>null_mutex.h</b> <a href="a00302.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>null_rw_mutex.h</b> <a href="a00303.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_do.h</b> <a href="a00304.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_for.h</b> <a href="a00313.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_for_each.h</b> <a href="a00317.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_invoke.h</b> <a href="a00319.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_reduce.h</b> <a href="a00325.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_scan.h</b> <a href="a00329.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_sort.h</b> <a href="a00334.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>parallel_while.h</b> <a href="a00338.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>partitioner.h</b> <a href="a00342.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>pipeline.h</b> <a href="a00347.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>queuing_mutex.h</b> <a href="a00348.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>queuing_rw_mutex.h</b> <a href="a00349.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>recursive_mutex.h</b> <a href="a00350.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00210.html">scalable_allocator.h</a> <a href="a00351.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>spin_mutex.h</b> <a href="a00352.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>spin_rw_mutex.h</b> <a href="a00353.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task.h</b> <a href="a00354.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task_group.h</b> <a href="a00363.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task_scheduler_init.h</b> <a href="a00371.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>task_scheduler_observer.h</b> <a href="a00372.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb.h</b> <a href="a00374.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_allocator.h</b> <a href="a00375.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_config.h</b> <a href="a00379.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_config_lrb.h</b> <a href="a00380.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_exception.h</b> <a href="a00381.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_machine.h</b> <a href="a00382.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_profiling.h</b> <a href="a00385.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_stddef.h</b> <a href="a00386.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbb_thread.h</b> <a href="a00391.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tbbmalloc_proxy.h</b> <a href="a00399.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tick_count.h</b> <a href="a00401.html">[code]</a></td><td class="indexvalue"></td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/doc/html/functions.html b/doc/html/functions.html
index e741e27..f215725 100644
--- a/doc/html/functions.html
+++ b/doc/html/functions.html
@@ -62,22 +62,21 @@ Here is a list of all documented class members with links to the class documenta
 <p>
 <h3><a class="anchor" name="index_a">- a -</a></h3><ul>
 <li>acquire()
-: <a class="el" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
-: <a class="el" href="a00145.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
-: <a class="el" href="a00146.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>add_to_depth()
-: <a class="el" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">tbb::task</a><li>affinity()
-: <a class="el" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>affinity_id
-: <a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocate()
-: <a class="el" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
-: <a class="el" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
-: <a class="el" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
-: <a class="el" href="a00162.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
-: <a class="el" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocated
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>allocator_type
-: <a class="el" href="a00166.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>assign()
+: <a class="el" href="a00164.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
+: <a class="el" href="a00149.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
+: <a class="el" href="a00150.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>affinity()
+: <a class="el" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>affinity_id
+: <a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocate()
+: <a class="el" href="a00173.html#c35e5db8e9cdff5d1387db5b0bad2e4a">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
+: <a class="el" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
+: <a class="el" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
+: <a class="el" href="a00166.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
+: <a class="el" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocated
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>allocator_type
+: <a class="el" href="a00170.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>assign()
 : <a class="el" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">tbb::concurrent_vector< T, A ></a><li>at()
 : <a class="el" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">tbb::concurrent_vector< T, A ></a><li>automatic
-: <a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a></ul>
+: <a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a></ul>
 <h3><a class="anchor" name="index_b">- b -</a></h3><ul>
 <li>back()
 : <a class="el" href="a00136.html#bd518e204107d07fd08d0ec5bdfd383d">tbb::concurrent_vector< T, A ></a><li>begin()
@@ -85,11 +84,11 @@ Here is a list of all documented class members with links to the class documenta
 : <a class="el" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">tbb::blocked_range< Value ></a></ul>
 <h3><a class="anchor" name="index_c">- c -</a></h3><ul>
 <li>cancel_group_execution()
-: <a class="el" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00163.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
+: <a class="el" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00167.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
 : <a class="el" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">tbb::concurrent_bounded_queue< T, A ></a><li>cbegin()
 : <a class="el" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">tbb::concurrent_vector< T, A ></a><li>cend()
 : <a class="el" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">tbb::concurrent_vector< T, A ></a><li>clear()
-: <a class="el" href="a00164.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00146.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">tbb::c [...]
+: <a class="el" href="a00168.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00150.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">tbb::c [...]
 : <a class="el" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#392a46759af2c884957115771affa7f4">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
 : <a class="el" href="a00136.html#1693d1da41b1a8235871be9c6633be35">tbb::concurrent_vector< T, A ></a><li>concurrent_bounded_queue()
 : <a class="el" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">tbb::concurrent_bounded_queue< T, A ></a><li>concurrent_hash_map()
@@ -99,36 +98,34 @@ Here is a list of all documented class members with links to the class documenta
 : <a class="el" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>const_iterator
 : <a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">tbb::blocked_range< Value ></a><li>const_reference
 : <a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">tbb::strict_ppl::concurrent_queue< T, A ></a><li>construct()
-: <a class="el" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>context()
-: <a class="el" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">tbb::task</a><li>count()
+: <a class="el" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>context()
+: <a class="el" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">tbb::task</a><li>count()
 : <a class="el" href="a00130.html#a3e97a1f3cb66e81a2336b013ef1ae7d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>crbegin()
 : <a class="el" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">tbb::concurrent_vector< T, A ></a><li>crend()
 : <a class="el" href="a00136.html#fff9cece89438587997ebedf93c5e962">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_d">- d -</a></h3><ul>
 <li>deallocate()
-: <a class="el" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>decrement_ref_count()
-: <a class="el" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">tbb::task</a><li>default_num_threads()
-: <a class="el" href="a00165.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>deferred
-: <a class="el" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>depth()
-: <a class="el" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">tbb::task</a><li>depth_type
-: <a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task</a><li>destroy()
-: <a class="el" href="a00169.html#921875bbacd2c8a5f324c7da7a415262">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, <a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00166.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator [...]
+: <a class="el" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>decrement_ref_count()
+: <a class="el" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">tbb::task</a><li>default_num_threads()
+: <a class="el" href="a00169.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>deferred
+: <a class="el" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>destroy()
+: <a class="el" href="a00173.html#921875bbacd2c8a5f324c7da7a415262">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#93d875d3555502ff6f18513525de204c">tbb::captured_exception</a>, <a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00170.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator [...]
 : <a class="el" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">tbb::strict_ppl::concurrent_queue< T, A ></a><li>downgrade_to_reader()
-: <a class="el" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00151.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <a class="el" href="a00164.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00155.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
 <h3><a class="anchor" name="index_e">- e -</a></h3><ul>
 <li>empty()
-: <a class="el" href="a00164.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f3f6fce0cf [...]
+: <a class="el" href="a00168.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f3f6fce0cf [...]
 : <a class="el" href="a00138.html#89811890e6a77f1e0cfc6c24ed35d09b">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">tbb::blocked_range< Value ></a>, <a class="el" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">tbb::aligned_space< T, N ></a><li>enumerable_thread_specific()
 : <a class="el" href="a00138.html#0466c43272d8458185e980fc2dc4abe2">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>erase()
 : <a class="el" href="a00130.html#b65abfa291da566617dd58dfb349630a">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>exclude()
 : <a class="el" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>execute()
-: <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">tbb::task</a><li>executing
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a></ul>
+: <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">tbb::task</a><li>executing
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a></ul>
 <h3><a class="anchor" name="index_f">- f -</a></h3><ul>
 <li>finalize()
 : <a class="el" href="a00139.html#56275eb889c77c4807967133e21401bd">tbb::filter</a><li>find()
-: <a class="el" href="a00130.html#2f1ca7e8319c464349a9de304b6dbf4a">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>freed
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>front()
+: <a class="el" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>freed
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>front()
 : <a class="el" href="a00136.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_g">- g -</a></h3><ul>
 <li>get_allocator()
@@ -138,50 +135,52 @@ Here is a list of all documented class members with links to the class documenta
 : <a class="el" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_i">- i -</a></h3><ul>
 <li>increment_ref_count()
-: <a class="el" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">tbb::task</a><li>init()
-: <a class="el" href="a00163.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
-: <a class="el" href="a00165.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
+: <a class="el" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">tbb::task</a><li>init()
+: <a class="el" href="a00167.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
+: <a class="el" href="a00169.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
 : <a class="el" href="a00130.html#7b42dba04d71e1367f0d542087906178">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_copy()
 : <a class="el" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_equal_range()
-: <a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>interval_t()
-: <a class="el" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
-: <a class="el" href="a00165.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_bound()
+: <a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_fast_find()
+: <a class="el" href="a00130.html#f0cdf5930563a49ffe827c520e948e01">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>interval_t()
+: <a class="el" href="a00177.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
+: <a class="el" href="a00169.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_bound()
 : <a class="el" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">tbb::filter</a><li>is_cancelled()
-: <a class="el" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
+: <a class="el" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
 : <a class="el" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00122.html#41a58b703d574b6e1ca155df3576f578">tbb::blocked_range< Value ></a><li>is_group_execution_cancelled()
-: <a class="el" href="a00163.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_ordered()
+: <a class="el" href="a00167.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_ordered()
 : <a class="el" href="a00139.html#cd53206c4795ef2df5df26b795caf692">tbb::filter</a><li>is_owned_by_current_thread()
-: <a class="el" href="a00162.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
+: <a class="el" href="a00166.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
 : <a class="el" href="a00139.html#fcfec27656a69ff2072802ac001e936f">tbb::filter</a><li>is_stolen_task()
-: <a class="el" href="a00162.html#f9169402702f56bf519448aaf34450aa">tbb::task</a><li>is_writer()
+: <a class="el" href="a00166.html#f9169402702f56bf519448aaf34450aa">tbb::task</a><li>is_writer()
 : <a class="el" href="a00132.html#adf8e405df5787351fe816c42042b9ec">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></ul>
 <h3><a class="anchor" name="index_l">- l -</a></h3><ul>
 <li>local()
 : <a class="el" href="a00138.html#9505351eace34ed7130257adcae91706">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>lock()
-: <a class="el" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">tbb::spin_mutex</a>, <a class="el" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">tbb::mutex</a><li>lock_read()
-: <a class="el" href="a00159.html#13f799708ac4ca437a16be202e263e18">tbb::spin_rw_mutex_v3</a><li>lookup()
+: <a class="el" href="a00163.html#4007d6e1523dbc3c2bb7f889ab789a8a">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">tbb::spin_mutex</a>, <a class="el" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">tbb::mutex</a><li>lock_read()
+: <a class="el" href="a00163.html#13f799708ac4ca437a16be202e263e18">tbb::spin_rw_mutex_v3</a><li>lookup()
 : <a class="el" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></ul>
 <h3><a class="anchor" name="index_m">- m -</a></h3><ul>
 <li>malloc_type
-: <a class="el" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>max_size()
-: <a class="el" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>, <a class="el" href="a00125.html#fb23b68 [...]
+: <a class="el" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>max_size()
+: <a class="el" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>, <a class="el" href="a00125.html#fb23b68 [...]
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter</a><li>move()
-: <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
+: <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">tbb::captured_exception</a>, <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
 : <a class="el" href="a00142.html#05313cb77d4f85213103d4dab74ed454">tbb::mutex</a><li>my_exception_data
 : <a class="el" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">tbb::movable_exception< ExceptionData ></a></ul>
 <h3><a class="anchor" name="index_n">- n -</a></h3><ul>
 <li>name()
-: <a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00168.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
-: <a class="el" href="a00162.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
-: <a class="el" href="a00172.html#fb7f78ca61cf28398645ace66e284473">tbb::tick_count</a></ul>
+: <a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00172.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
+: <a class="el" href="a00166.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
+: <a class="el" href="a00176.html#fb7f78ca61cf28398645ace66e284473">tbb::tick_count</a></ul>
 <h3><a class="anchor" name="index_o">- o -</a></h3><ul>
 <li>operator *()
-: <a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator()()
+: <a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator delete()
+: <a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">tbb::tbb_exception</a><li>operator()()
 : <a class="el" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">tbb::filter</a>, <a class="el" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a><li>operator+
-: <a class="el" href="a00173.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator+=()
-: <a class="el" href="a00173.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-
-: <a class="el" href="a00172.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00173.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a><li>operator-=()
-: <a class="el" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
+: <a class="el" href="a00177.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator+=()
+: <a class="el" href="a00177.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-
+: <a class="el" href="a00176.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00177.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a><li>operator-=()
+: <a class="el" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
 : <a class="el" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator=()
 : <a class="el" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>operator[]()
 : <a class="el" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">tbb::concurrent_vector< T, A ></a></ul>
@@ -190,94 +189,93 @@ Here is a list of all documented class members with links to the class documenta
 : <a class="el" href="a00124.html#b8ebf17a552ba47825e9b3887855b719">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>pages()
 : <a class="el" href="a00124.html#cf971430aa12361d3ed245344b7c6764">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">tbb::filter</a><li>parallel_while()
-: <a class="el" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
-: <a class="el" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
+: <a class="el" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
+: <a class="el" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
 : <a class="el" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">tbb::internal::atomic_backoff</a><li>pipeline()
-: <a class="el" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
+: <a class="el" href="a00150.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
 : <a class="el" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">tbb::concurrent_bounded_queue< T, A ></a><li>pop_front()
-: <a class="el" href="a00164.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
+: <a class="el" href="a00168.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
 : <a class="el" href="a00135.html#48da3536245318af6cb5fd58bac78039">tbb::deprecated::concurrent_queue< T, A ></a><li>process_item()
-: <a class="el" href="a00171.html#5e726bdc7fbd924c0b07bd558b1d4d5d">tbb::thread_bound_filter</a><li>push()
+: <a class="el" href="a00175.html#5e726bdc7fbd924c0b07bd558b1d4d5d">tbb::thread_bound_filter</a><li>push()
 : <a class="el" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">tbb::strict_ppl::concurrent_queue< T, A ></a><li>push_back()
-: <a class="el" href="a00164.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
+: <a class="el" href="a00168.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
 : <a class="el" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">tbb::deprecated::concurrent_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_q">- q -</a></h3><ul>
 <li>queuing_mutex()
-: <a class="el" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
-: <a class="el" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
+: <a class="el" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
+: <a class="el" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
 <h3><a class="anchor" name="index_r">- r -</a></h3><ul>
 <li>range()
 : <a class="el" href="a00138.html#a32dd1d88e42dc1faccceca244b12b6c">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#3d09ccfb581b879ae64203741035e193">tbb::concurrent_vector< T, A ></a><li>rbegin()
 : <a class="el" href="a00136.html#9f9c103e18d5f212703805354074ad44">tbb::concurrent_vector< T, A ></a><li>ready
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recursive_mutex()
-: <a class="el" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>recycle_as_child_of()
-: <a class="el" href="a00162.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
-: <a class="el" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
-: <a class="el" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
-: <a class="el" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>reexecute
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>ref_count()
-: <a class="el" href="a00162.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>reference
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recursive_mutex()
+: <a class="el" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>recycle_as_child_of()
+: <a class="el" href="a00166.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
+: <a class="el" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
+: <a class="el" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
+: <a class="el" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>reexecute
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>ref_count()
+: <a class="el" href="a00166.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>reference
 : <a class="el" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">tbb::strict_ppl::concurrent_queue< T, A ></a><li>register_pending_exception()
-: <a class="el" href="a00163.html#d97c8a03615594b71b4ef06ff75cf561">tbb::task_group_context</a><li>release()
-: <a class="el" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
+: <a class="el" href="a00167.html#d97c8a03615594b71b4ef06ff75cf561">tbb::task_group_context</a><li>release()
+: <a class="el" href="a00164.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
 : <a class="el" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">tbb::concurrent_vector< T, A ></a><li>reserve()
 : <a class="el" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">tbb::concurrent_vector< T, A ></a><li>reset()
-: <a class="el" href="a00163.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>resize()
+: <a class="el" href="a00167.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>resize()
 : <a class="el" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">tbb::concurrent_vector< T, A ></a><li>row_range_type
 : <a class="el" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">tbb::blocked_range2d< RowValue, ColValue ></a><li>rows()
 : <a class="el" href="a00124.html#1584623e59ff32a8aa82006827508be4">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#f496e7348a82652fba581203477cc07c">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
-: <a class="el" href="a00146.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
+: <a class="el" href="a00150.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
 <h3><a class="anchor" name="index_s">- s -</a></h3><ul>
 <li>scoped_lock()
-: <a class="el" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
-: <a class="el" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
-: <a class="el" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>serial
+: <a class="el" href="a00164.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
+: <a class="el" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
+: <a class="el" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>serial
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter</a><li>serial_in_order
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">tbb::filter</a><li>serial_out_of_order
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">tbb::filter</a><li>set_affinity()
-: <a class="el" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
-: <a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">tbb::concurrent_bounded_queue< T, A ></a><li>set_depth()
-: <a class="el" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">tbb::task</a><li>set_ref_count()
-: <a class="el" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>shrink_to_fit()
+: <a class="el" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
+: <a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">tbb::concurrent_bounded_queue< T, A ></a><li>set_ref_count()
+: <a class="el" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>shrink_to_fit()
 : <a class="el" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">tbb::concurrent_vector< T, A ></a><li>size()
 : <a class="el" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator &g [...]
 : <a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">tbb::blocked_range< Value ></a><li>spawn()
-: <a class="el" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
-: <a class="el" href="a00162.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
-: <a class="el" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
-: <a class="el" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
-: <a class="el" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
-: <a class="el" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>state_type
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a><li>swap()
+: <a class="el" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
+: <a class="el" href="a00166.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
+: <a class="el" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
+: <a class="el" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
+: <a class="el" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
+: <a class="el" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>state_type
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a><li>swap()
 : <a class="el" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#dd73f70aa6602021ea2c56bac9715353">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></ul>
 <h3><a class="anchor" name="index_t">- t -</a></h3><ul>
 <li>task()
-: <a class="el" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
-: <a class="el" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">tbb::task_group_context</a><li>task_list()
-: <a class="el" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
-: <a class="el" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
-: <a class="el" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
-: <a class="el" href="a00169.html#292832fd5c523e3d8081a22247840a1d">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
-: <a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
-: <a class="el" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
-: <a class="el" href="a00159.html#088bb256be794cc47d3b83791632fdfc">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">tbb::spin_mutex</a>, <a class="el" href="a00152.html#86e719b0afee25704af11ab97694d240">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4331652c79dea1c1131bd59ab161b234">tbb::mutex</a><li>try_lock_read()
-: <a class="el" href="a00159.html#b8667415869013f840d976aa406d385a">tbb::spin_rw_mutex_v3</a><li>try_pop()
+: <a class="el" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
+: <a class="el" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">tbb::task_group_context</a><li>task_list()
+: <a class="el" href="a00168.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
+: <a class="el" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
+: <a class="el" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
+: <a class="el" href="a00173.html#292832fd5c523e3d8081a22247840a1d">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
+: <a class="el" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
+: <a class="el" href="a00164.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
+: <a class="el" href="a00163.html#088bb256be794cc47d3b83791632fdfc">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">tbb::spin_mutex</a>, <a class="el" href="a00156.html#86e719b0afee25704af11ab97694d240">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4331652c79dea1c1131bd59ab161b234">tbb::mutex</a><li>try_lock_read()
+: <a class="el" href="a00163.html#b8667415869013f840d976aa406d385a">tbb::spin_rw_mutex_v3</a><li>try_pop()
 : <a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">tbb::strict_ppl::concurrent_queue< T, A ></a><li>try_process_item()
-: <a class="el" href="a00171.html#c4f90f2c771bce748beb9be734fa286c">tbb::thread_bound_filter</a><li>try_push()
+: <a class="el" href="a00175.html#c4f90f2c771bce748beb9be734fa286c">tbb::thread_bound_filter</a><li>try_push()
 : <a class="el" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">tbb::concurrent_bounded_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_u">- u -</a></h3><ul>
 <li>unlock()
-: <a class="el" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">tbb::spin_mutex</a>, <a class="el" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">tbb::mutex</a><li>unsafe_size()
+: <a class="el" href="a00163.html#f9f52ead2098eb5fb12da59d5ae53b55">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">tbb::spin_mutex</a>, <a class="el" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">tbb::mutex</a><li>unsafe_size()
 : <a class="el" href="a00134.html#eaa35a5274606779802e9a669a706260">tbb::strict_ppl::concurrent_queue< T, A ></a><li>upgrade_to_writer()
-: <a class="el" href="a00160.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00151.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <a class="el" href="a00164.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00155.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></ul>
 <h3><a class="anchor" name="index_v">- v -</a></h3><ul>
 <li>value_type
-: <a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a cl [...]
+: <a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a cl [...]
 <h3><a class="anchor" name="index_w">- w -</a></h3><ul>
 <li>wait_for_all()
-: <a class="el" href="a00162.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
-: <a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
+: <a class="el" href="a00166.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
+: <a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
 <li>~combinable()
 : <a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">tbb::combinable< T ></a><li>~concurrent_bounded_queue()
@@ -288,14 +286,14 @@ Here is a list of all documented class members with links to the class documenta
 : <a class="el" href="a00133.html#e002771760f510e06c03e0a198286172">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>~enumerable_thread_specific()
 : <a class="el" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>~filter()
 : <a class="el" href="a00139.html#66d159f362293e3964ba3da8bc1d2604">tbb::filter</a><li>~parallel_while()
-: <a class="el" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
-: <a class="el" href="a00146.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
-: <a class="el" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
-: <a class="el" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
-: <a class="el" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
-: <a class="el" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
-: <a class="el" href="a00164.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
-: <a class="el" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
+: <a class="el" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
+: <a class="el" href="a00150.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
+: <a class="el" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
+: <a class="el" href="a00164.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
+: <a class="el" href="a00163.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
+: <a class="el" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
+: <a class="el" href="a00168.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
+: <a class="el" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html
index 92695b8..b429934 100644
--- a/doc/html/functions_enum.html
+++ b/doc/html/functions_enum.html
@@ -35,9 +35,9 @@
 <p>
 <ul>
 <li>malloc_type
-: <a class="el" href="a00166.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>mode
+: <a class="el" href="a00170.html#09a7f81fb2c3055aaecf058b11538544">tbb::tbb_allocator< T ></a><li>mode
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf">tbb::filter</a><li>state_type
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a></ul>
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e">tbb::task</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html
index 525c14c..3370c2b 100644
--- a/doc/html/functions_eval.html
+++ b/doc/html/functions_eval.html
@@ -35,13 +35,13 @@
 <p>
 <ul>
 <li>allocated
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>executing
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a><li>freed
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>parallel
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ebe94d3348dd038e41107819f00c1884c">tbb::task</a><li>executing
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ead0fe2302ccc360923f738c2ed7ec1b9">tbb::task</a><li>freed
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293ecc67ca92bd6f1ce9738a1e9e7206b735">tbb::task</a><li>parallel
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf75740556347260927e94ce3b23a34abe">tbb::filter</a><li>ready
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recycle
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>reexecute
-: <a class="el" href="a00162.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>serial
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e0841dcf1c2a96dee9aa7b69f636cb81a">tbb::task</a><li>recycle
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e58debec6ab130290640d0cc2eedba35d">tbb::task</a><li>reexecute
+: <a class="el" href="a00166.html#4a3c415562d17905390ea5b49d12293e3bf499aa6e6487cd1ace883a63100513">tbb::task</a><li>serial
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cff8662693d85bd1cd3df052b761edd237">tbb::filter</a><li>serial_in_order
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf5645f2f2a541e53009d3e719c06c5f93">tbb::filter</a><li>serial_out_of_order
 : <a class="el" href="a00139.html#d3b6ed2c517144199d0c39c62ddfd8cf7fb70bcb663107adfc2938de89bab7d9">tbb::filter</a></ul>
diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html
index 8bca288..78d50d8 100644
--- a/doc/html/functions_func.html
+++ b/doc/html/functions_func.html
@@ -61,17 +61,16 @@
 <p>
 <h3><a class="anchor" name="index_a">- a -</a></h3><ul>
 <li>acquire()
-: <a class="el" href="a00160.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
-: <a class="el" href="a00145.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00144.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
-: <a class="el" href="a00146.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>add_to_depth()
-: <a class="el" href="a00162.html#b0f98c633647fc73b978fe4cd2277ac4">tbb::task</a><li>affinity()
-: <a class="el" href="a00162.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>allocate()
-: <a class="el" href="a00166.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
-: <a class="el" href="a00162.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
-: <a class="el" href="a00162.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
-: <a class="el" href="a00162.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
-: <a class="el" href="a00162.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocator_type()
-: <a class="el" href="a00166.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>assign()
+: <a class="el" href="a00164.html#b0b646ec5be02a127d159bbb7ca65353">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#3ee3c338732b1f64b0b32a757807a30d">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#7fb04da37cccf8c99b1f9102d9074f9a">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#a8dd5ab8686e76de21587544dbb681e0">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#533e4fc8355ee321206a0609c42d909d">tbb::qu [...]
+: <a class="el" href="a00149.html#e131c560057a58229992b61eb8dba4c6">tbb::parallel_while< Body ></a>, <a class="el" href="a00148.html#40baaf0f6856f4491dd0adf896c93516">tbb::parallel_do_feeder< Item ></a><li>add_filter()
+: <a class="el" href="a00150.html#38fb5c9c8395dd6f89a4ae2011a83e0d">tbb::pipeline</a><li>affinity()
+: <a class="el" href="a00166.html#3a920a56b0bcf2801518fb45b2c9d2be">tbb::task</a><li>allocate()
+: <a class="el" href="a00173.html#c35e5db8e9cdff5d1387db5b0bad2e4a">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00170.html#f6cb487b1bdce0b581f265a77dca6d53">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#726b1586d05d44665a36e1c7b2699bfd">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#4cdeea67af6c1fcd8f1d5e9c4cab61e8">tbb::cache_aligned_allocator< T ></a><li>allocate_additional_child_of()
+: <a class="el" href="a00166.html#43bfe64c0e9333c0ca895cc0c375512b">tbb::task</a><li>allocate_child()
+: <a class="el" href="a00166.html#1ff794f7053cd9148d5f280fbf07377f">tbb::task</a><li>allocate_continuation()
+: <a class="el" href="a00166.html#1434c79a5138993269d034008bff7329">tbb::task</a><li>allocate_root()
+: <a class="el" href="a00166.html#8ccc518caf31075a3e073996d2d240a4">tbb::task</a><li>allocator_type()
+: <a class="el" href="a00170.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>assign()
 : <a class="el" href="a00136.html#93a06b3112cb804f42f40efb5e7387b4">tbb::concurrent_vector< T, A ></a><li>at()
 : <a class="el" href="a00136.html#23e14a38af748edff96a7adc3a0f1c58">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_b">- b -</a></h3><ul>
@@ -81,11 +80,11 @@
 : <a class="el" href="a00122.html#4c0efd2be3f96a0ab3ba5085e8b3fcc7">tbb::blocked_range< Value ></a></ul>
 <h3><a class="anchor" name="index_c">- c -</a></h3><ul>
 <li>cancel_group_execution()
-: <a class="el" href="a00162.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00163.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
+: <a class="el" href="a00166.html#0f3fb4aac549ab642022450a4bd13326">tbb::task</a>, <a class="el" href="a00167.html#8bcdfdf4e6bfb76125b6de15c00b571d">tbb::task_group_context</a><li>capacity()
 : <a class="el" href="a00136.html#3ed6b9ae7217af5103d974045b6f5cd5">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#b2888b3e4e837d7e03f2c731963a402b">tbb::concurrent_bounded_queue< T, A ></a><li>cbegin()
 : <a class="el" href="a00136.html#f88fcf1c920693c39bd9709db33c199f">tbb::concurrent_vector< T, A ></a><li>cend()
 : <a class="el" href="a00136.html#0c15a5d0f1cf75d687dabba07da1d46b">tbb::concurrent_vector< T, A ></a><li>clear()
-: <a class="el" href="a00164.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00146.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">tbb::c [...]
+: <a class="el" href="a00168.html#fce446ee13e025969945328f3ff59b95">tbb::task_list</a>, <a class="el" href="a00150.html#2c84aef5b834b555ee220b176e25931e">tbb::pipeline</a>, <a class="el" href="a00138.html#c890601a45273ef759e64ac2fe75cb6a">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#26f937a359a66b6aae904c3cd9a3c444">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#90b31e2954c6e4596c7900435a5f4bc1">tbb::c [...]
 : <a class="el" href="a00124.html#3336ba9480fd6c43e158f9beb024c050">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#392a46759af2c884957115771affa7f4">tbb::blocked_range2d< RowValue, ColValue ></a><li>compact()
 : <a class="el" href="a00136.html#1693d1da41b1a8235871be9c6633be35">tbb::concurrent_vector< T, A ></a><li>concurrent_bounded_queue()
 : <a class="el" href="a00129.html#a5e04dcd7db9fd9b583b4e7df832246a">tbb::concurrent_bounded_queue< T, A ></a><li>concurrent_hash_map()
@@ -93,31 +92,30 @@
 : <a class="el" href="a00135.html#383187b910f8c3ca27a39c1638566f15">tbb::deprecated::concurrent_queue< T, A ></a>, <a class="el" href="a00134.html#8a6b98ea11a867db8ac868f0113ca429">tbb::strict_ppl::concurrent_queue< T, A ></a><li>concurrent_vector()
 : <a class="el" href="a00136.html#4450de83c5862ea4bcd9443fd7e67419">tbb::concurrent_vector< T, A ></a><li>const_accessor()
 : <a class="el" href="a00133.html#6eedb35a3ca397dd289ed5ca6fb4d95d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>construct()
-: <a class="el" href="a00166.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>context()
-: <a class="el" href="a00162.html#d8c36a93f3972590fbb65ff1cef3173b">tbb::task</a><li>count()
+: <a class="el" href="a00170.html#ab228ab9e324ed041c2226e1d717df5f">tbb::tbb_allocator< T ></a>, <a class="el" href="a00125.html#958ee8745c86c275bfc9533af565e017">tbb::cache_aligned_allocator< T ></a><li>context()
+: <a class="el" href="a00166.html#d8c36a93f3972590fbb65ff1cef3173b">tbb::task</a><li>count()
 : <a class="el" href="a00130.html#a3e97a1f3cb66e81a2336b013ef1ae7d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>crbegin()
 : <a class="el" href="a00136.html#db78a1d28c9c966050e8a2926d834a33">tbb::concurrent_vector< T, A ></a><li>crend()
 : <a class="el" href="a00136.html#fff9cece89438587997ebedf93c5e962">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_d">- d -</a></h3><ul>
 <li>deallocate()
-: <a class="el" href="a00166.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>decrement_ref_count()
-: <a class="el" href="a00162.html#ef4680f5c148020c5e7e43ddef44cd5d">tbb::task</a><li>default_num_threads()
-: <a class="el" href="a00165.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>depth()
-: <a class="el" href="a00162.html#5be823a972b3c3b9901c5963eeb050fd">tbb::task</a><li>destroy()
-: <a class="el" href="a00169.html#921875bbacd2c8a5f324c7da7a415262">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#667812a82f1525e968c52593dea0ef4c">tbb::captured_exception</a>, <a class="el" href="a00168.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00166.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator [...]
-: <a class="el" href="a00160.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00151.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <a class="el" href="a00170.html#fdd011fdf2f9ad07006dc7c0a7ec1da2">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#f806a238c18cbcfb531e1e0a0d2ec59d">tbb::scalable_allocator< T ></a>, <a class="el" href="a00125.html#3d4eadf188f7d85d3805ae534e0b8e1c">tbb::cache_aligned_allocator< T ></a><li>decrement_ref_count()
+: <a class="el" href="a00166.html#ef4680f5c148020c5e7e43ddef44cd5d">tbb::task</a><li>default_num_threads()
+: <a class="el" href="a00169.html#ba00714c33a41a3c2216f48613971cab">tbb::task_scheduler_init</a><li>destroy()
+: <a class="el" href="a00173.html#921875bbacd2c8a5f324c7da7a415262">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#7a46873119d9f85a7b0009c13e41a258">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#93d875d3555502ff6f18513525de204c">tbb::captured_exception</a>, <a class="el" href="a00172.html#66c94938eca8bf88b76f3eccaaf215d8">tbb::tbb_exception</a>, <a class="el" href="a00170.html#ef133522bf55f05a605bee0763208281">tbb::tbb_allocator [...]
+: <a class="el" href="a00164.html#c2c2c38a08cb9080e87099fac3e5bc94">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00155.html#0d2f93edf7b15ec4bcee138823220c52">tbb::queuing_rw_mutex::scoped_lock</a></ul>
 <h3><a class="anchor" name="index_e">- e -</a></h3><ul>
 <li>empty()
-: <a class="el" href="a00164.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f3f6fce0cf [...]
+: <a class="el" href="a00168.html#f3ac31e092814b90929f81bb30441959">tbb::task_list</a>, <a class="el" href="a00138.html#ad23345a722622199deaa4dfd243d9f8">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#c6426cb93cf20d3af40f3c90f1f0481a">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#f64924f2ee9225c368a270fc3c394db9">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#f3f6fce0cf [...]
 : <a class="el" href="a00138.html#89811890e6a77f1e0cfc6c24ed35d09b">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#1e6aa764ce5a1cbd24526f68bc0a2f6b">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00122.html#8b929d93ddc13f148b11bceef3a3bdf8">tbb::blocked_range< Value ></a>, <a class="el" href="a00116.html#024be075c23c0394c9a2518d993bcd9e">tbb::aligned_space< T, N ></a><li>enumerable_thread_specific()
 : <a class="el" href="a00138.html#0466c43272d8458185e980fc2dc4abe2">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>erase()
 : <a class="el" href="a00130.html#b65abfa291da566617dd58dfb349630a">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>exclude()
 : <a class="el" href="a00130.html#671965989ffb5f6084c776cb0bb6cdab">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>execute()
-: <a class="el" href="a00162.html#22c298cd40937a431a06777423f002f6">tbb::task</a></ul>
+: <a class="el" href="a00166.html#22c298cd40937a431a06777423f002f6">tbb::task</a></ul>
 <h3><a class="anchor" name="index_f">- f -</a></h3><ul>
 <li>finalize()
 : <a class="el" href="a00139.html#56275eb889c77c4807967133e21401bd">tbb::filter</a><li>find()
-: <a class="el" href="a00130.html#2f1ca7e8319c464349a9de304b6dbf4a">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>front()
+: <a class="el" href="a00130.html#4f7cc0aab2d8216c0a6e681f32dd48c8">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>front()
 : <a class="el" href="a00136.html#502615a858eb9fa0390ee59169065e90">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_g">- g -</a></h3><ul>
 <li>get_allocator()
@@ -127,126 +125,127 @@
 : <a class="el" href="a00136.html#a7e3b67c8ccab16d0aecc80899ae799d">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_i">- i -</a></h3><ul>
 <li>increment_ref_count()
-: <a class="el" href="a00162.html#f5fb43c7ad0de5a4b95703cebc39e345">tbb::task</a><li>init()
-: <a class="el" href="a00163.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
-: <a class="el" href="a00165.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
+: <a class="el" href="a00166.html#f5fb43c7ad0de5a4b95703cebc39e345">tbb::task</a><li>init()
+: <a class="el" href="a00167.html#49a55352084fd44b8863d182e839e6dc">tbb::task_group_context</a><li>initialize()
+: <a class="el" href="a00169.html#d5ed214a8bb53b0466ed91ff4734b9a3">tbb::task_scheduler_init</a><li>insert()
 : <a class="el" href="a00130.html#7b42dba04d71e1367f0d542087906178">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_copy()
 : <a class="el" href="a00130.html#7973cd92f57dcb092ab757f8d9e089f9">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_equal_range()
-: <a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>interval_t()
-: <a class="el" href="a00173.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
-: <a class="el" href="a00165.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_bound()
+: <a class="el" href="a00130.html#308ec5ad19fdd1be4d345f8013070150">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>internal_fast_find()
+: <a class="el" href="a00130.html#f0cdf5930563a49ffe827c520e948e01">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>interval_t()
+: <a class="el" href="a00177.html#1a21a428e00cced2e6a49e0f5f2258bf">tbb::tick_count::interval_t</a><li>is_active()
+: <a class="el" href="a00169.html#12752282977029f23416642bc03e8b74">tbb::task_scheduler_init</a><li>is_bound()
 : <a class="el" href="a00139.html#15c29cae5d237e6d63dbfe5c94af89d5">tbb::filter</a><li>is_cancelled()
-: <a class="el" href="a00162.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
+: <a class="el" href="a00166.html#025f18118c057c4c8db87ff2ce8df975">tbb::task</a><li>is_divisible()
 : <a class="el" href="a00124.html#39d69191721c488e737ae5d9c5336b9c">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#ad36a9b38e4fef26d376f99552ce2d92">tbb::blocked_range2d< RowValue, ColValue ></a>, <a class="el" href="a00122.html#41a58b703d574b6e1ca155df3576f578">tbb::blocked_range< Value ></a><li>is_group_execution_cancelled()
-: <a class="el" href="a00163.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_ordered()
+: <a class="el" href="a00167.html#4db72f16210b0a991b2c134d6763a4cc">tbb::task_group_context</a><li>is_ordered()
 : <a class="el" href="a00139.html#cd53206c4795ef2df5df26b795caf692">tbb::filter</a><li>is_owned_by_current_thread()
-: <a class="el" href="a00162.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
+: <a class="el" href="a00166.html#c26718b3b247cd13deb1a741902e7105">tbb::task</a><li>is_serial()
 : <a class="el" href="a00139.html#fcfec27656a69ff2072802ac001e936f">tbb::filter</a><li>is_stolen_task()
-: <a class="el" href="a00162.html#f9169402702f56bf519448aaf34450aa">tbb::task</a><li>is_writer()
+: <a class="el" href="a00166.html#f9169402702f56bf519448aaf34450aa">tbb::task</a><li>is_writer()
 : <a class="el" href="a00132.html#adf8e405df5787351fe816c42042b9ec">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a></ul>
 <h3><a class="anchor" name="index_l">- l -</a></h3><ul>
 <li>local()
 : <a class="el" href="a00138.html#9505351eace34ed7130257adcae91706">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>lock()
-: <a class="el" href="a00159.html#4007d6e1523dbc3c2bb7f889ab789a8a">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#4f748989e19b6045e3a2d2ee73626a28">tbb::spin_mutex</a>, <a class="el" href="a00152.html#4c342c69d47f4bb0b393535dee4015d6">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">tbb::mutex</a><li>lock_read()
-: <a class="el" href="a00159.html#13f799708ac4ca437a16be202e263e18">tbb::spin_rw_mutex_v3</a><li>lookup()
+: <a class="el" href="a00163.html#4007d6e1523dbc3c2bb7f889ab789a8a">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#4f748989e19b6045e3a2d2ee73626a28">tbb::spin_mutex</a>, <a class="el" href="a00156.html#4c342c69d47f4bb0b393535dee4015d6">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4470e61c24c129a0299ca6c17240adbb">tbb::mutex</a><li>lock_read()
+: <a class="el" href="a00163.html#13f799708ac4ca437a16be202e263e18">tbb::spin_rw_mutex_v3</a><li>lookup()
 : <a class="el" href="a00130.html#0f0ba43d9cb783f12dd01bf5677da097">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></ul>
 <h3><a class="anchor" name="index_m">- m -</a></h3><ul>
 <li>max_size()
-: <a class="el" href="a00166.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00154.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>, <a class="el" href="a00125.html#fb23b68 [...]
-: <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#df6bbb78a362fe862a341e81e2999810">tbb::captured_exception</a>, <a class="el" href="a00168.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
+: <a class="el" href="a00170.html#f059ca2c96243024f0d562ee3a87a3a5">tbb::tbb_allocator< T ></a>, <a class="el" href="a00158.html#880e766f1d913988c21973dbdd874fd5">tbb::scalable_allocator< T ></a>, <a class="el" href="a00136.html#2c248a017f0576df3e7cd99627836fd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#6ed260e217fb310050928d7bd03f1b5e">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a>, <a class="el" href="a00125.html#fb23b68 [...]
+: <a class="el" href="a00141.html#1aea0ad179d6f0481fe7f3495f66adf9">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#837a50b8f6a800bda225c39d1699643f">tbb::captured_exception</a>, <a class="el" href="a00172.html#3e3482bf264d4ca4dde046cd9c02c766">tbb::tbb_exception</a><li>mutex()
 : <a class="el" href="a00142.html#05313cb77d4f85213103d4dab74ed454">tbb::mutex</a></ul>
 <h3><a class="anchor" name="index_n">- n -</a></h3><ul>
 <li>name()
-: <a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00168.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
-: <a class="el" href="a00162.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
-: <a class="el" href="a00172.html#fb7f78ca61cf28398645ace66e284473">tbb::tick_count</a></ul>
+: <a class="el" href="a00141.html#bc5f5c4739b17ac5211ac58226c2f5a5">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#5af82fd677449c5ca727fa1d7e16f9f5">tbb::captured_exception</a>, <a class="el" href="a00172.html#d00f6497e552fee978a02bfcbebf46e2">tbb::tbb_exception</a><li>note_affinity()
+: <a class="el" href="a00166.html#713c338c8eeaebdc5a6b10a69c039b06">tbb::task</a><li>now()
+: <a class="el" href="a00176.html#fb7f78ca61cf28398645ace66e284473">tbb::tick_count</a></ul>
 <h3><a class="anchor" name="index_o">- o -</a></h3><ul>
 <li>operator *()
-: <a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator()()
+: <a class="el" href="a00131.html#03a091f7355a3c0c03f839893695f372">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#d95b7a39a08b7ab256dfff2ca37cdb75">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator delete()
+: <a class="el" href="a00172.html#3f2da7f3d8a6e4c1df522af1213afb5a">tbb::tbb_exception</a><li>operator()()
 : <a class="el" href="a00139.html#fa1b3dc1f4f47563ccab7f4d92f5b543">tbb::filter</a>, <a class="el" href="a00132.html#7e98ad1b46ed35fb4a92d65c16c6982d">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor</a><li>operator+=()
-: <a class="el" href="a00173.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-=()
-: <a class="el" href="a00173.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
+: <a class="el" href="a00177.html#cd9814947902e26463a69a111530f81b">tbb::tick_count::interval_t</a><li>operator-=()
+: <a class="el" href="a00177.html#35ff7eaf7c2031b4a991402ac9ecb940">tbb::tick_count::interval_t</a><li>operator->()
 : <a class="el" href="a00131.html#302f02e5deec0a67b872e9cfb08d9e60">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a class="el" href="a00133.html#6fc0491f6420ffe38c48786e7b9ab042">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>operator=()
 : <a class="el" href="a00136.html#19f4ab88a01b0fd056af3bba463e7bd6">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#adadeb9d1acb8c3b34517435666cf297">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a><li>operator[]()
 : <a class="el" href="a00136.html#c6fade5c732cc95274d1d8277ea619d1">tbb::concurrent_vector< T, A ></a></ul>
 <h3><a class="anchor" name="index_p">- p -</a></h3><ul>
 <li>pages()
 : <a class="el" href="a00124.html#cf971430aa12361d3ed245344b7c6764">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>parallel_while()
-: <a class="el" href="a00145.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
-: <a class="el" href="a00162.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
+: <a class="el" href="a00149.html#36e26ba3880c7bcf804a97ba0cbe133f">tbb::parallel_while< Body ></a><li>parent()
+: <a class="el" href="a00166.html#314e98ee4347ccec83efcb9ee22e8596">tbb::task</a><li>pause()
 : <a class="el" href="a00119.html#a174ea93e3bd3d5cce82389c2f28d037">tbb::internal::atomic_backoff</a><li>pipeline()
-: <a class="el" href="a00146.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
+: <a class="el" href="a00150.html#596dc3beba27099c4c8581cb419e1a59">tbb::pipeline</a><li>pop()
 : <a class="el" href="a00129.html#41f4c6bd7a82ab070e840bbf81b0b123">tbb::concurrent_bounded_queue< T, A ></a><li>pop_front()
-: <a class="el" href="a00164.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
+: <a class="el" href="a00168.html#5fe85df5ed524418389d34051750347d">tbb::task_list</a><li>pop_if_present()
 : <a class="el" href="a00135.html#48da3536245318af6cb5fd58bac78039">tbb::deprecated::concurrent_queue< T, A ></a><li>process_item()
-: <a class="el" href="a00171.html#5e726bdc7fbd924c0b07bd558b1d4d5d">tbb::thread_bound_filter</a><li>push()
+: <a class="el" href="a00175.html#5e726bdc7fbd924c0b07bd558b1d4d5d">tbb::thread_bound_filter</a><li>push()
 : <a class="el" href="a00129.html#ceb08c743b11ba88c878e73fff8af20b">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#73c47563ffcc4c2f6452f25a04ebe2e2">tbb::strict_ppl::concurrent_queue< T, A ></a><li>push_back()
-: <a class="el" href="a00164.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
+: <a class="el" href="a00168.html#4cd34756bc4763dafb8c84838a0124ff">tbb::task_list</a>, <a class="el" href="a00136.html#e94e038f915c0268fdf2d3d7f87d81b8">tbb::concurrent_vector< T, A ></a><li>push_if_not_full()
 : <a class="el" href="a00135.html#7c45561bafe71107d09b2bc1b8f4e681">tbb::deprecated::concurrent_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_q">- q -</a></h3><ul>
 <li>queuing_mutex()
-: <a class="el" href="a00148.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
-: <a class="el" href="a00150.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
+: <a class="el" href="a00152.html#b389ad9c4db7293e4bdb5b8cda69ec04">tbb::queuing_mutex</a><li>queuing_rw_mutex()
+: <a class="el" href="a00154.html#85c90877c3447690ac4e2ac4ff8dea5e">tbb::queuing_rw_mutex</a></ul>
 <h3><a class="anchor" name="index_r">- r -</a></h3><ul>
 <li>range()
 : <a class="el" href="a00138.html#a32dd1d88e42dc1faccceca244b12b6c">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#3d09ccfb581b879ae64203741035e193">tbb::concurrent_vector< T, A ></a><li>rbegin()
 : <a class="el" href="a00136.html#9f9c103e18d5f212703805354074ad44">tbb::concurrent_vector< T, A ></a><li>recursive_mutex()
-: <a class="el" href="a00152.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle_as_child_of()
-: <a class="el" href="a00162.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
-: <a class="el" href="a00162.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
-: <a class="el" href="a00162.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
-: <a class="el" href="a00162.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>ref_count()
-: <a class="el" href="a00162.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>register_pending_exception()
-: <a class="el" href="a00163.html#d97c8a03615594b71b4ef06ff75cf561">tbb::task_group_context</a><li>release()
-: <a class="el" href="a00160.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
+: <a class="el" href="a00156.html#d2fceb7f95c24a8cd1457d4527e4b8c6">tbb::recursive_mutex</a><li>recycle_as_child_of()
+: <a class="el" href="a00166.html#db399855177438bbc9cc61d508dae8d2">tbb::task</a><li>recycle_as_continuation()
+: <a class="el" href="a00166.html#a67a79e18f62b43a623a00cfbd76db4c">tbb::task</a><li>recycle_as_safe_continuation()
+: <a class="el" href="a00166.html#3b290d14109704e2b69dc1ac980a7a76">tbb::task</a><li>recycle_to_reexecute()
+: <a class="el" href="a00166.html#4f1be9bbcdb487830dbe298b68d85144">tbb::task</a><li>ref_count()
+: <a class="el" href="a00166.html#ad774f55eaec008ae02b236423209ced">tbb::task</a><li>register_pending_exception()
+: <a class="el" href="a00167.html#d97c8a03615594b71b4ef06ff75cf561">tbb::task_group_context</a><li>release()
+: <a class="el" href="a00164.html#61b14d00a78185c9b2d206ebfc379124">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#eeb615e68e963e6bf8d9c11402d0ce8e">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#ac480ea0e9d5ea0345a67d57008b6263">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#67ae221109ddc69510ab593874e435d4">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#3bf2b8c87ff22115be9b2eac179f2d30">tbb::qu [...]
 : <a class="el" href="a00136.html#d438b9b32ea3a8ffb703015b6dce055b">tbb::concurrent_vector< T, A ></a><li>reserve()
 : <a class="el" href="a00136.html#5a0ce05026994b010018f72cfdeb72c1">tbb::concurrent_vector< T, A ></a><li>reset()
-: <a class="el" href="a00163.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>resize()
+: <a class="el" href="a00167.html#6d30d16bf1cd22f86c6afaf29c2b430c">tbb::task_group_context</a><li>resize()
 : <a class="el" href="a00136.html#98ce6b2c6d2622f0c030b46dfac3880c">tbb::concurrent_vector< T, A ></a><li>rows()
 : <a class="el" href="a00124.html#1584623e59ff32a8aa82006827508be4">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a>, <a class="el" href="a00123.html#f496e7348a82652fba581203477cc07c">tbb::blocked_range2d< RowValue, ColValue ></a><li>run()
-: <a class="el" href="a00146.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00145.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
+: <a class="el" href="a00150.html#93d7fec8cd607b803dd2d79fb46bd260">tbb::pipeline</a>, <a class="el" href="a00149.html#b32a0a6e5e09ebb7fad3e6652c19afe5">tbb::parallel_while< Body ></a></ul>
 <h3><a class="anchor" name="index_s">- s -</a></h3><ul>
 <li>scoped_lock()
-: <a class="el" href="a00160.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
-: <a class="el" href="a00173.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
-: <a class="el" href="a00162.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>set_affinity()
-: <a class="el" href="a00162.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
-: <a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">tbb::concurrent_bounded_queue< T, A ></a><li>set_depth()
-: <a class="el" href="a00162.html#fc4d4e61a56823aa1efdbb5d59e42973">tbb::task</a><li>set_ref_count()
-: <a class="el" href="a00162.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>shrink_to_fit()
+: <a class="el" href="a00164.html#42a92d4f8fdde425b111cfa8a9228071">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#5ce6807050a9e8f87bcb4a65dccb12ef">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#dec17713c4c1321ac8fec66816d0c602">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#fbb8798792d3aebb136c46fc63d2529e">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#9b51ef972f5618ac17caadb58841ab6d">tbb::qu [...]
+: <a class="el" href="a00177.html#d5d8429c0bc59cf6131b2abc7929fa59">tbb::tick_count::interval_t</a><li>self()
+: <a class="el" href="a00166.html#bd43e8d6249738efafd12d6a4c72c5e3">tbb::task</a><li>set_affinity()
+: <a class="el" href="a00166.html#dca19d7a45487a7d67a0db517e2b57c9">tbb::task</a><li>set_capacity()
+: <a class="el" href="a00129.html#089f33dfd504e30a95f40ed2a5799367">tbb::concurrent_bounded_queue< T, A ></a><li>set_ref_count()
+: <a class="el" href="a00166.html#06a4206a57e8e12a439b14d6d41cfd92">tbb::task</a><li>shrink_to_fit()
 : <a class="el" href="a00136.html#03c6f4cf66532bf4cc907ee738a9a186">tbb::concurrent_vector< T, A ></a><li>size()
 : <a class="el" href="a00138.html#302a4d6f55f852d5b7a6679e0e00316e">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00136.html#715fe313c4a9c22731cc404dd80c9ec9">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00129.html#7dc14d1a579a4cccda9f857585e1768d">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00130.html#25b0e3881038877604c5efc1c14c4afd">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator &g [...]
-: <a class="el" href="a00162.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
-: <a class="el" href="a00162.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
-: <a class="el" href="a00162.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
-: <a class="el" href="a00157.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
-: <a class="el" href="a00159.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
-: <a class="el" href="a00162.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>swap()
+: <a class="el" href="a00166.html#db841c647eb6d754440c2f4e4a73c80b">tbb::task</a><li>spawn_and_wait_for_all()
+: <a class="el" href="a00166.html#894ab68378e502776d8220eea7ce9fa1">tbb::task</a><li>spawn_root_and_wait()
+: <a class="el" href="a00166.html#c33c7edbaec67aa8a56f48986a9dc69f">tbb::task</a><li>spin_mutex()
+: <a class="el" href="a00161.html#3d8fb44644fd8d41ada1fbeba7409be3">tbb::spin_mutex</a><li>spin_rw_mutex_v3()
+: <a class="el" href="a00163.html#61332b2756de89f3f5f69310cbb6e70c">tbb::spin_rw_mutex_v3</a><li>state()
+: <a class="el" href="a00166.html#0af7b2d7e6e8b4333b2accfce3dfb374">tbb::task</a><li>swap()
 : <a class="el" href="a00136.html#96c9c4bd968ed3edb8dd276854d2dae0">tbb::concurrent_vector< T, A ></a>, <a class="el" href="a00130.html#dd73f70aa6602021ea2c56bac9715353">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator ></a></ul>
 <h3><a class="anchor" name="index_t">- t -</a></h3><ul>
 <li>task()
-: <a class="el" href="a00162.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
-: <a class="el" href="a00163.html#19fee08fb8ac98adccfe69c1aa63c491">tbb::task_group_context</a><li>task_list()
-: <a class="el" href="a00164.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
-: <a class="el" href="a00165.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
-: <a class="el" href="a00165.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
-: <a class="el" href="a00169.html#292832fd5c523e3d8081a22247840a1d">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00168.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
-: <a class="el" href="a00172.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
-: <a class="el" href="a00160.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
-: <a class="el" href="a00159.html#088bb256be794cc47d3b83791632fdfc">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">tbb::spin_mutex</a>, <a class="el" href="a00152.html#86e719b0afee25704af11ab97694d240">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4331652c79dea1c1131bd59ab161b234">tbb::mutex</a><li>try_lock_read()
-: <a class="el" href="a00159.html#b8667415869013f840d976aa406d385a">tbb::spin_rw_mutex_v3</a><li>try_pop()
+: <a class="el" href="a00166.html#2bce8ec6e44706e70128f5cf91b76e67">tbb::task</a><li>task_group_context()
+: <a class="el" href="a00167.html#19fee08fb8ac98adccfe69c1aa63c491">tbb::task_group_context</a><li>task_list()
+: <a class="el" href="a00168.html#416341c2047eaef50417b41eaf7e9de6">tbb::task_list</a><li>task_scheduler_init()
+: <a class="el" href="a00169.html#421600bf9bf9338bcf937063f2ff0e90">tbb::task_scheduler_init</a><li>terminate()
+: <a class="el" href="a00169.html#f73257e04cb7fb9bd5be2b635d9016f1">tbb::task_scheduler_init</a><li>throw_self()
+: <a class="el" href="a00173.html#292832fd5c523e3d8081a22247840a1d">tbb::internal::tbb_exception_ptr</a>, <a class="el" href="a00141.html#17cffba35811c92b7e65d63506b69602">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#2dd1be66ab32fa27e0ddef5707fa67ef">tbb::captured_exception</a>, <a class="el" href="a00172.html#8588e07fa49692f4d734e4f2e4f048f4">tbb::tbb_exception</a><li>tick_count()
+: <a class="el" href="a00176.html#34593326ae4191e02a13c7cbdab9de4c">tbb::tick_count</a><li>try_acquire()
+: <a class="el" href="a00164.html#9879626968d9b9a04cd2ec0fb2e84ae1">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#9297ec188534b45dc0ca48f2f39a0501">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#36bfc3e93e3ef6340abef4901444d340">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#2e4ff6c9ec2fee6682f95290d1f42baa">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#e5a014fb817599386a87170cf2cf51a9">tbb::qu [...]
+: <a class="el" href="a00163.html#088bb256be794cc47d3b83791632fdfc">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#8f9a58fb56a2b4c5efe1a7f7c1ae2074">tbb::spin_mutex</a>, <a class="el" href="a00156.html#86e719b0afee25704af11ab97694d240">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#4331652c79dea1c1131bd59ab161b234">tbb::mutex</a><li>try_lock_read()
+: <a class="el" href="a00163.html#b8667415869013f840d976aa406d385a">tbb::spin_rw_mutex_v3</a><li>try_pop()
 : <a class="el" href="a00129.html#0ca487019bbb00a196442aff78a1e4f7">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#ae31ca0db34ef96ef1e74aa0d28c95f8">tbb::strict_ppl::concurrent_queue< T, A ></a><li>try_process_item()
-: <a class="el" href="a00171.html#c4f90f2c771bce748beb9be734fa286c">tbb::thread_bound_filter</a><li>try_push()
+: <a class="el" href="a00175.html#c4f90f2c771bce748beb9be734fa286c">tbb::thread_bound_filter</a><li>try_push()
 : <a class="el" href="a00129.html#2bd6232531279fb3ccbd296bea23066b">tbb::concurrent_bounded_queue< T, A ></a></ul>
 <h3><a class="anchor" name="index_u">- u -</a></h3><ul>
 <li>unlock()
-: <a class="el" href="a00159.html#f9f52ead2098eb5fb12da59d5ae53b55">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00157.html#0e843ee6265f57f27d228ba91e7308ef">tbb::spin_mutex</a>, <a class="el" href="a00152.html#f0a96e26b7f074588dc31e32524856ae">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">tbb::mutex</a><li>unsafe_size()
+: <a class="el" href="a00163.html#f9f52ead2098eb5fb12da59d5ae53b55">tbb::spin_rw_mutex_v3</a>, <a class="el" href="a00161.html#0e843ee6265f57f27d228ba91e7308ef">tbb::spin_mutex</a>, <a class="el" href="a00156.html#f0a96e26b7f074588dc31e32524856ae">tbb::recursive_mutex</a>, <a class="el" href="a00142.html#5fc9ef443ae75d966695546be399cc6b">tbb::mutex</a><li>unsafe_size()
 : <a class="el" href="a00134.html#eaa35a5274606779802e9a669a706260">tbb::strict_ppl::concurrent_queue< T, A ></a><li>upgrade_to_writer()
-: <a class="el" href="a00160.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00151.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></ul>
+: <a class="el" href="a00164.html#3f0b1e3f2efab63336400348bd070226">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00155.html#11ba1da4a722c9e6f73339a52c487e82">tbb::queuing_rw_mutex::scoped_lock</a></ul>
 <h3><a class="anchor" name="index_w">- w -</a></h3><ul>
 <li>wait_for_all()
-: <a class="el" href="a00162.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
-: <a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00168.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
+: <a class="el" href="a00166.html#53d2615ad9c38859b4c8080936600283">tbb::task</a><li>what()
+: <a class="el" href="a00141.html#b33a89bccf0c63106f1270c7bfaaf54f">tbb::movable_exception< ExceptionData ></a>, <a class="el" href="a00127.html#6b5988ef74a1fe2a58998d110b3633e0">tbb::captured_exception</a>, <a class="el" href="a00172.html#e8157689ecb66bc6c72d3618bf3cc371">tbb::tbb_exception</a></ul>
 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
 <li>~combinable()
 : <a class="el" href="a00128.html#2c87e79ae98588a5780f708773388843">tbb::combinable< T ></a><li>~concurrent_bounded_queue()
@@ -257,14 +256,14 @@
 : <a class="el" href="a00133.html#e002771760f510e06c03e0a198286172">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor</a><li>~enumerable_thread_specific()
 : <a class="el" href="a00138.html#41176526161d6fef1bdd19c2db7ded4d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a><li>~filter()
 : <a class="el" href="a00139.html#66d159f362293e3964ba3da8bc1d2604">tbb::filter</a><li>~parallel_while()
-: <a class="el" href="a00145.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
-: <a class="el" href="a00146.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
-: <a class="el" href="a00150.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
-: <a class="el" href="a00160.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00158.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00153.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00151.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00149.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
-: <a class="el" href="a00159.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
-: <a class="el" href="a00162.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
-: <a class="el" href="a00164.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
-: <a class="el" href="a00165.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
+: <a class="el" href="a00149.html#6fcfc973cc56b79c6d0fbb8a31be7e84">tbb::parallel_while< Body ></a><li>~pipeline()
+: <a class="el" href="a00150.html#49513c6c24f9d5bbbb27edca5efe01c9">tbb::pipeline</a><li>~queuing_rw_mutex()
+: <a class="el" href="a00154.html#1ba73e3d95cfdf8323880bc623af9099">tbb::queuing_rw_mutex</a><li>~scoped_lock()
+: <a class="el" href="a00164.html#d7eaaa3f2e2c5dc11e7005811b1bdd04">tbb::spin_rw_mutex_v3::scoped_lock</a>, <a class="el" href="a00162.html#ac6fa425d1f06c56d8b70abc51aac844">tbb::spin_mutex::scoped_lock</a>, <a class="el" href="a00157.html#c1197ffb8f3cd9d4fed71d7e06265b7c">tbb::recursive_mutex::scoped_lock</a>, <a class="el" href="a00155.html#32c7d67a660d23ebbaab1a1d2826d31a">tbb::queuing_rw_mutex::scoped_lock</a>, <a class="el" href="a00153.html#ac2c576a93570957d694192a5f491443">tbb::qu [...]
+: <a class="el" href="a00163.html#9a815fb2759e55072ed413f1b6970cf3">tbb::spin_rw_mutex_v3</a><li>~task()
+: <a class="el" href="a00166.html#98245ee0473f84cb19dbbf8c81134908">tbb::task</a><li>~task_list()
+: <a class="el" href="a00168.html#6d438f1499a02db1e59c24ab6043e5ba">tbb::task_list</a><li>~task_scheduler_init()
+: <a class="el" href="a00169.html#4da6c86292d80c703a66c1f6f5299488">tbb::task_scheduler_init</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_rela.html b/doc/html/functions_rela.html
index 3957bf8..cb05088 100644
--- a/doc/html/functions_rela.html
+++ b/doc/html/functions_rela.html
@@ -35,8 +35,8 @@
 <p>
 <ul>
 <li>operator+
-: <a class="el" href="a00173.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator-
-: <a class="el" href="a00172.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00173.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a></ul>
+: <a class="el" href="a00177.html#5871ead1ca230efbe52a5008470e6428">tbb::tick_count::interval_t</a><li>operator-
+: <a class="el" href="a00176.html#09dde78a4100800c11bb883d6204b586">tbb::tick_count</a>, <a class="el" href="a00177.html#fa509691e1d689830931e36edd274f76">tbb::tick_count::interval_t</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_type.html b/doc/html/functions_type.html
index b11b146..2feb768 100644
--- a/doc/html/functions_type.html
+++ b/doc/html/functions_type.html
@@ -35,17 +35,16 @@
 <p>
 <ul>
 <li>affinity_id
-: <a class="el" href="a00162.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocator_type
-: <a class="el" href="a00166.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>const_iterator
+: <a class="el" href="a00166.html#d61bb32389d3857bf7511d69beaafb76">tbb::task</a><li>allocator_type
+: <a class="el" href="a00170.html#78701e7454ef8e1a25b5acd364367080">tbb::tbb_allocator< T ></a>, <a class="el" href="a00138.html#60047d25605a1ef993c49234e9ac5c2d">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>, <a class="el" href="a00129.html#2e2726fccf6d975dc1071608cc0bbf90">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#5a3956341728eaa558d8827063718cac">tbb::strict_ppl::concurrent_queue< T, A ></a><li>const_iterator
 : <a class="el" href="a00122.html#1a8d05842c2b3dfc177bc4d347e4cef7">tbb::blocked_range< Value ></a><li>const_reference
-: <a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">tbb::strict_ppl::concurrent_queue< T, A ></a><li>depth_type
-: <a class="el" href="a00162.html#d8815c39bb61bd7e2d2691c476ed03b9">tbb::task</a><li>difference_type
+: <a class="el" href="a00129.html#796713d0b9ba93a4721cbe13e4474068">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#4d48e7ff93f81636bca2c74f7da34750">tbb::strict_ppl::concurrent_queue< T, A ></a><li>difference_type
 : <a class="el" href="a00129.html#4b45c91297e69515d83d5eef85ae1f49">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#068576d16c7e4e05d52f9db7a45b5b65">tbb::strict_ppl::concurrent_queue< T, A ></a><li>page_range_type
 : <a class="el" href="a00124.html#b8ebf17a552ba47825e9b3887855b719">tbb::blocked_range3d< PageValue, RowValue, ColValue ></a><li>reference
 : <a class="el" href="a00129.html#dcd44ca6a88c0dc7a847a47a10811f0c">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#a8d725c50a9834bb7af5b67c0aff92b8">tbb::strict_ppl::concurrent_queue< T, A ></a><li>row_range_type
 : <a class="el" href="a00123.html#a807a22fe658ec38b8edfd69521d0383">tbb::blocked_range2d< RowValue, ColValue ></a><li>size_type
 : <a class="el" href="a00129.html#a80e4c11dbb324e4b92a24a77bbcde68">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#8fc30e93f8342a1960357f71e4fe8a2b">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00122.html#f5707bffea38eee5c9680f37358afb8e">tbb::blocked_range< Value ></a><li>value_type
-: <a class="el" href="a00145.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a cl [...]
+: <a class="el" href="a00149.html#fa297e53d3af2a101e712bc200233e9c">tbb::parallel_while< Body ></a>, <a class="el" href="a00129.html#98245517a931e5893f6601e66c51fc75">tbb::concurrent_bounded_queue< T, A ></a>, <a class="el" href="a00134.html#682c3978d5cb0620000994f11c44a476">tbb::strict_ppl::concurrent_queue< T, A ></a>, <a class="el" href="a00131.html#34035ddb9e2a27f2f0a1f6a2a16730cf">tbb::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor</a>, <a cl [...]
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html
index afd2df1..c50f97a 100644
--- a/doc/html/functions_vars.html
+++ b/doc/html/functions_vars.html
@@ -35,8 +35,8 @@
 <p>
 <ul>
 <li>automatic
-: <a class="el" href="a00165.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a><li>deferred
-: <a class="el" href="a00165.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>my_exception_data
+: <a class="el" href="a00169.html#8f5988e2b0fbb2d533fcbb7f2583743f">tbb::task_scheduler_init</a><li>deferred
+: <a class="el" href="a00169.html#e6c860f1e559026ff3ef4599c0d6c514">tbb::task_scheduler_init</a><li>my_exception_data
 : <a class="el" href="a00141.html#a8c0ae2089ae784b28907cf748b89416">tbb::movable_exception< ExceptionData ></a></ul>
 <hr>
 <p></p>
diff --git a/doc/html/globals.html b/doc/html/globals.html
index 03a285c..8f087ce 100644
--- a/doc/html/globals.html
+++ b/doc/html/globals.html
@@ -29,14 +29,15 @@ Here is a list of all documented file members with links to the documentation:
 <p>
 <ul>
 <li>scalable_aligned_free()
-: <a class="el" href="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
-: <a class="el" href="a00230.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
-: <a class="el" href="a00230.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
-: <a class="el" href="a00230.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
-: <a class="el" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
-: <a class="el" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_posix_memalign()
-: <a class="el" href="a00230.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
-: <a class="el" href="a00230.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
+: <a class="el" href="a00235.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
+: <a class="el" href="a00235.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
+: <a class="el" href="a00235.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
+: <a class="el" href="a00235.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
+: <a class="el" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
+: <a class="el" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_msize()
+: <a class="el" href="a00235.html#g0965ce1b4b7835f92869c7fd867265f7">scalable_allocator.h</a><li>scalable_posix_memalign()
+: <a class="el" href="a00235.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
+: <a class="el" href="a00235.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html
index bc561cb..df84b42 100644
--- a/doc/html/globals_func.html
+++ b/doc/html/globals_func.html
@@ -29,14 +29,15 @@
 <p>
 <ul>
 <li>scalable_aligned_free()
-: <a class="el" href="a00230.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
-: <a class="el" href="a00230.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
-: <a class="el" href="a00230.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
-: <a class="el" href="a00230.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
-: <a class="el" href="a00230.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
-: <a class="el" href="a00230.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_posix_memalign()
-: <a class="el" href="a00230.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
-: <a class="el" href="a00230.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
+: <a class="el" href="a00235.html#g65a20e812012f15ec7442d5b45d0cba5">scalable_allocator.h</a><li>scalable_aligned_malloc()
+: <a class="el" href="a00235.html#gc1c7aaa1fe85c17ba5a3a96f7e8d89e7">scalable_allocator.h</a><li>scalable_aligned_realloc()
+: <a class="el" href="a00235.html#gbaea91376be80dfabd7c93eaffd9abaa">scalable_allocator.h</a><li>scalable_calloc()
+: <a class="el" href="a00235.html#g3f5a2fde0bcaa3eda35be32c8658f444">scalable_allocator.h</a><li>scalable_free()
+: <a class="el" href="a00235.html#gca3579c21244dba9f0c351e5984d4565">scalable_allocator.h</a><li>scalable_malloc()
+: <a class="el" href="a00235.html#gc25b8e6c76db0b346a8249796a7a2475">scalable_allocator.h</a><li>scalable_msize()
+: <a class="el" href="a00235.html#g0965ce1b4b7835f92869c7fd867265f7">scalable_allocator.h</a><li>scalable_posix_memalign()
+: <a class="el" href="a00235.html#g05dcec987480bb2c82ecdead6a085899">scalable_allocator.h</a><li>scalable_realloc()
+: <a class="el" href="a00235.html#g951bbbbd2d041acb59ba5fa910b52543">scalable_allocator.h</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html
index 35cec48..883a6ce 100644
--- a/doc/html/hierarchy.html
+++ b/doc/html/hierarchy.html
@@ -50,50 +50,54 @@
 <li><a class="el" href="a00138.html">tbb::enumerable_thread_specific< T, Allocator, ETS_key_type ></a>
 <li><a class="el" href="a00139.html">tbb::filter</a>
 <ul>
-<li><a class="el" href="a00171.html">tbb::thread_bound_filter</a>
+<li><a class="el" href="a00175.html">tbb::thread_bound_filter</a>
 </ul>
 <li><a class="el" href="a00140.html">tbb::final_scan_tag</a>
 <li><b>atomic_impl</b><li><a class="el" href="a00142.html">tbb::mutex</a>
 <li><a class="el" href="a00143.html">tbb::mutex::scoped_lock</a>
-<li><a class="el" href="a00144.html">tbb::parallel_do_feeder< Item ></a>
-<li><a class="el" href="a00145.html">tbb::parallel_while< Body ></a>
-<li><a class="el" href="a00146.html">tbb::pipeline</a>
-<li><a class="el" href="a00147.html">tbb::pre_scan_tag</a>
-<li><a class="el" href="a00148.html">tbb::queuing_mutex</a>
-<li><a class="el" href="a00149.html">tbb::queuing_mutex::scoped_lock</a>
-<li><a class="el" href="a00150.html">tbb::queuing_rw_mutex</a>
-<li><a class="el" href="a00151.html">tbb::queuing_rw_mutex::scoped_lock</a>
-<li><a class="el" href="a00152.html">tbb::recursive_mutex</a>
-<li><a class="el" href="a00153.html">tbb::recursive_mutex::scoped_lock</a>
-<li><a class="el" href="a00154.html">tbb::scalable_allocator< T ></a>
-<li><a class="el" href="a00155.html">tbb::scalable_allocator< void ></a>
-<li><a class="el" href="a00156.html">tbb::simple_partitioner</a>
-<li><a class="el" href="a00157.html">tbb::spin_mutex</a>
-<li><a class="el" href="a00158.html">tbb::spin_mutex::scoped_lock</a>
-<li><a class="el" href="a00159.html">tbb::spin_rw_mutex_v3</a>
-<li><a class="el" href="a00160.html">tbb::spin_rw_mutex_v3::scoped_lock</a>
-<li><a class="el" href="a00161.html">tbb::split</a>
-<li><a class="el" href="a00162.html">tbb::task</a>
+<li><a class="el" href="a00144.html">tbb::null_mutex</a>
+<li><a class="el" href="a00145.html">tbb::null_mutex::scoped_lock</a>
+<li><a class="el" href="a00146.html">tbb::null_rw_mutex</a>
+<li><a class="el" href="a00147.html">tbb::null_rw_mutex::scoped_lock</a>
+<li><a class="el" href="a00148.html">tbb::parallel_do_feeder< Item ></a>
+<li><a class="el" href="a00149.html">tbb::parallel_while< Body ></a>
+<li><a class="el" href="a00150.html">tbb::pipeline</a>
+<li><a class="el" href="a00151.html">tbb::pre_scan_tag</a>
+<li><a class="el" href="a00152.html">tbb::queuing_mutex</a>
+<li><a class="el" href="a00153.html">tbb::queuing_mutex::scoped_lock</a>
+<li><a class="el" href="a00154.html">tbb::queuing_rw_mutex</a>
+<li><a class="el" href="a00155.html">tbb::queuing_rw_mutex::scoped_lock</a>
+<li><a class="el" href="a00156.html">tbb::recursive_mutex</a>
+<li><a class="el" href="a00157.html">tbb::recursive_mutex::scoped_lock</a>
+<li><a class="el" href="a00158.html">tbb::scalable_allocator< T ></a>
+<li><a class="el" href="a00159.html">tbb::scalable_allocator< void ></a>
+<li><a class="el" href="a00160.html">tbb::simple_partitioner</a>
+<li><a class="el" href="a00161.html">tbb::spin_mutex</a>
+<li><a class="el" href="a00162.html">tbb::spin_mutex::scoped_lock</a>
+<li><a class="el" href="a00163.html">tbb::spin_rw_mutex_v3</a>
+<li><a class="el" href="a00164.html">tbb::spin_rw_mutex_v3::scoped_lock</a>
+<li><a class="el" href="a00165.html">tbb::split</a>
+<li><a class="el" href="a00166.html">tbb::task</a>
 <ul>
 <li><a class="el" href="a00137.html">tbb::empty_task</a>
 </ul>
-<li><a class="el" href="a00163.html">tbb::task_group_context</a>
-<li><a class="el" href="a00164.html">tbb::task_list</a>
-<li><a class="el" href="a00165.html">tbb::task_scheduler_init</a>
-<li><a class="el" href="a00166.html">tbb::tbb_allocator< T ></a>
-<li><a class="el" href="a00167.html">tbb::tbb_allocator< void ></a>
-<li><a class="el" href="a00168.html">tbb::tbb_exception</a>
+<li><a class="el" href="a00167.html">tbb::task_group_context</a>
+<li><a class="el" href="a00168.html">tbb::task_list</a>
+<li><a class="el" href="a00169.html">tbb::task_scheduler_init</a>
+<li><a class="el" href="a00170.html">tbb::tbb_allocator< T ></a>
+<li><a class="el" href="a00171.html">tbb::tbb_allocator< void ></a>
+<li><a class="el" href="a00172.html">tbb::tbb_exception</a>
 <ul>
 <li><a class="el" href="a00127.html">tbb::captured_exception</a>
 <li><a class="el" href="a00141.html">tbb::movable_exception< ExceptionData ></a>
 </ul>
-<li><a class="el" href="a00169.html">tbb::internal::tbb_exception_ptr</a>
-<li><a class="el" href="a00170.html">tbb::tbb_hash_compare< T ></a>
-<li><a class="el" href="a00172.html">tbb::tick_count</a>
-<li><a class="el" href="a00173.html">tbb::tick_count::interval_t</a>
-<li><a class="el" href="a00174.html">tbb::internal::work_around_alignment_bug< Size, T ></a>
-<li><a class="el" href="a00175.html">tbb::zero_allocator< T, Allocator ></a>
-<li><a class="el" href="a00176.html">tbb::zero_allocator< void, Allocator ></a>
+<li><a class="el" href="a00173.html">tbb::internal::tbb_exception_ptr</a>
+<li><a class="el" href="a00174.html">tbb::tbb_hash_compare< T ></a>
+<li><a class="el" href="a00176.html">tbb::tick_count</a>
+<li><a class="el" href="a00177.html">tbb::tick_count::interval_t</a>
+<li><a class="el" href="a00178.html">tbb::internal::work_around_alignment_bug< Size, T ></a>
+<li><a class="el" href="a00179.html">tbb::zero_allocator< T, Allocator ></a>
+<li><a class="el" href="a00180.html">tbb::zero_allocator< void, Allocator ></a>
 </ul>
 <hr>
 <p></p>
diff --git a/doc/html/modules.html b/doc/html/modules.html
index cdea1f2..3e26ac0 100644
--- a/doc/html/modules.html
+++ b/doc/html/modules.html
@@ -15,12 +15,12 @@
     <li><a href="pages.html"><span>Related Pages</span></a></li>
   </ul></div>
 <h1>Modules</h1>Here is a list of all modules:<ul>
-<li><a class="el" href="a00228.html">Algorithms</a>
-<li><a class="el" href="a00229.html">Containers</a>
-<li><a class="el" href="a00230.html">Memory Allocation</a>
-<li><a class="el" href="a00231.html">Synchronization</a>
-<li><a class="el" href="a00232.html">Timing</a>
-<li><a class="el" href="a00233.html">Task Scheduling</a>
+<li><a class="el" href="a00233.html">Algorithms</a>
+<li><a class="el" href="a00234.html">Containers</a>
+<li><a class="el" href="a00235.html">Memory Allocation</a>
+<li><a class="el" href="a00236.html">Synchronization</a>
+<li><a class="el" href="a00237.html">Timing</a>
+<li><a class="el" href="a00238.html">Task Scheduling</a>
 </ul>
 <hr>
 <p></p>
diff --git a/doc/html/namespacemembers.html b/doc/html/namespacemembers.html
index 8e6c440..0c90880 100644
--- a/doc/html/namespacemembers.html
+++ b/doc/html/namespacemembers.html
@@ -33,25 +33,25 @@ Here is a list of all documented namespace members with links to the namespaces
 <p>
 <ul>
 <li>__TBB_DECL_ATOMIC_ALT()
-: <a class="el" href="a00224.html#ad165cf61abbe349d413df2589679add">tbb</a><li>__TBB_full_fence
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>assertion_failure()
-: <a class="el" href="a00224.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>assertion_handler_type
-: <a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a><li>ets_key_usage_type
-: <a class="el" href="a00224.html#a8622ae61b7e7737dac26542e181178e">tbb</a><li>hash_multiplier
-: <a class="el" href="a00224.html#6902d551186a654ffbf88582d4a0bdfa">tbb</a><li>memory_semantics
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef">tbb</a><li>parallel_do()
-: <a class="el" href="a00228.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
-: <a class="el" href="a00228.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_for_each()
-: <a class="el" href="a00228.html#g59794cb24f74cda4253fd9aed0a4b150">tbb</a><li>parallel_invoke()
-: <a class="el" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">tbb</a><li>parallel_reduce()
-: <a class="el" href="a00228.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
-: <a class="el" href="a00228.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
-: <a class="el" href="a00228.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>release
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a><li>set_assertion_handler()
-: <a class="el" href="a00224.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>tbb_hasher()
-: <a class="el" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb</a><li>TBB_runtime_interface_version()
-: <a class="el" href="a00224.html#a6858b22e90041c9c4669674ff39b056">tbb</a></ul>
+: <a class="el" href="a00229.html#ad165cf61abbe349d413df2589679add">tbb</a><li>__TBB_full_fence
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>assertion_failure()
+: <a class="el" href="a00229.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>assertion_handler_type
+: <a class="el" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a><li>ets_key_usage_type
+: <a class="el" href="a00229.html#a8622ae61b7e7737dac26542e181178e">tbb</a><li>hash_multiplier
+: <a class="el" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">tbb</a><li>memory_semantics
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef">tbb</a><li>parallel_do()
+: <a class="el" href="a00233.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
+: <a class="el" href="a00232.html#490399525b1e690ec31d6db964c6b272">tbb::strict_ppl</a>, <a class="el" href="a00233.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_for_each()
+: <a class="el" href="a00233.html#g85a58ff0853f129adb6f9e4355326ccc">tbb</a><li>parallel_invoke()
+: <a class="el" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">tbb</a><li>parallel_reduce()
+: <a class="el" href="a00233.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
+: <a class="el" href="a00233.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
+: <a class="el" href="a00233.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>release
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a><li>set_assertion_handler()
+: <a class="el" href="a00229.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>tbb_hasher()
+: <a class="el" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb</a><li>TBB_runtime_interface_version()
+: <a class="el" href="a00229.html#a6858b22e90041c9c4669674ff39b056">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespacemembers_enum.html b/doc/html/namespacemembers_enum.html
index dd59a56..d6b1f30 100644
--- a/doc/html/namespacemembers_enum.html
+++ b/doc/html/namespacemembers_enum.html
@@ -33,8 +33,8 @@
 <p>
 <ul>
 <li>ets_key_usage_type
-: <a class="el" href="a00224.html#a8622ae61b7e7737dac26542e181178e">tbb</a><li>memory_semantics
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef">tbb</a></ul>
+: <a class="el" href="a00229.html#a8622ae61b7e7737dac26542e181178e">tbb</a><li>memory_semantics
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespacemembers_eval.html b/doc/html/namespacemembers_eval.html
index 14a5e20..5037833 100644
--- a/doc/html/namespacemembers_eval.html
+++ b/doc/html/namespacemembers_eval.html
@@ -33,9 +33,9 @@
 <p>
 <ul>
 <li>__TBB_full_fence
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>release
-: <a class="el" href="a00224.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a></ul>
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefc6db01678b1749dff7554688d079520c">tbb</a><li>acquire
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fef5f1fafe8d229d348ff91d937f64e79c7">tbb</a><li>release
+: <a class="el" href="a00229.html#a8686246bb5d3664bd07563749970fefaa1fa107db0245c41fb109d976ae8d70">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespacemembers_func.html b/doc/html/namespacemembers_func.html
index 7c641f0..4819361 100644
--- a/doc/html/namespacemembers_func.html
+++ b/doc/html/namespacemembers_func.html
@@ -33,18 +33,18 @@
 <p>
 <ul>
 <li>__TBB_DECL_ATOMIC_ALT()
-: <a class="el" href="a00224.html#ad165cf61abbe349d413df2589679add">tbb</a><li>assertion_failure()
-: <a class="el" href="a00224.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>parallel_do()
-: <a class="el" href="a00228.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
-: <a class="el" href="a00228.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_for_each()
-: <a class="el" href="a00228.html#g59794cb24f74cda4253fd9aed0a4b150">tbb</a><li>parallel_invoke()
-: <a class="el" href="a00228.html#gbaadafdb93d290acec86e07fc8909c29">tbb</a><li>parallel_reduce()
-: <a class="el" href="a00228.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
-: <a class="el" href="a00228.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
-: <a class="el" href="a00228.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>set_assertion_handler()
-: <a class="el" href="a00224.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>tbb_hasher()
-: <a class="el" href="a00224.html#2babc190640003767a3049a4d3c5ee35">tbb</a><li>TBB_runtime_interface_version()
-: <a class="el" href="a00224.html#a6858b22e90041c9c4669674ff39b056">tbb</a></ul>
+: <a class="el" href="a00229.html#ad165cf61abbe349d413df2589679add">tbb</a><li>assertion_failure()
+: <a class="el" href="a00229.html#3d1252787be39b4aef311f1cadaff9e8">tbb</a><li>parallel_do()
+: <a class="el" href="a00233.html#g2617dc9b88b3285a7212599d49f74228">tbb</a><li>parallel_for()
+: <a class="el" href="a00232.html#490399525b1e690ec31d6db964c6b272">tbb::strict_ppl</a>, <a class="el" href="a00233.html#g04b4696b67370c01353ff5974c8f1196">tbb</a><li>parallel_for_each()
+: <a class="el" href="a00233.html#g85a58ff0853f129adb6f9e4355326ccc">tbb</a><li>parallel_invoke()
+: <a class="el" href="a00233.html#gbaadafdb93d290acec86e07fc8909c29">tbb</a><li>parallel_reduce()
+: <a class="el" href="a00233.html#g496bd7eadb3b97495ccb5655ef90319e">tbb</a><li>parallel_scan()
+: <a class="el" href="a00233.html#g62fde400a37bbca1a2fddc8e3d22f556">tbb</a><li>parallel_sort()
+: <a class="el" href="a00233.html#gc7576f82fdedc8a701a6c17ad9415926">tbb</a><li>set_assertion_handler()
+: <a class="el" href="a00229.html#823fa1c15dd829d1d9167157450ddcd9">tbb</a><li>tbb_hasher()
+: <a class="el" href="a00229.html#2babc190640003767a3049a4d3c5ee35">tbb</a><li>TBB_runtime_interface_version()
+: <a class="el" href="a00229.html#a6858b22e90041c9c4669674ff39b056">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespacemembers_type.html b/doc/html/namespacemembers_type.html
index af5b03d..9a8704f 100644
--- a/doc/html/namespacemembers_type.html
+++ b/doc/html/namespacemembers_type.html
@@ -33,7 +33,7 @@
 <p>
 <ul>
 <li>assertion_handler_type
-: <a class="el" href="a00224.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a></ul>
+: <a class="el" href="a00229.html#ed375248ff6019a70ca0f9da528e5d0b">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespacemembers_vars.html b/doc/html/namespacemembers_vars.html
index 4f5a231..ffb3a55 100644
--- a/doc/html/namespacemembers_vars.html
+++ b/doc/html/namespacemembers_vars.html
@@ -33,7 +33,7 @@
 <p>
 <ul>
 <li>hash_multiplier
-: <a class="el" href="a00224.html#6902d551186a654ffbf88582d4a0bdfa">tbb</a></ul>
+: <a class="el" href="a00229.html#6902d551186a654ffbf88582d4a0bdfa">tbb</a></ul>
 <hr>
 <p></p>
 Copyright © 2005-2009 Intel Corporation.  All Rights Reserved.
diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html
index dbfc429..19324a4 100644
--- a/doc/html/namespaces.html
+++ b/doc/html/namespaces.html
@@ -20,7 +20,8 @@
     <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
   </ul></div>
 <h1>Namespace List</h1>Here is a list of all documented namespaces with brief descriptions:<table>
-  <tr><td class="indexkey"><a class="el" href="a00224.html">tbb</a></td><td class="indexvalue">The namespace tbb contains all components of the library </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00229.html">tbb</a></td><td class="indexvalue">The namespace tbb contains all components of the library </td></tr>
+  <tr><td class="indexkey"><a class="el" href="a00232.html">tbb::strict_ppl</a></td><td class="indexvalue">For internal use only </td></tr>
 </table>
 <hr>
 <p></p>
diff --git a/examples/common/gui/winvideo.h b/examples/common/gui/winvideo.h
index c704d37..c89bbc6 100644
--- a/examples/common/gui/winvideo.h
+++ b/examples/common/gui/winvideo.h
@@ -269,7 +269,7 @@ void video::main_loop()
 bool video::next_frame()
 {
     if(!running) return false;
-    g_updates++; // fast but inaccurate counter. The race is possible here
+    g_updates++; // Fast but inaccurate counter. The data race here is benign.
     if(!threaded) while(loop_once(this));
     else if(g_handles[1]) {
         SetEvent(g_handles[1]);
diff --git a/examples/concurrent_hash_map/count_strings/count_strings.cpp b/examples/concurrent_hash_map/count_strings/count_strings.cpp
index 1c8ade6..335a957 100644
--- a/examples/concurrent_hash_map/count_strings/count_strings.cpp
+++ b/examples/concurrent_hash_map/count_strings/count_strings.cpp
@@ -59,7 +59,7 @@ static bool Verbose = false;
 static int NThread = 1;
 
 //! Problem size
-const size_t N = 1000000;
+long N = 1000000;
 const int size_factor = 2;
 
 //! Indicates if the number of threads wasn't set explicitly
@@ -80,7 +80,7 @@ struct Tally {
     }
 };
 
-static MyString Data[N];
+static MyString* Data;
 
 static void CountOccurrences(int nthreads) {
     StringTable table;
@@ -210,19 +210,27 @@ static void ParseCommandLine( int argc, char* argv[] ) {
         Verbose = true;
         ++i;
     }
-    if( i<argc && !isdigit(argv[i][0]) ) {
-        fprintf(stderr,"Usage: %s [verbose] [number-of-threads]\n",argv[0]);
-        exit(1);
-    }
-    if( i<argc ) {
-        NThread = strtol(argv[i++],0,0);
-        is_number_of_threads_set = true;
-    }
+    if( i<argc )
+        if( !isdigit(argv[i][0]) ) {
+            fprintf(stderr,"Usage: %s [verbose] [number-of-strings] [number-of-threads]\n",argv[0]);
+            exit(1);
+        } else {
+            N = strtol(argv[i++],0,0);
+        }
+    if( i<argc )
+        if( !isdigit(argv[i][0]) ) {
+            fprintf(stderr,"Usage: %s [verbose] [number-of-strings] [number-of-threads]\n",argv[0]);
+            exit(1);
+        } else {
+            NThread = strtol(argv[i++],0,0);
+            is_number_of_threads_set = true;
+        }
 }
 
 int main( int argc, char* argv[] ) {
     srand(2);
     ParseCommandLine( argc, argv );
+    Data = new MyString[N];
     CreateData();
     if (is_number_of_threads_set) {
         task_scheduler_init init(NThread);
@@ -237,4 +245,5 @@ int main( int argc, char* argv[] ) {
             CountOccurrences(0);
         }
     }
+    delete[] Data;
 }
diff --git a/examples/concurrent_hash_map/count_strings/index.html b/examples/concurrent_hash_map/count_strings/index.html
index f5a59d6..2ba9f04 100644
--- a/examples/concurrent_hash_map/count_strings/index.html
+++ b/examples/concurrent_hash_map/count_strings/index.html
@@ -29,13 +29,13 @@ General build directions can be found <A HREF=../../index.html#build>here</A>.
 
 <H2>Usage</H2>
 <DL>
-<DT><TT>count_strings [verbose] [<I>N</I>]</TT>
-<DD><I>N</I> is the number of threads to be used.  The "verbose" option enables printing of extra
-    debug information during execution.
+<DT><TT>count_strings [verbose] [<I>N</I>] [<I>P</I>]</TT>
+<DD><I>N</I> is the number of strings and <I>P</I> is the number of threads to be used.  The "verbose" option enables printing
+    of extra information during execution.
 <DT>To run a short version of this example, e.g., for use with Intel® Threading Tools:
 <DD>Build a <I>debug</I> version of the example
     (see the <A HREF=../../index.html#build>build directions</A>).
-    <BR>Run it with the desired number of threads, e.g., <TT>count_strings 4</TT>.
+    <BR>Run it with a small number of strings and the desired number of threads, e.g., <TT>count_strings 10000 2</TT>.
 </DL>
 
 <HR>
diff --git a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
index e0e55fc..df85e3e 100644
--- a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
+++ b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp
@@ -53,14 +53,14 @@ public:
 
     void operator()( Cell* c, tbb::parallel_do_feeder<Cell*>& feeder ) const {
         c->update();
-        // Restore ref_count in preparation for subsequent traversal.
-        c->ref_count = ArityOfOp[c->op];
         for( size_t k=0; k<c->successor.size(); ++k ) {
             Cell* successor = c->successor[k];
             if( 0 == --(successor->ref_count) ) {
                 feeder.add( successor );
             }
         }
+        // Restore ref_count in preparation for subsequent traversal.
+        c->ref_count = ArityOfOp[c->op];
     }
 };   
 
@@ -151,7 +151,7 @@ int main( int argc, char* argv[] ) {
         size_t total_root_set_size = 0;
         for( int trial=0; trial<ntrial; ++trial ) {
             Graph g;
-            g.create_random_dag(1000);
+            g.create_random_dag(10000);
             vector<Cell*> root_set;
             g.get_root_set(root_set);
             total_root_set_size += root_set.size();
diff --git a/examples/parallel_for/game_of_life.NET/Makefile.windows b/examples/parallel_for/game_of_life.NET/Makefile.windows
index b657750..e6d0e63 100644
--- a/examples/parallel_for/game_of_life.NET/Makefile.windows
+++ b/examples/parallel_for/game_of_life.NET/Makefile.windows
@@ -39,7 +39,7 @@ all: release test
 release:
 	$(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 debug:
-	$(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MDd /Od /Zi /D TBB_DO_ASSERT /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
+	$(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
 clean:
 	@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
 test:
diff --git a/examples/parallel_for/game_of_life.NET/src/Board.h b/examples/parallel_for/game_of_life.NET/src/Board.h
index 1a5d680..65e980a 100644
--- a/examples/parallel_for/game_of_life.NET/src/Board.h
+++ b/examples/parallel_for/game_of_life.NET/src/Board.h
@@ -62,16 +62,7 @@ class Board
     {
     public:
         Board(int width, int height, int squareSize, LabelPtr counter);        
-        virtual ~Board()
-        {
-#ifndef _CONSOLE
-            if (components)
-            {
-                delete components;
-            }
-#endif
-        }
-
+        virtual ~Board();
         void seed(int s);
         void seed(const BoardPtr s);
 #ifndef _CONSOLE
diff --git a/examples/parallel_for/game_of_life.NET/src/Evolution.cpp b/examples/parallel_for/game_of_life.NET/src/Evolution.cpp
index 763d203..05faa03 100644
--- a/examples/parallel_for/game_of_life.NET/src/Evolution.cpp
+++ b/examples/parallel_for/game_of_life.NET/src/Evolution.cpp
@@ -116,7 +116,7 @@ void SequentialEvolution::Step()
 #ifdef USE_SSE
     UpdateState(m_matrix, m_matrix->data, 0, m_matrix->height);
 #else
-    UpdateState(m_matrix, m_dest, 0, m_matrix->width * m_matrix->height);
+    UpdateState(m_matrix, m_dest, 0, (m_matrix->width * m_matrix->height)-1);
     UpdateMatrix();
 #endif
         }
@@ -133,7 +133,10 @@ void ParallelEvolution::Run()
 #else
 void ParallelEvolution::Run(double execution_time, int nthread)
 {
-    printf("Starting game (Parallel evolution for %d thread(s))\n", nthread);
+    if(nthread == tbb::task_scheduler_init::automatic)
+        printf("Starting game (Parallel evolution for automatic number of thread(s))\n");
+    else
+        printf("Starting game (Parallel evolution for %d thread(s))\n", nthread);
 #endif
 
     m_nIteration = 0;
diff --git a/examples/parallel_for/game_of_life.NET/src/Evolution.h b/examples/parallel_for/game_of_life.NET/src/Evolution.h
index 1b98d3e..e70606a 100644
--- a/examples/parallel_for/game_of_life.NET/src/Evolution.h
+++ b/examples/parallel_for/game_of_life.NET/src/Evolution.h
@@ -74,6 +74,9 @@ public:
         //! allocate memory for second matrix data block
         m_dest = new char[m_size];
         is_paused = false;
+#ifdef _CONSOLE
+        m_serial_time = 0;
+#endif
     }
 
     virtual ~Evolution()
diff --git a/examples/parallel_for/game_of_life.NET/src/Game_of_life.cpp b/examples/parallel_for/game_of_life.NET/src/Game_of_life.cpp
index 8cc9cf6..367e629 100644
--- a/examples/parallel_for/game_of_life.NET/src/Game_of_life.cpp
+++ b/examples/parallel_for/game_of_life.NET/src/Game_of_life.cpp
@@ -75,6 +75,18 @@ Board::Board(int width, int height, int squareSize, LabelPtr counter)
 #endif
 }
 
+Board::~Board()
+{
+#ifndef _CONSOLE
+    if (components)
+    {
+        delete components;
+    }
+#endif
+    delete[] m_matrix->data;
+    delete m_matrix;
+}
+
 void Board::seed(int s)
 {        
     srand(s);
@@ -93,8 +105,6 @@ void Board::seed(int s)
 
 void Board::seed( const BoardPtr src )
 {        
-    for (int j=0; j<m_height; j++)
-        for (int i=0; i<m_width; i++)
             memcpy(m_matrix->data, src->m_matrix->data, m_height*m_width);
 #ifndef _CONSOLE
     Invalidate();
@@ -153,7 +163,7 @@ bool ParseCommandLine(int argc, char * argv [])
     {
         low = tbb::task_scheduler_init::automatic;
         high = low;
-        execution_time = 10;
+        execution_time = 5;
         return true;
     }
     //! command line with parameters
@@ -211,13 +221,18 @@ int main( int argc, char* argv[] )
     m_board2->seed(m_board1);
 
     m_seq = new SequentialEvolution(m_board1->m_matrix, m_board1);
-    m_par = new ParallelEvolution(m_board2->m_matrix, m_board2);
-
     m_seq->Run(execution_time, 1);
+    delete m_seq;
+
+    m_par = new ParallelEvolution(m_board2->m_matrix, m_board2);
     for( int p = low; p <= high; ++p ) 
     {
         m_par->Run(execution_time, p);
-    }    
+    }
+    delete m_par;
+
+    delete m_board1;
+    delete m_board2;
     return 0;
 }
 #endif
diff --git a/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.sln b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.sln
index ab8d1c0..8bc8825 100644
--- a/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.sln
+++ b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.sln
@@ -5,19 +5,31 @@ EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug(console)|Win32 = Debug(console)|Win32
+		Debug(console)|x64 = Debug(console)|x64
 		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
 		Release(console)|Win32 = Release(console)|Win32
+		Release(console)|x64 = Release(console)|x64
 		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.ActiveCfg = Debug(console)|Win32
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.Build.0 = Debug(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.ActiveCfg = Debug(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.Build.0 = Debug(console)|x64
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.ActiveCfg = Debug|Win32
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.Build.0 = Debug|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.ActiveCfg = Debug|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.Build.0 = Debug|x64
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.ActiveCfg = Release(console)|Win32
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.Build.0 = Release(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.ActiveCfg = Release(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.Build.0 = Release(console)|x64
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.ActiveCfg = Release|Win32
 		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.Build.0 = Release|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.ActiveCfg = Release|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
index 7a19772..d60ac1b 100644
--- a/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
+++ b/examples/parallel_for/game_of_life.NET/vc8/Game_of_life.vcproj
@@ -11,6 +11,9 @@
 		<Platform
 			Name="Win32"
 		/>
+		<Platform
+			Name="x64"
+		/>
 	</Platforms>
 	<ToolFiles>
 	</ToolFiles>
@@ -99,6 +102,91 @@
 			/>
 		</Configuration>
 		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				GenerateXMLDocumentationFiles="false"
+				WarningLevel="2"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb_debug.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
+				GenerateDebugInformation="true"
+				AssemblyDebug="1"
+				SubSystem="2"
+				EntryPointSymbol="main"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
@@ -183,6 +271,91 @@
 			/>
 		</Configuration>
 		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-S -03&#x0D;&#x0A;"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_WINDOWS;NDEBUG"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib;"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				EntryPointSymbol="main"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Debug(console)|Win32"
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
@@ -263,6 +436,88 @@
 			/>
 		</Configuration>
 		<Configuration
+			Name="Debug(console)|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			ManagedExtensions="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description=""
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				ExceptionHandling="1"
+				RuntimeLibrary="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb_debug.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib;"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+				SubSystem="1"
+				TargetMachine="17"
+				FixedBaseAddress="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Release(console)|Win32"
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
@@ -342,6 +597,87 @@
 				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc8\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
+		<Configuration
+			Name="Release(console)|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			ManagedExtensions="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description=""
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
+				RuntimeLibrary="2"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc8\lib"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+				FixedBaseAddress="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc8\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
 	</Configurations>
 	<References>
 		<AssemblyReference
@@ -383,6 +719,14 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
+					Name="Debug(console)|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
 					Name="Release(console)|Win32"
 					ExcludedFromBuild="true"
 					>
@@ -390,6 +734,14 @@
 						Name="VCCLCompilerTool"
 					/>
 				</FileConfiguration>
+				<FileConfiguration
+					Name="Release(console)|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\src\Evolution.cpp"
@@ -420,13 +772,6 @@
 			<File
 				RelativePath="..\src\Form1.h"
 				>
-				<FileConfiguration
-					Name="Debug(console)|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
 			</File>
 		</Filter>
 		<Filter
diff --git a/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.sln b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.sln
index 8fa8e8b..b70d4b8 100644
--- a/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.sln
+++ b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.sln
@@ -1,23 +1,35 @@
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game_of_life", "Game_of_life.vcproj", "{56035D17-379A-4C67-A113-6E82CCDDBA50}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game of Life", "Game_of_life.vcproj", "{731C7E2E-2766-41D9-96FC-0A3548973803}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug(console)|Win32 = Debug(console)|Win32
+		Debug(console)|x64 = Debug(console)|x64
 		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
 		Release(console)|Win32 = Release(console)|Win32
+		Release(console)|x64 = Release(console)|x64
 		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Debug(console)|Win32.ActiveCfg = Debug(console)|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Debug(console)|Win32.Build.0 = Debug(console)|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Debug|Win32.ActiveCfg = Debug|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Debug|Win32.Build.0 = Debug|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Release(console)|Win32.ActiveCfg = Release(console)|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Release(console)|Win32.Build.0 = Release(console)|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Release|Win32.ActiveCfg = Release|Win32
-		{56035D17-379A-4C67-A113-6E82CCDDBA50}.Release|Win32.Build.0 = Release|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.ActiveCfg = Debug(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.Build.0 = Debug(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.ActiveCfg = Debug(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.Build.0 = Debug(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.ActiveCfg = Debug|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.Build.0 = Debug|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.ActiveCfg = Debug|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.Build.0 = Debug|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.ActiveCfg = Release(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.Build.0 = Release(console)|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.ActiveCfg = Release(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.Build.0 = Release(console)|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.ActiveCfg = Release|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.Build.0 = Release|Win32
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.ActiveCfg = Release|x64
+		{731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
index 2ed25ab..a826b9b 100644
--- a/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
+++ b/examples/parallel_for/game_of_life.NET/vc9/Game_of_life.vcproj
@@ -2,15 +2,19 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="9.00"
-	Name="Game_of_life"
-	ProjectGUID="{56035D17-379A-4C67-A113-6E82CCDDBA50}"
+	Name="Game of Life"
+	ProjectGUID="{731C7E2E-2766-41D9-96FC-0A3548973803}"
 	RootNamespace="Game_of_life"
+	Keyword="ManagedCProj"
 	TargetFrameworkVersion="131072"
 	>
 	<Platforms>
 		<Platform
 			Name="Win32"
 		/>
+		<Platform
+			Name="x64"
+		/>
 	</Platforms>
 	<ToolFiles>
 	</ToolFiles>
@@ -22,6 +26,7 @@
 			ConfigurationType="1"
 			CharacterSet="1"
 			ManagedExtensions="1"
+			WholeProgramOptimization="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -42,11 +47,11 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
-				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="0"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;USE_SSE"
 				RuntimeLibrary="3"
-				WarningLevel="3"
+				UsePrecompiledHeader="0"
+				GenerateXMLDocumentationFiles="false"
+				WarningLevel="2"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -63,7 +68,7 @@
 				IgnoreImportLibrary="false"
 				AdditionalDependencies="tbb_debug.lib user32.lib $(NOINHERIT)"
 				LinkIncremental="2"
-				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib;"
 				GenerateDebugInformation="true"
 				AssemblyDebug="1"
 				SubSystem="2"
@@ -93,7 +98,91 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying DLLs and PDBs"
-				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)_x64"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)_x64"
+			ConfigurationType="1"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				GenerateXMLDocumentationFiles="false"
+				WarningLevel="2"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb_debug.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
+				GenerateDebugInformation="true"
+				AssemblyDebug="1"
+				SubSystem="2"
+				EntryPointSymbol="main"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -101,7 +190,8 @@
 			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)"
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
+			ManagedExtensions="1"
 			WholeProgramOptimization="1"
 			>
 			<Tool
@@ -121,11 +211,12 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
+				AdditionalOptions="&#x0D;&#x0A;"
 				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				DebugInformationFormat="3"
 			/>
@@ -140,11 +231,17 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="tbb.lib"
-				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib;"
 				GenerateDebugInformation="true"
+				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
+				EntryPointSymbol="main"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -168,7 +265,91 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying DLLs and PDBs"
-				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)"""
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(ConfigurationName)_x64"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)_x64"
+			ConfigurationType="1"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="&#x0D;&#x0A;"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_WINDOWS;NDEBUG"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				IgnoreImportLibrary="false"
+				AdditionalDependencies="tbb.lib user32.lib $(NOINHERIT)"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib;"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				EntryPointSymbol="main"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -177,12 +358,14 @@
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
+			ManagedExtensions="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
+				Description=""
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -198,8 +381,9 @@
 				Optimization="0"
 				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
+				ExceptionHandling="1"
 				RuntimeLibrary="3"
-				Detect64BitPortabilityProblems="true"
+				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -215,9 +399,12 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="tbb_debug.lib"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\ia32\vc9\lib;"
 				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
 				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -241,7 +428,88 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying DLLs and PDBs"
-				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug(console)|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)_x64"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)_x64"
+			ConfigurationType="1"
+			CharacterSet="2"
+			ManagedExtensions="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description=""
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+				ExceptionHandling="1"
+				RuntimeLibrary="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb_debug.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib;"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				FixedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb_debug.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -250,12 +518,14 @@
 			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			CharacterSet="2"
+			ManagedExtensions="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
+				Description=""
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -268,11 +538,10 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="2"
 				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
 				RuntimeLibrary="2"
-				Detect64BitPortabilityProblems="true"
+				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="3"
 			/>
 			<Tool
@@ -293,7 +562,9 @@
 				SubSystem="1"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
+				RandomizedBaseAddress="1"
 				FixedBaseAddress="1"
+				DataExecutionPrevention="0"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -317,7 +588,87 @@
 			<Tool
 				Name="VCPostBuildEventTool"
 				Description="Copying DLLs and PDBs"
-				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy  "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)""
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\ia32\vc9\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release(console)|x64"
+			OutputDirectory="$(TEMP)\tbb_examples\$(PlatformName)\$(ConfigurationName)_x64"
+			IntermediateDirectory="$(TEMP)\tbb_examples\$(SolutionName)\$(PlatformName)\$(ConfigurationName)_x64"
+			ConfigurationType="1"
+			CharacterSet="2"
+			ManagedExtensions="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description=""
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="$(TBB22_INSTALL_DIR)\include"
+				PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;USE_SSE"
+				RuntimeLibrary="2"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tbb.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(TBB22_INSTALL_DIR)\intel64\vc9\lib"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				RandomizedBaseAddress="1"
+				FixedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Copying DLLs and PDBs"
+				CommandLine="copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.dll" "$(OutDir)"&#x0D;&#x0A;copy "$(TBB22_INSTALL_DIR)\intel64\vc9\bin\tbb.pdb" "$(OutDir)"&#x0D;&#x0A;"
 			/>
 		</Configuration>
 	</Configurations>
@@ -366,6 +717,14 @@
 					/>
 				</FileConfiguration>
 				<FileConfiguration
+					Name="Debug(console)|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
 					Name="Release(console)|Win32"
 					ExcludedFromBuild="true"
 					>
@@ -373,6 +732,14 @@
 						Name="VCCLCompilerTool"
 					/>
 				</FileConfiguration>
+				<FileConfiguration
+					Name="Release(console)|x64"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\src\Evolution.cpp"
diff --git a/examples/parallel_for/polygon_overlay/Makefile.windows b/examples/parallel_for/polygon_overlay/Makefile.windows
index 9855781..dc96cfd 100644
--- a/examples/parallel_for/polygon_overlay/Makefile.windows
+++ b/examples/parallel_for/polygon_overlay/Makefile.windows
@@ -45,7 +45,7 @@ ARCHA = $(ARCH0:\vc7.1-=)
 ARCHB = $(ARCHA:\vc8-=)
 ARCHC = $(ARCHB:\vc9-=)
 ARCH3 = $(ARCHC:ia32=x86)
-ARCH4 = $(ARCH3:em64t=AMD64)
+ARCH4 = $(ARCH3:intel64=AMD64)
 XARCH = $(ARCH4:-=x86)
 
 MAKEINC = ../../common/gui/Makefile.win
diff --git a/examples/parallel_for/polygon_overlay/polymain.cpp b/examples/parallel_for/polygon_overlay/polymain.cpp
index 45c14ed..02a7f16 100644
--- a/examples/parallel_for/polygon_overlay/polymain.cpp
+++ b/examples/parallel_for/polygon_overlay/polymain.cpp
@@ -48,7 +48,7 @@
 using namespace std;
 
 #if _DEBUG
-char *faceNames[] = { "North", "East", "South", "West" };
+const char *faceNames[] = { "North", "East", "South", "West" };
 #endif
 
 /** 
diff --git a/examples/parallel_for/polygon_overlay/pover_video.cpp b/examples/parallel_for/polygon_overlay/pover_video.cpp
index 9b647c7..cc1e159 100644
--- a/examples/parallel_for/polygon_overlay/pover_video.cpp
+++ b/examples/parallel_for/polygon_overlay/pover_video.cpp
@@ -59,7 +59,7 @@ void rt_sleep(int msec) {
 using namespace std;
 
 bool g_next_frame() {
-    if(++n_next_frame_calls >= frame_skips) {
+    if(++n_next_frame_calls >= frame_skips) { // the data race here is benign
         n_next_frame_calls = 0; 
         return gVideo->next_frame();
     } 
diff --git a/examples/parallel_for/seismic/Makefile.windows b/examples/parallel_for/seismic/Makefile.windows
index 45c1590..ca12d88 100644
--- a/examples/parallel_for/seismic/Makefile.windows
+++ b/examples/parallel_for/seismic/Makefile.windows
@@ -45,7 +45,7 @@ ARCHA = $(ARCH0:\vc7.1-=)
 ARCHB = $(ARCHA:\vc8-=)
 ARCHC = $(ARCHB:\vc9-=)
 ARCH3 = $(ARCHC:ia32=x86)
-ARCH4 = $(ARCH3:em64t=AMD64)
+ARCH4 = $(ARCH3:intel64=AMD64)
 XARCH = $(ARCH4:-=x86)
 
 MAKEINC = ../../common/gui/Makefile.win
diff --git a/examples/parallel_for/seismic/SeismicSimulation.cpp b/examples/parallel_for/seismic/SeismicSimulation.cpp
index 38239aa..6693918 100644
--- a/examples/parallel_for/seismic/SeismicSimulation.cpp
+++ b/examples/parallel_for/seismic/SeismicSimulation.cpp
@@ -283,11 +283,11 @@ void InitializeUniverse() {
         d *= 1-1.0f/(DamperSize*DamperSize);
         for( int j=1; j<UniverseWidth-1; ++j ) {
             D[k][j] *= d;
-            D[UniverseHeight-k][j] *= d;
+            D[UniverseHeight-1-k][j] *= d;
         }
         for( int i=1; i<UniverseHeight-1; ++i ) {
             D[i][k] *= d;
-            D[i][UniverseWidth-k] *= d;
+            D[i][UniverseWidth-1-k] *= d;
         }
     }
 }
diff --git a/examples/parallel_for/tachyon/Makefile.windows b/examples/parallel_for/tachyon/Makefile.windows
index f590338..38cf165 100644
--- a/examples/parallel_for/tachyon/Makefile.windows
+++ b/examples/parallel_for/tachyon/Makefile.windows
@@ -68,7 +68,7 @@ ARCHA = $(ARCH0:\vc7.1-=)
 ARCHB = $(ARCHA:\vc8-=)
 ARCHC = $(ARCHB:\vc9-=)
 ARCH3 = $(ARCHC:ia32=x86)
-ARCH4 = $(ARCH3:em64t=AMD64)
+ARCH4 = $(ARCH3:intel64=AMD64)
 XARCH = $(ARCH4:-=x86)
 
 # The default dataset
diff --git a/examples/parallel_reduce/convex_hull/convex_hull.h b/examples/parallel_reduce/convex_hull/convex_hull.h
index 392ee6e..bfed09d 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull.h
+++ b/examples/parallel_reduce/convex_hull/convex_hull.h
@@ -46,7 +46,7 @@ using namespace std;
 
 namespace cfg {
     // convex hull problem parameter defaults
-    const long    NP = 5000000; // problem size
+    const long    NP  = 5000000;  // problem size
     const int     SNT = 1;        // minimal number of threads
     const int     ENT = 8;        // maximal number of threads
 
diff --git a/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp b/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
index 0150bb1..1166d06 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
+++ b/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp
@@ -26,6 +26,10 @@
     the GNU General Public License.
 */
 
+/*
+    This file contains a few implementations, so it may look overly complicated.
+    The most efficient implementation is also separated into convex_hull_sample.cpp
+*/
 #include "convex_hull.h"
 
 typedef util::point<double> point_t;
@@ -303,6 +307,9 @@ template<typename BodyType>
 void initialize(pointVec_t &points) {
     points.clear();
 
+    // In the buffered version, a temporary storage for as much as grainSize elements 
+    // is allocated inside the body. Since auto_partitioner may increase effective
+    // range size which would cause a crash, simple partitioner has to be used.
     tbb::parallel_for(range_t(0, cfg::MAXPOINTS, BodyType::grainSize),
                       BodyType(points), tbb::simple_partitioner());
 }
@@ -493,6 +500,7 @@ template <typename BodyType>
 point_t divide(const pointVec_t &P, pointVec_t &P_reduced,
               const point_t &p1, const point_t &p2) {
     BodyType body(p1, p2, P, P_reduced);
+    // Must use simple_partitioner (see the comment in initialize() above)
     tbb::parallel_reduce(range_t(0, P.size(), BodyType::grainSize),
                          body, tbb::simple_partitioner() );
 
diff --git a/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp b/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
index c0204f7..2e07129 100644
--- a/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
+++ b/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp
@@ -26,12 +26,20 @@
     the GNU General Public License.
 */
 
+/*
+    This file contains the TBB-based implementation of convex hull algortihm.
+    It corresponds to the following settings in convex_hull_bench.cpp:
+    - USETBB defined to 1
+    - USECONCVEC defined to 1
+    - INIT_ONCE defined to 0
+    - only buffered version is used
+*/
 #include "convex_hull.h"
 
 #include "tbb/task_scheduler_init.h"
-#include "tbb/blocked_range.h"
 #include "tbb/parallel_for.h"
 #include "tbb/parallel_reduce.h"
+#include "tbb/blocked_range.h"
 #include "tbb/tick_count.h"
 #include "tbb/concurrent_vector.h"
 
@@ -70,11 +78,14 @@ public:
     }
 };
 
-void initialize_buf(pointVec_t &points) {
+void initialize(pointVec_t &points) {
     points.clear();
 
-    tbb::parallel_for(range_t(0, cfg::MAXPOINTS,
-        FillRNDPointsVector_buf::grainSize), FillRNDPointsVector_buf(points));
+    // In the buffered version, a temporary storage for as much as grainSize elements 
+    // is allocated inside the body. Since auto_partitioner may increase effective
+    // range size which would cause a crash, simple partitioner has to be used.
+    tbb::parallel_for(range_t(0, cfg::MAXPOINTS, FillRNDPointsVector_buf::grainSize),
+                      FillRNDPointsVector_buf(points), tbb::simple_partitioner());
 }
 
 class FindXExtremum {
@@ -187,10 +198,12 @@ public:
     }
 };
 
-point_t divide_buf(const pointVec_t &P, pointVec_t &P_reduced, 
-                  const point_t &p1, const point_t &p2) {
+point_t divide(const pointVec_t &P, pointVec_t &P_reduced, 
+                   const point_t &p1, const point_t &p2) {
     SplitByCP_buf sbcpb(p1, p2, P, P_reduced);
-    tbb::parallel_reduce(range_t(0, P.size(), SplitByCP_buf::grainSize), sbcpb);
+    // Must use simple_partitioner (see the comment in initialize() above)
+    tbb::parallel_reduce(range_t(0, P.size(), SplitByCP_buf::grainSize),
+                         sbcpb, tbb::simple_partitioner());
 
     if(util::VERBOSE) {
         std::stringstream ss;
@@ -203,7 +216,7 @@ point_t divide_buf(const pointVec_t &P, pointVec_t &P_reduced,
     return sbcpb.farthestPoint();
 }
 
-void divide_and_conquer_buf(const pointVec_t &P, pointVec_t &H,
+void divide_and_conquer(const pointVec_t &P, pointVec_t &H,
                             point_t p1, point_t p2) {
     if (P.size()<2) {
         H.push_back(p1);
@@ -213,17 +226,17 @@ void divide_and_conquer_buf(const pointVec_t &P, pointVec_t &H,
         pointVec_t P_reduced;
         pointVec_t H1, H2;
 
-        point_t p_far = divide_buf(P, P_reduced, p1, p2);
+        point_t p_far = divide(P, P_reduced, p1, p2);
 
-        divide_and_conquer_buf(P_reduced, H1, p1, p_far);
-        divide_and_conquer_buf(P_reduced, H2, p_far, p2);
+        divide_and_conquer(P_reduced, H1, p1, p_far);
+        divide_and_conquer(P_reduced, H2, p_far, p2);
 
         appendVector(H1, H);
         appendVector(H2, H);
     }
 }
 
-void quickhull_buf(const pointVec_t &points, pointVec_t &hull) {
+void quickhull(const pointVec_t &points, pointVec_t &hull) {
     hull.clear();
 
     point_t p_maxx = extremum<FindXExtremum::maxX>(points);
@@ -231,8 +244,8 @@ void quickhull_buf(const pointVec_t &points, pointVec_t &hull) {
 
     pointVec_t H;
 
-    divide_and_conquer_buf(points, hull, p_maxx, p_minx);
-    divide_and_conquer_buf(points, H, p_minx, p_maxx);
+    divide_and_conquer(points, hull, p_maxx, p_minx);
+    divide_and_conquer(points, H, p_minx, p_maxx);
 
     appendVector(H, hull);
 }
@@ -251,9 +264,9 @@ int main(int argc, char* argv[]) {
         ++nthreads) {
         tbb::task_scheduler_init init(nthreads);
         tm_init = util::gettime();
-        initialize_buf(points);
+        initialize(points);
         tm_start = util::gettime();
-        quickhull_buf(points, hull);
+        quickhull(points, hull);
         tm_end = util::gettime();
 
         util::WriteResults(nthreads, util::time_diff(tm_init, tm_start),
diff --git a/examples/pipeline/square/gen_input.cpp b/examples/pipeline/square/gen_input.cpp
index e46706d..a167bd6 100644
--- a/examples/pipeline/square/gen_input.cpp
+++ b/examples/pipeline/square/gen_input.cpp
@@ -38,6 +38,7 @@ int main( int argc, char* argv[] ) {
         printf("%u\n",a);
         b+=a;
         a=(b-a)%10000;
+        if (a<0) a=-a;
     }
     return 0;
 }
diff --git a/examples/pipeline/square/square.cpp b/examples/pipeline/square/square.cpp
index 15fbfb0..d518d6d 100644
--- a/examples/pipeline/square/square.cpp
+++ b/examples/pipeline/square/square.cpp
@@ -246,7 +246,9 @@ int run_pipeline( int nthreads )
 
     // Run the pipeline
     tbb::tick_count t0 = tbb::tick_count::now();
-    pipeline.run( NThread );
+    // Need more than one token in flight per thread to keep all threads 
+    // busy; 2-4 works
+    pipeline.run( nthreads*4 );
     tbb::tick_count t1 = tbb::tick_count::now();
 
     // Remove filters from pipeline before they are implicitly destroyed.
@@ -283,7 +285,7 @@ int main( int argc, char* argv[] ) {
         }
         { // parallel run (number of threads is selected automatically)
             tbb::task_scheduler_init init_parallel;
-            if(!run_pipeline (0))
+            if(!run_pipeline (init_parallel.default_num_threads()))
                 return 1;
         }
     }
diff --git a/examples/pipeline/text_filter/text_filter.cpp b/examples/pipeline/text_filter/text_filter.cpp
index fac8596..bd5247b 100644
--- a/examples/pipeline/text_filter/text_filter.cpp
+++ b/examples/pipeline/text_filter/text_filter.cpp
@@ -136,7 +136,7 @@ MyOutputFilter::MyOutputFilter( FILE* output_file ) :
 
 void* MyOutputFilter::operator()( void* item ) {
     MyBuffer& b = *static_cast<MyBuffer*>(item);
-    int n = fwrite( b.begin(), 1, b.size(), my_output_file );
+    int n = (int) fwrite( b.begin(), 1, b.size(), my_output_file );
     if( n<=0 ) {
         fprintf(stderr,"Can't write into %s file\n", OutputFileName);
         exit(1);
diff --git a/include/tbb/_concurrent_queue_internal.h b/include/tbb/_concurrent_queue_internal.h
index 4b45f4c..418065d 100644
--- a/include/tbb/_concurrent_queue_internal.h
+++ b/include/tbb/_concurrent_queue_internal.h
@@ -55,9 +55,9 @@ template<typename T, typename A> class concurrent_queue;
 #endif
 
 //! For internal use only.
-//! @cond INTERNAL
 namespace strict_ppl {
 
+//! @cond INTERNAL
 namespace internal {
 
 using namespace tbb::internal;
@@ -617,7 +617,12 @@ protected:
 
 public:
     //! Default constructor
-    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {}
+    concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {
+#if __GNUC__==4&&__GNUC_MINOR__==3
+        // to get around a possible gcc 4.3 bug
+        __asm__ __volatile__("": : :"memory");
+#endif
+    }
 
     //! Copy constructor
     concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) {
@@ -763,6 +768,8 @@ bool operator!=( const concurrent_queue_iterator<C,T>& i, const concurrent_queue
 
 } // namespace internal
 
+//! @endcond
+
 } // namespace strict_ppl
 
 //! @cond INTERNAL
diff --git a/include/tbb/cache_aligned_allocator.h b/include/tbb/cache_aligned_allocator.h
index 1a7671e..449dcb1 100644
--- a/include/tbb/cache_aligned_allocator.h
+++ b/include/tbb/cache_aligned_allocator.h
@@ -36,12 +36,6 @@ namespace tbb {
 
 //! @cond INTERNAL
 namespace internal {
-    //! Compile-time constant that is upper bound on cache line/sector size.
-    /** It should be used only in situations where having a compile-time upper 
-        bound is more useful than a run-time exact answer.
-        @ingroup memory_allocation */
-    const size_t NFS_MaxLineSize = 128;
-
     //! Cache/sector line size.
     /** @ingroup memory_allocation */
     size_t __TBB_EXPORTED_FUNC NFS_GetLineSize();
diff --git a/include/tbb/compat/ppl.h b/include/tbb/compat/ppl.h
index 624168e..998bd00 100644
--- a/include/tbb/compat/ppl.h
+++ b/include/tbb/compat/ppl.h
@@ -41,6 +41,7 @@ namespace Concurrency {
     using tbb::task_group;
     using tbb::structured_task_group;
     using tbb::missing_wait;
+    using tbb::make_task;
 
     using tbb::not_complete;
     using tbb::complete;
diff --git a/include/tbb/concurrent_hash_map.h b/include/tbb/concurrent_hash_map.h
index 44e28be..ea4138f 100644
--- a/include/tbb/concurrent_hash_map.h
+++ b/include/tbb/concurrent_hash_map.h
@@ -56,9 +56,25 @@ namespace internal {
     void* __TBB_EXPORTED_FUNC itt_load_pointer_with_acquire_v3( const void* src );
     //! ITT instrumented routine that stores src into location pointed to by dst.
     void __TBB_EXPORTED_FUNC itt_store_pointer_with_release_v3( void* dst, void* src );
+    //! Routine that loads pointer from location pointed to by src without causing ITT to report a race.
+    void* __TBB_EXPORTED_FUNC itt_load_pointer_v3( const void* src );
 
     //! Type of a hash code.
     typedef size_t hashcode_t;
+    //! Node base type
+    struct hash_map_node_base : no_copy {
+        //! Mutex type
+        typedef spin_rw_mutex mutex_t;
+        //! Scoped lock type for mutex
+        typedef mutex_t::scoped_lock scoped_t;
+        //! Next node in chain
+        hash_map_node_base *next;
+        mutex_t mutex;
+    };
+    //! Incompleteness flag value
+    static hash_map_node_base *const rehash_req = reinterpret_cast<hash_map_node_base*>(size_t(3));
+    //! Rehashed empty bucket flag
+    static hash_map_node_base *const empty_rehashed = reinterpret_cast<hash_map_node_base*>(size_t(0));
     //! base class of concurrent_hash_map
     class hash_map_base {
     public:
@@ -69,19 +85,7 @@ namespace internal {
         //! Segment index type
         typedef size_t segment_index_t;
         //! Node base type
-        struct node_base : no_copy {
-            //! Mutex type
-            typedef spin_rw_mutex mutex_t;
-            //! Scoped lock type for mutex
-            typedef mutex_t::scoped_lock scoped_t;
-            //! Next node in chain
-            node_base *next;
-            mutex_t mutex;
-        };
-        //! Incompleteness flag value
-#       define __TBB_rehash_req reinterpret_cast<node_base*>(1)
-        //! Rehashed empty bucket flag
-#       define __TBB_empty_rehashed reinterpret_cast<node_base*>(0)
+        typedef hash_map_node_base node_base;
         //! Bucket type
         struct bucket : no_copy {
             //! Mutex type for buckets
@@ -140,7 +144,7 @@ namespace internal {
         
         //! @return true if @arg ptr is valid pointer
         static bool is_valid( void *ptr ) {
-            return ptr > reinterpret_cast<void*>(1);
+            return reinterpret_cast<size_t>(ptr) > size_t(63);
         }
 
         //! Initialize buckets
@@ -148,12 +152,13 @@ namespace internal {
             if( is_initial ) std::memset(ptr, 0, sz*sizeof(bucket) );
             else for(size_type i = 0; i < sz; i++, ptr++) {
                     *reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
-                    ptr->node_list = __TBB_rehash_req;
+                    ptr->node_list = rehash_req;
                 }
         }
         
         //! Add node @arg n to bucket @arg b
         static void add_to_bucket( bucket *b, node_base *n ) {
+            __TBB_ASSERT(b->node_list != rehash_req, NULL);
             n->next = b->node_list;
             b->node_list = n; // its under lock and flag is set
         }
@@ -179,6 +184,7 @@ namespace internal {
                 segment_ptr_t ptr = alloc.allocate( sz );
                 init_buckets( ptr, sz, is_initial );
 #if TBB_USE_THREADING_TOOLS
+                // TODO: actually, fence and notification are unnecessary here and below
                 itt_store_pointer_with_release_v3( my_table + k, ptr );
 #else
                 my_table[k] = ptr;// my_mask has release fence
@@ -238,7 +244,11 @@ namespace internal {
                 m_old = (m_old<<1) - 1; // get full mask from a bit
                 __TBB_ASSERT((m_old&(m_old+1))==0 && m_old <= m, NULL);
                 // check whether it is rehashing/ed
-                if( __TBB_load_with_acquire(get_bucket( h & m_old )->node_list) != __TBB_rehash_req )
+#if TBB_USE_THREADING_TOOLS
+                if( itt_load_pointer_with_acquire_v3(&( get_bucket(h & m_old)->node_list )) != rehash_req )
+#else
+                if( __TBB_load_with_acquire(get_bucket( h & m_old )->node_list) != rehash_req )
+#endif
                     return true;
             }
             return false;
@@ -252,7 +262,12 @@ namespace internal {
             if( sz >= mask ) { // TODO: add custom load_factor 
                 segment_index_t new_seg = segment_index_of( mask+1 );
                 __TBB_ASSERT( is_valid(my_table[new_seg-1]), "new allocations must not publish new mask until segment has allocated");
-                if( !my_table[new_seg] && __TBB_CompareAndSwapW(&my_table[new_seg], 1, 0) == 0 )
+#if TBB_USE_THREADING_TOOLS
+                if( !itt_load_pointer_v3(my_table+new_seg)
+#else
+                if( !my_table[new_seg]
+#endif
+                  && __TBB_CompareAndSwapW(&my_table[new_seg], 2, 0) == 0 )
                     return new_seg; // The value must be processed
             }
             return 0;
@@ -310,7 +325,7 @@ namespace internal {
             size_t k = my_index+1;
             while( my_bucket && k <= my_map->my_mask ) {
                 // Following test uses 2's-complement wizardry
-                if( k& (k-2) ) // not the begining of a segment
+                if( k& (k-2) ) // not the beginning of a segment
                     ++my_bucket;
                 else my_bucket = my_map->get_bucket( k );
                 my_node = static_cast<node*>( my_bucket->node_list );
@@ -532,6 +547,7 @@ struct tbb_hash_compare {
 
 @par Changes since TBB 2.1
     - Replaced internal algorithm and data structure. Patent is pending.
+    - Added buckets number argument for constructor
 
 @par Changes since TBB 2.0
     - Fixed exception-safety
@@ -602,7 +618,7 @@ protected:
         node *n = static_cast<node*>( b->node_list );
         while( is_valid(n) && !my_hash_compare.equal(key, n->item.first) )
             n = static_cast<node*>( n->next );
-        __TBB_ASSERT(n != __TBB_rehash_req, "Search can be executed only for rehashed bucket");
+        __TBB_ASSERT(n != internal::rehash_req, "Search can be executed only for rehashed bucket");
         return n;
     }
 
@@ -612,21 +628,22 @@ protected:
         bucket *my_b;
     public:
         bucket_accessor( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) { acquire( base, h, writer ); }
-        //! find a bucket by maksed hashcode, optionally rehash, and acquire the lock
+        //! find a bucket by masked hashcode, optionally rehash, and acquire the lock
         inline void acquire( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) {
             my_b = base->get_bucket( h );
 #if TBB_USE_THREADING_TOOLS
-            if( itt_load_pointer_with_acquire_v3(&my_b->node_list) == __TBB_rehash_req
+            // TODO: actually, notification is unnecessary here, just hiding double-check
+            if( itt_load_pointer_with_acquire_v3(&my_b->node_list) == internal::rehash_req
 #else
-            if( __TBB_load_with_acquire(my_b->node_list) == __TBB_rehash_req
+            if( __TBB_load_with_acquire(my_b->node_list) == internal::rehash_req
 #endif
                 && try_acquire( my_b->mutex, /*write=*/true ) )
             {
-                if( my_b->node_list == __TBB_rehash_req ) base->rehash_bucket( my_b, h ); //recursive rehashing
+                if( my_b->node_list == internal::rehash_req ) base->rehash_bucket( my_b, h ); //recursive rehashing
                 my_is_writer = true;
             }
             else bucket::scoped_t::acquire( my_b->mutex, /*write=*/my_is_writer = writer );
-            __TBB_ASSERT( my_b->node_list != __TBB_rehash_req, NULL);
+            __TBB_ASSERT( my_b->node_list != internal::rehash_req, NULL);
         }
         //! check whether bucket is locked for write
         bool is_writer() { return my_is_writer; }
@@ -640,7 +657,7 @@ protected:
     void rehash_bucket( bucket *b_new, const hashcode_t h ) {
         __TBB_ASSERT( *(intptr_t*)(&b_new->mutex), "b_new must be locked (for write)");
         __TBB_ASSERT( h > 1, "The lowermost buckets can't be rehashed" );
-        __TBB_store_with_release(b_new->node_list, __TBB_empty_rehashed); // mark rehashed
+        __TBB_store_with_release(b_new->node_list, internal::empty_rehashed); // mark rehashed
         hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit
 
         bucket_accessor b_old( this, h & mask );
@@ -732,6 +749,13 @@ public:
         : my_allocator(a)
     {}
 
+    //! Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
+    concurrent_hash_map(size_type n, const allocator_type &a = allocator_type())
+        : my_allocator(a)
+    {
+        reserve( n );
+    }
+
     //! Copy constructor
     concurrent_hash_map( const concurrent_hash_map& table, const allocator_type &a = allocator_type())
         : my_allocator(a)
@@ -896,24 +920,40 @@ protected:
     template<typename I>
     void internal_copy(I first, I last);
 
-    //! fast find when no concurrent erasure is used
-    const_pointer find( const Key& key ) const {
+    //! Fast find when no concurrent erasure is used. For internal use inside TBB only!
+    /** Return pointer to item with given key, or NULL if no such item exists.
+        Must not be called concurrently with erasure operations. */
+    const_pointer internal_fast_find( const Key& key ) const {
         hashcode_t h = my_hash_compare.hash( key );
+#if TBB_USE_THREADING_TOOLS
+        hashcode_t m = (hashcode_t) itt_load_pointer_with_acquire_v3( &my_mask );
+#else
         hashcode_t m = my_mask;
+#endif
+        node *n;
     restart:
         __TBB_ASSERT((m&(m+1))==0, NULL);
         bucket *b = get_bucket( h & m );
-        if( b->node_list == __TBB_rehash_req ) {
+#if TBB_USE_THREADING_TOOLS
+        // TODO: actually, notification is unnecessary here, just hiding double-check
+        if( itt_load_pointer_with_acquire_v3(&b->node_list) == internal::rehash_req )
+#else
+        if( __TBB_load_with_acquire(b->node_list) == internal::rehash_req )
+#endif
+        {
             bucket::scoped_t lock;
-            if( lock.try_acquire( b->mutex, /*write=*/true ) && b->node_list == __TBB_rehash_req )
-                const_cast<concurrent_hash_map*>(this)->rehash_bucket( b, h & m ); //recursive rehashing
-            else internal::spin_wait_while_eq( b->node_list, __TBB_rehash_req ); //TODO: rework for fast find?
+            if( lock.try_acquire( b->mutex, /*write=*/true ) ) {
+                if( b->node_list == internal::rehash_req)
+                    const_cast<concurrent_hash_map*>(this)->rehash_bucket( b, h & m ); //recursive rehashing
+            }
+            else lock.acquire( b->mutex, /*write=*/false );
+            __TBB_ASSERT(b->node_list!=internal::rehash_req,NULL);
         }
-        node *n = search_bucket( key, b );
-        if( check_mask_race( h, m ) )
-            goto restart;
+        n = search_bucket( key, b );
         if( n )
             return &n->item;
+        else if( check_mask_race( h, m ) )
+            goto restart;
         return 0;
     }
 };
@@ -947,7 +987,7 @@ bool concurrent_hash_map<Key,T,HashCompare,A>::lookup( bool op_insert, const Key
         n = search_bucket( key, b() );
         if( op_insert ) {
             // [opt] insert a key
-            if( !is_valid(n) ) {
+            if( !n ) {
                 if( !tmp_n ) {
                     if(t) tmp_n = new( my_allocator ) node(key, *t);
                     else  tmp_n = new( my_allocator ) node(key);
@@ -988,6 +1028,7 @@ bool concurrent_hash_map<Key,T,HashCompare,A>::lookup( bool op_insert, const Key
                 if( !trials.bounded_pause() ) {
                     // the wait takes really long, restart the operation
                     b.release();
+                    __TBB_ASSERT( !op_insert || !return_value, "Can't acquire new item in locked bucket?" );
                     __TBB_Yield();
                     m = my_mask;
                     goto restart;
@@ -1014,7 +1055,7 @@ std::pair<I, I> concurrent_hash_map<Key,T,HashCompare,A>::internal_equal_range(
     __TBB_ASSERT((m&(m+1))==0, NULL);
     h &= m;
     bucket *b = get_bucket( h );
-    while( b->node_list == __TBB_rehash_req ) {
+    while( b->node_list == internal::rehash_req ) {
         m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit
         b = get_bucket( h &= m );
     }
@@ -1061,8 +1102,8 @@ bool concurrent_hash_map<Key,T,HashCompare,A>::erase( const Key &key ) {
     node_base *n;
     hashcode_t const h = my_hash_compare.hash( key );
     hashcode_t m = my_mask;
+restart:
     {//lock scope
-    restart:
         // get bucket
         bucket_accessor b( this, h & m );
     search:
@@ -1113,14 +1154,14 @@ void concurrent_hash_map<Key,T,HashCompare,A>::clear() {
     for( segment_index_t b = 0; b <= m; b++ ) {
         node_base *n = get_bucket(b)->node_list;
 #if TBB_USE_PERFORMANCE_WARNINGS
-        if( n == __TBB_empty_rehashed ) empty_buckets++;
-        else if( n == __TBB_rehash_req ) buckets--;
+        if( n == internal::empty_rehashed ) empty_buckets++;
+        else if( n == internal::rehash_req ) buckets--;
         else if( n->next ) overpopulated_buckets++;
 #endif
         for(; is_valid(n); n = n->next ) {
             hashcode_t h = my_hash_compare.hash( static_cast<node*>(n)->item.first );
             h &= m;
-            __TBB_ASSERT( h == b || get_bucket(h)->node_list == __TBB_rehash_req, "Rehashing is not finished until serial stage due to concurrent or terminated operation" );
+            __TBB_ASSERT( h == b || get_bucket(h)->node_list == internal::rehash_req, "Rehashing is not finished until serial stage due to concurrent or unexpectedly terminated operation" );
         }
     }
 #if TBB_USE_PERFORMANCE_WARNINGS
@@ -1159,13 +1200,21 @@ void concurrent_hash_map<Key,T,HashCompare,A>::clear() {
 template<typename Key, typename T, typename HashCompare, typename A>
 void concurrent_hash_map<Key,T,HashCompare,A>::internal_copy( const concurrent_hash_map& source ) {
     reserve( source.my_size ); // TODO: load_factor?
-    if( my_mask == source.my_mask ) { // optimized version
-        for( const_iterator it = source.begin(), end = source.end(); it != end; ++it ) {
-            bucket *b = get_bucket( it.my_index );
-            __TBB_ASSERT( b->node_list != __TBB_rehash_req, "Invalid bucket in destination table");
-            node *n = new( my_allocator ) node(it->first, it->second);
-            add_to_bucket( b, n );
-            ++my_size; // TODO: replace by non-atomic op
+    hashcode_t mask = source.my_mask;
+    if( my_mask == mask ) { // optimized version
+        bucket *dst = 0, *src = 0;
+        for( hashcode_t k = 0; k <= mask; k++ ) {
+            if( k & (k-2) ) ++dst,src++; // not the beginning of a segment
+            else { dst = get_bucket( k ); src = source.get_bucket( k ); }
+            __TBB_ASSERT( dst->node_list != internal::rehash_req, "Invalid bucket in destination table");
+            node *n = static_cast<node*>( src->node_list );
+            if( n == internal::rehash_req ) { // source is not rehashed, items are in previous buckets
+                bucket_accessor b( this, k );
+                rehash_bucket( b(), k ); // TODO: use without synchronization
+            } else for(; n; n = static_cast<node*>( n->next ) ) {
+                add_to_bucket( dst, new( my_allocator ) node(n->item.first, n->item.second) );
+                ++my_size; // TODO: replace by non-atomic op
+            }
         }
     } else internal_copy( source.begin(), source.end() );
 }
@@ -1177,7 +1226,7 @@ void concurrent_hash_map<Key,T,HashCompare,A>::internal_copy(I first, I last) {
     for(; first != last; ++first) {
         hashcode_t h = my_hash_compare.hash( first->first );
         bucket *b = get_bucket( h & m );
-        __TBB_ASSERT( b->node_list != __TBB_rehash_req, "Invalid bucket in destination table");
+        __TBB_ASSERT( b->node_list != internal::rehash_req, "Invalid bucket in destination table");
         node *n = new( my_allocator ) node(first->first, first->second);
         add_to_bucket( b, n );
         ++my_size; // TODO: replace by non-atomic op
diff --git a/include/tbb/concurrent_vector.h b/include/tbb/concurrent_vector.h
index 46f13f9..383c044 100644
--- a/include/tbb/concurrent_vector.h
+++ b/include/tbb/concurrent_vector.h
@@ -32,7 +32,6 @@
 #include "tbb_stddef.h"
 #include <algorithm>
 #include <iterator>
-#include <limits>
 #include <new>
 #include <cstring>
 #include "atomic.h"
@@ -41,6 +40,16 @@
 
 #include "tbb_machine.h"
 
+#if _MSC_VER==1500 && !__INTEL_COMPILER
+    // VS2008/VC9 seems to have an issue; limits pull in math.h
+    #pragma warning( push )
+    #pragma warning( disable: 4985 )
+#endif
+#include <limits> /* std::numeric_limits */
+#if _MSC_VER==1500 && !__INTEL_COMPILER
+    #pragma warning( pop )
+#endif
+
 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64)
     // Workaround for overzealous compiler warnings in /Wp64 mode
     #pragma warning (push)
@@ -52,12 +61,12 @@ namespace tbb {
 template<typename T, class A = cache_aligned_allocator<T> >
 class concurrent_vector;
 
-//! Bad allocation marker
-#define __TBB_BAD_ALLOC reinterpret_cast<void*>(size_t(63))
 
 //! @cond INTERNAL
 namespace internal {
 
+    //! Bad allocation marker
+    static void *const vector_allocation_error_flag = reinterpret_cast<void*>(size_t(63));
     //! Routine that loads pointer from location pointed to by src without any fence, without causing ITT to report a race.
     void* __TBB_EXPORTED_FUNC itt_load_pointer_v3( const void* src );
 
@@ -84,7 +93,7 @@ namespace internal {
             void* array;
 #if TBB_USE_ASSERT
             ~segment_t() {
-                __TBB_ASSERT( array <= __TBB_BAD_ALLOC, "should have been freed by clear" );
+                __TBB_ASSERT( array <= internal::vector_allocation_error_flag, "should have been freed by clear" );
             }
 #endif /* TBB_USE_ASSERT */
         };
@@ -495,7 +504,13 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_copy(vector, sizeof(T), &copy_array);
+        try {
+            internal_copy(vector, sizeof(T), &copy_array);
+        } catch(...) {
+            segment_t *table = my_segment;
+            internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+            throw;
+        }
     }
 
     //! Copying constructor for vector with different allocator type
@@ -504,14 +519,26 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_copy(vector.internal_vector_base(), sizeof(T), &copy_array);
+        try {
+            internal_copy(vector.internal_vector_base(), sizeof(T), &copy_array);
+        } catch(...) {
+            segment_t *table = my_segment;
+            internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+            throw;
+        }
     }
 
     //! Construction with initial size specified by argument n
     explicit concurrent_vector(size_type n)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array );
+        try {
+            internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array );
+        } catch(...) {
+            segment_t *table = my_segment;
+            internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+            throw;
+        }
     }
 
     //! Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance
@@ -519,7 +546,13 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+        try {
+            internal_resize( n, sizeof(T), max_size(), static_cast<const void*>(&t), &destroy_array, &initialize_array_by );
+        } catch(...) {
+            segment_t *table = my_segment;
+            internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+            throw;
+        }
     }
 
     //! Construction with copying iteration range and given allocator instance
@@ -528,7 +561,13 @@ public:
         : internal::allocator_base<T, A>(a)
     {
         vector_allocator_ptr = &internal_allocator;
-        internal_assign_range(first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+        try {
+            internal_assign_range(first, last, static_cast<is_integer_tag<std::numeric_limits<I>::is_integer> *>(0) );
+        } catch(...) {
+            segment_t *table = my_segment;
+            internal_free_segments( reinterpret_cast<void**>(table), internal_clear(&destroy_array), my_first_block );
+            throw;
+        }
     }
 
     //! Assignment
@@ -868,11 +907,11 @@ void concurrent_vector<T, A>::internal_free_segments(void *table[], segment_inde
         --k;
         T* array = static_cast<T*>(table[k]);
         table[k] = NULL;
-        if( array > __TBB_BAD_ALLOC ) // check for correct segment pointer
+        if( array > internal::vector_allocation_error_flag ) // check for correct segment pointer
             this->my_allocator.deallocate( array, segment_size(k) );
     }
     T* array = static_cast<T*>(table[0]);
-    if( array > __TBB_BAD_ALLOC ) {
+    if( array > internal::vector_allocation_error_flag ) {
         __TBB_ASSERT( first_block > 0, NULL );
         while(k > 0) table[--k] = NULL;
         this->my_allocator.deallocate( array, segment_size(first_block) );
@@ -891,7 +930,7 @@ T& concurrent_vector<T, A>::internal_subscript( size_type index ) const {
 #else
     T* array = static_cast<T*>(my_segment[k].array);
 #endif /* TBB_USE_THREADING_TOOLS */
-    __TBB_ASSERT( array != __TBB_BAD_ALLOC, "the instance is broken by bad allocation. Use at() instead" );
+    __TBB_ASSERT( array != internal::vector_allocation_error_flag, "the instance is broken by bad allocation. Use at() instead" );
     __TBB_ASSERT( array, "index is being allocated" );
     return array[j];
 }
@@ -905,7 +944,7 @@ T& concurrent_vector<T, A>::internal_subscript_with_exceptions( size_type index
     if( my_segment == (segment_t*)my_storage && k >= pointers_per_short_table )
         internal_throw_exception(1); // throw std::range_error
     void *array = my_segment[k].array; // no need in __TBB_load_with_acquire
-    if( array <= __TBB_BAD_ALLOC ) // check for correct segment pointer
+    if( array <= internal::vector_allocation_error_flag ) // check for correct segment pointer
         internal_throw_exception(2); // throw std::range_error
     return static_cast<T*>(array)[j];
 }
diff --git a/include/tbb/enumerable_thread_specific.h b/include/tbb/enumerable_thread_specific.h
index 68d2f88..123a62f 100644
--- a/include/tbb/enumerable_thread_specific.h
+++ b/include/tbb/enumerable_thread_specific.h
@@ -453,7 +453,9 @@ namespace tbb {
             typedef tbb::concurrent_hash_map<Key, T, HC, A> base_type;
             typedef typename base_type::const_pointer const_pointer;
             typedef typename base_type::key_type key_type;
-            const_pointer find( const key_type &k ) { return base_type::find( k ); } // make public
+            const_pointer find( const key_type &k ) {
+                return internal_fast_find( k );
+            } // make public
         };
     
     } // namespace internal
@@ -495,7 +497,7 @@ namespace tbb {
     
         typedef typename Allocator::template rebind< padded_element<T> >::other padded_allocator_type;
         typedef tbb::concurrent_vector< padded_element<T>, padded_allocator_type > internal_collection_type;
-        typedef ptrdiff_t hash_table_index_type; // storing array indices rather than iterators to simplify
+        typedef typename internal_collection_type::size_type hash_table_index_type; // storing array indices rather than iterators to simplify
         // copying the hash table that correlates thread IDs with concurrent vector elements.
         
         typedef typename Allocator::template rebind< std::pair< typename internal::thread_hash_compare::thread_key, hash_table_index_type > >::other hash_element_allocator;
@@ -601,44 +603,59 @@ namespace tbb {
             bool exists;
             return local(exists);
         }
-    
+
         //! Returns reference to calling thread's local copy, creating one if necessary
         reference local(bool& exists)  {
             if ( pointer local_ptr = static_cast<pointer>(my_tls_manager::get_tls(my_key)) ) {
                 exists = true;
                return *local_ptr;
             }
-            // check hash table
+            hash_table_index_type local_index;
             typename internal::thread_hash_compare::thread_key my_t_key = internal::thread_hash_compare::my_thread_key(tbb::this_tbb_thread::get_id());
             {
                 typename thread_to_index_type::const_pointer my_existing_entry;
                 my_existing_entry = my_hash_tbl.find(my_t_key);
                 if(my_existing_entry) {
                     exists = true;
-                    hash_table_index_type my_index = my_existing_entry->second;
-                    reference local_ref = (my_locals[my_index].value);
-                    // This will only be needed if a change is made to the instance
-                    my_tls_manager::set_tls( my_key, static_cast<void *>(&local_ref) );
-                    return local_ref;
+                    local_index = my_existing_entry->second;
+                }
+                else {
+
+                    // see if the table entry can be found by accessor
+                    typename thread_to_index_type::accessor a;
+                    if(!my_hash_tbl.insert(a, my_t_key)) {
+                        exists = true;
+                        local_index = a->second;
+                    }
+                    else {
+                        // create new entry
+                        exists = false;
+                        if(my_finit_callback) {
+                            // convert iterator to array index
+#if TBB_DEPRECATED
+                            local_index = my_locals.push_back(my_finit_callback->apply());
+#else
+                            local_index = my_locals.push_back(my_finit_callback->apply()) - my_locals.begin();
+#endif
+                        }
+                        else {
+                            // convert iterator to array index
+#if TBB_DEPRECATED
+                            local_index = my_locals.push_back(*my_exemplar_ptr);
+#else
+                            local_index = my_locals.push_back(*my_exemplar_ptr) - my_locals.begin();
+#endif
+                        }
+                        // insert into hash table
+                        a->second = local_index;
+                    }
                 }
             }
-            // create new entry
-            exists = false;
-            hash_table_index_type local_index;
-            if(my_finit_callback) {
-                // convert iterator to array index
-                local_index = my_locals.push_back(my_finit_callback->apply()) - my_locals.begin();
-            }
-            else {
-                // convert iterator to array index
-                local_index = my_locals.push_back(*my_exemplar_ptr) - my_locals.begin();
-            }
-            // insert into hash table
+
             reference local_ref = (my_locals[local_index].value);
-            my_hash_tbl.insert( std::make_pair(my_t_key, local_index) );
             my_tls_manager::set_tls( my_key, static_cast<void *>(&local_ref) );
             return local_ref;
-        }
+        } // local
 
         //! Get the number of local copies
         size_type size() const { return my_locals.size(); }
diff --git a/include/tbb/machine/linux_intel64.h b/include/tbb/machine/linux_intel64.h
index 6f42254..55bca95 100644
--- a/include/tbb/machine/linux_intel64.h
+++ b/include/tbb/machine/linux_intel64.h
@@ -37,7 +37,9 @@
 
 #define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
 
+#ifndef __TBB_rel_acq_fence
 inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }
+#endif
 
 #define __MACHINE_DECL_ATOMICS(S,T,X) \
 static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand )  \
diff --git a/include/tbb/null_mutex.h b/include/tbb/null_mutex.h
index 0993f0b..6cf8dc8 100644
--- a/include/tbb/null_mutex.h
+++ b/include/tbb/null_mutex.h
@@ -31,11 +31,15 @@
 
 namespace tbb {
     
+//! A mutex which does nothing
+/** A null_mutex does no operation and simulates success.
+    @ingroup synchronization */
 class null_mutex {   
     //! Deny assignment and copy construction 
     null_mutex( const null_mutex& );   
     void operator=( const null_mutex& );   
 public:   
+    //! Represents acquisition of a mutex.
     class scoped_lock {   
     public:   
         scoped_lock() {}
diff --git a/include/tbb/null_rw_mutex.h b/include/tbb/null_rw_mutex.h
index d558052..6be42e1 100644
--- a/include/tbb/null_rw_mutex.h
+++ b/include/tbb/null_rw_mutex.h
@@ -31,11 +31,15 @@
 
 namespace tbb {
     
+//! A rw mutex which does nothing
+/** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation.
+    @ingroup synchronization */
 class null_rw_mutex {
     //! Deny assignment and copy construction 
     null_rw_mutex( const null_rw_mutex& );   
     void operator=( const null_rw_mutex& );   
 public:   
+    //! Represents acquisition of a mutex.
     class scoped_lock {   
     public:   
         scoped_lock() {}
diff --git a/include/tbb/parallel_for.h b/include/tbb/parallel_for.h
index 8b733e0..8d103e0 100644
--- a/include/tbb/parallel_for.h
+++ b/include/tbb/parallel_for.h
@@ -183,11 +183,11 @@ namespace internal {
     //! Calls the function with values from range [begin, end) with a step provided
 template<typename Function, typename Index>
 class parallel_for_body : internal::no_assign {
-    Function &my_func;
+    const Function &my_func;
     const Index my_begin;
     const Index my_step; 
 public:
-    parallel_for_body( Function& _func, Index& _begin, Index& _step) 
+    parallel_for_body( const Function& _func, Index& _begin, Index& _step) 
         : my_func(_func), my_begin(_begin), my_step(_step) {}
     
     void operator()( tbb::blocked_range<Index>& r ) const {
@@ -203,12 +203,12 @@ namespace strict_ppl {
 //@{
 //! Parallel iteration over a range of integers with a step provided
 template <typename Index, typename Function>
-Function parallel_for(Index first, Index last, Index step, Function f) {
+void parallel_for(Index first, Index last, Index step, const Function& f) {
     tbb::task_group_context context;
-    return parallel_for(first, last, step, f, context);
+    parallel_for(first, last, step, f, context);
 }
 template <typename Index, typename Function>
-Function parallel_for(Index first, Index last, Index step, Function f, tbb::task_group_context &context) {
+void parallel_for(Index first, Index last, Index step, const Function& f, tbb::task_group_context &context) {
     if (step <= 0 ) throw std::invalid_argument("step should be positive");
 
     if (last > first) {
@@ -218,8 +218,18 @@ Function parallel_for(Index first, Index last, Index step, Function f, tbb::task
         internal::parallel_for_body<Function, Index> body(f, first, step);
         tbb::parallel_for(range, body, tbb::auto_partitioner(), context);
     }
-    return f;
 }
+//! Parallel iteration over a range of integers with a default step value
+template <typename Index, typename Function>
+void parallel_for(Index first, Index last, const Function& f) {
+    tbb::task_group_context context;
+    parallel_for(first, last, static_cast<Index>(1), f, context);
+}
+template <typename Index, typename Function>
+void parallel_for(Index first, Index last, const Function& f, tbb::task_group_context &context) {
+    parallel_for(first, last, static_cast<Index>(1), f, context);
+}
+
 //@}
 
 } // namespace strict_ppl
diff --git a/include/tbb/parallel_for_each.h b/include/tbb/parallel_for_each.h
index 3ae8da3..fa67b6c 100644
--- a/include/tbb/parallel_for_each.h
+++ b/include/tbb/parallel_for_each.h
@@ -53,23 +53,23 @@ namespace internal {
 /** \name parallel_for_each
     **/
 //@{
-//! Calls function _Func for all items from [_First, Last) interval using user-supplied context
+//! Calls function f for all items from [first, last) interval using user-supplied context
 /** @ingroup algorithms */
-template<typename Input_iterator, typename Function>
-Function parallel_for_each(Input_iterator _First, Input_iterator _Last, Function _Func, task_group_context &context) {
-    internal::parallel_for_each_body<Function, Input_iterator> body(_Func);
+template<typename InputIterator, typename Function>
+Function parallel_for_each(InputIterator first, InputIterator last, Function f, task_group_context &context) {
+    internal::parallel_for_each_body<Function, InputIterator> body(f);
 
-    tbb::parallel_do (_First, _Last, body, context);
-    return _Func;
+    tbb::parallel_do (first, last, body, context);
+    return f;
 }
 
-//! uses default context
-template<typename Input_iterator, typename Function>
-Function parallel_for_each(Input_iterator _First, Input_iterator _Last, Function _Func) {
-    internal::parallel_for_each_body<Function, Input_iterator> body(_Func);
+//! Uses default context
+template<typename InputIterator, typename Function>
+Function parallel_for_each(InputIterator first, InputIterator last, Function f) {
+    internal::parallel_for_each_body<Function, InputIterator> body(f);
 
-    tbb::parallel_do (_First, _Last, body);
-    return _Func;
+    tbb::parallel_do (first, last, body);
+    return f;
 }
 
 //@}
diff --git a/include/tbb/parallel_reduce.h b/include/tbb/parallel_reduce.h
index 89786ac..0300173 100644
--- a/include/tbb/parallel_reduce.h
+++ b/include/tbb/parallel_reduce.h
@@ -193,6 +193,7 @@ public:
         const RealBody&  my_real_body;
         const Reduction& my_reduction;
         Value            my_value;
+        lambda_reduce_body& operator= ( const lambda_reduce_body& other );
     public:
         lambda_reduce_body( const Value& identity, const RealBody& body, const Reduction& reduction )
             : identity_element(identity)
@@ -306,7 +307,7 @@ void parallel_reduce( const Range& range, Body& body, affinity_partitioner& part
 template<typename Range, typename Value, typename RealBody, typename Reduction>
 Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) {
     internal::lambda_reduce_body<Range,Value,RealBody,Reduction> body(identity, real_body, reduction);
-    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,__TBB_DEFAULT_PARTITIONER>
+    internal::start_reduce<Range,internal::lambda_reduce_body<Range,Value,RealBody,Reduction>,const __TBB_DEFAULT_PARTITIONER>
                           ::run(range, body, __TBB_DEFAULT_PARTITIONER() );
     return body.result();
 }
diff --git a/include/tbb/pipeline.h b/include/tbb/pipeline.h
index 6684a1f..4cfb293 100644
--- a/include/tbb/pipeline.h
+++ b/include/tbb/pipeline.h
@@ -47,7 +47,7 @@ namespace internal {
 typedef unsigned long Token;
 typedef long tokendiff_t;
 class stage_task;
-class ordered_buffer;
+class input_buffer;
 class pipeline_root_task;
 class pipeline_cleaner;
 
@@ -88,7 +88,7 @@ public:
 protected:
     filter( bool is_serial_ ) : 
         next_filter_in_pipeline(not_in_pipeline()),
-        input_buffer(NULL),
+        my_input_buffer(NULL),
         my_filter_mode(static_cast<unsigned char>(is_serial_ ? serial : parallel)),
         prev_filter_in_pipeline(not_in_pipeline()),
         my_pipeline(NULL),
@@ -97,7 +97,7 @@ protected:
     
     filter( mode filter_mode ) :
         next_filter_in_pipeline(not_in_pipeline()),
-        input_buffer(NULL),
+        my_input_buffer(NULL),
         my_filter_mode(static_cast<unsigned char>(filter_mode)),
         prev_filter_in_pipeline(not_in_pipeline()),
         my_pipeline(NULL),
@@ -141,7 +141,7 @@ private:
 
     //! Buffer for incoming tokens, or NULL if not required.
     /** The buffer is required if the filter is serial or follows a thread-bound one. */
-    internal::ordered_buffer* input_buffer;
+    internal::input_buffer* my_input_buffer;
 
     friend class internal::stage_task;
     friend class internal::pipeline_root_task;
diff --git a/include/tbb/scalable_allocator.h b/include/tbb/scalable_allocator.h
index c8fd2d1..aca27a7 100644
--- a/include/tbb/scalable_allocator.h
+++ b/include/tbb/scalable_allocator.h
@@ -79,6 +79,12 @@ void * __TBB_EXPORTED_FUNC scalable_aligned_realloc (void* ptr, size_t size, siz
     @ingroup memory_allocation */
 void __TBB_EXPORTED_FUNC scalable_aligned_free (void* ptr);
 
+/** The analogue of _msize/malloc_size/malloc_usable_size.
+    Returns the usable size of a memory block previously allocated by scalable_*,
+    or 0 (zero) if ptr does not point to such a block.
+    @ingroup memory_allocation */
+size_t __TBB_EXPORTED_FUNC scalable_msize (void* ptr);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* __cplusplus */
diff --git a/include/tbb/spin_rw_mutex.h b/include/tbb/spin_rw_mutex.h
index bf81d12..229745b 100644
--- a/include/tbb/spin_rw_mutex.h
+++ b/include/tbb/spin_rw_mutex.h
@@ -92,7 +92,7 @@ public:
     public:
         //! Construct lock that has not acquired a mutex.
         /** Equivalent to zero-initialization of *this. */
-        scoped_lock() : mutex(NULL) {}
+        scoped_lock() : mutex(NULL), is_writer(false) {}
 
         //! Acquire lock on given mutex.
         /** Upon entry, *this should not be in the "have acquired a mutex" state. */
diff --git a/include/tbb/task.h b/include/tbb/task.h
index 701774c..05a6898 100644
--- a/include/tbb/task.h
+++ b/include/tbb/task.h
@@ -32,10 +32,6 @@
 #include "tbb_stddef.h"
 #include "tbb_machine.h"
 
-#if __TBB_EXCEPTIONS
-#include "cache_aligned_allocator.h"
-#endif /* __TBB_EXCEPTIONS */
-
 namespace tbb {
 
 class task;
@@ -164,7 +160,8 @@ namespace internal {
             In the "blocking style" of programming, this field is one more than the difference. */
         reference_count ref_count;
 
-        //! Scheduling depth
+        //! Obsolete. Used to be scheduling depth before TBB 2.2
+        /** Retained only for the sake of backward binary compatibility. **/
         int depth;
 
         //! A task::state_type, stored as a byte for compactness.
@@ -506,7 +503,6 @@ public:
         __TBB_ASSERT( new_parent.prefix().state!=freed, "parent already freed" );
         p.state = allocated;
         p.parent = &new_parent;
-        p.depth = new_parent.prefix().depth+1;
 #if __TBB_EXCEPTIONS
         p.context = new_parent.prefix().context;
 #endif /* __TBB_EXCEPTIONS */
@@ -520,38 +516,12 @@ public:
         prefix().state = reexecute;
     }
 
-#if __TBB_TASK_DEQUE
     // All depth-related methods are obsolete, and are retained for the sake 
     // of backward source compatibility only
     intptr_t depth() const {return 0;}
     void set_depth( intptr_t ) {}
     void add_to_depth( int ) {}
 
-#else /* !__TBB_TASK_DEQUE */
-    //! A scheduling depth.
-    /** Guaranteed to be a signed integral type. */
-    typedef internal::intptr depth_type;
-
-    //! Scheduling depth
-    depth_type depth() const {return prefix().depth;}
-
-    //! Set scheduling depth to given value.
-    /** The depth must be non-negative */
-    void set_depth( depth_type new_depth ) {
-        __TBB_ASSERT( state()!=ready, "cannot change depth of ready task" );
-        __TBB_ASSERT( new_depth>=0, "depth cannot be negative" );
-        __TBB_ASSERT( new_depth==int(new_depth), "integer overflow error");
-        prefix().depth = int(new_depth);
-    }
-
-    //! Change scheduling depth by given amount.
-    /** The resulting depth must be non-negative. */
-    void add_to_depth( int delta ) {
-        __TBB_ASSERT( state()!=ready, "cannot change depth of ready task" );
-        __TBB_ASSERT( prefix().depth>=-delta, "depth cannot be negative" );
-        prefix().depth+=delta;
-    }
-#endif /* !__TBB_TASK_DEQUE */
 
     //------------------------------------------------------------------------
     // Spawning and blocking
@@ -588,21 +558,14 @@ public:
         is important to ensure that at least one child has not completed until
         the parent is ready to run. */
     void spawn( task& child ) {
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         prefix().owner->spawn( child, child.prefix().next );
     }
 
     //! Spawn multiple tasks and clear list.
-    /** All of the tasks must be at the same depth. */
     void spawn( task_list& list );
 
     //! Similar to spawn followed by wait_for_all, but more efficient.
     void spawn_and_wait_for_all( task& child ) {
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         prefix().owner->wait_for_all( *this, &child );
     }
 
@@ -613,9 +576,6 @@ public:
     /** The thread that calls spawn_root_and_wait must be the same thread
         that allocated the task. */
     static void spawn_root_and_wait( task& root ) {
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( root.is_owned_by_current_thread(), "root not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         root.prefix().owner->spawn_root_and_wait( root, root.prefix().next );
     }
 
@@ -627,9 +587,6 @@ public:
     //! Wait for reference count to become one, and set reference count to zero.
     /** Works on tasks while waiting. */
     void wait_for_all() {
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         prefix().owner->wait_for_all( *this, NULL );
     }
 
@@ -667,7 +624,7 @@ public:
         return int(prefix().ref_count);
     }
 
-    //! True if this task is owned by the calling thread; false otherwise.
+    //! Obsolete, and only retained for the sake of backward compatibility. Always returns true.
     bool __TBB_EXPORTED_METHOD is_owned_by_current_thread() const;
 
     //------------------------------------------------------------------------
@@ -770,9 +727,6 @@ public:
 };
 
 inline void task::spawn( task_list& list ) {
-#if !__TBB_RELAXED_OWNERSHIP
-    __TBB_ASSERT( is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     if( task* t = list.first ) {
         prefix().owner->spawn( *t, *list.next_ptr );
         list.clear();
@@ -781,9 +735,6 @@ inline void task::spawn( task_list& list ) {
 
 inline void task::spawn_root_and_wait( task_list& root_list ) {
     if( task* t = root_list.first ) {
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( t->is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         t->prefix().owner->spawn_root_and_wait( *t, *root_list.next_ptr );
         root_list.clear();
     }
diff --git a/include/tbb/task_group.h b/include/tbb/task_group.h
index 74be0b8..b3e6cf2 100644
--- a/include/tbb/task_group.h
+++ b/include/tbb/task_group.h
@@ -30,6 +30,7 @@
 #define __TBB_task_group_H
 
 #include "task.h"
+#include <exception>
 
 namespace tbb {
 
@@ -81,11 +82,7 @@ protected:
     empty_task* my_root;
     task_group_context my_context;
 
-#if __TBB_RELAXED_OWNERSHIP
     task& owner () { return *my_root; }
-#else
-    task& owner () { return task::self(); }
-#endif
 
     template<typename F>
     task_group_status internal_run_and_wait( F& f ) {
@@ -156,7 +153,14 @@ public:
         throw;
     }
 
+#if __SUNPRO_CC
+    template<typename F>
+    void run( task_handle<F>& h ) {
+        internal_run< task_handle<F>, internal::task_handle_task<F> >( h );
+    }
+#else
     using task_group_base::run;
+#endif
 
     template<typename F>
     void run( const F& f ) {
@@ -169,10 +173,9 @@ public:
     }
 
     template<typename F>
-    task_group_status run_and_wait( F& f ) {
-        return internal_run_and_wait<F>( f );
+    task_group_status run_and_wait( task_handle<F>& h ) {
+      return internal_run_and_wait< task_handle<F> >( h );
     }
-
 }; // class task_group
 
 class missing_wait : public std::exception {
@@ -215,6 +218,11 @@ bool is_current_task_group_canceling() {
     return task::self().is_cancelled();
 }
 
+template<class F>
+task_handle<F> make_task( const F& f ) {
+    return task_handle<F>( f );
+}
+
 } // namespace tbb
 
 #endif /* __TBB_task_group_H */
diff --git a/include/tbb/tbb_config.h b/include/tbb/tbb_config.h
index 27d20d3..fad5bf2 100644
--- a/include/tbb/tbb_config.h
+++ b/include/tbb/tbb_config.h
@@ -83,24 +83,6 @@
 #define __TBB_SCHEDULER_OBSERVER 1
 #endif /* __TBB_SCHEDULER_OBSERVER */
 
-#ifndef __TBB_TASK_SCHEDULER_AUTO_INIT
-#define __TBB_TASK_SCHEDULER_AUTO_INIT 1
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
-
-#ifndef __TBB_TASK_DEQUE
-#define __TBB_TASK_DEQUE 1
-#endif /* !__TBB_TASK_DEQUE */
-
-#if __TBB_TASK_DEQUE
-#ifndef __TBB_RELAXED_OWNERSHIP
-#define __TBB_RELAXED_OWNERSHIP 1
-#endif /* !__TBB_RELAXED_OWNERSHIP */
-#else
-#ifdef __TBB_RELAXED_OWNERSHIP
-#undef __TBB_RELAXED_OWNERSHIP
-#endif /* __TBB_RELAXED_OWNERSHIP */
-#endif /* !__TBB_TASK_DEQUE */
-
 #ifndef __TBB_NEW_ITT_NOTIFY
 #define __TBB_NEW_ITT_NOTIFY 1
 #endif /* !__TBB_NEW_ITT_NOTIFY */
@@ -108,7 +90,7 @@
 
 /* TODO: The following condition should be extended as soon as new compilers/runtimes 
          with std::exception_ptr support appear. */
-#define __TBB_EXCEPTION_PTR_PRESENT  ( _MSC_VER >= 1600 )
+#define __TBB_EXCEPTION_PTR_PRESENT  (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && (__GNUC__==4 && __GNUC_MINOR__>=4))
 
 
 #ifndef TBB_USE_CAPTURED_EXCEPTION
@@ -136,6 +118,10 @@
 
 /** Workarounds presence **/
 
+#if __GNUC__==4 && __GNUC_MINOR__==4 && !defined(__INTEL_COMPILER)
+    #define __TBB_GCC_WARNING_SUPPRESSION_ENABLED 1
+#endif
+
 /** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by
     the bugs in compilers, standard or OS specific libraries. They should be 
     removed as soon as the corresponding bugs are fixed or the buggy OS/compiler
@@ -153,6 +139,11 @@
     #define __TBB_EXCEPTION_HANDLING_BROKEN 1
 #endif
 
+#if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
+    /** That's a bug in Intel compiler 11.1.044/IA-32/Windows, that leads to a worker thread crash on the thread's startup. **/
+    #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
+#endif
+
 #if __FreeBSD__
     /** The bug in FreeBSD 8.0 results in kernel panic when there is contention 
         on a mutex created with this attribute. **/
@@ -163,5 +154,8 @@
     #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
 #endif /* __FreeBSD__ */
 
+#if __LRB__
+#include "tbb_config_lrb.h"
+#endif
 
 #endif /* __TBB_tbb_config_H */
diff --git a/include/tbb/tbb_exception.h b/include/tbb/tbb_exception.h
index c4a587a..621129e 100644
--- a/include/tbb/tbb_exception.h
+++ b/include/tbb/tbb_exception.h
@@ -80,7 +80,13 @@ namespace tbb {
     
     TBB provides two implementations of this interface: tbb::captured_exception and 
     template class tbb::movable_exception. See their declarations for more info. **/
-class tbb_exception : public std::exception {
+class tbb_exception : public std::exception
+{
+    /** No operator new is provided because the TBB usage model assumes dynamic 
+        creation of the TBB exception objects only by means of applying move()
+        operation on an exception thrown out of TBB scheduler. **/
+    void* operator new ( size_t );
+
 public:
     //! Creates and returns pointer to the deep copy of this exception object. 
     /** Move semantics is allowed. **/
@@ -103,6 +109,16 @@ public:
 
     //! Returns the result of originally intercepted exception's what() method.
     virtual const char* what() const throw() = 0;
+
+    /** Operator delete is provided only to allow using existing smart pointers
+        with TBB exception objects obtained as the result of applying move()
+        operation on an exception thrown out of TBB scheduler. 
+        
+        When overriding method move() make sure to override operator delete as well
+        if memory is allocated not by TBB's scalable allocator. **/
+    void operator delete ( void* p ) {
+        internal::deallocate_via_handler_v3(p);
+    }
 };
 
 //! This class is used by TBB to propagate information about unhandled exceptions into the root thread.
@@ -114,7 +130,7 @@ class captured_exception : public tbb_exception
 {
 public:
     captured_exception ( const captured_exception& src )
-        : my_dynamic(false)
+        : tbb_exception(src), my_dynamic(false)
     {
         set(src.my_exception_name, src.my_exception_info);
     }
@@ -138,10 +154,10 @@ public:
     }
 
     /*override*/ 
-    captured_exception* move () throw();
+    captured_exception* __TBB_EXPORTED_METHOD move () throw();
 
     /*override*/ 
-    void destroy () throw();
+    void __TBB_EXPORTED_METHOD destroy () throw();
 
     /*override*/ 
     void throw_self () { throw *this; }
@@ -152,16 +168,16 @@ public:
     /*override*/ 
     const char* __TBB_EXPORTED_METHOD what() const throw();
 
+    void __TBB_EXPORTED_METHOD set ( const char* name, const char* info ) throw();
+    void __TBB_EXPORTED_METHOD clear () throw();
+
 private:
     //! Used only by method clone().  
     captured_exception() {}
 
-    //! Functionally equivalent to {captured_exception e(name,info); return c.clone();}
+    //! Functionally equivalent to {captured_exception e(name,info); return e.clone();}
     static captured_exception* allocate ( const char* name, const char* info );
 
-    void set ( const char* name, const char* info ) throw();
-    void clear () throw();
-
     bool my_dynamic;
     const char* my_exception_name;
     const char* my_exception_info;
@@ -185,7 +201,8 @@ public:
     {}
 
     movable_exception ( const movable_exception& src ) throw () 
-        : my_exception_data(src.my_exception_data)
+        : tbb_exception(src)
+        , my_exception_data(src.my_exception_data)
         , my_dynamic(false)
         , my_exception_name(src.my_exception_name)
     {}
@@ -212,7 +229,7 @@ public:
     movable_exception* move () throw() {
         void* e = internal::allocate_via_handler_v3(sizeof(movable_exception));
         if ( e ) {
-            new (e) movable_exception(*this);
+            ::new (e) movable_exception(*this);
             ((movable_exception*)e)->my_dynamic = true;
         }
         return (movable_exception*)e;
@@ -254,8 +271,9 @@ class tbb_exception_ptr {
 
 public:
     static tbb_exception_ptr* allocate ();
-    static tbb_exception_ptr* allocate ( const tbb_exception& );
-    static tbb_exception_ptr* allocate ( const captured_exception& );
+    static tbb_exception_ptr* allocate ( const tbb_exception& tag );
+    //! This overload uses move semantics (i.e. it empties src)
+    static tbb_exception_ptr* allocate ( captured_exception& src );
     
     //! Destroys this objects
     /** Note that objects of this type can be created only by the allocate() method. **/
diff --git a/include/tbb/tbb_stddef.h b/include/tbb/tbb_stddef.h
index d10826f..a1e24df 100644
--- a/include/tbb/tbb_stddef.h
+++ b/include/tbb/tbb_stddef.h
@@ -34,7 +34,7 @@
 #define TBB_VERSION_MINOR 2
 
 // Engineering-focused interface version
-#define TBB_INTERFACE_VERSION 4000
+#define TBB_INTERFACE_VERSION 4001
 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
 
 // The oldest major interface version still supported
@@ -229,6 +229,12 @@ typedef size_t uintptr;
     but it happens to be for all platforms of interest. */
 typedef std::ptrdiff_t intptr;
 
+//! Compile-time constant that is upper bound on cache line/sector size.
+/** It should be used only in situations where having a compile-time upper 
+    bound is more useful than a run-time exact answer.
+    @ingroup memory_allocation */
+const size_t NFS_MaxLineSize = 128;
+
 //! Report a runtime warning.
 void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... );
 
diff --git a/src/Makefile b/src/Makefile
index ac5a66a..c4ff8da 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -39,6 +39,9 @@ rml: rml_release rml_debug
 
 test: tbbmalloc_test_release test_release tbbmalloc_test_debug test_debug
 
+# Suffix _ni stands for "no ingnore", meaning that the first error during the test session will stop it
+test_ni: tbbmalloc_test_release_ni test_release_ni tbbmalloc_test_debug_ni test_debug_ni
+
 test_no_depends: tbbmalloc_test_release_no_depends test_release_no_depends tbbmalloc_test_debug_no_depends test_debug_no_depends
 	@echo done
 
@@ -77,7 +80,7 @@ debug_%:: cfg?=debug
 debug_%:: run_cmd=$(debugger)
 test_% stress_% time_%:: cfg?=release
 debug_% test_% stress_% time_%::
-	$(MAKE) -C "$(work_dir)_$(cfg)"  -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) run_cmd=$(run_cmd) tbb_root=$(tbb_root) $@
+	$(MAKE) -C "$(work_dir)_$(cfg)"  -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) run_cmd="$(run_cmd)" tbb_root=$(tbb_root) $@
 
 clean_%::
 ifeq ($(cfg),)
@@ -96,12 +99,6 @@ tbb_release: mkdir_release
 tbb_debug: mkdir_debug
 	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root)
 
-rml_release: mkdir_release
-	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.rml cfg=release tbb_root=$(tbb_root) rml
-
-rml_debug: mkdir_debug
-	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root) rml
-
 test_release: $(call cross_cfg,mkdir_release) $(call cross_cfg,tbb_release) test_release_no_depends
 test_release_no_depends: 
 	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_release)"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) 
@@ -110,14 +107,15 @@ test_debug: $(call cross_cfg,mkdir_debug) $(call cross_cfg,tbb_debug) test_debug
 test_debug_no_depends:
 	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)
 
-test_release_no_ignore: 
+test_release_ni: 
 	$(MAKE) -C "$(call cross_cfg,$(work_dir)_release)"  -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) 
 
-test_debug_no_ignore:
+test_debug_ni:
 	$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)
 
-.PHONY: tbbmalloc_release tbbmalloc_debug tbbmalloc_test_release tbbmalloc_test_debug
-.PHONY: tbbmalloc_test_release_no_depends tbbmalloc_test_debug_no_depends
+.PHONY: tbbmalloc_release tbbmalloc_debug
+.PHONY: tbbmalloc_dll_release tbbmalloc_dll_debug tbbmalloc_proxy_dll_release tbbmalloc_proxy_dll_debug
+.PHONY: tbbmalloc_test_release tbbmalloc_test_debug tbbmalloc_test_release_no_depends tbbmalloc_test_debug_no_depends
 
 tbbmalloc_release: mkdir_release
 	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root)
@@ -145,6 +143,29 @@ tbbmalloc_test_debug: $(call cross_cfg,mkdir_debug) $(call cross_cfg,tbbmalloc_d
 tbbmalloc_test_debug_no_depends:
 	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)
 
+tbbmalloc_test_release_ni: $(call cross_cfg,mkdir_release) $(call cross_cfg,tbbmalloc_release) tbbmalloc_test_release_no_depends
+	$(MAKE) -C "$(call cross_cfg,$(work_dir)_release)"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)
+
+tbbmalloc_test_debug_ni: $(call cross_cfg,mkdir_debug) $(call cross_cfg,tbbmalloc_debug) tbbmalloc_test_debug_no_depends
+	$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)
+
+.PHONY: rml_release rml_debug rml_test_release rml_test_debug
+.PHONY: rml_test_release_no_depends rml_test_debug_no_depends
+
+rml_release: mkdir_release
+	$(MAKE) -C "$(work_dir)_release"  -r -f $(tbb_root)/build/Makefile.rml cfg=release tbb_root=$(tbb_root) rml
+
+rml_debug: mkdir_debug
+	$(MAKE) -C "$(work_dir)_debug"  -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root) rml
+
+rml_test_release: $(call cross_cfg,mkdir_release) $(call cross_cfg,rml_release) rml_test_release_no_depends
+rml_test_release_no_depends:
+	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_release)"  -r -f $(tbb_root)/build/Makefile.rml cfg=release rml_test tbb_root=$(tbb_root)
+
+rml_test_debug: $(call cross_cfg,mkdir_debug) $(call cross_cfg,rml_debug) rml_test_debug_no_depends
+rml_test_debug_no_depends:
+	-$(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)"  -r -f $(tbb_root)/build/Makefile.rml cfg=debug rml_test tbb_root=$(tbb_root)
+
 .PHONY: examples_release examples_debug
 
 examples_release: tbb_release tbbmalloc_release
@@ -176,13 +197,19 @@ mkdir_debug:
 	$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
 	$(if $(subst undefined,,$(origin_build_dir)),,cd "$(work_dir)_debug" && $(MAKE_TBBVARS) $(tbb_build_prefix)_debug)
 
+codecov: compiler=$(if $(findstring windows,$(tbb_os)),icl,icc)
 codecov:
-	$(MAKE) tbb_root=.. compiler=$(if $(findstring windows,$(tbb_os)),icl,icc) codecov=yes do_codecov
+	$(MAKE) tbb_root=.. codecov=yes do_codecov
 
 do_codecov:
-	$(MAKE) tbbmalloc_test_release test_release
+	$(MAKE) RML=yes tbbmalloc_test_release test_release
+	$(MAKE) clean_test_* cfg=release
+	$(MAKE) RML=yes crosstest=yes tbbmalloc_test_debug test_debug
+	$(MAKE) clean_test_* cfg=release
+	$(MAKE) rml_test_release
 	$(MAKE) clean_test_* cfg=release
-	$(MAKE) crosstest=yes tbbmalloc_test_debug test_debug
+	$(MAKE) crosstest=yes rml_test_debug
+	$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test tbb_root=$(tbb_root) cfg=release codecov=yes codecov_gen
 
 info:
 	@echo OS: $(tbb_os)
diff --git a/src/perf/fibonacci_cutoff.cpp b/src/perf/fibonacci_cutoff.cpp
index cb63d77..2f2f710 100644
--- a/src/perf/fibonacci_cutoff.cpp
+++ b/src/perf/fibonacci_cutoff.cpp
@@ -40,7 +40,7 @@ long SerialFib( const long n );
 long ParallelFib( const long n ); 
 
 inline void dump_title() {
-    printf("Serial/Parallel, P, N, cutoff, repititions, time, fib, speedup\n");
+    printf("Serial/Parallel, P, N, cutoff, repetitions, time, fib, speedup\n");
 }
 
 inline void output(int P, long n, long c, int T, double serial_elapsed, double elapsed, long result) {
@@ -106,7 +106,7 @@ void find_cutoff(const int P, const long n, const int T, const double serial_ela
 
 int main(int argc, char *argv[]) {
     if (argc < 4) {
-        printf("Usage: %s threads n repititions\n",argv[0]); 
+        printf("Usage: %s threads n repetitions\n",argv[0]); 
         return 1;
     }
 
diff --git a/src/perf/time_framework.h b/src/perf/time_framework.h
index 6a149b6..d301c2b 100644
--- a/src/perf/time_framework.h
+++ b/src/perf/time_framework.h
@@ -101,6 +101,9 @@ public:
         return Format("test %d", testn);
     }
 
+    //! optionally override to init test mode just before execution for a given thread number.
+    virtual void test_prefix(int testn, int threadn) { }
+
     //! Override to provide main test's entry function returns a value to record
     virtual value_t test(int testn, int threadn) = 0;
 
@@ -124,7 +127,7 @@ public:
     tester() : TesterBase(<user-specified tests count>) { ... }
 
     //! run a test with sequental number @arg test_number for @arg thread.
-	/ *override* / value_t test(int test_number, int thread);
+    / *override* / value_t test(int test_number, int thread);
 };
 
 ******/
@@ -148,6 +151,16 @@ class NanosecPerValue : public Tester {
     }
 };
 
+template<typename Tester, int scale = 1>
+class ValuePerSecond : public Tester {
+    /*override*/ value_t test(int testn, int threadn) {
+        Timer timer;
+        Tester::test(testn, threadn);
+        // return time value per seconds/scale
+        return double(Tester::value)/(timer.get_time()*scale);
+    }
+};
+
 // operate with single tester
 class TestRunner {
     friend class TestProcessor;
@@ -182,6 +195,7 @@ public:
 
     void run_test(int threadn) {
         for(int testn = 0; testn < tester.tests_count; testn++) {
+            tester.test_prefix(testn, threadn);
             tester.barrier->wait();                                 // <<<<<<<<<<<<<<<<< Barrier before running test mode
             value_t result = tester.test(testn, threadn);
             stat->AddRoundResult(keys[testn][threadn], result);
diff --git a/src/perf/time_hash_map_fill.cpp b/src/perf/time_hash_map_fill.cpp
new file mode 100644
index 0000000..1b96447
--- /dev/null
+++ b/src/perf/time_hash_map_fill.cpp
@@ -0,0 +1,155 @@
+/*
+    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks.
+
+    Threading Building Blocks is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public License
+    version 2 as published by the Free Software Foundation.
+
+    Threading Building Blocks is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Threading Building Blocks; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    As a special exception, you may use this file as part of a free software
+    library without restriction.  Specifically, if other files instantiate
+    templates or use macros or inline functions from this file, or you compile
+    this file and link it with other files to produce an executable, this
+    file does not by itself cause the resulting executable to be covered by
+    the GNU General Public License.  This exception does not however
+    invalidate any other reasons why the executable file might be covered by
+    the GNU General Public License.
+*/
+
+// configuration:
+
+// Size of input array
+const int INPUT_SIZE = 2000000;
+// Specify list of unique percents to test against. Max - 10
+#define SOURCE_ARRAY UNIQUE_PERCENT(5); UNIQUE_PERCENT(10); UNIQUE_PERCENT(20); UNIQUE_PERCENT(40)
+
+// enable/disable tests for:
+#define BOX1 "TBB"
+#define BOX1TEST ValuePerSecond<Uniques<tbb::concurrent_hash_map<int,int> >, 1000000/*ns*/>
+#define BOX1HEADER "tbb/concurrent_hash_map.h"
+
+// enable/disable tests for:
+#define BOX2 "OLD"
+#define BOX2TEST ValuePerSecond<Uniques<tbb::concurrent_hash_map<int,int> >, 1000000/*ns*/>
+#define BOX2HEADER "tbb/concurrent_hash_map-5468.h"
+
+#define TBB_USE_THREADING_TOOLS 0
+//////////////////////////////////////////////////////////////////////////////////
+
+#include <cstdlib>
+#include <math.h>
+#include "tbb/tbb_stddef.h"
+#include <vector>
+#include <map>
+// needed by hash_maps
+#include <stdexcept>
+#include <iterator>
+#include <algorithm>                 // std::swap
+#include <utility>      // Need std::pair
+#include <cstring>      // Need std::memset
+#include <typeinfo>
+#include "tbb/cache_aligned_allocator.h"
+#include "tbb/tbb_allocator.h"
+#include "tbb/spin_rw_mutex.h"
+#include "tbb/aligned_space.h"
+#include "tbb/atomic.h"
+// for test
+#include "tbb/spin_mutex.h"
+#include "time_framework.h"
+
+
+using namespace tbb;
+using namespace tbb::internal;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Input data built for SOURCE_ARRAY settings
+int Mixtures = 0;
+int Percents[10];
+int *Data[10];
+
+// Main test class used to run the timing tests. All overridden methods are called by the framework
+template<typename TableType>
+struct Uniques : TesterBase {
+    typedef typename TableType::accessor accessor;
+    typedef typename TableType::const_accessor const_accessor;
+    TableType *Table;
+    int n_items;
+
+    // Returns name of test mode specified by number
+    /*override*/ std::string get_name(int testn) {
+        return Format("%d%% uniques", Percents[testn]);
+    }
+
+    // Initializes base class with number of test modes
+    Uniques() : TesterBase(Mixtures), Table(0) {}
+    ~Uniques() { if(Table) delete Table; }
+    
+    // Informs the class that value and threads number become known
+    /*override*/ void init() {
+        n_items = value/threads_count;
+    }
+
+    // Informs the class that the test mode for specified thread is about to start
+    /*override*/ void test_prefix(int testn, int t) {
+        barrier->wait();
+        if( t ) return;
+        if(Table) delete Table;
+        Table = new TableType(MaxThread*4);
+    }
+
+    // Executes test mode for a given thread. Return value is ignored when used with timing wrappers.
+    /*override*/ double test(int testn, int t)
+    {
+        for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) {
+            Table->insert( std::make_pair(Data[testn][i],t) );
+        }
+        return 0;
+    }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+// Using BOX declarations from configuration
+#include "time_sandbox.h"
+
+// Prepares the input data for given unique percent
+inline void UNIQUE_PERCENT(int p) {
+    Percents[Mixtures] = p;
+    Data[Mixtures] = new int[INPUT_SIZE];
+    int uniques = INPUT_SIZE/100*p;
+    srand(10101);
+    for(int i = 0; i < INPUT_SIZE; i++)
+        Data[Mixtures][i] = rand()%uniques;
+    Mixtures++;
+}
+
+int main(int argc, char* argv[]) {
+    if(argc>1) Verbose = true;
+    //if(argc>2) ExtraVerbose = true;
+    MinThread = 1; MaxThread = task_scheduler_init::default_num_threads();
+    ParseCommandLine( argc, argv );
+
+    ASSERT(tbb_allocator<int>::allocator_type() == tbb_allocator<int>::scalable, "expecting scalable allocator library to be loaded. Please build it by:\n\t\tmake tbbmalloc");
+    SOURCE_ARRAY; // prepare source array
+
+    {
+        // Declares test processor
+        TEST_PROCESSOR_NAME the_test("time_hash_map_fill"/*, StatisticsCollector::ByThreads*/);
+        for( int t=MinThread; t <= MaxThread; t++)
+            the_test.factory(INPUT_SIZE, t); // executes the tests specified in BOX-es for given 'value' and threads
+        the_test.report.SetTitle("Operations per nanosecond", INPUT_SIZE);
+        the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); // Write files
+    }
+    return 0;
+}
+
diff --git a/src/rml/client/omp_dynamic_link.h b/src/rml/client/library_assert.h
similarity index 83%
copy from src/rml/client/omp_dynamic_link.h
copy to src/rml/client/library_assert.h
index 327a1fb..6d8300b 100644
--- a/src/rml/client/omp_dynamic_link.h
+++ b/src/rml/client/library_assert.h
@@ -26,12 +26,16 @@
     the GNU General Public License.
 */
 
-#ifndef __KMP_omp_dynamic_link_H
-#define __KMP_omp_dynamic_link_H
-
-#define OPEN_INTERNAL_NAMESPACE namespace __kmp {
-#define CLOSE_INTERNAL_NAMESPACE }
-
-#include "tbb/dynamic_link.h" // Refers to src/tbb, not include/tbb 
-
-#endif /* __KMP_dynamic_link_H */
+#ifndef LIBRARY_ASSERT_H
+#define LIBRARY_ASSERT_H
+
+#ifndef  LIBRARY_ASSERT
+#ifdef KMP_ASSERT2
+#define LIBRARY_ASSERT(x,y) KMP_ASSERT2((x),(y))
+#else
+#include <assert.h>
+#define LIBRARY_ASSERT(x,y) assert(x)
+#endif
+#endif /* LIBRARY_ASSERT */
+
+#endif /* LIBRARY_ASSERT_H */
diff --git a/src/rml/client/omp_dynamic_link.cpp b/src/rml/client/omp_dynamic_link.cpp
index b6e327a..0f89a3c 100644
--- a/src/rml/client/omp_dynamic_link.cpp
+++ b/src/rml/client/omp_dynamic_link.cpp
@@ -27,6 +27,6 @@
 */
 
 #include "omp_dynamic_link.h"
-#define LIBRARY_ASSERT(x,y) /*((void)0)*/ /* FIXME - replace with whatever OpenMP uses for internal assertions */
+#include "library_assert.h"
 #include "tbb/dynamic_link.cpp" // Refers to src/tbb, not include/tbb
 
diff --git a/src/rml/client/omp_dynamic_link.h b/src/rml/client/omp_dynamic_link.h
index 327a1fb..290b668 100644
--- a/src/rml/client/omp_dynamic_link.h
+++ b/src/rml/client/omp_dynamic_link.h
@@ -34,4 +34,4 @@
 
 #include "tbb/dynamic_link.h" // Refers to src/tbb, not include/tbb 
 
-#endif /* __KMP_dynamic_link_H */
+#endif /* __KMP_omp_dynamic_link_H */
diff --git a/src/rml/client/rml_factory.h b/src/rml/client/rml_factory.h
index ba3681f..2f584b9 100644
--- a/src/rml/client/rml_factory.h
+++ b/src/rml/client/rml_factory.h
@@ -49,11 +49,13 @@
 #error Unknown OS
 #endif
 
+#include "library_assert.h"
+
 const ::rml::versioned_object::version_type CLIENT_VERSION = 1;
 
 ::rml::factory::status_type FACTORY::open() {
     // Failure of following assertion indicates that factory is already open, or not zero-inited.
-    assert( !library_handle );
+    LIBRARY_ASSERT( !library_handle, NULL );
     status_type (*open_factory_routine)( factory&, version_type&, version_type );
     dynamic_link_descriptor server_link_table[4] = {
         DLD(__RML_open_factory,open_factory_routine),
@@ -87,12 +89,12 @@ void FACTORY::close() {
 
 ::rml::factory::status_type FACTORY::make_server( SERVER*& s, CLIENT& c) {
     // Failure of following assertion means that factory was not successfully opened.
-    assert( my_make_server_routine );
+    LIBRARY_ASSERT( my_make_server_routine, NULL );
     return (*my_make_server_routine)(*this,s,c);
 }
 
 void FACTORY::call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const {
     // Failure of following assertion means that factory was not successfully opened.
-    assert( my_call_with_server_info_routine );
+    LIBRARY_ASSERT( my_call_with_server_info_routine, NULL );
     (*my_call_with_server_info_routine)( cb, arg );
 }
diff --git a/src/rml/include/rml_base.h b/src/rml/include/rml_base.h
index 1b78abe..148edb2 100644
--- a/src/rml/include/rml_base.h
+++ b/src/rml/include/rml_base.h
@@ -92,7 +92,7 @@ public:
     virtual size_type max_job_count() const RML_PURE(size_type)
 
     //! Minimum stack size for each job.  0 means to use default stack size. [idempotent]
-    virtual size_t min_stack_size() const RML_PURE(size_t)
+    virtual std::size_t min_stack_size() const RML_PURE(std::size_t)
 
     //! Server calls this routine when it needs client to create a job object.
     /** Value of index is guaranteed to be unique for each job and in the half-open 
diff --git a/src/rml/include/rml_omp.h b/src/rml/include/rml_omp.h
index 302e76e..d664908 100644
--- a/src/rml/include/rml_omp.h
+++ b/src/rml/include/rml_omp.h
@@ -57,14 +57,14 @@ public:
         - Negative result indicates that no coins were taken, and that the bank has deficit 
           by that amount and the caller (if being a good citizen) should return that many coins.
      */
-    virtual int try_increase_load( size_type n, bool strict ) RML_PURE(size_type)
+    virtual int try_increase_load( size_type /*n*/, bool /*strict*/ ) RML_PURE(size_type)
 
     //! Return n coins into the bank.
-    virtual void decrease_load( size_type n ) RML_PURE(void);
+    virtual void decrease_load( size_type /*n*/ ) RML_PURE(void);
 
     //! Convert n coins into n threads.
     /** When a thread returns, it is converted back into a coin and the coin is returned to the bank. */
-    virtual void get_threads( size_type m, void* cookie, job* array[] ) RML_PURE(void);
+    virtual void get_threads( size_type /*m*/, void* /*cookie*/, job* /*array*/[] ) RML_PURE(void);
 
     /** Putting a thread to sleep - convert a thread into a coin
         Waking up a thread        - convert a coin into a thread
diff --git a/src/rml/include/rml_tbb.h b/src/rml/include/rml_tbb.h
index 578e778..3c0d8a9 100644
--- a/src/rml/include/rml_tbb.h
+++ b/src/rml/include/rml_tbb.h
@@ -81,7 +81,7 @@ public:
 
     //! Factory method to be called by client to create a server object.
     /** Factory must be open. 
-        Returns st_success or st_incompatible . */
+        Returns st_success, st_connection_exists, or st_incompatible . */
     status_type make_server( server_type*&, client_type& );
 
     //! Close factory
diff --git a/src/rml/server/hunk.h b/src/rml/server/hunk.h
deleted file mode 100644
index ca86290..0000000
--- a/src/rml/server/hunk.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
-
-    This file is part of Threading Building Blocks.
-
-    Threading Building Blocks is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    Threading Building Blocks is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Threading Building Blocks; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.
-*/
-
-#ifndef __RML_hunk_H
-#define __RML_hunk_H
-
-#include "tbb/cache_aligned_allocator.h"
-
-namespace rml {
-
-namespace internal {
-
-//! Bare-bones container for sequence 
-/* The sequence avoids false sharing of its elements with objects that are not in the sequence.
-   The container works even for element types that are not assignable or copyable (unlike std::vctor<T>). */
-template<typename T>
-class hunk {
-    //! Pointer to beginning of storage
-    T* my_array;
-    //! Pointer to end of storage
-    T* my_end;
-    typedef tbb::cache_aligned_allocator<T> allocator_type;
-public:
-    //! Iterator for iterating over the sequence
-    typedef T* iterator;
-
-    //! Construct hunk with no sequence
-    hunk() : my_array(NULL), my_end(NULL) {}
-
-    //! Allocate a sequence
-    void allocate( size_t n );
-
-    //! Deallocate a sequence
-    /** Assertion failure if sequence was not allocated. */
-    void clear();
-
-    //! True if sequence as been allocated
-    bool is_allocated() const {return my_array!=NULL;}
-
-    //! Beginning of sequence
-    iterator begin() {return my_array;}
-
-    //! Beginning of sequence
-    iterator end() {return my_end;}
-
-    //! Return kth element
-    T& operator[]( size_t k ) {
-        __TBB_ASSERT( k<size(), NULL );
-        return my_array[k];
-    }
-
-    //! Number of element in the sequence
-    size_t size() const {return my_end-my_array;}
-
-    ~hunk() {
-        if( is_allocated() )
-            clear();
-    }
-};
-
-template<typename T>
-void hunk<T>::allocate( size_t n ) { 
-    my_array = allocator_type().allocate(n);
-    my_end = my_array;
-    try {
-        T* limit = my_array+n;
-        for( ; my_end!=limit; ++my_end ) 
-            new(my_end) T;
-    } catch(...) {
-        clear();
-        throw;
-    }
-}
-
-template<typename T>
-void hunk<T>::clear() {
-    __TBB_ASSERT( is_allocated(), NULL );
-    size_t n = size();
-    while( my_end!=my_array ) 
-        (--my_end)->T::~T();
-    allocator_type().deallocate(my_array,n);
-    my_array = NULL;
-    my_end = NULL;
-}
-
-} // namespace internal
-} // namespace rml
-
-#endif /* __RML_hunk_H */
diff --git a/src/rml/server/job_automaton.h b/src/rml/server/job_automaton.h
index bb4223d..7e3c4f3 100644
--- a/src/rml/server/job_automaton.h
+++ b/src/rml/server/job_automaton.h
@@ -32,6 +32,12 @@
 #include "rml_base.h"
 #include "tbb/atomic.h"
 
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+    // Workaround for overzealous compiler warnings 
+    #pragma warning (push)
+    #pragma warning (disable: 4244)
+#endif
+
 namespace rml {
 
 namespace internal {
@@ -74,7 +80,7 @@ public:
             return false;
         } else {
             __TBB_ASSERT( (snapshot&1)==0, "already marked that way" );
-            intptr_t old = my_job.compare_and_swap( snapshot|1,  snapshot );
+            intptr_t old = my_job.compare_and_swap( snapshot|1, snapshot );
             __TBB_ASSERT( old==snapshot || old==-1, "unexpected interference" );  
             return old==snapshot;
         }
@@ -143,4 +149,9 @@ public:
 } // namespace internal
 } // namespace rml
 
+
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+    #pragma warning (pop)
+#endif // warning 4244 are back
+
 #endif /* __RML_job_automaton_H */
diff --git a/src/rml/server/ring.h b/src/rml/server/ring.h
deleted file mode 100644
index 4a865f7..0000000
--- a/src/rml/server/ring.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
-
-    This file is part of Threading Building Blocks.
-
-    Threading Building Blocks is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    Threading Building Blocks is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Threading Building Blocks; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.
-*/
-
-#ifndef __RML_ring_H
-#define __RML_ring_H
-
-#include <vector>
-#include <utility>
-#include "tbb/cache_aligned_allocator.h"
-#include "rml_base.h"
-#include "job_automaton.h"
-
-namespace rml {
-
-namespace internal {
-
-//! Circular sequence of pair(Connection&,job&) with a cursor.
-template<typename Connection> 
-class ring {
-public:
-    typedef Connection connection_type;
-    typedef ::rml::job job_type;
-    class value_type {
-    public:
-        Connection& connection() const {return *my_connection;}
-        job_type& job() const {return *my_job;}
-        job_automaton& automaton() const {return *my_automaton;}
-        value_type( Connection& c, job_type& j, job_automaton& ja ) : my_connection(&c), my_job(&j), my_automaton(&ja) {}
-    private:
-        Connection* my_connection;
-        job_type* my_job;
-        job_automaton* my_automaton;
-    };
-private:
-    typedef std::vector<value_type,tbb::cache_aligned_allocator<value_type> > array_type;
-    /** Logically, a linked list would make more sense.  But it is not as cache friendly. */
-    array_type my_array;
-    typename array_type::const_iterator my_cursor;
-
-public:
-    ring() {
-        my_cursor = my_array.begin();
-    }
-
-    //! Return number of items in the ring
-    size_t size() const {return my_array.size();}
-
-    //! Insert an new item into the sequence
-    /** Where the item is inserted is implementation-dependent. */
-    void insert( connection_type& client, job_type& job, job_automaton& ja ) {
-        // Save cursor position
-        typename array_type::difference_type i = my_cursor-my_array.begin();
-        my_array.push_back(value_type(client,job,ja));
-        // Restore cursor
-        my_cursor = my_array.begin()+i;
-    }
-
-    //! Erase item in the sequence that corresponds to given connection_type.
-    /** If item was present, returns pointer to job_automaton of that item.
-        Otherwise returns NULL. */
-    job_automaton* erase( const connection_type& c ) {
-        // Search for matching item.
-        typename array_type::iterator i = my_array.begin();
-        for(;;) {
-            if( i==my_array.end() )
-                return NULL;
-            if( &i->connection()==&c )
-                break;
-            ++i;
-        }
-        // Delete found item without corrupting cursor.
-        typename array_type::difference_type j = my_cursor-my_array.begin();
-        if( i<my_cursor ) {
-            --j;
-        } else if( my_cursor+1==my_array.end() ) {
-            __TBB_ASSERT(i==my_cursor,NULL);
-            j=0;
-        }
-        job_automaton* result = &i->automaton();
-        __TBB_ASSERT( result, NULL );
-        my_array.erase(i); 
-        __TBB_ASSERT( !my_array.empty() || j==0, NULL );
-        my_cursor=my_array.begin()+j;
-        return result;
-    }
-
-    //! Apply client method to all jobs in the ring.
-    /** Requres signature "Client& Connection::client()". 
-        Templatized over Client so that method can be tested without having to define a full Client type. */
-    template<typename Client>
-    void for_each_job( void (Client::*method)(job&) ) {
-        for( typename array_type::iterator i=my_array.begin(); i!=my_array.end(); ++i ) {
-            value_type& v = *i;
-            if( v.automaton().try_acquire() ) {
-                (i->connection().client().*method)(v.job());
-                v.automaton().release();
-            }
-        } 
-    }
-
-    //! NULL if ring is empty, otherwise pointer to value at current cursor position.
-    const value_type* cursor() const {return my_array.empty() ? NULL : &*my_cursor;}
-
-    //! Advance cursor to next item.
-    void advance_cursor() {
-        if( ++my_cursor==my_array.end() )
-            my_cursor = my_array.begin();
-    }
-
-};
-
-} // namespace internal
-} // namespace rml
-
-#endif /* __RML_ring_H */
diff --git a/src/rml/server/rml_server.cpp b/src/rml/server/rml_server.cpp
index 832bc99..0ffdfe7 100644
--- a/src/rml/server/rml_server.cpp
+++ b/src/rml/server/rml_server.cpp
@@ -33,14 +33,12 @@
 
 #include "tbb/tbb_allocator.h"
 #include "tbb/cache_aligned_allocator.h"
-#include "ring.h"
+#include "job_automaton.h"
 #include "wait_counter.h"
 #include "thread_monitor.h"
 #include "tbb/aligned_space.h"
 #include "tbb/atomic.h"
-#include "tbb/mutex.h"
 #include "tbb/tbb_misc.h"           // Get DetectNumberOfWorkers() from here.
-#include "tbb/concurrent_queue.h"
 #if _MSC_VER==1500 && !defined(__INTEL_COMPILER)
 // VS2008/VC9 seems to have an issue; 
 #pragma warning( push )
@@ -75,71 +73,38 @@ const version_type SERVER_VERSION = 1;
 
 static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize;
 
+template<typename Server, typename Client> class generic_connection;
 class tbb_connection_v1;
 class omp_connection_v1;
 
-enum message_kind {
-    mk_initialize_tbb_job,
-    mk_terminate_tbb_job,
-    mk_initialize_omp_job,
-    mk_terminate_omp_job
-};
-
-//! Message to a thread
-class message {
-public:
-    message_kind kind;
-    rml::server* connection;
-    job_automaton* automaton;
-    message() {} 
-    message( message_kind k, rml::server* s, job_automaton* ja ) : kind(k), connection(s), automaton(ja) {
-        __TBB_ASSERT( k==mk_initialize_tbb_job||k==mk_initialize_omp_job, NULL );
-    }
-    message( message_kind k, rml::server* s ) : kind(k), connection(s) {
-        __TBB_ASSERT( k==mk_terminate_tbb_job||k==mk_terminate_omp_job, NULL );
-    }
-};
-
-//! Mailbox to which any thread can mail a message, but only the owner of the mailbox can read messages.
-/** Class mailbox is defined because of the fear that queue.empty() would be too slow. */
-class mailbox {
-    tbb::atomic<int> size;
-    tbb::concurrent_queue<message> queue;
-public:
-    bool empty() const {return size==0;}
-    void pop( message& m ) {
-        __TBB_ASSERT( size>0, "attempt to pop empty mailbox" );
-        __TBB_ASSERT( !queue.empty(), "corrupted mailbox" );
-        --size; 
-        bool popped = queue.try_pop(m);
-        __TBB_ASSERT_EX( popped, "corrupted mailbox" );
-    }
-    void push( const message& m ) {
-        queue.push(m);
-        ++size;
-    }
-    mailbox() {
-        size=0;
-        __TBB_ASSERT( queue.empty(), NULL );
-    }
-    ~mailbox() {
-        __TBB_ASSERT( size==0, "destroying non-empty mailbox" );        
-        __TBB_ASSERT( queue.empty(), NULL );        
-    }
+enum request_kind {
+    rk_none,
+    rk_initialize_tbb_job,
+    rk_terminate_tbb_job,
+    rk_initialize_omp_job,
+    rk_terminate_omp_job
 };
 
 //! State of a server_thread
 /** Below is a diagram of legal state transitions.
 
-              ts_tbb_busy               
+    OMP
+              ts_omp_busy               
               ^          ^       
              /            \       
             /              V       
     ts_asleep <-----------> ts_idle 
-            \              ^       
-             \            /       
-              V          V       
-              ts_omp_busy               
+
+    TBB 
+              ts_tbb_busy               
+              ^          ^       
+             /            \       
+            /              V       
+    ts_asleep <-----------> ts_idle --> ts_done
+
+    For TBB only. Extra state transition.
+
+    ts_created -> ts_started -> ts_visited
  */
 enum thread_state_t {
     //! Thread not doing anything useful, but running and looking for work. 
@@ -197,18 +162,13 @@ class ref_count: no_copy {
     tbb::atomic<int> my_ref_count;
 public:
     ref_count(int k ) {my_ref_count=k;}
-
-    ~ref_count() {
-        __TBB_ASSERT( !my_ref_count, "premature destruction of refcounted object" );
-    }
-
+    ~ref_count() {__TBB_ASSERT( !my_ref_count, "premature destruction of refcounted object" );}
     //! Add one and return new value.
     int add_ref() {
         int k = ++my_ref_count;
         __TBB_ASSERT(k>=1,"reference count underflowed before add_ref");
         return k;
     }
-
     //! Subtract one and return new value.
     int remove_ref() {
         int k = --my_ref_count; 
@@ -259,7 +219,6 @@ struct thread_map_base {
         job_automaton my_automaton;
 // FIXME - pad out to cache line, because my_automaton is hit hard by thread()
         friend class thread_map;
-
     };
     typedef tbb::concurrent_vector<value_type,tbb::zero_allocator<value_type,tbb::cache_aligned_allocator> > array_type;
 };
@@ -279,6 +238,7 @@ static tbb::atomic<int> the_balance_inited;
     plus 1 if a host thread owns this instance. */
 class server_thread: public ref_count {
     friend class thread_map;
+    template<typename Server, typename Client> friend class generic_connection;
     //! Integral type that can hold a thread_state_t
     typedef int thread_state_rep_t;
     tbb::atomic<thread_state_rep_t> state;
@@ -290,10 +250,10 @@ public:
     server_thread* link; // FIXME: this is a temporary fix. Remove when all is done.
     thread_map_base::array_type::iterator my_map_pos;
 private:
-    typedef ring<tbb_connection_v1> tbb_ring_type;
-    typedef ring<omp_connection_v1> omp_ring_type;
-    tbb_ring_type tbb_ring;
-    omp_ring_type omp_ring;
+    rml::server *my_conn;
+    rml::job* my_job;
+    job_automaton* my_ja;
+    size_t my_index;
 
 #if TBB_USE_ASSERT
     //! Flag used to check if thread is still using *this.
@@ -305,8 +265,8 @@ private:
 
     //! Destroy job corresponding to given client
     /** Return true if thread must quit. */
-    template<typename Ring>
-    bool destroy_job( Ring& ring, typename Ring::connection_type& c );
+    template<typename Connection>
+    bool destroy_job( Connection& c );
 
     //! Process requests
     /** Return true if thread must quit. */
@@ -321,9 +281,7 @@ public:
         return thread_state_t(s);
     }
 
-    //! Current stack size of the thread.  
-    size_t stack_size;
-    mailbox requests;
+    tbb::atomic<request_kind> request;
 
     omp_dispatch_type omp_dispatch;
 
@@ -336,7 +294,7 @@ public:
     //! Attempt to wakeup a thread 
     /** The value "to" is the new state for the thread, if it was woken up.
         Returns true if thread was woken up, false otherwise. */
-    bool wakeup(  bool only_if_undersubscribed, thread_state_t to, thread_state_t from );
+    bool wakeup( thread_state_t to, thread_state_t from );
 
     //! Attempt to enslave a thread for OpenMP/TBB.
     bool try_grab_for( thread_state_t s );
@@ -389,23 +347,18 @@ void wakeup_some_tbb_threads();
 class thread_map : public thread_map_base {
 public:
     typedef rml::client::size_type size_type;
-
+    //! ctor
     thread_map( wait_counter& fc, ::rml::client& client ) : 
-        all_visited_at_least_once(false),
-        my_min_stack_size(0), 
-        my_server_ref_count(1),
-        my_client_ref_count(1),
-        my_client(client),
-        my_factory_counter(fc)
-    {
-        my_unrealized_threads = 0;
-    }
+        all_visited_at_least_once(false), my_min_stack_size(0), my_server_ref_count(1),
+        my_client_ref_count(1), my_client(client), my_factory_counter(fc)
+    { my_unrealized_threads = 0; }
+    //! dtor
     ~thread_map() {}
     typedef array_type::iterator iterator;
     iterator begin() {return my_array.begin();}
     iterator end() {return my_array.end();}
     void bind( /* rml::server& server, message_kind initialize */ );
-    void unbind( rml::server& server, message_kind terminate );
+    void unbind( request_kind terminate );
     void assist_cleanup( bool assist_null_only );
 
     /** Returns number of unrealized threads to create. */
@@ -418,7 +371,7 @@ public:
     /** Return NULL if out of unrealized threads. */
     value_type* add_one_thread( bool is_omp_thread_ );
 
-    void bind_one_thread( rml::server& server, message_kind initialize, value_type& x );
+    void bind_one_thread( rml::server& server, request_kind initialize, value_type& x );
 
     void remove_client_ref();
     int add_server_ref() {return my_server_ref_count.add_ref();}
@@ -447,8 +400,7 @@ private:
     wait_counter& my_factory_counter;
 };
 
-void thread_map::bind_one_thread( rml::server& server, message_kind initialize, value_type& x ) {
-
+void thread_map::bind_one_thread( rml::server& server, request_kind initialize, value_type& x ) {
     // Add one to account for the thread referencing this map hereforth.
     server_thread& t = x.thread();
     my_server_ref_count.add_ref();
@@ -459,12 +411,14 @@ void thread_map::bind_one_thread( rml::server& server, message_kind initialize,
     t.add_ref();
 #endif
     // Have responsibility to start the thread.
-    t.requests.push( message( initialize, &server, &x.my_automaton ) );
+    t.my_conn = &server;
+    t.my_ja = &x.my_automaton;
+    t.request = initialize;
     t.launch( my_min_stack_size );
     // Must wakeup thread so it can fill in its "my_job" field in *this.
     // Otherwise deadlock can occur where wait_for_job spins on thread that is sleeping.
     __TBB_ASSERT( t.state!=ts_tbb_busy, NULL );
-    t.wakeup( /*only_if_undersubscribed=*/false, ts_idle, ts_asleep );
+    t.wakeup( ts_idle, ts_asleep );
 }
 
 thread_map::value_type* thread_map::add_one_thread( bool is_omp_thread_ ) {
@@ -475,6 +429,8 @@ thread_map::value_type* thread_map::add_one_thread( bool is_omp_thread_ ) {
     } while( my_unrealized_threads.compare_and_swap(u-1,u)!=u );
     server_thread& t = my_private_threads.add_one_thread();
     t.is_omp_thread = is_omp_thread_;
+    __TBB_ASSERT( u>=1, NULL );
+    t.my_index = u - 1;
     __TBB_ASSERT( t.state!=ts_tbb_busy, NULL );
     if( !t.is_omp_thread )
         t.tbb_state = ts_created;
@@ -484,20 +440,20 @@ thread_map::value_type* thread_map::add_one_thread( bool is_omp_thread_ ) {
     return &v;
 }
 
-void thread_map::bind( /* rml::server& server, message_kind initialize */ ) {
+void thread_map::bind( /* rml::server& server, request_kind initialize */ ) {
     ++my_factory_counter;
     my_min_stack_size = my_client.min_stack_size();
     __TBB_ASSERT( my_unrealized_threads==0, "already called bind?" );
     my_unrealized_threads = my_client.max_job_count();
 }
 
-void thread_map::unbind( rml::server& server, message_kind terminate ) {
+void thread_map::unbind( request_kind terminate ) {
     // Ask each server_thread to cleanup its job for this server.
-    for( iterator i = begin(); i!=end(); ++i ) {
+    for( iterator i=begin(); i!=end(); ++i ) {
         server_thread& t = i->thread();
         // The last parameter of the message is not used by the recipient. 
-        t.requests.push( message( terminate, &server ) );
-        t.wakeup( /*only_if_undersubscribed=*/false, ts_idle, ts_asleep );
+        t.request = terminate;
+        t.wakeup( ts_idle, ts_asleep );
     }
     // Remove extra ref to client.
     remove_client_ref();
@@ -568,55 +524,27 @@ struct connection_traits {};
 
 static tbb::atomic<tbb_connection_v1*> this_tbb_connection;
 
-template<typename Connection, typename Ring>
-void make_job( Connection& c, Ring& ring, server_thread& t, job_automaton& ja );
-
 template<typename Server, typename Client>
 class generic_connection: public Server, no_copy {
     /*override*/ version_type version() const {return SERVER_VERSION;}
-
     /*override*/ void yield() {thread_monitor::yield();}
-
-    /*override*/ void independent_thread_number_changed( int delta ) {
-        my_thread_map.adjust_balance( -delta );
-    }
-
-    /*override*/ unsigned default_concurrency() const {
-        return hardware_concurrency()-1;
-    }
+    /*override*/ void independent_thread_number_changed( int delta ) {my_thread_map.adjust_balance( -delta );}
+    /*override*/ unsigned default_concurrency() const {return hardware_concurrency()-1;}
 
 protected:
     thread_map my_thread_map;
-
-    void do_open() {
-        my_thread_map.bind( /* *this, connection_traits<Server,Client>::initialize */ );
-    }
-    
+    void do_open() {my_thread_map.bind();}
     void request_close_connection();
-
     //! Make destructor virtual
     virtual ~generic_connection() {}
-
     generic_connection( wait_counter& fc, Client& c ) : my_thread_map(fc,c) {}
 
 public:
-
     Client& client() const {return static_cast<Client&>(my_thread_map.client());}
-
-    template<typename Connection, typename Ring>
-    friend void make_job( Connection& c, Ring& ring, server_thread& t, job_automaton& ja );
-
-    int add_server_ref () {
-        return my_thread_map.add_server_ref();
-    }
-
-    void remove_server_ref() {
-        if( my_thread_map.remove_server_ref()==0 ) 
-            delete this;
-    }
-    void remove_client_ref() {
-        my_thread_map.remove_client_ref();
-    }
+    int add_server_ref () {return my_thread_map.add_server_ref();}
+    void remove_server_ref() {if( my_thread_map.remove_server_ref()==0 ) delete this;}
+    void remove_client_ref() {my_thread_map.remove_client_ref();}
+    void make_job( server_thread& t, job_automaton& ja );
 };
 
 //------------------------------------------------------------------------
@@ -625,8 +553,8 @@ public:
 
 template<>
 struct connection_traits<tbb_server,tbb_client> {
-    static const message_kind initialize = mk_initialize_tbb_job;
-    static const message_kind terminate = mk_terminate_tbb_job;
+    static const request_kind initialize = rk_initialize_tbb_job;
+    static const request_kind terminate = rk_terminate_tbb_job;
     static const bool assist_null_only = true;
     static const bool is_tbb = true;
 };
@@ -635,12 +563,9 @@ struct connection_traits<tbb_server,tbb_client> {
 /** The internal representation uses inheritance for the server part and a pointer for the client part. */
 class tbb_connection_v1: public generic_connection<tbb_server,tbb_client> {
     friend void wakeup_some_tbb_threads();
-
     /*override*/ void adjust_job_count_estimate( int delta );
-
     //! Estimate on number of jobs without threads working on them.
     tbb::atomic<int> my_slack;
-
     friend class dummy_class_to_shut_up_gratuitous_warning_from_gcc_3_2_3;
 #if TBB_USE_ASSERT
     tbb::atomic<int> my_job_count_estimate;
@@ -648,7 +573,6 @@ class tbb_connection_v1: public generic_connection<tbb_server,tbb_client> {
 
     // pad these? or use a single variable w/ atomic add/subtract?
     tbb::atomic<int> n_adjust_job_count_requests;
-
     ~tbb_connection_v1();
 
 public:
@@ -659,9 +583,7 @@ public:
     };
 
     //! True if there is slack that try_process can use.
-    bool has_slack() const {
-        return my_slack>0;
-    }
+    bool has_slack() const {return my_slack>0;}
 
     bool try_process( job& job ) {
         bool visited = false;
@@ -687,20 +609,9 @@ public:
         this_tbb_connection = this;
     }
 
-    void wakeup_tbb_threads( unsigned n )
-    {
-        my_thread_map.wakeup_tbb_threads( n );
-    }
-
-    bool wakeup_next_thread( thread_map::iterator i )
-    {
-       return my_thread_map.wakeup_next_thread( i, *this );
-    }
-
-    thread_map::size_type get_unrealized_threads ()
-    {
-        return my_thread_map.get_unrealized_threads();
-    }
+    void wakeup_tbb_threads( unsigned n ) {my_thread_map.wakeup_tbb_threads( n );}
+    bool wakeup_next_thread( thread_map::iterator i ) {return my_thread_map.wakeup_next_thread( i, *this );}
+    thread_map::size_type get_unrealized_threads () {return my_thread_map.get_unrealized_threads();}
 };
 
 /* to deal with cases where the machine is oversubscribed; we want each thread to trip to try_process() at least once */
@@ -710,7 +621,6 @@ bool thread_map::wakeup_next_thread( thread_map::iterator this_thr, tbb_connecti
         return false;
 
     iterator e = end();
-
 retry:
     bool exist = false;
     iterator k=this_thr; 
@@ -737,7 +647,6 @@ retry:
             goto retry;
     else 
         all_visited_at_least_once = true;
-
     return false;
 }
 
@@ -761,8 +670,8 @@ void thread_map::adjust_balance( int delta ) {
 
 template<>
 struct connection_traits<omp_server,omp_client> {
-    static const message_kind initialize = mk_initialize_omp_job;
-    static const message_kind terminate = mk_terminate_omp_job;
+    static const request_kind initialize = rk_initialize_omp_job;
+    static const request_kind terminate = rk_terminate_omp_job;
     static const bool assist_null_only = false;
     static const bool is_tbb = false;
 };
@@ -785,24 +694,9 @@ public:
 #endif /* TBB_USE_ASSERT */
         do_open();
     }
-    ~omp_connection_v1() {
-        __TBB_ASSERT( net_delta==0, "net increase/decrease of load is nonzero" );
-    }
+    ~omp_connection_v1() {__TBB_ASSERT( net_delta==0, "net increase/decrease of load is nonzero" );}
 };
 
-/** Not a member of generic_connection because we need Connection to be the derived class. */
-template<typename Connection, typename Ring>
-void make_job( Connection& c, Ring& ring, server_thread& t, job_automaton& ja ) {
-    if( ja.try_acquire() ) {
-        typename Ring::job_type& j = *c.client().create_one_job();
-        __TBB_ASSERT( &j!=NULL, "client:::create_one_job returned NULL" );
-        __TBB_ASSERT( (intptr_t(&j)&1)==0, "client::create_one_job returned misaligned job" );
-        ja.set_and_release( j );
-        Connection::scratch_ptr(j) = &t;
-        ring.insert( c, j, ja );
-    }
-}
-
 template<typename Server, typename Client>    
 void generic_connection<Server,Client>::request_close_connection() {
 #if _MSC_VER && !defined(__INTEL_COMPILER)
@@ -821,12 +715,24 @@ void generic_connection<Server,Client>::request_close_connection() {
 #if _MSC_VER && !defined(__INTEL_COMPILER)
 #pragma warning( pop )
 #endif
-    my_thread_map.unbind( *this, connection_traits<Server,Client>::terminate );
+    my_thread_map.unbind( connection_traits<Server,Client>::terminate );
     my_thread_map.assist_cleanup( connection_traits<Server,Client>::assist_null_only );
     // Remove extra reference
     remove_server_ref();
 }
 
+template<typename Server, typename Client>
+void generic_connection<Server,Client>::make_job( server_thread& t, job_automaton& ja ) {
+    if( ja.try_acquire() ) {
+        rml::job& j = *client().create_one_job();
+        __TBB_ASSERT( &j!=NULL, "client:::create_one_job returned NULL" );
+        __TBB_ASSERT( (intptr_t(&j)&1)==0, "client::create_one_job returned misaligned job" );
+        ja.set_and_release( j );
+        __TBB_ASSERT( t.my_conn && t.my_ja && t.my_job==NULL, NULL );
+        t.my_job  = &j;
+    }
+}
+
 tbb_connection_v1::~tbb_connection_v1() {
 #if TBB_USE_ASSERT
     if( my_job_count_estimate!=0 ) {
@@ -860,7 +766,7 @@ void tbb_connection_v1::adjust_job_count_estimate( int delta ) {
                 // No unrealized threads left.
                 break;
             // eagerly start the thread off.
-            my_thread_map.bind_one_thread( *this, mk_initialize_tbb_job, *k );
+            my_thread_map.bind_one_thread( *this, rk_initialize_tbb_job, *k );
             server_thread& t = k->thread();
             __TBB_ASSERT( !t.link, NULL );
             t.link = new_threads_anchor;
@@ -983,7 +889,6 @@ void omp_connection_v1::get_threads( size_type request_size, void* cookie, job*
         return;
 
     unsigned index = 0;
-
     for(;;) { // don't return until all request_size threads are grabbed.
         // Need to grab some threads
         thread_map::iterator k_end=my_thread_map.end();
@@ -1010,7 +915,7 @@ void omp_connection_v1::get_threads( size_type request_size, void* cookie, job*
                 fprintf(stderr,"server::get_threads: exceeded job_count\n");
                 __TBB_ASSERT(false, NULL);
             }
-            my_thread_map.bind_one_thread( *this, mk_initialize_omp_job, *k );
+            my_thread_map.bind_one_thread( *this, rk_initialize_omp_job, *k );
             server_thread& t = k->thread();
             if( t.try_grab_for( ts_omp_busy ) ) {
                 job& j = k->wait_for_job();
@@ -1053,7 +958,7 @@ server_thread::server_thread() :
     ref_count(0),
     link(NULL), // FIXME: remove when all fixes are done.
     my_map_pos(),
-    stack_size(0) 
+    my_conn(NULL), my_job(NULL), my_ja(NULL)
 {
     state = ts_idle;
 #if TBB_USE_ASSERT
@@ -1065,8 +970,14 @@ server_thread::~server_thread() {
     __TBB_ASSERT( !has_active_thread, NULL );
 }
 
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced
+    #pragma warning(push)
+    #pragma warning(disable:4189)
+#endif
 __RML_DECL_THREAD_ROUTINE server_thread::thread_routine( void* arg ) {
     server_thread* self = static_cast<server_thread*>(arg);
+    AVOID_64K_ALIASING( self->my_index );
 #if TBB_USE_ASSERT
     __TBB_ASSERT( !self->has_active_thread, NULL );
     self->has_active_thread = true;
@@ -1074,9 +985,11 @@ __RML_DECL_THREAD_ROUTINE server_thread::thread_routine( void* arg ) {
     self->loop();
     return NULL;
 }
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    #pragma warning(pop)
+#endif
 
 void server_thread::launch( size_t stack_size ) {
-    this->stack_size = stack_size;
     thread_monitor::launch( thread_routine, this, stack_size );
 }
 
@@ -1085,7 +998,7 @@ void server_thread::sleep_perhaps( thread_state_t asleep ) {
     thread_monitor::cookie c; 
     monitor.prepare_wait(c);
     if( state.compare_and_swap( asleep, ts_idle )==ts_idle ) {
-        if( requests.empty() ) {
+        if( request==rk_none ) {
             monitor.commit_wait(c);
             // Someone else woke me up.  The compare_and_swap further below deals with spurious wakeups.
         } else {
@@ -1112,20 +1025,16 @@ void server_thread::sleep_perhaps( thread_state_t asleep ) {
     __TBB_ASSERT( read_state()!=asleep, "a thread can only put itself to sleep" );
 }
 
-bool server_thread::wakeup( bool only_if_undersubscribed, thread_state_t to, thread_state_t from ) {
+bool server_thread::wakeup( thread_state_t to, thread_state_t from ) {
     bool success = false;
-    __TBB_ASSERT( from==ts_asleep && (to==ts_idle||to==ts_omp_busy||to==ts_tbb_busy), 
-                  NULL );
-    if( !only_if_undersubscribed ) {
-        if( state.compare_and_swap( to, from )==from ) {
-            if( !is_omp_thread )
-                __TBB_ASSERT( to==ts_idle||to==ts_tbb_busy, NULL );
-            // There is a small timing window that permits balance to become negative,
-            // but such occurrences are probably rare enough to not worry about, since
-            // at worst the result is slight temporary oversubscription.
-            monitor.notify();
-            success = true;
-        }
+    __TBB_ASSERT( from==ts_asleep && (to==ts_idle||to==ts_omp_busy||to==ts_tbb_busy), NULL );
+    if( state.compare_and_swap( to, from )==from ) {
+        if( !is_omp_thread ) __TBB_ASSERT( to==ts_idle||to==ts_tbb_busy, NULL );
+        // There is a small timing window that permits balance to become negative,
+        // but such occurrences are probably rare enough to not worry about, since
+        // at worst the result is slight temporary oversubscription.
+        monitor.notify();
+        success = true;
     } 
     return success;
 }
@@ -1135,7 +1044,7 @@ bool server_thread::try_grab_for( thread_state_t target_state ) {
     bool success = false;
     switch( read_state() ) {
         case ts_asleep: 
-            success = wakeup( /*only_if_undersubscribed=*/false, target_state, ts_asleep );
+            success = wakeup( target_state, ts_asleep );
             break;
         case ts_idle:
             success = state.compare_and_swap( target_state, ts_idle )==ts_idle;
@@ -1147,8 +1056,8 @@ bool server_thread::try_grab_for( thread_state_t target_state ) {
     return success;
 }
 
-template<typename Ring>
-inline bool server_thread::destroy_job( Ring& ring, typename Ring::connection_type& c ) {
+template<typename Connection>
+bool server_thread::destroy_job( Connection& c ) {
     __TBB_ASSERT( !is_omp_thread||state==ts_idle, NULL );
     __TBB_ASSERT( is_omp_thread||(state==ts_idle||state==ts_tbb_busy), NULL );
     if( !is_omp_thread ) {
@@ -1160,9 +1069,10 @@ inline bool server_thread::destroy_job( Ring& ring, typename Ring::connection_ty
         if( state==ts_tbb_busy ) { // return the coin to the deposit
             // need to deposit first to let the next connection see the change
             ++the_balance;
+            state = ts_done; // no other thread changes the state when it is ts_*_busy
         }
     }
-    if( job_automaton* ja = ring.erase( c ) ) {
+    if( job_automaton* ja = my_ja ) {
         rml::job* j;
         if( ja->try_plug(j) ) {
             __TBB_ASSERT( j, NULL );
@@ -1173,41 +1083,42 @@ inline bool server_thread::destroy_job( Ring& ring, typename Ring::connection_ty
         }
     }
     //! Must do remove client reference first, because execution of c.remove_ref() can cause *this to be destroyed.
+    int k = remove_ref();
+    __TBB_ASSERT_EX( k==0, "more than one references?" );
 #if TBB_USE_ASSERT
-    __TBB_ASSERT( remove_ref()==0, "more than one references?" );
     has_active_thread = false;
-#else
-    remove_ref();
 #endif /* TBB_USE_ASSERT */
     c.remove_server_ref();
     return true;
 }
 
 bool server_thread::process_requests() {
-    __TBB_ASSERT( !requests.empty(), "should only be called for non-empty queue" );
+    __TBB_ASSERT( request!=rk_none, "should only be called when at least one request is present" );
     do {
-        message m;
-        requests.pop( m );
-        switch( m.kind ) {
-            case mk_initialize_tbb_job: 
-                make_job( *static_cast<tbb_connection_v1*>(m.connection), tbb_ring, *this, *m.automaton );
+        request_kind my_req = request;
+        request.compare_and_swap( rk_none, my_req );
+        switch( my_req ) {
+            case rk_initialize_tbb_job: 
+                static_cast<tbb_connection_v1*>(my_conn)->make_job( *this, *my_ja );
                 break;
             
-            case mk_initialize_omp_job: 
-                make_job( *static_cast<omp_connection_v1*>(m.connection), omp_ring, *this, *m.automaton );
+            case rk_initialize_omp_job: 
+                static_cast<omp_connection_v1*>(my_conn)->make_job( *this, *my_ja );
                 break;
 
-            case mk_terminate_tbb_job:
-                if( destroy_job( tbb_ring, *static_cast<tbb_connection_v1*>(m.connection) ) )
+            case rk_terminate_tbb_job:
+                if( destroy_job( *static_cast<tbb_connection_v1*>(my_conn) ) )
                     return true;
                 break; 
 
-            case mk_terminate_omp_job:
-                if( destroy_job( omp_ring, *static_cast<omp_connection_v1*>(m.connection) ) )
+            case rk_terminate_omp_job:
+                if( destroy_job( *static_cast<omp_connection_v1*>(my_conn) ) )
                     return true;
                 break; 
+            default:
+                break;
          }
-    } while( !requests.empty() );
+    } while( request!=rk_none );
     return false;
 }
 
@@ -1219,7 +1130,7 @@ void server_thread::loop() {
             sleep_perhaps( ts_asleep );   
 
         // Drain mailbox before reading the state.
-        if( !requests.empty() ) 
+        if( request!=rk_none ) 
             if( process_requests() )
                 return;     
              
@@ -1237,13 +1148,12 @@ void server_thread::loop() {
             state = ts_idle;
         } else if( s==ts_tbb_busy ) {
             // do some TBB work.
-            const tbb_ring_type::value_type* item = tbb_ring.cursor(); 
-            __TBB_ASSERT( item, NULL );
-            tbb_connection_v1& conn = item->connection();
+            __TBB_ASSERT( my_conn && my_job, NULL );
+            tbb_connection_v1& conn = *static_cast<tbb_connection_v1*>(my_conn);
             // give openmp higher priority
             bool has_coin = true;
             while( has_coin && conn.has_slack() && the_balance>=0 ) {
-                if( conn.try_process(item->job()) ) {
+                if( conn.try_process(*my_job) ) {
                     tbb_state = ts_visited;
                     if( conn.has_slack() && the_balance>=0 )
                         has_coin = !conn.wakeup_next_thread( my_map_pos );
diff --git a/src/rml/server/thread_monitor.h b/src/rml/server/thread_monitor.h
index 19cc7e0..607188b 100644
--- a/src/rml/server/thread_monitor.h
+++ b/src/rml/server/thread_monitor.h
@@ -34,6 +34,7 @@
 #if USE_WINTHREAD
 #include <windows.h>
 #include <process.h>
+#include <malloc.h> //_alloca
 #elif USE_PTHREAD
 #include <pthread.h>
 #include <string.h>
@@ -45,6 +46,22 @@
 
 // All platform-specific threading support is in this header.
 
+#if (_WIN32||_WIN64)&&!__TBB_ipf
+// Deal with 64K aliasing.  The formula for "offset" is a Fibonacci hash function,
+// which has the desirable feature of spreading out the offsets fairly evenly
+// without knowing the total number of offsets, and furthermore unlikely to
+// accidentally cancel out other 64K aliasing schemes that Microsoft might implement later.
+// See Knuth Vol 3. "Theorem S" for details on Fibonacci hashing.
+// The second statement is really does need "volatile", otherwise the compiler might remove the _alloca.
+#define AVOID_64K_ALIASING(idx)                       \
+    size_t offset = (idx+1) * 40503U % (1U<<16);      \
+    void* volatile sink_for_alloca = _alloca(offset); \
+    __TBB_ASSERT_EX(sink_for_alloca, "_alloca failed");
+#else
+// Linux thread allocators avoid 64K aliasing.
+#define AVOID_64K_ALIASING(idx)
+#endif /* _WIN32||_WIN64 */
+
 namespace rml {
 
 namespace internal {
@@ -104,9 +121,12 @@ private:
 
 
 #if USE_WINTHREAD
+#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION
+#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
+#endif
 inline void thread_monitor::launch( thread_routine_type thread_routine, void* arg, size_t stack_size ) {
     unsigned thread_id;
-    uintptr_t status = _beginthreadex( NULL, unsigned(stack_size), thread_routine, arg, 0, &thread_id );
+    uintptr_t status = _beginthreadex( NULL, unsigned(stack_size), thread_routine, arg, STACK_SIZE_PARAM_IS_A_RESERVATION, &thread_id );
     if( status==0 ) {
         fprintf(stderr,"thread_monitor::launch: _beginthreadex failed\n");
         exit(1); 
diff --git a/src/rml/test/test_hunk.cpp b/src/rml/test/test_hunk.cpp
deleted file mode 100644
index d8f4d60..0000000
--- a/src/rml/test/test_hunk.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
-
-    This file is part of Threading Building Blocks.
-
-    Threading Building Blocks is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    Threading Building Blocks is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Threading Building Blocks; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.
-*/
-
-#include "hunk.h"
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
-
-int Limit;
-int Count;
-
-struct Exception {};
-
-class MinimalType: NoCopy {
-    //! Used to detect use of bitwise copy instead of copy constructor
-    MinimalType* my_self_ptr;
-public:
-    bool is_valid() const {return my_self_ptr==this;}
-    MinimalType() {
-        my_self_ptr = this;
-        if( Count>=Limit ) 
-            throw Exception();
-        ++Count;
-    }
-    ~MinimalType() {
-        my_self_ptr = NULL;
-        --Count;
-    }
-};
-
-typedef rml::internal::hunk<MinimalType> MyHunkType;
-
-void SimpleTest() {
-    // Trials differ in whether method clear is used or not before destruction
-    for( int trial=0; trial<2; ++trial ) {
-        for( int n=0; n<25; ++n ) {
-            {
-                MyHunkType h;
-                Limit = n;
-                ASSERT( !h.is_allocated(), NULL );
-                h.allocate( n );
-                ASSERT( Count==n, NULL );
-                ASSERT( h.is_allocated(), NULL );
-                ASSERT( h.size()==size_t(n), NULL );
-                size_t k=0;
-                for( MyHunkType::iterator i=h.begin(); i!=h.end(); ++i, ++k ) {
-                    ASSERT( i->is_valid(), NULL );
-                    MinimalType& element = h[k];
-                    ASSERT( &element==h.begin()+k, NULL );
-                }
-                if( trial&1 ) {
-                    h.clear();
-                    ASSERT( Count==0, NULL );
-                    ASSERT( !h.is_allocated(), NULL );
-                }
-            }
-            ASSERT( Count==0, NULL );
-        }
-    }
-}
-
-void ExceptionTest() {
-    for( Limit=0; Limit<25; ++Limit ) 
-        for( int n=Limit+1; n<=Limit+25; ++n ) {
-            MyHunkType h;
-            ASSERT( Count==0, NULL );
-            try {
-                h.allocate( n );
-            } catch( Exception ) {
-                ASSERT( Count==0, "did not undo constructions properly?" );
-            }
-        }
-}
-
-int main() {
-    SimpleTest();
-    ExceptionTest();
-    printf("done\n");
-    return 0;
-}
diff --git a/src/rml/test/test_ring.cpp b/src/rml/test/test_ring.cpp
deleted file mode 100644
index 75ca0f1..0000000
--- a/src/rml/test/test_ring.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
-    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
-
-    This file is part of Threading Building Blocks.
-
-    Threading Building Blocks is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    Threading Building Blocks is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Threading Building Blocks; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.
-*/
-
-#include "ring.h"
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
-
-/** Must be relatively prime to 17. */
-const size_t N = 20;
-
-struct MyJob: ::rml::job, private NoCopy {
-    size_t tag;
-};
-
-size_t Count;
-
-struct MyClient: NoAssign {
-    //! Is virtual because what the test is testing is virtual in the real production case.
-    virtual void tally( ::rml::job& job ) {
-        ++Count;
-        ASSERT( static_cast<MyJob&>(job).tag>0, NULL ); 
-    }
-    virtual ~MyClient() {}
-};
-
-struct MyConnection: private NoCopy {
-    MyClient client() const {return MyClient();}
-};
-
-MyConnection Connections[N];
-
-MyJob Job[N];
-rml::internal::job_automaton JobAutomaton[N];
-
-typedef rml::internal::ring<MyConnection> MyRingType;
-
-void CheckSizeAndRandomizeCursor( MyRingType& r, size_t size ) {
-    Count = 0;
-    r.for_each_job( &MyClient::tally ) ;
-    ASSERT( Count==size, NULL );
-    if( size ) {
-        // March cursor around to semi-random point
-        size_t delta = size_t(rand()) % size;
-        for( size_t m=0; m<delta; ++m )
-            r.advance_cursor();
-    }
-}
-
-#include <cstdlib>
-
-int main() {
-    srand(2);
-    // Trials differ in randomization of cursor
-    for( int trial=0; trial<20; ++trial ) {
-        MyRingType r;
-        ASSERT( r.cursor()==NULL, NULL );
-        // Add some jobs
-        for( size_t i=0; i<N; ++i ) {
-            MyJob& job = Job[i*17%N];
-            MyJob* current_job = static_cast<MyJob*>(r.cursor() ? &r.cursor()->job() : NULL);
-            r.insert( Connections[i*61%N], job, JobAutomaton[i*17%N] );
-            ASSERT( r.size()==i+1, NULL );
-            if( current_job )
-                ASSERT( &r.cursor()->job()==current_job, "insertion did not preserve cursor position" );
-            else 
-                ASSERT( &r.cursor()->job()==&job, "cursor not positioned after inserting into empty ring" );
-            job.tag = i+1;
-            CheckSizeAndRandomizeCursor(r,i+1);
-            // Walk around ring once
-            size_t sum = 0;
-            for( size_t k=0; k<=i; ++k ) {
-                // Use const object here for sake of testing that cursor() is const.
-                const MyRingType& cr = r;
-                sum += static_cast<MyJob&>(cr.cursor()->job()).tag;
-                r.advance_cursor();
-            }
-            ASSERT( sum==(i+1)*(i+2)/2, NULL );
-        }
-        // Remove the jobs
-        for( size_t k=0; k<N; ++k ) {
-            // Get current and next cursor position.
-            MyJob* current_job = static_cast<MyJob*>(&r.cursor()->job());
-            r.advance_cursor();
-            MyJob* next_job = static_cast<MyJob*>(&r.cursor()->job());
-            // Reposition cursor
-            for( size_t m=0; m<N-k-1; ++m )
-                r.advance_cursor();
-            ASSERT( current_job==&r.cursor()->job(), NULL );
-
-            size_t i = (k*23+trial)%N;
-            rml::internal::job_automaton* ja = r.erase( Connections[i*61%N] );
-            rml::job* j = Job+(ja-JobAutomaton);
-            ASSERT( r.size()==N-k-1, NULL );
-            if( current_job!=j ) {
-                ASSERT( &r.cursor()->job()==current_job, "erasure did not preserve cursor position" );
-            } else if( k+1<N ) {
-                ASSERT( next_job==&r.cursor()->job(), NULL );
-            } else {
-                ASSERT( !r.cursor(), NULL );
-            }
-            ASSERT( ja==JobAutomaton+i*17%N, "erase returned wrong job_automaton" );
-            static_cast<MyJob*>(j)->tag = 0;
-            CheckSizeAndRandomizeCursor(r,N-k-1);
-        }
-        ASSERT( r.cursor()==NULL, NULL );
-    }
-    // JobAutomaton objects must be plugged before being destroyed.
-    for( size_t k=0; k<N; ++k ) {
-        rml::job* j;
-        JobAutomaton[k].try_plug(j);
-    }
-    printf("done\n");
-    return 0;
-}
diff --git a/src/tbb/concurrent_queue.cpp b/src/tbb/concurrent_queue.cpp
index ac7e67a..33ce591 100644
--- a/src/tbb/concurrent_queue.cpp
+++ b/src/tbb/concurrent_queue.cpp
@@ -154,9 +154,9 @@ public:
 #if _WIN32||_WIN64
     uint32_t consumer_wait_generation;
     uint32_t n_consumers_to_wakeup;
-    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(size_t)+sizeof(uint32_t)+sizeof(uint32_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
+    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(atomic<size_t>)+sizeof(atomic<uint32_t>)+sizeof(uint32_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
 #else
-    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(size_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
+    char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(atomic<size_t>)+sizeof(atomic<uint32_t>))&(NFS_MaxLineSize-1))];
 #endif
 
     atomic<ticket> tail_counter;
@@ -166,14 +166,14 @@ public:
 #if _WIN32||_WIN64
     uint32_t producer_wait_generation;
     uint32_t n_producers_to_wakeup;
-    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint32_t)+sizeof(uint32_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
+    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(atomic<uint32_t>)+sizeof(uint32_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
 #else
-    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(uint32_t))&(NFS_MaxLineSize-1))];
+    char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(waitvar_t)+sizeof(mutexvar_t)+sizeof(atomic<uint32_t>))&(NFS_MaxLineSize-1))];
 #endif
 #else /* !__TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
     atomic<ticket> head_counter;
     atomic<size_t> n_invalid_entries;
-    char pad1[NFS_MaxLineSize-sizeof(atomic<ticket>)-sizeof(size_t)];
+    char pad1[NFS_MaxLineSize-sizeof(atomic<ticket>)-sizeof(atomic<size_t>)];
     atomic<ticket> tail_counter;
     char pad2[NFS_MaxLineSize-sizeof(atomic<ticket>)];
 #endif /* __TBB_NO_BUSY_WAIT_IN_CONCURRENT_QUEUE */
diff --git a/src/tbb/concurrent_vector.cpp b/src/tbb/concurrent_vector.cpp
index 5a31c33..7dc51f4 100644
--- a/src/tbb/concurrent_vector.cpp
+++ b/src/tbb/concurrent_vector.cpp
@@ -43,7 +43,7 @@ using namespace std;
 namespace tbb {
 
 namespace internal {
-class concurrent_vector_base_v3::helper {
+    class concurrent_vector_base_v3::helper :no_assign {
 public:
     //! memory page size
     static const size_type page_size = 4096;
@@ -56,13 +56,13 @@ public:
         segment_t *s = v.my_segment;
         segment_index_t u = s==v.my_storage? pointers_per_short_table : pointers_per_long_table;
         segment_index_t k = 0;
-        while( k < u && s[k].array > __TBB_BAD_ALLOC )
+        while( k < u && s[k].array > internal::vector_allocation_error_flag )
             ++k;
         return k;
     }
 
     //! assign first segment size. k - is index of last segment to be allocated, not a count of segments
-    static void assign_first_segment_if_neccessary(concurrent_vector_base_v3 &v, segment_index_t k) {
+    inline static void assign_first_segment_if_neccessary(concurrent_vector_base_v3 &v, segment_index_t k) {
         if( !v.my_first_block ) {
             /* There was a suggestion to set first segment according to incompact_predicate:
             while( k && !helper::incompact_predicate(segment_size( k ) * element_size) )
@@ -91,13 +91,14 @@ public:
     }
 
     static size_type enable_segment(concurrent_vector_base_v3 &v, size_type k, size_type element_size) {
-        __TBB_ASSERT( v.my_segment[k].array <= __TBB_BAD_ALLOC, "concurrent operation during growth?" );
+        segment_t* s = v.my_segment; // TODO: optimize out as argument? Optimize accesses to my_first_block
+        __TBB_ASSERT( s[k].array <= internal::vector_allocation_error_flag, "concurrent operation during growth?" );
         if( !k ) {
             assign_first_segment_if_neccessary(v, default_initial_segments-1);
             try {
-                publish_segment(v.my_segment[0], allocate_segment(v, segment_size(v.my_first_block) ) );
-            } catch(...) { // intercept exception here, assign __TBB_BAD_ALLOC value, re-throw exception
-                publish_segment(v.my_segment[0], __TBB_BAD_ALLOC); throw;
+                publish_segment(s[0], allocate_segment(v, segment_size(v.my_first_block) ) );
+            } catch(...) { // intercept exception here, assign internal::vector_allocation_error_flag value, re-throw exception
+                publish_segment(s[0], internal::vector_allocation_error_flag); throw;
             }
             return 2;
         }
@@ -105,7 +106,6 @@ public:
         if( !v.my_first_block ) // push_back only
             spin_wait_while_eq( v.my_first_block, segment_index_t(0) );
         if( k < v.my_first_block ) {
-            segment_t* s = v.my_segment;
             // s[0].array is changed only once ( 0 -> !0 ) and points to uninitialized memory
             void *array0 = __TBB_load_with_acquire(s[0].array);
             if( !array0 ) {
@@ -115,8 +115,8 @@ public:
                 array0 = __TBB_load_with_acquire(s[0].array);
             }
             ITT_NOTIFY(sync_acquired, &s[0].array);
-            if( array0 <= __TBB_BAD_ALLOC ) { // check for __TBB_BAD_ALLOC of initial segment
-                publish_segment(s[k], __TBB_BAD_ALLOC); // and assign __TBB_BAD_ALLOC here
+            if( array0 <= internal::vector_allocation_error_flag ) { // check for internal::vector_allocation_error_flag of initial segment
+                publish_segment(s[k], internal::vector_allocation_error_flag); // and assign internal::vector_allocation_error_flag here
                 throw bad_last_alloc(); // throw custom exception
             }
             publish_segment( s[k],
@@ -124,34 +124,155 @@ public:
             );
         } else {
             try {
-                publish_segment(v.my_segment[k], allocate_segment(v, m));
-            } catch(...) { // intercept exception here, assign __TBB_BAD_ALLOC value, re-throw exception
-                publish_segment(v.my_segment[k], __TBB_BAD_ALLOC); throw;
+                publish_segment(s[k], allocate_segment(v, m));
+            } catch(...) { // intercept exception here, assign internal::vector_allocation_error_flag value, re-throw exception
+                publish_segment(s[k], internal::vector_allocation_error_flag); throw;
             }
         }
         return m;
     }
 
-    inline static void extend_table_if_necessary(concurrent_vector_base_v3 &v, size_type k) {
+    inline static void extend_table_if_necessary(concurrent_vector_base_v3 &v, size_type k, size_type start ) {
         if(k >= pointers_per_short_table && v.my_segment == v.my_storage)
-            extend_segment_table(v);
+            extend_segment_table(v, start );
     }
 
-    static void extend_segment_table(concurrent_vector_base_v3 &v) {
-        segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_table, sizeof(segment_t), NULL );
-        // if( !s ) throw bad_alloc() -- implemented in NFS_Allocate
-        memset( s, 0, pointers_per_long_table*sizeof(segment_t) );
+    static void extend_segment_table(concurrent_vector_base_v3 &v, size_type start) {
+        if( start > segment_size(pointers_per_short_table) ) start = segment_size(pointers_per_short_table);
         // If other threads are trying to set pointers in the short segment, wait for them to finish their
         // assigments before we copy the short segment to the long segment. Note: grow_to_at_least depends on it
-        for(segment_index_t i = 0; i < pointers_per_short_table; i++)
-            if(!v.my_storage[i].array)
-                spin_wait_while_eq(v.my_storage[i].array, (void*)0);
+        for( segment_index_t i = 0; segment_base(i) < start && v.my_segment == v.my_storage; i++ )
+            if(!v.my_storage[i].array) {
+                ITT_NOTIFY(sync_prepare, &v.my_storage[i].array);
+                atomic_backoff backoff;
+                do backoff.pause(); while( v.my_segment == v.my_storage && !v.my_storage[i].array );
+                ITT_NOTIFY(sync_acquired, &v.my_storage[i].array);
+            }
+        if( v.my_segment != v.my_storage ) return;
 
+        segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_table, sizeof(segment_t), NULL );
+        // if( !s ) throw bad_alloc() -- implemented in NFS_Allocate
+        memset( s, 0, pointers_per_long_table*sizeof(segment_t) );
         for( segment_index_t i = 0; i < pointers_per_short_table; i++)
             s[i] = v.my_storage[i];
         if( v.my_segment.compare_and_swap( s, v.my_storage ) != v.my_storage )
             NFS_Free( s );
     }
+
+    inline static segment_t &acquire_segment(concurrent_vector_base_v3 &v, size_type index, size_type element_size, bool owner) {
+        segment_t &s = v.my_segment[index]; // TODO: pass v.my_segment as arument
+        if( !__TBB_load_with_acquire(s.array) ) { // do not check for internal::vector_allocation_error_flag 
+            if( owner ) {
+                enable_segment( v, index, element_size );
+            } else {
+                ITT_NOTIFY(sync_prepare, &s.array);
+                spin_wait_while_eq( s.array, (void*)0 );
+                ITT_NOTIFY(sync_acquired, &s.array);
+            }
+        } else {
+            ITT_NOTIFY(sync_acquired, &s.array);
+        }
+        if( s.array <= internal::vector_allocation_error_flag ) // check for internal::vector_allocation_error_flag
+            throw bad_last_alloc(); // throw custom exception, because it's hard to recover after internal::vector_allocation_error_flag correctly
+        return s;
+    }
+
+    ///// non-static fields of helper for exception-safe iteration across segments
+    segment_t *table;// TODO: review all segment_index_t as just short type
+    size_type first_block, k, sz, start, finish, element_size;
+    helper(segment_t *segments, size_type fb, size_type esize, size_type index, size_type s, size_type f) throw()
+        : table(segments), first_block(fb), k(index), sz(0), start(s), finish(f), element_size(esize) {}
+    inline void first_segment() throw() {
+        __TBB_ASSERT( start <= finish, NULL );
+        __TBB_ASSERT( first_block || !finish, NULL );
+        if( k < first_block ) k = 0; // process solid segment at a time
+        size_type base = segment_base( k );
+        __TBB_ASSERT( base <= start, NULL );
+        finish -= base; start -= base; // rebase as offsets from segment k
+        sz = k ? base : segment_size( first_block ); // sz==base for k>0
+    }
+    inline void next_segment() throw() {
+        finish -= sz; start = 0; // offsets from next segment
+        if( !k ) k = first_block;
+        else { ++k; sz <<= 1; }
+    }
+    template<typename F>
+    inline size_type apply(const F &func) {
+        first_segment();
+        while( sz < finish ) { // work for more than one segment
+            func( table[k], static_cast<char*>(table[k].array)+element_size*start, sz-start );
+            next_segment();
+        }
+        func( table[k], static_cast<char*>(table[k].array)+element_size*start, finish-start );
+        return k;
+    }
+    inline void *get_segment_ptr(size_type index, bool wait) {
+        segment_t &s = table[index];
+        if( !__TBB_load_with_acquire(s.array) && wait ) {
+            ITT_NOTIFY(sync_prepare, &s.array);
+            spin_wait_while_eq( s.array, (void*)0 );
+            ITT_NOTIFY(sync_acquired, &s.array);
+        }
+        return s.array;
+    }
+    ~helper() {
+        if( sz >= finish ) return; // the work is done correctly
+        if( !sz ) { // allocation failed, restore the table
+            segment_index_t k_start = k, k_end = segment_index_of(finish-1);
+            if( segment_base( k_start ) < start )
+                get_segment_ptr(k_start++, true); // wait
+            if( k_start < first_block ) {
+                void *array0 = get_segment_ptr(0, start>0); // wait if necessary
+                if( array0 && !k_start ) ++k_start;
+                if( array0 <= internal::vector_allocation_error_flag )
+                    for(; k_start < first_block && k_start <= k_end; ++k_start )
+                        publish_segment(table[k_start], internal::vector_allocation_error_flag);
+                else for(; k_start < first_block && k_start <= k_end; ++k_start )
+                        publish_segment(table[k_start], static_cast<void*>(
+                            static_cast<char*>(array0) + segment_base(k_start)*element_size) );
+            }
+            for(; k_start <= k_end; ++k_start ) // not in first block
+                if( !__TBB_load_with_acquire(table[k_start].array) )
+                    publish_segment(table[k_start], internal::vector_allocation_error_flag);
+            // fill alocated items
+            first_segment();
+            goto recover;
+        }
+        while( sz <= finish ) { // there is still work for at least one segment
+            next_segment();
+recover:
+            void *array = table[k].array;
+            if( array > internal::vector_allocation_error_flag )
+                std::memset( static_cast<char*>(array)+element_size*start, 0, ((sz<finish?sz:finish) - start)*element_size );
+            else __TBB_ASSERT( array == internal::vector_allocation_error_flag, NULL );
+        }
+    }
+    struct init_body {
+        internal_array_op2 func;
+        const void *arg;
+        init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {}
+        void operator()(segment_t &, void *begin, size_type n) const {
+            func( begin, arg, n );
+        }
+    };
+    struct safe_init_body {
+        internal_array_op2 func;
+        const void *arg;
+        safe_init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {}
+        void operator()(segment_t &s, void *begin, size_type n) const {
+            if( s.array <= internal::vector_allocation_error_flag )
+                throw bad_last_alloc(); // throw custom exception
+            func( begin, arg, n );
+        }
+    };
+    struct destroy_body {
+        internal_array_op1 func;
+        destroy_body(internal_array_op1 destroy) : func(destroy) {}
+        void operator()(segment_t &s, void *begin, size_type n) const {
+            if( s.array > internal::vector_allocation_error_flag )
+                func( begin, n );
+        }
+    };
 };
 
 concurrent_vector_base_v3::~concurrent_vector_base_v3() {
@@ -160,9 +281,9 @@ concurrent_vector_base_v3::~concurrent_vector_base_v3() {
         // Clear short segment.
         for( segment_index_t i = 0; i < pointers_per_short_table; i++)
             my_storage[i].array = NULL;
-#if 0 && TBB_USE_DEBUG // TODO: current copy constructor couses it to fail
+#if TBB_USE_DEBUG
         for( segment_index_t i = 0; i < pointers_per_long_table; i++)
-            __TBB_ASSERT( my_segment[i].array <= __TBB_BAD_ALLOC, "should have been freed by clear");
+            __TBB_ASSERT( my_segment[i].array <= internal::vector_allocation_error_flag, "Segment should have been freed. Please recompile with new TBB before using exceptions.");
 #endif
         my_segment = my_storage;
         NFS_Free( s );
@@ -183,15 +304,15 @@ void concurrent_vector_base_v3::internal_throw_exception(size_type t) const {
 
 void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element_size, size_type max_size ) {
     if( n>max_size ) {
-        throw length_error("argument to ConcurrentVector::reserve exceeds ConcurrentVector::max_size()");
+        throw length_error("argument to concurrent_vector::reserve exceeds concurrent_vector::max_size()");
     }
     __TBB_ASSERT( n, NULL );
     helper::assign_first_segment_if_neccessary(*this, segment_index_of(n-1));
     segment_index_t k = helper::find_segment_end(*this);
     try {
         for( ; segment_base(k)<n; ++k ) {
-            helper::extend_table_if_necessary(*this, k);
-            if(my_segment[k].array <= __TBB_BAD_ALLOC)
+            helper::extend_table_if_necessary(*this, k, 0);
+            if(my_segment[k].array <= internal::vector_allocation_error_flag)
                 helper::enable_segment(*this, k, element_size);
         }
     } catch(...) {
@@ -201,19 +322,19 @@ void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element
 
 void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy ) {
     size_type n = src.my_early_size;
-    my_early_size = n;
-    my_segment = my_storage;
+    __TBB_ASSERT( my_segment == my_storage, NULL);
     if( n ) {
-        helper::assign_first_segment_if_neccessary(*this, segment_index_of(n));
+        helper::assign_first_segment_if_neccessary(*this, segment_index_of(n-1));
         size_type b;
         for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) {
             if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table)
-                || src.my_segment[k].array <= __TBB_BAD_ALLOC ) {
+                || src.my_segment[k].array <= internal::vector_allocation_error_flag ) {
                 my_early_size = b; break;
             }
-            helper::extend_table_if_necessary(*this, k);
+            helper::extend_table_if_necessary(*this, k, 0);
             size_type m = helper::enable_segment(*this, k, element_size);
-            if( m > n-b ) m = n-b; 
+            if( m > n-b ) m = n-b;
+            my_early_size = b+m;
             copy( my_segment[k].array, src.my_segment[k].array, m );
         }
     }
@@ -221,12 +342,12 @@ void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3&
 
 void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) {
     size_type n = src.my_early_size;
-    while( my_early_size>n ) { 
+    while( my_early_size>n ) { // TODO: improve
         segment_index_t k = segment_index_of( my_early_size-1 );
         size_type b=segment_base(k);
         size_type new_end = b>=n ? b : n;
         __TBB_ASSERT( my_early_size>new_end, NULL );
-        if( my_segment[k].array <= __TBB_BAD_ALLOC) // check vector was broken before
+        if( my_segment[k].array <= internal::vector_allocation_error_flag) // check vector was broken before
             throw bad_last_alloc(); // throw custom exception
         // destructors are supposed to not throw any exceptions
         destroy( (char*)my_segment[k].array+element_size*(new_end-b), my_early_size-new_end );
@@ -237,13 +358,15 @@ void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3
     helper::assign_first_segment_if_neccessary(*this, segment_index_of(n));
     size_type b;
     for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) {
-        helper::extend_table_if_necessary(*this, k);
-        if(!my_segment[k].array)
-            helper::enable_segment(*this, k, element_size);
         if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table)
-            || src.my_segment[k].array <= __TBB_BAD_ALLOC ) { // if source is damaged
-                my_early_size = b; break;
+            || src.my_segment[k].array <= internal::vector_allocation_error_flag ) { // if source is damaged
+                my_early_size = b; break; // TODO: it may cause undestructed items
         }
+        helper::extend_table_if_necessary(*this, k, 0);
+        if( !my_segment[k].array )
+            helper::enable_segment(*this, k, element_size);
+        else if( my_segment[k].array <= internal::vector_allocation_error_flag )
+            throw bad_last_alloc(); // throw custom exception
         size_type m = k? segment_size(k) : 2;
         if( m > n-b ) m = n-b;
         size_type a = 0;
@@ -257,7 +380,7 @@ void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3
         if( m>0 )
             copy( (char*)my_segment[k].array+a, (char*)src.my_segment[k].array+a, m );
     }
-    __TBB_ASSERT( src.my_early_size==n, "detected use of ConcurrentVector::operator= with right side that was concurrently modified" );
+    __TBB_ASSERT( src.my_early_size==n, "detected use of concurrent_vector::operator= with right side that was concurrently modified" );
 }
 
 void* concurrent_vector_base_v3::internal_push_back( size_type element_size, size_type& index ) {
@@ -266,21 +389,8 @@ void* concurrent_vector_base_v3::internal_push_back( size_type element_size, siz
     index = tmp;
     segment_index_t k_old = segment_index_of( tmp );
     size_type base = segment_base(k_old);
-    helper::extend_table_if_necessary(*this, k_old);
-    segment_t& s = my_segment[k_old];
-    if( !__TBB_load_with_acquire(s.array) ) { // do not check for __TBB_BAD_ALLOC because it's hard to recover after __TBB_BAD_ALLOC correctly
-        if( base==tmp ) {
-            helper::enable_segment(*this, k_old, element_size);
-        } else {
-            ITT_NOTIFY(sync_prepare, &s.array);
-            spin_wait_while_eq( s.array, (void*)0 );
-            ITT_NOTIFY(sync_acquired, &s.array);
-        }
-    } else {
-        ITT_NOTIFY(sync_acquired, &s.array);
-    }
-    if( s.array <= __TBB_BAD_ALLOC ) // check for __TBB_BAD_ALLOC
-        throw bad_last_alloc(); // throw custom exception
+    helper::extend_table_if_necessary(*this, k_old, tmp);
+    segment_t& s = helper::acquire_segment(*this, k_old, element_size, base==tmp);
     size_type j_begin = tmp-base;
     return (void*)((char*)s.array+element_size*j_begin);
 }
@@ -313,10 +423,13 @@ concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_to
             while( !__TBB_load_with_acquire(my_segment[i].array) ); // my_segment may change concurrently
             ITT_NOTIFY(sync_acquired, &s.array);
         }
-        if( my_segment[i].array <= __TBB_BAD_ALLOC )
+        if( my_segment[i].array <= internal::vector_allocation_error_flag )
             throw bad_last_alloc();
     }
-    __TBB_ASSERT( internal_capacity() >= new_size, NULL);
+#if TBB_USE_DEBUG
+    size_type capacity = internal_capacity();
+    __TBB_ASSERT( capacity >= new_size, NULL);
+#endif
     return e;
 }
 
@@ -328,99 +441,40 @@ concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_by
 
 void concurrent_vector_base_v3::internal_grow( const size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src ) {
     __TBB_ASSERT( start<finish, "start must be less than finish" );
-    size_type tmp = start;
-    helper::assign_first_segment_if_neccessary(*this, segment_index_of(finish));
-    do {
-        segment_index_t k_old = segment_index_of( tmp );
-        size_type base = segment_base(k_old);
-        helper::extend_table_if_necessary(*this, k_old);
-        segment_t& s = my_segment[k_old];
-        if( !__TBB_load_with_acquire(s.array) ) { // do not check for __TBB_BAD_ALLOC because it's hard to recover after __TBB_BAD_ALLOC correctly
-            if( base==tmp ) {
-                helper::enable_segment(*this, k_old, element_size);
-            } else {
-                ITT_NOTIFY(sync_prepare, &s.array);
-                spin_wait_while_eq( s.array, (void*)0 );
-                ITT_NOTIFY(sync_acquired, &s.array);
-            }
-        } else {
-            ITT_NOTIFY(sync_acquired, &s.array);
-        }
-        if( s.array <= __TBB_BAD_ALLOC ) // check for __TBB_BAD_ALLOC
-            throw bad_last_alloc(); // throw custom exception
-        size_type n = k_old?segment_size(k_old):2;
-        size_type j_begin = tmp-base;
-        size_type j_end = n > finish-base ? finish-base : n;
-        init( (void*)((char*)s.array+element_size*j_begin), src, j_end-j_begin );
-        tmp = base+j_end;
-    } while( tmp<finish );
+    segment_index_t k_start = segment_index_of(start), k_end = segment_index_of(finish-1);
+    helper::assign_first_segment_if_neccessary(*this, k_end);
+    helper::extend_table_if_necessary(*this, k_end, start);
+    helper range(my_segment, my_first_block, element_size, k_start, start, finish);
+    for(; k_end > k_start && k_end >= range.first_block; --k_end ) // allocate segments in reverse order
+        helper::acquire_segment(*this, k_end, element_size, true/*for k_end>k_start*/);
+    for(; k_start <= k_end; ++k_start ) // but allocate first block in straight order
+        helper::acquire_segment(*this, k_start, element_size, segment_base( k_start ) >= start );
+    range.apply( helper::init_body(init, src) );
 }
 
 void concurrent_vector_base_v3::internal_resize( size_type n, size_type element_size, size_type max_size, const void *src,
                                                 internal_array_op1 destroy, internal_array_op2 init ) {
     size_type j = my_early_size;
-    my_early_size = n;
     if( n > j ) { // construct items
         internal_reserve(n, element_size, max_size);
-        segment_index_t k = segment_index_of( j );
-        size_type i = my_first_block; // it should be read after call to reserve
-        if( k < i ) k = 0; // process solid segment at a time
-        segment_index_t b = segment_base( k );
-        n -= b; j -= b; // rebase as offsets from segment k
-        size_type sz = k ? b : segment_size( i ); // sz==b for k>0
-        while( sz < n ) { // work for more than one segment
-            void *array = my_segment[k].array;
-            if( array <= __TBB_BAD_ALLOC )
-                throw bad_last_alloc(); // throw custom exception
-            init( (void*)((char*)array+element_size*j), src, sz-j );
-            n -= sz; j = 0; // offsets from next segment
-            if( !k ) k = i;
-            else { ++k; sz <<= 1; }
-        }
-        void *array = my_segment[k].array;
-        if( array <= __TBB_BAD_ALLOC )
-            throw bad_last_alloc(); // throw custom exception
-        init( (void*)((char*)array+element_size*j), src, n-j );
+        my_early_size = n;
+        helper for_each(my_segment, my_first_block, element_size, segment_index_of(j), j, n);
+        for_each.apply( helper::safe_init_body(init, src) );
     } else {
-        segment_index_t k = segment_index_of( n );
-        size_type i = my_first_block;
-        if( k < i ) k = 0; // process solid segment at a time
-        segment_index_t b = segment_base( k );
-        n -= b; j -= b; // rebase as offsets from segment k
-        size_type sz = k ? b : segment_size( i ); // sz==b for k>0
-        while( sz < j ) { // work for more than one segment
-            void *array = my_segment[k].array;
-            if( array > __TBB_BAD_ALLOC )
-                destroy( (void*)((char*)array+element_size*n), sz-n);
-            j -= sz; n = 0;
-            if( !k ) k = i;
-            else { ++k; sz <<= 1; }
-        }
-        void *array = my_segment[k].array;
-        if( array > __TBB_BAD_ALLOC )
-            destroy( (void*)((char*)array+element_size*n), j-n);
+        my_early_size = n;
+        helper for_each(my_segment, my_first_block, element_size, segment_index_of(n), n, j);
+        for_each.apply( helper::destroy_body(destroy) );
     }
 }
 
 concurrent_vector_base_v3::segment_index_t concurrent_vector_base_v3::internal_clear( internal_array_op1 destroy ) {
     __TBB_ASSERT( my_segment, NULL );
-    const size_type k_end = helper::find_segment_end(*this);
-    size_type finish = my_early_size;
-    // Set "my_early_size" early, so that subscripting errors can be caught.
+    size_type j = my_early_size;
     my_early_size = 0;
-    while( finish > 0 ) {
-        segment_index_t k_old = segment_index_of(finish-1);
-        size_type base = segment_base(k_old);
-        size_type j_end = finish-base;
-        finish = base;
-        if( k_old <= k_end ) {
-            segment_t& s = my_segment[k_old];
-            __TBB_ASSERT( j_end, NULL );
-            if( s.array > __TBB_BAD_ALLOC)
-                destroy( s.array, j_end ); // destructors are supposed to not throw any exceptions
-        }
-    }
-    return k_end;
+    helper for_each(my_segment, my_first_block, 0, 0, 0, j); // element_size is safe to be zero if 'start' is zero
+    j = for_each.apply( helper::destroy_body(destroy) );
+    size_type i = helper::find_segment_end(*this);
+    return j < i? i : j+1;
 }
 
 void *concurrent_vector_base_v3::internal_compact( size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy )
@@ -450,12 +504,18 @@ void *concurrent_vector_base_v3::internal_compact( size_type element_size, void
         // copy items to the new segment
         size_type my_segment_size = segment_size( first_block );
         for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) {
-            __TBB_ASSERT( segment_table[i].array > __TBB_BAD_ALLOC, NULL);
+            __TBB_ASSERT( segment_table[i].array > internal::vector_allocation_error_flag, NULL);
             void *s = static_cast<void*>(
                 static_cast<char*>(seg) + segment_base(i)*element_size );
             if(j + my_segment_size >= my_size) my_segment_size = my_size - j;
-            // exception can occur here
-            copy( s, segment_table[i].array, my_segment_size );
+            try { // exception can occur here
+                copy( s, segment_table[i].array, my_segment_size );
+            } catch(...) { // destroy all the already copied items
+                helper for_each(reinterpret_cast<segment_t*>(&old.table[0]), old.first_block, element_size,
+                    0, 0, segment_base(i)+my_segment_size);
+                for_each.apply( helper::destroy_body(destroy) );
+                throw;
+            }
             my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block );
         }
         // commit the changes
diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp
index 12d9a30..f6de510 100644
--- a/src/tbb/dynamic_link.cpp
+++ b/src/tbb/dynamic_link.cpp
@@ -48,7 +48,7 @@ OPEN_INTERNAL_NAMESPACE
 
 #if __TBB_WEAK_SYMBOLS
 
-bool dynamic_link( const char* /*library*/, const dynamic_link_descriptor descriptors[], size_t n, size_t required )
+bool dynamic_link( void*, const dynamic_link_descriptor descriptors[], size_t n, size_t required )
 {
     if ( required == ~(size_t)0 )
         required = n;
@@ -92,6 +92,7 @@ bool dynamic_link( void* module, const dynamic_link_descriptor descriptors[], si
     return true;
 }
 
+#endif /* !__TBB_WEAK_SYMBOLS */
 bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t n, size_t required, dynamic_link_handle* handle )
 {
 #if _WIN32||_WIN64
@@ -128,6 +129,5 @@ void dynamic_unlink( dynamic_link_handle handle ) {
 #endif /* _WIN32||_WIN64 */    
     }
 }
-#endif /* !__TBB_WEAK_SYMBOLS */
 
 CLOSE_INTERNAL_NAMESPACE
diff --git a/src/tbb/dynamic_link.h b/src/tbb/dynamic_link.h
index b0c02e0..1439eca 100644
--- a/src/tbb/dynamic_link.h
+++ b/src/tbb/dynamic_link.h
@@ -95,9 +95,7 @@ bool dynamic_link( const char* libraryname,
                    size_t required = ~(size_t)0,
                    dynamic_link_handle* handle = 0 );
 
-#if !__TBB_WEAK_SYMBOLS
 void dynamic_unlink( dynamic_link_handle handle );
-#endif /* !__TBB_WEAK_SYMBOLS */
 
 CLOSE_INTERNAL_NAMESPACE
 
diff --git a/src/tbb/gate.h b/src/tbb/gate.h
deleted file mode 100644
index fb12836..0000000
--- a/src/tbb/gate.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
-    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
-
-    This file is part of Threading Building Blocks.
-
-    Threading Building Blocks is free software; you can redistribute it
-    and/or modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
-
-    Threading Building Blocks is distributed in the hope that it will be
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with Threading Building Blocks; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.
-*/
-
-#ifndef _TBB_Gate_H
-#define _TBB_Gate_H
-
-#include "itt_notify.h"
-
-namespace tbb {
-
-namespace internal {
-
-#if __TBB_RML
-//! Fake version of Gate for use with RML.
-/** Really just an atomic intptr_t with a compare-and-swap operation,
-    but wrapped in syntax that makes it look like a normal Gate object,
-    in order to minimize source changes for RML in task.cpp. */
-class Gate {
-public:
-    typedef intptr_t state_t;
-   
-    //! Get current state of gate
-    state_t get_state() const {
-        return state;
-    }
-
-#if defined(_MSC_VER) && defined(_Wp64)
-    // Workaround for overzealous compiler warnings in /Wp64 mode
-    #pragma warning (disable: 4244)
-#endif
-
-    bool try_update( intptr_t value, intptr_t comparand ) {
-        return state.compare_and_swap(value,comparand)==comparand;
-    }
-private:
-    atomic<state_t> state;
-};
-
-#elif __TBB_USE_FUTEX
-
-//! Implementation of Gate based on futex.
-/** Use this futex-based implementation where possible, because it is the simplest and usually fastest. */
-class Gate {
-public:
-    typedef intptr_t state_t;
-
-    Gate() {
-        ITT_SYNC_CREATE(&state, SyncType_Scheduler, SyncObj_Gate);
-    }
-
-    //! Get current state of gate
-    state_t get_state() const {
-        return state;
-    }
-    //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
-        __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
-retry:
-        state_t old_state = state;
-        // First test for condition without using atomic operation
-        if( flip ? old_state!=comparand : old_state==comparand ) {
-            // Now atomically retest condition and set.
-            state_t s = state.compare_and_swap( value, old_state );
-            if( s==old_state ) {
-                // compare_and_swap succeeded
-                if( value!=0 )   
-                    futex_wakeup_all( &state );  // Update was successful and new state is not SNAPSHOT_EMPTY
-            } else {
-                // compare_and_swap failed.  But for != case, failure may be spurious for our purposes if
-                // the value there is nonetheless not equal to value.  This is a fairly rare event, so
-                // there is no need for backoff.  In event of such a failure, we must retry.
-                if( flip && s!=value ) 
-                    goto retry;
-            }
-        }
-    }
-    //! Wait for state!=0.
-    void wait() {
-        if( state==0 )
-            futex_wait( &state, 0 );
-    }
-private:
-    atomic<state_t> state;
-};
-
-#elif USE_WINTHREAD
-
-class Gate {
-public:
-    typedef intptr_t state_t;
-private:
-    //! If state==0, then thread executing wait() suspend until state becomes non-zero.
-    state_t state;
-    CRITICAL_SECTION critical_section;
-    HANDLE event;
-public:
-    //! Initialize with count=0
-    Gate() : state(0) {
-        event = CreateEvent( NULL, true, false, NULL );
-        InitializeCriticalSection( &critical_section );
-        ITT_SYNC_CREATE(&event, SyncType_Scheduler, SyncObj_Gate);
-        ITT_SYNC_CREATE(&critical_section, SyncType_Scheduler, SyncObj_GateLock);
-    }
-    ~Gate() {
-        // Fake prepare/acquired pair for Intel(R) Parallel Amplifier to correctly attribute the operations below
-        ITT_NOTIFY( sync_prepare, &event );
-        CloseHandle( event );
-        DeleteCriticalSection( &critical_section );
-        ITT_NOTIFY( sync_acquired, &event );
-    }
-    //! Get current state of gate
-    state_t get_state() const {
-        return state;
-    }
-    //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
-        __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
-        EnterCriticalSection( &critical_section );
-        state_t old = state;
-        if( flip ? old!=comparand : old==comparand ) {
-            state = value;
-            if( !old )
-                SetEvent( event );
-            else if( !value )
-                ResetEvent( event );
-        }
-        LeaveCriticalSection( &critical_section );
-    }
-    //! Wait for state!=0.
-    void wait() {
-        if( state==0 ) {
-            WaitForSingleObject( event, INFINITE );
-        }
-    }
-};
-
-#elif USE_PTHREAD
-
-class Gate {
-public:
-    typedef intptr_t state_t;
-private:
-    //! If state==0, then thread executing wait() suspend until state becomes non-zero.
-    state_t state;
-    pthread_mutex_t mutex;
-    pthread_cond_t cond;
-public:
-    //! Initialize with count=0
-    Gate() : state(0)
-    {
-        pthread_mutex_init( &mutex, NULL );
-        pthread_cond_init( &cond, NULL);
-        ITT_SYNC_CREATE(&cond, SyncType_Scheduler, SyncObj_Gate);
-        ITT_SYNC_CREATE(&mutex, SyncType_Scheduler, SyncObj_GateLock);
-    }
-    ~Gate() {
-        pthread_cond_destroy( &cond );
-        pthread_mutex_destroy( &mutex );
-    }
-    //! Get current state of gate
-    state_t get_state() const {
-        return state;
-    }
-    //! Update state=value if state==comparand (flip==false) or state!=comparand (flip==true)
-    void try_update( intptr_t value, intptr_t comparand, bool flip=false ) {
-        __TBB_ASSERT( comparand!=0 || value!=0, "either value or comparand must be non-zero" );
-        pthread_mutex_lock( &mutex );
-        state_t old = state;
-        if( flip ? old!=comparand : old==comparand ) {
-            state = value;
-            if( !old )
-                pthread_cond_broadcast( &cond );
-        }
-        pthread_mutex_unlock( &mutex );
-    }
-    //! Wait for state!=0.
-    void wait() {
-        if( state==0 ) {
-            pthread_mutex_lock( &mutex );
-            while( state==0 ) {
-                pthread_cond_wait( &cond, &mutex );
-            }
-            pthread_mutex_unlock( &mutex );
-        }
-    }
-};
-
-#else
-#error Must define USE_PTHREAD or USE_WINTHREAD
-#endif  /* threading kind */
-
-} // namespace Internal
-
-} // namespace ThreadingBuildingBlocks
-
-#endif /* _TBB_Gate_H */
diff --git a/src/tbb/itt_notify.h b/src/tbb/itt_notify.h
index c5dc20b..db8aefc 100644
--- a/src/tbb/itt_notify.h
+++ b/src/tbb/itt_notify.h
@@ -81,7 +81,6 @@ namespace tbb {
             *SyncType_Scheduler;
     //! Display names of internal synchronization components/scenarios
     extern const tchar 
-            *SyncObj_LibraryInitialization,
             *SyncObj_SchedulerInitialization,
             *SyncObj_SchedulersList,
             *SyncObj_TaskStealingLoop,
diff --git a/src/tbb/pipeline.cpp b/src/tbb/pipeline.cpp
index 78ecb99..822609b 100644
--- a/src/tbb/pipeline.cpp
+++ b/src/tbb/pipeline.cpp
@@ -43,13 +43,19 @@ struct task_info {
     Token my_token;
     //! False until my_token is set.
     bool my_token_ready;
+    //! True if my_object is valid.
     bool is_valid;
+    //! Set to initial state (no object, no token)
+    void reset() {
+        my_object = NULL;
+        my_token = 0;
+        my_token_ready = false;
+        is_valid = false;
+    }
 };
-static task_info empty_info = {NULL, 0, false, false};
-
 //! A buffer of input items for a filter.
 /** Each item is a task_info, inserted into a position in the buffer corresponding to a Token. */
-class ordered_buffer {
+class input_buffer {
     friend class tbb::internal::pipeline_root_task;
     friend class tbb::thread_bound_filter;
 
@@ -87,7 +93,7 @@ class ordered_buffer {
     bool is_bound;
 public:
     //! Construct empty buffer.
-    ordered_buffer( bool is_ordered_, bool is_bound_ ) : 
+    input_buffer( bool is_ordered_, bool is_bound_ ) : 
             array(NULL), array_size(0),
             low_token(0), high_token(0), 
             is_ordered(is_ordered_), is_bound(is_bound_) {
@@ -96,7 +102,7 @@ public:
     }
 
     //! Destroy the buffer.
-    ~ordered_buffer() {
+    ~input_buffer() {
         __TBB_ASSERT( array, NULL );
         cache_aligned_allocator<task_info>().deallocate(array,array_size);
         poison_pointer( array );
@@ -139,7 +145,8 @@ public:
     // Using template to avoid explicit dependency on stage_task
     template<typename StageTask>
     void note_done( Token token, StageTask& spawner ) {
-        task_info wakee = empty_info;
+        task_info wakee;
+        wakee.reset();
         {
             spin_mutex::scoped_lock lock( array_mutex );
             if( !is_ordered || token==low_token ) {
@@ -201,7 +208,7 @@ public:
     }
 };
 
-void ordered_buffer::grow( size_type minimum_size ) {
+void input_buffer::grow( size_type minimum_size ) {
     size_type old_size = array_size;
     size_type new_size = old_size ? 2*old_size : initial_buffer_size;
     while( new_size<minimum_size ) 
@@ -230,11 +237,12 @@ public:
     //! Construct stage_task for first stage in a pipeline.
     /** Such a stage has not read any input yet. */
     stage_task( pipeline& pipeline ) :
-        task_info(empty_info),
         my_pipeline(pipeline), 
         my_filter(pipeline.filter_list),
         my_at_start(true)
-    {}
+    {
+        task_info::reset();
+    }
     //! Construct stage_task for a subsequent stage in a pipeline.
     stage_task( pipeline& pipeline, filter* filter_, const task_info& info ) :
         task_info(info),
@@ -242,13 +250,19 @@ public:
         my_filter(filter_),
         my_at_start(false)
     {}
+    //! Roughly equivalent to the constructor of input stage task
+    void reset() {
+        task_info::reset();
+        my_filter = my_pipeline.filter_list;
+        my_at_start = true;
+    }
     //! The virtual task execution method
     /*override*/ task* execute();
 #if __TBB_EXCEPTIONS
     ~stage_task()    
     {
         if (my_filter && my_object && (my_filter->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4)) {
-            __TBB_ASSERT(is_cancelled(), "Tryning to finalize the task that wasn't cancelled");
+            __TBB_ASSERT(is_cancelled(), "Trying to finalize the task that wasn't cancelled");
             my_filter->finalize(my_object);
             my_object = NULL;
         }
@@ -284,9 +298,14 @@ task* stage_task::execute() {
                     if( my_pipeline.has_thread_bound_filters )
                         my_pipeline.token_counter++; // ideally, with relaxed semantics
                 }
-                ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens );
-                if( --my_pipeline.input_tokens>0 ) 
-                    spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
+                if( !my_filter->next_filter_in_pipeline ) {
+                    reset();
+                    goto process_another_stage;
+                } else {
+                    ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens );
+                    if( --my_pipeline.input_tokens>0 )
+                        spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
+                }
             } else {
                 my_pipeline.end_of_input = true; 
                 return NULL;
@@ -315,9 +334,8 @@ task* stage_task::execute() {
     } else {
         my_object = (*my_filter)(my_object);
         if( my_filter->is_serial() )
-            my_filter->input_buffer->note_done(my_token, *this);
+            my_filter->my_input_buffer->note_done(my_token, *this);
     }
-    task* next = NULL;
     my_filter = my_filter->next_filter_in_pipeline; 
     if( my_filter ) {
         // There is another filter to execute.
@@ -325,7 +343,7 @@ task* stage_task::execute() {
         add_to_depth(1);
         if( my_filter->is_serial() ) {
             // The next filter must execute tokens in order
-            if( my_filter->input_buffer->put_token(*this) ){
+            if( my_filter->my_input_buffer->put_token(*this) ){
                 // Can't proceed with the same item
                 if( my_filter->is_bound() ) {
                     // Find the next non-thread-bound filter
@@ -333,31 +351,27 @@ task* stage_task::execute() {
                         my_filter = my_filter->next_filter_in_pipeline;
                     } while( my_filter && my_filter->is_bound() );
                     // Check if there is an item ready to process
-                    if( my_filter && my_filter->input_buffer->return_item(*this, !my_filter->is_serial()) ) 
+                    if( my_filter && my_filter->my_input_buffer->return_item(*this, !my_filter->is_serial()) ) 
                         goto process_another_stage;
                 } 
                 my_filter = NULL; // To prevent deleting my_object twice if exception occurs
                 return NULL;
             }
         }
-process_another_stage:
-        /* A semi-hackish way to reexecute the same task object immediately without spawning.
-           recycle_as_continuation marks the task for future execution,
-           and then 'this' pointer is returned to bypass spawning. */
-        recycle_as_continuation();
-        next = this;
     } else {
-        // Reached end of the pipe.  Inject a new token.
-        // The token must be injected before execute() returns, in order to prevent the
-        // parent's reference count from prematurely reaching 0.
-        set_depth( parent()->depth()+1 ); 
-        if( ++my_pipeline.input_tokens==1 ) {
-            ITT_NOTIFY( sync_acquired, &my_pipeline.input_tokens );
-            if( !my_pipeline.end_of_input && !my_pipeline.filter_list->is_bound() ) 
-                spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) );
-        }
+        // Reached end of the pipe.
+        if( ++my_pipeline.input_tokens>1 || my_pipeline.end_of_input || my_pipeline.filter_list->is_bound() )
+            return NULL; // No need to recycle for new input
+        ITT_NOTIFY( sync_acquired, &my_pipeline.input_tokens );
+        // Recycle as an input stage task.
+        reset();
     }
-    return next;
+process_another_stage:
+    /* A semi-hackish way to reexecute the same task object immediately without spawning.
+       recycle_as_continuation marks the task for future execution,
+       and then 'this' pointer is returned to bypass spawning. */
+    recycle_as_continuation();
+    return this;
 }
 
 class pipeline_root_task: public task {
@@ -381,10 +395,11 @@ class pipeline_root_task: public task {
                 __TBB_ASSERT( !current_filter->is_bound(), "filter is thread-bound?" );
                 __TBB_ASSERT( current_filter->prev_filter_in_pipeline->is_bound(), "previous filter is not thread-bound?" );
                 if( !my_pipeline.end_of_input
-                    || (tokendiff_t)(my_pipeline.token_counter - current_filter->input_buffer->low_token)>0 )
+                    || (tokendiff_t)(my_pipeline.token_counter - current_filter->my_input_buffer->low_token) > 0 )
                 {
-                    task_info info = empty_info;
-                    if( current_filter->input_buffer->return_item(info, !current_filter->is_serial()) ) {
+                    task_info info;
+                    info.reset();
+                    if( current_filter->my_input_buffer->return_item(info, !current_filter->is_serial()) ) {
                         set_ref_count(1);
                         recycle_as_continuation();
                         return new( allocate_child() ) stage_task( my_pipeline, current_filter, info);
@@ -468,7 +483,7 @@ void pipeline::inject_token( task& ) {
 void pipeline::clear_filters() {
     for( filter* f = filter_list; f; f = f->next_filter_in_pipeline ) {
         if ((f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4))
-            if( internal::ordered_buffer* b = f->input_buffer )
+            if( internal::input_buffer* b = f->my_input_buffer )
                 b->clear(f);
     }
 }
@@ -492,9 +507,9 @@ pipeline::~pipeline() {
 void pipeline::clear() {
     filter* next;
     for( filter* f = filter_list; f; f=next ) {
-        if( internal::ordered_buffer* b = f->input_buffer ) {
+        if( internal::input_buffer* b = f->my_input_buffer ) {
             delete b; 
-            f->input_buffer = NULL;
+            f->my_input_buffer = NULL;
         }
         next=f->next_filter_in_pipeline;
         f->next_filter_in_pipeline = filter::not_in_pipeline();
@@ -538,15 +553,15 @@ void pipeline::add_filter( filter& filter_ ) {
         if( filter_.is_serial() ) {
             if( filter_.is_bound() )
                 has_thread_bound_filters = true;
-            filter_.input_buffer = new internal::ordered_buffer( filter_.is_ordered(), filter_.is_bound() );
+            filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), filter_.is_bound() );
         }
         else {
             if( filter_.prev_filter_in_pipeline && filter_.prev_filter_in_pipeline->is_bound() )
-                filter_.input_buffer = new internal::ordered_buffer( false, false );
+                filter_.my_input_buffer = new internal::input_buffer( false, false );
         }
     } else {
         if( filter_.is_serial() ) {
-            filter_.input_buffer = new internal::ordered_buffer( filter_.is_ordered(), false );
+            filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), false );
         }
     }
 
@@ -565,9 +580,9 @@ void pipeline::remove_filter( filter& filter_ ) {
         __TBB_ASSERT( filter_.next_filter_in_pipeline, "filter list broken?" ); 
         filter_.next_filter_in_pipeline->prev_filter_in_pipeline = filter_.prev_filter_in_pipeline;
     }
-    if( internal::ordered_buffer* b = filter_.input_buffer ) {
+    if( internal::input_buffer* b = filter_.my_input_buffer ) {
         delete b; 
-        filter_.input_buffer = NULL;
+        filter_.my_input_buffer = NULL;
     }
     filter_.next_filter_in_pipeline = filter_.prev_filter_in_pipeline = filter::not_in_pipeline();
     if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) )
@@ -583,23 +598,16 @@ void pipeline::run( size_t max_number_of_live_tokens
     __TBB_ASSERT( max_number_of_live_tokens>0, "pipeline::run must have at least one token" );
     __TBB_ASSERT( !end_counter, "pipeline already running?" );
     if( filter_list ) {
-        if( filter_list->next_filter_in_pipeline || !filter_list->is_serial() ) {
-            internal::pipeline_cleaner my_pipeline_cleaner(*this);
-            end_of_input = false;
+        internal::pipeline_cleaner my_pipeline_cleaner(*this);
+        end_of_input = false;
 #if __TBB_EXCEPTIONS            
-            end_counter = new( task::allocate_root(context) ) internal::pipeline_root_task( *this );
+        end_counter = new( task::allocate_root(context) ) internal::pipeline_root_task( *this );
 #else
-            end_counter = new( task::allocate_root() ) internal::pipeline_root_task( *this );
+        end_counter = new( task::allocate_root() ) internal::pipeline_root_task( *this );
 #endif
-            input_tokens = internal::Token(max_number_of_live_tokens);
-            // Start execution of tasks
-            task::spawn_root_and_wait( *end_counter );
-        } else {
-            // There are no filters, and thus no parallelism is possible.
-            // Just drain the input stream.
-            while( (*filter_list)(NULL) ) 
-                continue;
-        }
+        input_tokens = internal::Token(max_number_of_live_tokens);
+        // Start execution of tasks
+        task::spawn_root_and_wait( *end_counter );
     } 
 }
 
@@ -631,7 +639,8 @@ thread_bound_filter::result_type thread_bound_filter::try_process_item() {
 }
 
 thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool is_blocking) {
-    internal::task_info info = internal::empty_info;
+    internal::task_info info;
+    info.reset();
     
     if( !prev_filter_in_pipeline ) {
         if( my_pipeline->end_of_input )
@@ -655,8 +664,8 @@ thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool
             return end_of_stream; 
         }
     } else { /* this is not an input filter */
-        while( !input_buffer->return_item(info, /*advance=*/true) ) {
-            if( my_pipeline->end_of_input && input_buffer->low_token == my_pipeline->token_counter )
+        while( !my_input_buffer->return_item(info, /*advance=*/true) ) {
+            if( my_pipeline->end_of_input && my_input_buffer->low_token == my_pipeline->token_counter )
                 return end_of_stream;
             if( is_blocking )
                 __TBB_Yield();
@@ -666,7 +675,7 @@ thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool
         info.my_object = (*this)(info.my_object);
     }
     if( next_filter_in_pipeline ) {
-        next_filter_in_pipeline->input_buffer->put_item(info);
+        next_filter_in_pipeline->my_input_buffer->put_item(info);
     } else {
         my_pipeline->input_tokens++;
     }
diff --git a/src/tbb/private_server.cpp b/src/tbb/private_server.cpp
index b41ef0e..99234ea 100644
--- a/src/tbb/private_server.cpp
+++ b/src/tbb/private_server.cpp
@@ -67,6 +67,9 @@ class private_worker: no_copy {
     //! Associated client
     tbb_client& my_client; 
 
+    //! index used for avoiding the 64K aliasing problem
+    const size_t my_index;
+
     //! Monitor for sleeping when there is no work to do.
     /** The invariant that holds for sleeping workers is:
         "my_slack<=0 && my_state==st_normal && I am on server's list of asleep threads" */
@@ -86,9 +89,10 @@ class private_worker: no_copy {
     static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg );
 
 protected:
-    private_worker( private_server& server, tbb_client& client ) : 
+    private_worker( private_server& server, tbb_client& client, const size_t i ) : 
         my_server(server),
-        my_client(client)
+        my_client(client),
+        my_index(i)
     {
         my_state = st_init;
     }
@@ -106,7 +110,7 @@ static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize;
 class padded_private_worker: public private_worker {
     char pad[cache_line_size - sizeof(private_worker)%cache_line_size];
 public:
-    padded_private_worker( private_server& server, tbb_client& client ) : private_worker(server,client) {}
+    padded_private_worker( private_server& server, tbb_client& client, const size_t i ) : private_worker(server,client,i) {}
 };
 #if _MSC_VER && !defined(__INTEL_COMPILER)
     #pragma warning(pop)
@@ -185,11 +189,20 @@ public:
 //------------------------------------------------------------------------
 // Methods of private_worker
 //------------------------------------------------------------------------
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced
+    #pragma warning(push)
+    #pragma warning(disable:4189)
+#endif
 __RML_DECL_THREAD_ROUTINE private_worker::thread_routine( void* arg ) {
     private_worker* self = static_cast<private_worker*>(arg);
+    AVOID_64K_ALIASING( self->my_index );
     self->run();
     return NULL;
 }
+#if _MSC_VER && !defined(__INTEL_COMPILER)
+    #pragma warning(pop)
+#endif
 
 void private_worker::start_shutdown() {
     state_t s; 
@@ -254,7 +267,7 @@ private_server::private_server( tbb_client& client ) :
     memset( my_thread_array, 0, sizeof(private_worker)*my_n_thread );
     // FIXME - use recursive chain reaction to launch the threads.
     for( size_t i=0; i<my_n_thread; ++i ) {
-        private_worker* t = new( &my_thread_array[i] ) padded_private_worker( *this, client ); 
+        private_worker* t = new( &my_thread_array[i] ) padded_private_worker( *this, client, i ); 
         thread_monitor::launch( private_worker::thread_routine, t, stack_size );
     } 
 }
diff --git a/src/tbb/task.cpp b/src/tbb/task.cpp
index 1404057..8570522 100644
--- a/src/tbb/task.cpp
+++ b/src/tbb/task.cpp
@@ -73,7 +73,6 @@
 #include "tbb/tbb_machine.h"
 #include "tbb/mutex.h"
 #include "tbb/atomic.h"
-#include "tbb/gate.h"
 #if __TBB_SCHEDULER_OBSERVER
 #include "tbb/task_scheduler_observer.h"
 #include "tbb/spin_rw_mutex.h"
@@ -85,7 +84,6 @@
 
 #include "tbb/partitioner.h"
 
-#if __TBB_RML
 #include "../rml/include/rml_tbb.h"
 
 namespace tbb {
@@ -95,7 +93,6 @@ namespace tbb {
         }
     }
 }
-#endif /*__TBB_RML */
 
 #if DO_TBB_TRACE
 #include <cstdio>
@@ -129,22 +126,13 @@ namespace tbb {
     reinterpret_cast<class_name*>((char*)member_addr - __TBB_offsetof(class_name, member_name))
 #endif /* __TBB_EXCEPTIONS */
 
-// Macro __TBB_ALLOC_TASK_ARGS is an attempt to get rid of ugly ifdefs 
-// in the main part of the code. It drops some of its arguments depending on
-// whether the corresponding controlling macros are defined. 
+// This macro is an attempt to get rid of ugly ifdefs in the shared parts of the code. 
+// It drops the second argument depending on whether the controlling macro is defined. 
 // The first argument is just a convenience allowing to keep comma before the macro usage.
 #if __TBB_EXCEPTIONS
-#if __TBB_TASK_DEQUE
-    #define __TBB_ALLOC_TASK_ARGS(arg1, depth, context) arg1, context
-#else /* !__TBB_TASK_DEQUE */
-    #define __TBB_ALLOC_TASK_ARGS(arg1, depth, context) arg1, depth, context
-#endif /* !__TBB_TASK_DEQUE */
+    #define __TBB_CONTEXT_ARG(arg1, context) arg1, context
 #else /* !__TBB_EXCEPTIONS */
-#if __TBB_TASK_DEQUE
-    #define __TBB_ALLOC_TASK_ARGS(arg1, depth, context) arg1
-#else /* !__TBB_TASK_DEQUE */
-    #define __TBB_ALLOC_TASK_ARGS(arg1, depth, context) arg1, depth
-#endif /* !__TBB_TASK_DEQUE */
+    #define __TBB_CONTEXT_ARG(arg1, context) arg1
 #endif /* !__TBB_EXCEPTIONS */
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
@@ -169,7 +157,6 @@ using namespace std;
             *SyncType_Scheduler = _T("%Constant")
             ;
     const tchar 
-            *SyncObj_LibraryInitialization = _T("TbbLibraryInitialization"),
             *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"),
             *SyncObj_SchedulersList = _T("TbbSchedulersList"),
             *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"),
@@ -202,7 +189,6 @@ typedef void* thread_routine_return_type;
 typedef unsigned thread_routine_return_type;
 #endif
 
-#if __TBB_TASK_DEQUE
 //------------------------------------------------------------------------
 // General utility section
 //------------------------------------------------------------------------
@@ -307,7 +293,6 @@ protected:
 //------------------------------------------------------------------------
 // End of general utility section
 //------------------------------------------------------------------------
-#endif /* __TBB_TASK_DEQUE */
 
 //! Alignment for a task object
 const size_t task_alignment = 16;
@@ -318,9 +303,6 @@ const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/t
 
 template<typename SchedulerTraits> class CustomScheduler;
 
-#if !__TBB_TASK_DEQUE
-typedef task::depth_type depth_type;
-#endif /* !__TBB_TASK_DEQUE */
 
 class mail_outbox;
 
@@ -457,12 +439,21 @@ public:
     task_proxy* pop() {
         return my_putter->internal_pop();
     }
+    //! Indicate whether thread that reads this mailbox is idle.
+    /** Raises assertion failure if mailbox is redundantly marked as not idle. */
     void set_is_idle( bool value ) {
         if( my_putter ) {
-            __TBB_ASSERT( my_putter->my_is_idle==!value, NULL );
+            __TBB_ASSERT( my_putter->my_is_idle || value, "attempt to redundantly mark mailbox as not idle" );
             my_putter->my_is_idle = value;
         }
     }
+#if TBB_USE_ASSERT
+    //! Indicate whether thread that reads this mailbox is idle.
+    bool assert_is_idle( bool value ) const {
+        __TBB_ASSERT( !my_putter || my_putter->my_is_idle==value, NULL );
+        return true;
+    }
+#endif /* TBB_USE_ASSERT */
 #if DO_ITT_NOTIFY
     //! Get pointer to corresponding outbox used for ITT_NOTIFY calls.
     void* outbox() const {return my_putter;}
@@ -497,68 +488,6 @@ public:
 };
 #endif /* __TBB_SCHEDULER_OBSERVER */
 
-#if !__TBB_TASK_DEQUE
-//------------------------------------------------------------------------
-// TaskPool
-//------------------------------------------------------------------------
-
-//! Prefix to a TaskPool
-class TaskPoolPrefix {
-    static const unsigned null_arena_index = ~0u;
-
-    unsigned arena_index;
-
-    //! Index of first non-empty element of TaskPool::array
-    depth_type steal_begin;
-
-    friend class GenericScheduler;
-    friend class TaskPool;
-}; // class TaskPoolPrefix
-
-//! Pool of tasks, organized as a deque.
-class TaskPool {
-    typedef size_t size_type;
-
-    static const size_type min_array_size = (NFS_MaxLineSize-sizeof(TaskPoolPrefix))/sizeof(task*);
-
-    /** Must be last field, because it is really array of indeterminate length. */
-    task* array[min_array_size];
-
-    //! Get reference to prefix portion
-    TaskPoolPrefix& prefix() const {return ((TaskPoolPrefix*)(void*)this)[-1];}
-
-    //! Return number of bytes required to allocate a pool with given number of array elements.
-    static size_t byte_size( size_type array_size ) {
-        return sizeof(TaskPoolPrefix)+array_size*sizeof(task*);
-    }
-
-    //! Allocate TaskPool object with given number of array elements.
-    static TaskPool* allocate_task_pool( size_type array_size ) {
-        __TBB_ASSERT( array_size>0, NULL );
-        size_t n = byte_size(array_size);
-        unsigned char* storage = (unsigned char*)NFS_Allocate( n, 1, NULL );
-        memset( storage, 0, n );
-        return (TaskPool*)(storage+sizeof(TaskPoolPrefix));
-    }
-
-    //! Deallocate a TaskPool that was allocated by method allocate.
-    void free_task_pool() {
-        __TBB_ASSERT( this, "attempt to free NULL TaskPool" );
-        NFS_Free( &prefix() );
-    }
-
-    friend class GenericScheduler;
-    template<typename SchedulerTraits> friend class internal::CustomScheduler;
-
-#if TBB_USE_ASSERT
-    bool assert_okay() const {
-        __TBB_ASSERT( this!=NULL, NULL );
-        __TBB_ASSERT( prefix().steal_begin>=-4, NULL );
-        return true;
-    }
-#endif /* TBB_USE_ASSERT */
-}; // class TaskPool
-#endif /* !__TBB_TASK_DEQUE */
 
 //------------------------------------------------------------------------
 // Arena
@@ -571,19 +500,11 @@ struct WorkerDescriptor {
     //! NULL until worker is published.  -1 if worker should not be published.
     GenericScheduler* scheduler;
 
-#if !__TBB_RML
-    Arena* arena;
-
-    //! Start worker thread for this descriptor.
-    void start_one_worker_thread();
-#endif /* !__TBB_RML */
 };
 
 //! The useful contents of an ArenaPrefix
 class UnpaddedArenaPrefix: no_copy 
-#if __TBB_RML
    ,rml::tbb_client
-#endif /* __TBB_RML */
 {
     friend class GenericScheduler;
     template<typename SchedulerTraits> friend class internal::CustomScheduler;
@@ -591,13 +512,8 @@ class UnpaddedArenaPrefix: no_copy
     friend class Governor;
     friend struct WorkerDescriptor;
 
-#if __TBB_TASK_DEQUE
     //! Arena slot to try to acquire first for the next new master.
     unsigned limit;
-#else /* !__TBB_TASK_DEQUE */
-    //! One more than index of highest arena slot currently in use.
-    atomic<size_t> limit;
-#endif /* !__TBB_TASK_DEQUE */
 
     //! Number of masters that own this arena.
     /** This may be smaller than the number of masters who have entered the arena. */
@@ -609,15 +525,10 @@ class UnpaddedArenaPrefix: no_copy
     //! Number of workers that belong to this arena
     const unsigned number_of_workers;
 
-#if __TBB_RML
     //! Pointer to the RML server object that services requests for this arena.
     rml::tbb_server* server;
     //! Counter used to allocate job indices
     tbb::atomic<size_t> next_job_index;
-#else
-    //! Number of workers still using this arena (plus one if a master is still using the arena)
-    atomic<int> gc_ref_count;
-#endif /* !__TBB_RML */
 
     //! Stack size of worker threads
     stack_size_type stack_size;
@@ -631,8 +542,13 @@ class UnpaddedArenaPrefix: no_copy
     atomic<intptr> task_node_count;
 #endif /* COUNT_TASK_NODES */
 
-    //! Gate at which worker threads wait until a master spawns a task.
-    Gate gate;
+    //! Estimate of number of available tasks.  
+    /** The estimate is either 0 (SNAPSHOT_EMPTY), infinity (SNAPSHOT_FULL), or a special value. 
+        The implementation of Arena::is_busy_or_empty requires that pool_state_t be unsigned. */
+    typedef uintptr_t pool_state_t;
+
+    //! Current estimate of number of available tasks.  
+    tbb::atomic<pool_state_t> pool_state;
  
 protected:
     UnpaddedArenaPrefix( unsigned number_of_slots_, unsigned number_of_workers_ ) :
@@ -644,15 +560,10 @@ protected:
         task_node_count = 0;
 #endif /* COUNT_TASK_NODES */
         limit = number_of_workers_;
-#if __TBB_RML
         server = NULL;
         stack_size = 0;
         next_job_index = 0;
-#else
-        gc_ref_count = number_of_workers_+1; 
-#endif /* !__TBB_RML */
     }
-#if __TBB_RML
     void open_connection_to_rml();
 
 private:
@@ -682,7 +593,6 @@ private:
     /*override*/ void acknowledge_close_connection();
 
     /*override*/ void process( job& j );
-#endif /* __TBB_RML */
 };
 
 //! The prefix to Arena with padding.
@@ -697,7 +607,6 @@ public:
     }
 };
 
-#if __TBB_TASK_DEQUE
 
 struct ArenaSlot {
     // Task pool (the deque of task pointers) of the scheduler that owns this slot
@@ -721,29 +630,9 @@ struct ArenaSlot {
     char pad2[NFS_MaxLineSize - sizeof(size_t)];
 };
 
-#else /* !__TBB_TASK_DEQUE */
-
-struct UnpaddedArenaSlot {
-    //! Holds copy of task_pool->deepest and a lock bit
-    /** Computed as 2*task_pool->deepest+(is_locked).
-        I.e., the low order bit indicates whether the slot is locked. 
-        -2 denotes an empty task pool
-        -3 denotes an unused arena slot that is locked
-        -4 denotes an unused arena slot that is unlocked */
-    depth_type steal_end;
-    TaskPool* task_pool;
-    bool owner_waits;
-};
-
-struct ArenaSlot: UnpaddedArenaSlot {
-    char pad[NFS_MaxLineSize-sizeof(UnpaddedArenaSlot)];
-};
-#endif /* !__TBB_TASK_DEQUE */
 
 class Arena {
-#if __TBB_RML
     friend class UnpaddedArenaPrefix;
-#endif /* __TBB_RML */
     friend class GenericScheduler;
     template<typename SchedulerTraits> friend class internal::CustomScheduler;
     friend class Governor;
@@ -782,41 +671,31 @@ class Arena {
         NFS_Free( storage );
     }
 
+    typedef ArenaPrefix::pool_state_t pool_state_t;
+
     //! No tasks to steal since last snapshot was taken
-    static const Gate::state_t SNAPSHOT_EMPTY = 0;
+    static const pool_state_t SNAPSHOT_EMPTY = 0;
 
     //! At least one task has been offered for stealing since the last snapshot started
-    static const Gate::state_t SNAPSHOT_FULL = -1;
+    static const pool_state_t SNAPSHOT_FULL = pool_state_t(-1);
 
-#if __TBB_RML
     //! Server is going away and hence further calls to adjust_job_count_estimate are unsafe.
-    static const Gate::state_t SNAPSHOT_SERVER_GOING_AWAY = -2;
-#else
-    //! Gate is permanently open
-    static const Gate::state_t SNAPSHOT_PERMANENTLY_OPEN = -2;
-#endif /* !__TBB_RML */
+    static const pool_state_t SNAPSHOT_SERVER_GOING_AWAY = pool_state_t(-2);
+
+    //! No tasks to steal or snapshot is being taken.
+    static bool is_busy_or_empty( pool_state_t s ) {return s<SNAPSHOT_SERVER_GOING_AWAY;}
 
     //! If necessary, inform gate that task was added to pool recently.
     void mark_pool_full();
 
-#if __TBB_RML
     //! Check if pool is empty.
     /** Return true if pool is empty or being cleaned up. */
     bool check_if_pool_is_empty();
-#else
-    //! Wait while pool is empty
-    /** Return true if pool transitioned from non-empty to empty while thread was waiting. */
-    bool wait_while_pool_is_empty();
-#endif /* __TBB_RML */
 
     //! Terminate worker threads
     /** Wait for worker threads to complete. */
     void terminate_workers();
 
-#if !__TBB_RML
-    //! Remove a reference to the arena, and free the arena if no references remain.
-    void remove_gc_reference();
-#endif /* !__TBB_RML */
 
 #if COUNT_TASK_NODES
     //! Returns the number of task objects "living" in worker threads
@@ -856,6 +735,7 @@ struct IntelSchedulerTraits {
     as well as synchronization for DoOneTimeInitializations. */
 class __TBB_InitOnce {
     friend void DoOneTimeInitializations();
+    friend void ITT_DoUnsafeOneTimeInitialization ();
 
     static atomic<int> count;
 
@@ -866,29 +746,22 @@ class __TBB_InitOnce {
     static void release_resources();
 
     static bool InitializationDone;
-#if USE_PTHREAD
-    static pthread_mutex_t  InitializationLock;
-public:
-    static void lock() {
-        int status = pthread_mutex_lock( &InitializationLock );
-        if( status )
-            handle_perror(status,"pthread_mutex_lock");
-    }
-    static void unlock() {
-        int status = pthread_mutex_unlock( &InitializationLock );
-        if( status )
-            handle_perror(status,"pthread_mutex_unlock");
-    }
-#else /* USE_WINTHREAD */
-    static CRITICAL_SECTION InitializationLock;
+
+    // Scenarios are possible when tools interop has to be initialized before the
+    // TBB itself. This imposes a requirement that the global initialization lock 
+    // has to support valid static initialization, and does not issue any tool
+    // notifications in any build mode.
+    typedef unsigned char mutex_type;
+
+    // Global initialization lock
+    static mutex_type InitializationLock;
+
 public:
-    static void lock()   { EnterCriticalSection( &InitializationLock ); }
-    static void unlock() { LeaveCriticalSection( &InitializationLock ); }
-#endif
+    static void lock()   { __TBB_LockByte( InitializationLock ); }
 
-    static bool initialization_done() {
-        return __TBB_load_with_acquire(InitializationDone);
-    }
+    static void unlock() { __TBB_store_with_release( InitializationLock, 0 ); }
+
+    static bool initialization_done() { return __TBB_load_with_acquire(InitializationDone); }
 
     //! Add initial reference to resources. 
     /** We assume that dynamic loading of the library prevents any other threads from entering the library
@@ -923,6 +796,7 @@ public:
     The class contains only static data members and methods.*/
 class Governor {
     friend class __TBB_InitOnce;
+    friend void ITT_DoUnsafeOneTimeInitialization ();
 
     static basic_tls<GenericScheduler*> theTLS;
     static Arena* theArena;
@@ -930,11 +804,11 @@ class Governor {
 
     //! Create key for thread-local storage.
     static void create_tls() {
-#if __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD
+#if USE_PTHREAD
         int status = theTLS.create(auto_terminate);
 #else
         int status = theTLS.create();
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
+#endif
         if( status )
             handle_perror(status, "TBB failed to initialize TLS storage\n");
     }
@@ -942,7 +816,7 @@ class Governor {
     //! Destroy the thread-local storage key.
     static void destroy_tls() {
 #if TBB_USE_ASSERT
-        if( __TBB_InitOnce::initialization_done() && local_scheduler() ) 
+        if( __TBB_InitOnce::initialization_done() && theTLS.get() ) 
             fprintf(stderr, "TBB is unloaded while tbb::task_scheduler_init object is alive?");
 #endif
         int status = theTLS.destroy();
@@ -950,21 +824,12 @@ class Governor {
             handle_perror(status, "TBB failed to destroy TLS storage");
     }
     
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-    //! The internal routine to undo automatic initialization.
-    /** The signature is written with void* so that the routine
-        can be the destructor argument to pthread_key_create. */
-    static void auto_terminate(void* scheduler);
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
-
-public:
     //! Obtain the instance of arena to register a new master thread
     /** If there is no active arena, create one. */
     static Arena* obtain_arena( int number_of_threads, stack_size_type thread_stack_size )
     {
-        Arena* a;
         mutex::scoped_lock lock( theArenaMutex );
-        a = theArena;
+        Arena* a = theArena;
         if( a ) {
             a->prefix().number_of_masters += 1;
         } else {
@@ -978,44 +843,41 @@ public:
             // and concurrent masters inspect theArena while holding theArenaMutex.
             __TBB_ASSERT( !theArena, NULL );
             theArena = a;
-#if __TBB_RML
             // Must create server under lock, otherwise second master might see arena without a server.
             a->prefix().open_connection_to_rml();
-#endif /* __TBB_RML */
-            lock.release();
-#if !__TBB_RML
-            // Attach threads to workers
-            if( number_of_threads>1 ) // there should be worker threads
-                a->prefix().worker_list[0].start_one_worker_thread();
-#endif /* __TBB_RML */
         }
         return a;
     }
 
+    //! The internal routine to undo automatic initialization.
+    /** The signature is written with void* so that the routine
+        can be the destructor argument to pthread_key_create. */
+    static void auto_terminate(void* scheduler);
+
+public:
+    //! Processes scheduler initialization request (possibly nested) in a master thread
+    /** If necessary creates new instance of arena and/or local scheduler.
+        The auto_init argument specifies if the call is due to automatic initialization. **/
+    static GenericScheduler* init_scheduler( int num_threads, stack_size_type stack_size, bool auto_init = false );
+
+    //! Processes scheduler termination request (possibly nested) in a master thread
+    static void terminate_scheduler( GenericScheduler* s );
+
     //! Dereference arena when a master thread stops using TBB.
     /** If no more masters in the arena, terminate workers and destroy it. */
     static void finish_with_arena() {
-        Arena* a;
-        {
-            mutex::scoped_lock lock( theArenaMutex );
-            a = theArena;
-            __TBB_ASSERT( a, "theArena is missing" );
-            if( --(a->prefix().number_of_masters) )
-                a = NULL;
-            else {
-                theArena = NULL;
-#if __TBB_RML
-                // Must do this while holding lock, otherwise terminate message might reach
-                // RML thread *after* initialize message reaches it for the next arena, which
-                // which causes TLS to be set to new value before old one is erased!
-                a->terminate_workers();
-#endif /* __TBB_RML */
-            }
-        }
-#if !__TBB_RML
-        if( a )
+        mutex::scoped_lock lock( theArenaMutex );
+        Arena* a = theArena;
+        __TBB_ASSERT( a, "theArena is missing" );
+        if( --(a->prefix().number_of_masters) )
+            a = NULL;
+        else {
+            theArena = NULL;
+            // Must do this while holding lock, otherwise terminate message might reach
+            // RML thread *after* initialize message reaches it for the next arena, which
+            // which causes TLS to be set to new value before old one is erased!
             a->terminate_workers();
-#endif /* __TBB_RML */
+        }
     }
 
     static size_t number_of_workers_in_arena() {
@@ -1030,25 +892,21 @@ public:
     //! Unregister TBB scheduler instance from thread local storage.
     inline static void sign_off(GenericScheduler* s);
 
-    //! Obtain the thread local instance of TBB scheduler.
-    /** Returns NULL if this is the first time the thread has requested a scheduler.
-        It's the client's responsibility to check for the NULL, because in many
-        contexts, we can prove that it cannot be NULL. */
-    static GenericScheduler* local_scheduler() {
-        __TBB_ASSERT( __TBB_InitOnce::initialization_done(), "thread did not activate a task_scheduler_init object?" );
-        return theTLS.get();
-    }
+    //! Used to check validity of the local scheduler TLS contents.
+    static bool is_set ( GenericScheduler* s ) { return theTLS.get() == s; }
 
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-    //! Create a thread local instance of TBB scheduler on demand.
-    static GenericScheduler* local_scheduler_with_auto_init();
+    //! Obtain the thread local instance of the TBB scheduler.
+    /** If the scheduler has not been initialized yet, initialization is done automatically.
+        Note that auto-initialized scheduler instance is destroyed only when its thread terminates. **/
+    static GenericScheduler* local_scheduler () {
+        GenericScheduler* s = theTLS.get();
+        return s ? s : init_scheduler( task_scheduler_init::automatic, 0, true );
+    }
 
     //! Undo automatic initialization if necessary; call when a thread exits.
     static void terminate_auto_initialized_scheduler() {
-        auto_terminate(theTLS.get());
+        auto_terminate( theTLS.get() );
     }
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
-
 }; // class Governor
 
 //------------------------------------------------------------------------
@@ -1073,11 +931,7 @@ static int SchedulerTraitsId;
 //! Counter of references to global shared resources such as TLS.
 atomic<int> __TBB_InitOnce::count;
 
-#if USE_PTHREAD
-    pthread_mutex_t  __TBB_InitOnce::InitializationLock = PTHREAD_MUTEX_INITIALIZER;
-#else
-    CRITICAL_SECTION __TBB_InitOnce::InitializationLock;
-#endif
+__TBB_InitOnce::mutex_type __TBB_InitOnce::InitializationLock;
 
 //! Flag that is set to true after one-time initializations are done.
 bool __TBB_InitOnce::InitializationDone;
@@ -1087,17 +941,11 @@ bool __TBB_InitOnce::InitializationDone;
     static bool ITT_InitializationDone;
 #endif
 
-#if __TBB_RML
 static rml::tbb_factory rml_server_factory;
 //! Set to true if private statically linked RML server should be used instead of shared server.
 static bool use_private_rml;
-#endif /* __TBB_RML */
 
-#if (__linux__ || __APPLE__) && __GNUC__ && !(__INTEL_COMPILER && __TBB_ipf)
-    // Use GCC-style attribute to set the highest initialization priority (the lowest possible number)
-    // ICC for IA-64 has a bug in handling init_priority so skipping in this case
-    static __TBB_InitOnce __TBB_InitOnceHiddenInstance __attribute__((init_priority (101)));
-#elif !(_WIN32||_WIN64) || __TBB_TASK_CPP_DIRECTLY_INCLUDED
+#if !(_WIN32||_WIN64) || __TBB_TASK_CPP_DIRECTLY_INCLUDED
     static __TBB_InitOnce __TBB_InitOnceHiddenInstance;
 #endif
 
@@ -1213,33 +1061,31 @@ extern void initialize_cache_aligned_allocator();
 
 #if DO_ITT_NOTIFY
 //! Performs initialization of tools support.
-/** Defined in task.cpp. Must be called in a protected do-once manner.
+/** Defined in itt_notify.cpp. Must be called in a protected do-once manner.
     \return true if notification hooks were installed, false otherwise. **/
 bool InitializeITT();
 
-/** Calls tools interoperability mechanisms initialization routine in a protected 
-    manner ensuring that it is done only once.
-    Used by dummy handlers only. **/
-extern "C"
-void ITT_DoOneTimeInitialization() {
-#if !TBB_USE_DEBUG
-    // In debug builds constructor of one of the static TBB mutexes is called 
-    // first and invokes proxy ITT handler before our do-once mutex is initialized.
-    // Since this kind of initialization takes place under the loader lock, it is
-    // safe to omit synchronization here.
-    __TBB_InitOnce::lock();
-#endif
+/** Thread-unsafe lazy one-time initialization of tools interop.
+    Used by both dummy handlers and general TBB one-time initialization routine. **/
+void ITT_DoUnsafeOneTimeInitialization () {
     if ( !ITT_InitializationDone ) {
         ITT_Present = InitializeITT();
         ITT_InitializationDone = true;
+        ITT_SYNC_CREATE(&Governor::theArenaMutex, SyncType_GlobalLock, SyncObj_SchedulerInitialization);
     }
-#if !TBB_USE_DEBUG
+}
+
+/** Thread-safe lazy one-time initialization of tools interop.
+    Used by dummy handlers only. **/
+extern "C"
+void ITT_DoOneTimeInitialization() {
+    __TBB_InitOnce::lock();
+    ITT_DoUnsafeOneTimeInitialization();
     __TBB_InitOnce::unlock();
-#endif
 }
 #endif /* DO_ITT_NOTIFY */
 
-//! Performs lazy one-time initializations.
+//! Performs thread-safe lazy one-time general TBB initialization.
 void DoOneTimeInitializations() {
     __TBB_InitOnce::lock();
     // No fence required for load of InitializationDone, because we are inside a critical section.
@@ -1249,14 +1095,10 @@ void DoOneTimeInitializations() {
             PrintVersion();
         bool have_itt = false;
 #if DO_ITT_NOTIFY
-        if ( !ITT_InitializationDone ) {
-            ITT_Present = InitializeITT();
-            ITT_InitializationDone = true;
-        }
+        ITT_DoUnsafeOneTimeInitialization();
         have_itt = ITT_Present;
 #endif /* DO_ITT_NOTIFY */
         initialize_cache_aligned_allocator();
-#if __TBB_RML
         ::rml::factory::status_type status = rml_server_factory.open(); 
         if( status!=::rml::factory::st_success ) {
             use_private_rml = true;
@@ -1265,7 +1107,6 @@ void DoOneTimeInitializations() {
             PrintExtraVersionInfo( "RML", "shared" );
             rml_server_factory.call_with_server_info( PrintRMLVersionInfo, (void*)"" );
         }
-#endif /* __TBB_RML */
         if( !have_itt )
             SchedulerTraitsId = IntelSchedulerTraits::id;
 #if __TBB_EXCEPTIONS
@@ -1300,20 +1141,10 @@ __TBB_InitOnce::~__TBB_InitOnce() {
 
 void __TBB_InitOnce::acquire_resources() {
     Governor::create_tls();
-#if _WIN32||_WIN64
-    InitializeCriticalSection(&InitializationLock);
-#endif
-    ITT_SYNC_CREATE(&InitializationLock, SyncType_GlobalLock, SyncObj_LibraryInitialization);
-    ITT_SYNC_CREATE(&(Governor::theArenaMutex), SyncType_GlobalLock, SyncObj_SchedulerInitialization);
 }
 
 void __TBB_InitOnce::release_resources() {
-#if __TBB_RML
     rml_server_factory.close();
-#endif /* __TBB_RML */
-#if _WIN32||_WIN64
-    DeleteCriticalSection(&InitializationLock);
-#endif
     Governor::destroy_tls();
 }
 
@@ -1333,11 +1164,9 @@ extern "C" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID /*lpvR
                 __TBB_InitOnce::remove_ref();
             }
             break;
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
         case DLL_THREAD_DETACH:
             Governor::terminate_auto_initialized_scheduler();
             break;
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
     }
     return true;
 }
@@ -1373,10 +1202,10 @@ public:
 //  so the one for tbb::internal::scheduler::~scheduler() is provided here
 scheduler::~scheduler( ) {}
 
-#if __TBB_TASK_DEQUE
     #define EmptyTaskPool ((task**)0u)
     #define LockedTaskPool ((task**)~0u)
-#endif /* __TBB_TASK_DEQUE */
+
+    #define LocalSpawn local_spawn
 
 //! Cilk-style task scheduler.
 /** None of the fields here are every read or written by threads other than
@@ -1386,20 +1215,10 @@ scheduler::~scheduler( ) {}
     except for tweaks specific to processors and tools (e.g. VTune).
     The derived template class CustomScheduler<SchedulerTraits> fills in the tweaks. */
 class GenericScheduler: public scheduler 
-#if __TBB_RML
    ,public ::rml::job
-#endif /*__TBB_RML */
 {
-#if !__TBB_TASK_DEQUE
-    typedef task::depth_type depth_type;
-#endif /* !__TBB_TASK_DEQUE */
     friend class tbb::task;
-    friend class tbb::task_scheduler_init;
-#if __TBB_RML
     friend class UnpaddedArenaPrefix;
-#else /* !__TBB_RML */
-    friend struct WorkerDescriptor;
-#endif /* !__TBB_RML */
     friend class Arena;
     friend class allocate_root_proxy;
     friend class Governor;
@@ -1432,7 +1251,6 @@ class GenericScheduler: public scheduler
         return (t.prefix().extra_state & 0x3F)==0x1;
     }
 
-#if __TBB_TASK_DEQUE
     //! Position in the call stack specifying its maximal filling when stealing is still allowed
     uintptr_t my_stealing_threshold;
 #if __TBB_ipf
@@ -1457,24 +1275,12 @@ class GenericScheduler: public scheduler
     /** When out of arena it points to this scheduler's dummy_slot. **/
     mutable ArenaSlot* arena_slot;
 
-#else /* !__TBB_TASK_DEQUE */
-    
-    //! Deepest non-empty level.
-    /** Not read by thieves. -1 if array is empty. */
-    depth_type deepest;
-
-    //! The physical number of slots in "array".
-    TaskPool::size_type array_size;
-
-    //! Dummy slot used when scheduler is not in arena
-    UnpaddedArenaSlot dummy_slot;
-
-    //! Pointer to my slot in the arena
-    mutable UnpaddedArenaSlot* arena_slot;
-#endif /* !__TBB_TASK_DEQUE */
-
     bool in_arena () const { return arena_slot != &dummy_slot; }
 
+    bool is_local_task_pool_empty () {
+        return arena_slot->task_pool == EmptyTaskPool || arena_slot->head >= arena_slot->tail;
+    }
+
     //! The arena that I own (if master) or belong to (if worker)
     Arena* const arena;
 
@@ -1516,10 +1322,8 @@ class GenericScheduler: public scheduler
     //! True if this is assigned to thread local storage by registering with Governor.
     bool is_registered;
 
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
     //! True if *this was created by automatic TBB initialization
     bool is_auto_initialized;
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
 
 #if __TBB_SCHEDULER_OBSERVER
     //! Last observer_proxy processed by this scheduler
@@ -1557,7 +1361,6 @@ class GenericScheduler: public scheduler
     long proxy_bypass_count;
 #endif /* STATISTICS */
 
-#if __TBB_TASK_DEQUE
     //! Sets up the data necessary for the stealing limiting heuristics
     void init_stack_info ();
 
@@ -1591,15 +1394,6 @@ class GenericScheduler: public scheduler
     //! Unlocks victim's task pool
     void unlock_task_pool( ArenaSlot* victim_arena_slot, task** victim_task_pool ) const;
 
-#else /* !__TBB_TASK_DEQUE */
-
-    //! Try to enter the arena
-    /** On return, guarantees that task pool has been acquired. */
-    void try_enter_arena();
-
-    //! Leave the arena
-    void leave_arena( bool compress );
-#endif /* !__TBB_TASK_DEQUE */
 
     //! Locks the local task pool
     void acquire_task_pool() const;
@@ -1608,7 +1402,6 @@ class GenericScheduler: public scheduler
     void release_task_pool() const;
 
     //! Get a task from the local pool.
-#if __TBB_TASK_DEQUE
     //! Checks if t is affinitized to another thread, and if so, bundles it as proxy.
     /** Returns either t or proxy containing t. **/
     task* prepare_for_spawning( task* t );
@@ -1617,13 +1410,6 @@ class GenericScheduler: public scheduler
         Returns the pointer to the task or NULL if the pool is empty. 
         In the latter case compacts the pool. **/
     task* get_task();
-#else /* !__TBB_TASK_DEQUE */
-    /** Called only by the thread that owns *this.
-        Gets task only if there is one at depth d or deeper in the pool.
-        If successful, unlinks the task and returns a pointer to it.
-        Otherwise returns NULL. */
-    task* get_task( depth_type d );
-#endif /* !__TBB_TASK_DEQUE */
 
     //! Attempt to get a task from the mailbox.
     /** Called only by the thread that owns *this.
@@ -1642,13 +1428,8 @@ class GenericScheduler: public scheduler
     task* strip_proxy( task_proxy* result );
 
     //! Steal task from another scheduler's ready pool.
-#if __TBB_TASK_DEQUE
     task* steal_task( ArenaSlot& victim_arena_slot );
-#else /* !__TBB_TASK_DEQUE */
-    task* steal_task( UnpaddedArenaSlot& arena_slot, depth_type d );
-#endif /* !__TBB_TASK_DEQUE */
 
-#if __TBB_TASK_DEQUE
     /** Initial size of the task deque sufficient to serve without reallocation
         4 nested paralle_for calls with iteration space of 65535 grains each. **/
     static const size_t min_task_pool_size = 64;
@@ -1664,10 +1445,6 @@ class GenericScheduler: public scheduler
 
     //! Grow ready task deque to at least n elements.
     void grow( size_t n );
-#else /* !__TBB_TASK_DEQUE */
-    //! Grow "array" to at least "minimum_size" elements.
-    void grow( TaskPool::size_type minimum_size );
-#endif /* !__TBB_TASK_DEQUE */
 
     //! Initialize a scheduler for a master thread.
     static GenericScheduler* create_master( Arena* a );
@@ -1678,12 +1455,6 @@ class GenericScheduler: public scheduler
     //! Initialize a scheduler for a worker thread.
     static GenericScheduler* create_worker( Arena& a, size_t index );
 
-#if !__TBB_RML
-    //! Initialize a heap (or subheap) of schedulers.
-    /** The workers are started up as a binary tree, where each vertex in the tree
-        starts any children it has. The tree is implicitly arranged like a binary heap. */
-    static GenericScheduler* create_worker_heap( WorkerDescriptor& w );
-#endif /* !__TBB_RML */
 
     //! Top-level routine for worker threads
     /** Argument arg is a WorkerDescriptor*, cast to a (void*). */
@@ -1702,7 +1473,6 @@ protected:
 #endif /* TBB_USE_ASSERT */
 
 public:
-#if __TBB_RELAXED_OWNERSHIP
     void local_spawn( task& first, task*& next );
     void local_spawn_root_and_wait( task& first, task*& next );
 
@@ -1714,11 +1484,6 @@ public:
     void spawn_root_and_wait( task& first, task*& next ) {
         Governor::local_scheduler()->local_spawn_root_and_wait( first, next );
     }
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    /*override*/ void spawn( task& first, task*& next );
-
-    /*override*/ void spawn_root_and_wait( task& first, task*& next );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
 
     //! Allocate and construct a scheduler object.
     static GenericScheduler* allocate_scheduler( Arena* arena );
@@ -1729,7 +1494,7 @@ public:
     //! Allocate task object, either from the heap or a free list.
     /** Returns uninitialized task object with initialized prefix. */
     task& allocate_task( size_t number_of_bytes, 
-                       __TBB_ALLOC_TASK_ARGS(task* parent, depth_type depth, task_group_context* context) );
+                       __TBB_CONTEXT_ARG(task* parent, task_group_context* context) );
 
     //! Optimization hint to free_task that enables it omit unnecessary tests and code.
     enum hint {
@@ -1775,11 +1540,7 @@ public:
 
     //! True if running on a worker thread, false otherwise.
     inline bool is_worker() {
-#if __TBB_TASK_DEQUE
         return arena_index < arena->prefix().number_of_workers;
-#else /* !__TBB_TASK_DEQUE */
-        return (dummy_slot.task_pool->prefix().arena_index < arena->prefix().number_of_workers);
-#endif /* !__TBB_TASK_DEQUE */
     }
 
 #if TEST_ASSEMBLY_ROUTINES
@@ -1841,8 +1602,8 @@ class auto_empty_task {
     task* my_task;
     GenericScheduler* my_scheduler;
 public:
-    auto_empty_task ( __TBB_ALLOC_TASK_ARGS(GenericScheduler *s, int depth, task_group_context* context) ) 
-        : my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_ALLOC_TASK_ARGS(NULL, depth, context))) empty_task )
+    auto_empty_task ( __TBB_CONTEXT_ARG(GenericScheduler *s, task_group_context* context) ) 
+        : my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_CONTEXT_ARG(NULL, context))) empty_task )
         , my_scheduler(s)
     {}
     // empty_task has trivial destructor, so there's no need to call it.
@@ -1866,48 +1627,61 @@ void Governor::sign_on(GenericScheduler* s) {
 
 void Governor::sign_off(GenericScheduler* s) {
     if( s->is_registered ) {
-#if __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD
-        __TBB_ASSERT( theTLS.get()==s || !s->is_worker() && !theTLS.get(), "attempt to unregister a wrong scheduler instance" );
+#if USE_PTHREAD
+        __TBB_ASSERT( theTLS.get()==s || (!s->is_worker() && !theTLS.get()), "attempt to unregister a wrong scheduler instance" );
 #else
         __TBB_ASSERT( theTLS.get()==s, "attempt to unregister a wrong scheduler instance" );
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD */
+#endif /* USE_PTHREAD */
         theTLS.set(NULL);
         s->is_registered = false;
         __TBB_InitOnce::remove_ref();
     }
 }
 
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-GenericScheduler* Governor::local_scheduler_with_auto_init() {
+GenericScheduler* Governor::init_scheduler( int num_threads, stack_size_type stack_size, bool auto_init ) {
+    if( !__TBB_InitOnce::initialization_done() )
+        DoOneTimeInitializations();
     GenericScheduler* s = theTLS.get();
-    if( !s ) {
-        if( !__TBB_InitOnce::initialization_done() ) 
-            DoOneTimeInitializations();
-        __TBB_ASSERT( __TBB_InitOnce::initialization_done(), "library initialization failed?" );
-        // use the same argument values as default constructor of task_scheduler_init
-        s = GenericScheduler::create_master(obtain_arena(task_scheduler_init::automatic,0));
-        s->is_auto_initialized = true;
-        TBB_TRACE(("Scheduler was initialized automatically: s=%p\n",s));
-    }
-    __TBB_ASSERT(s, "somehow a scheduler object was not created?");
+    if( s ) {
+        s->ref_count += 1;
+        return s;
+    }
+    s = GenericScheduler::create_master( obtain_arena(num_threads, stack_size) );
+    __TBB_ASSERT(s, "Somehow a local scheduler creation for a master thread failed");
+    s->is_auto_initialized = auto_init;
     return s;
 }
 
+void Governor::terminate_scheduler( GenericScheduler* s ) {
+    __TBB_ASSERT( s == theTLS.get(), "Attempt to terminate non-local scheduler instance" );
+    if( !--(s->ref_count) )
+        s->cleanup_master();
+}
+
 void Governor::auto_terminate(void* arg){
     GenericScheduler* s = static_cast<GenericScheduler*>(arg);
     if( s && s->is_auto_initialized ) {
-        if( !--(s->ref_count) )
-            s->cleanup_master();
+        if( !--(s->ref_count) ) {
+            if ( !theTLS.get() && !s->is_local_task_pool_empty() ) {
+                // This thread's TLS slot is already cleared. But in order to execute
+                // remaining tasks cleanup_master() will need TLS correctly set.
+                // So we temporarily restore its value.
+                theTLS.set(s);
+                s->cleanup_master();
+                theTLS.set(NULL);
+            }
+            else
+                s->cleanup_master();
+        }
     }
 }
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
 
 //------------------------------------------------------------------------
 // GenericScheduler implementation
 //------------------------------------------------------------------------
 
 inline task& GenericScheduler::allocate_task( size_t number_of_bytes, 
-                                            __TBB_ALLOC_TASK_ARGS(task* parent, depth_type depth, task_group_context* context) ) {
+                                            __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ) {
     GATHER_STATISTIC(current_active+=1);
     task* t = free_list;
     if( number_of_bytes<=quick_task_size ) {
@@ -1944,12 +1718,8 @@ inline task& GenericScheduler::allocate_task( size_t number_of_bytes,
 #endif /* __TBB_EXCEPTIONS */
     p.owner = this;
     p.ref_count = 0;
-#if __TBB_TASK_DEQUE
     // Assign some not outrageously out-of-place value for a while
     p.depth = 0;
-#else /* !__TBB_TASK_DEQUE */
-    p.depth = int(depth);
-#endif /* !__TBB_TASK_DEQUE */
     p.parent = parent;
     // In TBB 3.0 and later, the constructor for task sets extra_state to indicate the version of the tbb/task.h header.
     // In TBB 2.0 and earlier, the constructor leaves extra_state as zero.
@@ -2017,16 +1787,12 @@ class CustomScheduler: private GenericScheduler {
     //! Scheduler loop that dispatches tasks.
     /** If child is non-NULL, it is dispatched first.
         Then, until "parent" has a reference count of 1, other task are dispatched or stolen. */
-#if __TBB_RELAXED_OWNERSHIP
     void local_wait_for_all( task& parent, task* child );
 
     /*override*/
     void wait_for_all( task& parent, task* child ) {
         static_cast<CustomScheduler*>(Governor::local_scheduler())->local_wait_for_all( parent, child );
     }
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    /*override*/void wait_for_all( task& parent, task* child );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
 
     typedef CustomScheduler<SchedulerTraits> scheduler_type;
 
@@ -2055,11 +1821,7 @@ public:
         __TBB_ASSERT( arena, "missing arena" );
         scheduler_type* s = (scheduler_type*)NFS_Allocate(sizeof(scheduler_type),1,NULL);
         new( s ) scheduler_type(  arena );
-#if __TBB_TASK_DEQUE
         __TBB_ASSERT( s->assert_okay(), NULL );
-#else /* !__TBB_TASK_DEQUE */
-        __TBB_ASSERT( s->dummy_slot.task_pool->assert_okay(), NULL );
-#endif /* !__TBB_TASK_DEQUE */
         ITT_SYNC_CREATE(s, SyncType_Scheduler, SyncObj_TaskPoolSpinning);
         return s;
     }
@@ -2075,9 +1837,6 @@ static bool AssertOkay( const task& task ) {
     __TBB_ASSERT( &task!=NULL, NULL );
     __TBB_ASSERT( (uintptr)&task % task_alignment == 0, "misaligned task" );
     __TBB_ASSERT( (unsigned)task.state()<=(unsigned)task::recycle, "corrupt task (invalid state)" );
-#if !__TBB_TASK_DEQUE
-    __TBB_ASSERT( task.prefix().depth<1L<<30, "corrupt task (absurd depth)" );
-#endif /* !__TBB_TASK_DEQUE */
     return true;
 }
 #endif /* TBB_USE_ASSERT */
@@ -2113,23 +1872,13 @@ Arena* Arena::allocate_arena( unsigned number_of_slots, unsigned number_of_worke
     size_t k;
     // Mark each worker slot as locked and unused
     for( k=0; k<number_of_workers; ++k ) {
-#if __TBB_TASK_DEQUE
         // All slots are set to null meaning that they are free
-#else /* !__TBB_TASK_DEQUE */
-        a->slot[k].steal_end = -3;
-#endif /* !__TBB_TASK_DEQUE */
-#if !__TBB_RML
-        w[k].arena = a;
-#endif /* __TBB_RML */
         ITT_SYNC_CREATE(a->slot + k, SyncType_Scheduler, SyncObj_WorkerTaskPool);
         ITT_SYNC_CREATE(&w[k].scheduler, SyncType_Scheduler, SyncObj_WorkerLifeCycleMgmt);
         ITT_SYNC_CREATE(&a->mailbox(k+1), SyncType_Scheduler, SyncObj_Mailbox);
     }
     // Mark rest of slots as unused
     for( ; k<number_of_slots; ++k ) {
-#if !__TBB_TASK_DEQUE
-        a->slot[k].steal_end = -4;
-#endif /* !__TBB_TASK_DEQUE */
         ITT_SYNC_CREATE(a->slot + k, SyncType_Scheduler, SyncObj_MasterTaskPool);
         ITT_SYNC_CREATE(&a->mailbox(k+1), SyncType_Scheduler, SyncObj_Mailbox);
     }
@@ -2144,119 +1893,85 @@ inline void Arena::mark_pool_full() {
     // fence might hurt overall performance more than it helps, because the fence would be executed 
     // on every task pool release, even when stealing does not occur.  Since TBB allows parallelism, 
     // but never promises parallelism, the missed wakeup is not a correctness problem.
-    Gate::state_t snapshot = prefix().gate.get_state();
-    if( snapshot!=SNAPSHOT_FULL ) 
-#if __TBB_RML
-        if( snapshot!=SNAPSHOT_SERVER_GOING_AWAY )
-            if( prefix().gate.try_update( SNAPSHOT_FULL, snapshot ) ) 
-                if( snapshot==SNAPSHOT_EMPTY )
-                    prefix().server->adjust_job_count_estimate( int(prefix().number_of_workers) );
-#else
-        prefix().gate.try_update( SNAPSHOT_FULL, SNAPSHOT_PERMANENTLY_OPEN, true );
-#endif /* __TBB_RML */
+    pool_state_t snapshot = prefix().pool_state;
+    if( is_busy_or_empty(snapshot) ) {
+        // Attempt to mark as full.  The compare_and_swap below is a little unusual because the 
+        // result is compared to a value that can be different than the comparand argument.
+        if( prefix().pool_state.compare_and_swap( SNAPSHOT_FULL, snapshot )==SNAPSHOT_EMPTY ) {
+            if( snapshot!=SNAPSHOT_EMPTY ) {
+                // This thread initialized s1 to "busy" and then another thread transitioned 
+                // pool_state to "empty" in the meantime, which caused the compare_and_swap above 
+                // to fail.  Attempt to transition pool_state from "empty" to "full".
+                if( prefix().pool_state.compare_and_swap( SNAPSHOT_FULL, SNAPSHOT_EMPTY )!=SNAPSHOT_EMPTY ) {
+                    // Some other thread transitioned pool_state from "empty", and hence became
+                    // responsible for waking up workers.
+                    return;
+                }
+            }
+            // This thread transitioned pool from empty to full state, and thus is responsible for
+            // telling RML that there is work to do.
+            prefix().server->adjust_job_count_estimate( int(prefix().number_of_workers) );
+        }
+    }
 }
 
-#if __TBB_RML
 bool Arena::check_if_pool_is_empty() 
-#else
-bool Arena::wait_while_pool_is_empty() 
-#endif  /* __TBB_RML */
 {
     for(;;) {
-        Gate::state_t snapshot = prefix().gate.get_state();
+        pool_state_t snapshot = prefix().pool_state;
         switch( snapshot ) {
             case SNAPSHOT_EMPTY:
-#if __TBB_RML
             case SNAPSHOT_SERVER_GOING_AWAY:
-#else
-                prefix().gate.wait();
-#endif /* !__TBB_RML */
                 return true;
             case SNAPSHOT_FULL: {
                 // Use unique id for "busy" in order to avoid ABA problems.
-                const Gate::state_t busy = Gate::state_t(this);
+                const pool_state_t busy = pool_state_t(this);
                 // Request permission to take snapshot
-                prefix().gate.try_update( busy, SNAPSHOT_FULL );
-                if( prefix().gate.get_state()==busy ) {
+                if( prefix().pool_state.compare_and_swap( busy, SNAPSHOT_FULL )==SNAPSHOT_FULL ) {
                     // Got permission.  Take the snapshot.
                     size_t n = prefix().limit;
                     size_t k; 
                     for( k=0; k<n; ++k ) 
-#if __TBB_TASK_DEQUE
                         if( slot[k].task_pool != EmptyTaskPool && slot[k].head < slot[k].tail )
-#else /* !__TBB_TASK_DEQUE */
-                        if( slot[k].steal_end>=0 ) 
-#endif /* !__TBB_TASK_DEQUE */
                             break;
                     // Test and test-and-set.
-                    if( prefix().gate.get_state()==busy ) {
+                    if( prefix().pool_state==busy ) {
                         if( k>=n ) {
-#if __TBB_RML
-                            if( prefix().gate.try_update( SNAPSHOT_EMPTY, busy ) ) {
+                            if( prefix().pool_state.compare_and_swap( SNAPSHOT_EMPTY, busy )==busy ) {
+                                // This thread transitioned pool to empty state, and thus is responsible for
+                                // telling RML that there is no other work to do.
                                 prefix().server->adjust_job_count_estimate( -int(prefix().number_of_workers) );
                                 return true;
                             }
-#else
-                            prefix().gate.try_update( SNAPSHOT_EMPTY, busy );
-                            continue;
-#endif /* !__TBB_RML */
                         } else {
-                            prefix().gate.try_update( SNAPSHOT_FULL, busy );
+                            // Undo previous transition SNAPSHOT_FULL-->busy, unless another thread undid it.
+                            prefix().pool_state.compare_and_swap( SNAPSHOT_FULL, busy );
                         }
                     }
                 } 
                 return false;
             }
             default:
-                // Another thread is taking a snapshot or gate is permanently open.
+                // Another thread is taking a snapshot.
                 return false;
         }
     }
 }
 
 void Arena::terminate_workers() {
-#if __TBB_RML
     for(;;) {
-        Gate::state_t snapshot = prefix().gate.get_state();
+        pool_state_t snapshot = prefix().pool_state;
         if( snapshot==SNAPSHOT_SERVER_GOING_AWAY ) 
             break;
-        if( prefix().gate.try_update( SNAPSHOT_SERVER_GOING_AWAY, snapshot ) ) {
+        if( prefix().pool_state.compare_and_swap( SNAPSHOT_SERVER_GOING_AWAY, snapshot )==snapshot ) {
             if( snapshot!=SNAPSHOT_EMPTY )
                 prefix().server->adjust_job_count_estimate( -int(prefix().number_of_workers) );
             break;
         }
     }
     prefix().server->request_close_connection();
-#else
-    int n = prefix().number_of_workers;
-    __TBB_ASSERT( n>=0, "negative number of workers; casting error?" );
-    for( int i=n; --i>=0; ) {
-        WorkerDescriptor& w = prefix().worker_list[i];
-        if( w.scheduler || __TBB_CompareAndSwapW( &w.scheduler, intptr(-1), intptr(0) ) ) {
-            // Worker published itself.  Tell worker to quit.
-            ITT_NOTIFY(sync_acquired, &w.scheduler);
-            task* t = __TBB_load_with_acquire(w.scheduler)->dummy_task;
-            ITT_NOTIFY(sync_releasing, &t->prefix().ref_count);
-            t->prefix().ref_count = 1;
-        } else {
-            // Worker did not publish itself yet, and we have set w.scheduler to -1, 
-            // which tells the worker that it should never publish itself.
-        }
-    }
-    // Permanently wake up sleeping workers
-    prefix().gate.try_update( SNAPSHOT_PERMANENTLY_OPEN, SNAPSHOT_PERMANENTLY_OPEN, true );
-    remove_gc_reference();
-#endif /* !__TBB_RML */
 }
 
-#if !__TBB_RML
-void Arena::remove_gc_reference() {
-    __TBB_ASSERT( this, "attempt to remove reference to NULL Arena" );
-    if( --prefix().gc_ref_count==0 ) {
-        free_arena();
-    }
-}
-#endif /* !__TBB_RML */
 
 #if COUNT_TASK_NODES
 intptr Arena::workers_task_node_count() {
@@ -2280,13 +1995,8 @@ intptr Arena::workers_task_node_count() {
 #endif
 
 GenericScheduler::GenericScheduler( Arena* arena_ ) :
-#if __TBB_TASK_DEQUE
     arena_index(null_arena_index),
     task_pool_size(0),
-#else /* !__TBB_TASK_DEQUE */
-    deepest(-1),
-    array_size(0),
-#endif /* !__TBB_TASK_DEQUE */
     arena_slot(&dummy_slot),
     arena(arena_),
     random( unsigned(this-(GenericScheduler*)NULL) ),
@@ -2296,9 +2006,7 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     ref_count(1),
     my_affinity_id(0),
     is_registered(false),
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
     is_auto_initialized(false),
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
 #if __TBB_SCHEDULER_OBSERVER
     local_last_observer_proxy(NULL),
 #endif /* __TBB_SCHEDULER_OBSERVER */
@@ -2319,19 +2027,9 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
     small_task_count(1),   // Extra 1 is a guard reference
     return_list(NULL)
 {
-#if __TBB_TASK_DEQUE
     dummy_slot.task_pool = allocate_task_pool( min_task_pool_size );
     dummy_slot.head = dummy_slot.tail = 0;
-#else /* !__TBB_TASK_DEQUE */
-    TaskPool* t = TaskPool::allocate_task_pool(TaskPool::min_array_size);
-    dummy_slot.task_pool = t;
-    t->prefix().steal_begin = depth_type(array_size);
-    t->prefix().arena_index = TaskPoolPrefix::null_arena_index;
-    dummy_slot.steal_end = -2;
-    dummy_slot.owner_waits = false;
-    array_size = TaskPool::min_array_size;
-#endif /* !__TBB_TASK_DEQUE */
-    dummy_task = &allocate_task( sizeof(task), __TBB_ALLOC_TASK_ARGS(NULL, -1, NULL) );
+    dummy_task = &allocate_task( sizeof(task), __TBB_CONTEXT_ARG(NULL, NULL) );
 #if __TBB_EXCEPTIONS
     context_list_head.my_prev = &context_list_head;
     context_list_head.my_next = &context_list_head;
@@ -2351,7 +2049,6 @@ GenericScheduler::GenericScheduler( Arena* arena_ ) :
 bool GenericScheduler::assert_okay() const {
 #if TBB_USE_ASSERT>=2||TEST_ASSEMBLY_ROUTINES
     acquire_task_pool();
-#if __TBB_TASK_DEQUE
     task** tp = dummy_slot.task_pool;
     __TBB_ASSERT( task_pool_size >= min_task_pool_size, NULL );
     __TBB_ASSERT( arena_slot->head <= arena_slot->tail, NULL );
@@ -2360,18 +2057,6 @@ bool GenericScheduler::assert_okay() const {
         __TBB_ASSERT( tp[i]->prefix().state == task::ready ||
                       tp[i]->prefix().extra_state == es_task_proxy, "task in the deque has invalid state" );
     }
-#else /* !__TBB_TASK_DEQUE */
-    __TBB_ASSERT( array_size>=TaskPool::min_array_size, NULL );
-    TaskPool* tp = dummy_slot.task_pool;
-    __TBB_ASSERT( tp, NULL );
-    for( depth_type k=0; k<depth_type(array_size); ++k ) {
-        for( task* t = tp->array[k]; t; t=t->prefix().next ) {
-            __TBB_ASSERT( deepest>=k, "deepest not set properly" );
-            __TBB_ASSERT( t->prefix().depth==k, NULL );
-            __TBB_ASSERT( t->prefix().owner==this, NULL );
-        }
-    }
-#endif /* !__TBB_TASK_DEQUE */
     release_task_pool();
 #endif /* TBB_USE_ASSERT>=2||TEST_ASSEMBLY_ROUTINES */
     return true;
@@ -2442,7 +2127,6 @@ void GenericScheduler::propagate_cancellation ( task_group_context* ctx ) {
 #endif /* __TBB_EXCEPTIONS */
 
 
-#if __TBB_TASK_DEQUE
 
 void GenericScheduler::init_stack_info () {
     // Stacks are growing top-down. Highest address is called "stack base", 
@@ -2454,7 +2138,18 @@ void GenericScheduler::init_stack_info () {
     NT_TIB  *pteb = (NT_TIB*)NtCurrentTeb();
 #endif
     __TBB_ASSERT( &pteb < pteb->StackBase && &pteb > pteb->StackLimit, "invalid stack info in TEB" );
-    my_stealing_threshold = (uintptr_t)pteb->StackBase / 2 + (uintptr_t)pteb->StackLimit / 2;
+    __TBB_ASSERT( arena->prefix().stack_size>0, "stack_size not initialized?" );
+    // When a thread is created with the attribute STACK_SIZE_PARAM_IS_A_RESERVATION, stack limit 
+    // in the TIB points to the committed part of the stack only. This renders the expression
+    // "(uintptr_t)pteb->StackBase / 2 + (uintptr_t)pteb->StackLimit / 2" virtually useless.
+    // Thus for worker threads we use the explicit stack size we used while creating them.
+    // And for master threads we rely on the following fact and assumption:
+    // - the default stack size of a master thread on Windows is 1M;
+    // - if it was explicitly set by the application it is at least as large as the size of a worker stack.
+    if ( is_worker() || arena->prefix().stack_size < MByte )
+        my_stealing_threshold = (uintptr_t)pteb->StackBase - arena->prefix().stack_size / 2;
+    else
+        my_stealing_threshold = (uintptr_t)pteb->StackBase - MByte / 2;
 #else /* USE_PTHREAD */
     // There is no portable way to get stack base address in Posix, so we use 
     // non-portable method (on all modern Linux) or the simplified approach 
@@ -2523,9 +2218,11 @@ void GenericScheduler::grow( size_t new_size ) {
     task** new_pool = allocate_task_pool( new_size ); // updates task_pool_size
     task** old_pool = dummy_slot.task_pool;
     acquire_task_pool();    // requires the old dummy_slot.task_pool value
+    // arena_slot->tail should not be updated before arena_slot->head because their
+    // values are used by other threads to check if this task pool is empty.
     size_t new_tail = arena_slot->tail - arena_slot->head;
     __TBB_ASSERT( new_tail <= task_pool_size, "new task pool is too short" );
-    memcpy( new_pool, old_pool + arena_slot->head, arena_slot->tail * sizeof(task*) );
+    memcpy( new_pool, old_pool + arena_slot->head, new_tail * sizeof(task*) );
     arena_slot->head = 0;
     arena_slot->tail = new_tail;
     dummy_slot.task_pool = new_pool;
@@ -2534,24 +2231,6 @@ void GenericScheduler::grow( size_t new_size ) {
     __TBB_ASSERT( assert_okay(), NULL );
 }
 
-#else /* !__TBB_TASK_DEQUE */
-
-void GenericScheduler::grow( TaskPool::size_type minimum_size ) {
-    __TBB_ASSERT( assert_okay(), NULL );
-    TaskPool::size_type b_size = 2*minimum_size;
-    __TBB_ASSERT( b_size > array_size, "ready task pool cannot shrink" );
-    TaskPool* new_pool = TaskPool::allocate_task_pool( b_size );
-    __TBB_ASSERT( assert_okay(), NULL );
-    acquire_task_pool();
-    TaskPool* old_pool = dummy_slot.task_pool;
-    memcpy( &new_pool->prefix(), &old_pool->prefix(), TaskPool::byte_size(array_size) );
-    arena_slot->task_pool = dummy_slot.task_pool = new_pool;
-    array_size = b_size;
-    release_task_pool();
-    old_pool->free_task_pool();
-    __TBB_ASSERT( assert_okay(), NULL );
-}
-#endif /* !__TBB_TASK_DEQUE */
 
 GenericScheduler* GenericScheduler::allocate_scheduler( Arena* arena ) {
     switch( SchedulerTraitsId ) {
@@ -2567,12 +2246,8 @@ GenericScheduler* GenericScheduler::allocate_scheduler( Arena* arena ) {
 
 void GenericScheduler::free_scheduler() {
     if( in_arena() ) {
-#if __TBB_TASK_DEQUE
         acquire_task_pool();
         leave_arena();
-#else /* !__TBB_TASK_DEQUE */
-        leave_arena(/*compress=*/false);
-#endif /* !__TBB_TASK_DEQUE */
     }
 #if __TBB_EXCEPTIONS
     task_group_context* &context = dummy_task->prefix().context;
@@ -2610,11 +2285,7 @@ void GenericScheduler::free_scheduler() {
     the_statistics.record( execute_count, steal_count, mail_received_count,
                            proxy_execute_count, proxy_steal_count, proxy_bypass_count );
 #endif /* STATISTICS */
-#if __TBB_TASK_DEQUE
     free_task_pool( dummy_slot.task_pool );
-#else /* !__TBB_TASK_DEQUE */
-    dummy_slot.task_pool->free_task_pool();
-#endif /* !__TBB_TASK_DEQUE */
     dummy_slot.task_pool = NULL;
     // Update small_task_count last.  Doing so sooner might cause another thread to free *this.
     __TBB_ASSERT( small_task_count>=k, "small_task_count corrupted" );
@@ -2623,7 +2294,6 @@ void GenericScheduler::free_scheduler() {
         NFS_Free( this );
 }
 
-#if __TBB_TASK_DEQUE
 /** ATTENTION: 
     This method is mostly the same as GenericScheduler::lock_task_pool(), with 
     a little different logic of slot state checks (slot is either locked or points 
@@ -2711,7 +2381,7 @@ inline task** GenericScheduler::lock_task_pool( ArenaSlot* victim_arena_slot ) c
         backoff.pause();
     }
     __TBB_ASSERT( victim_task_pool == EmptyTaskPool || 
-                  victim_arena_slot->task_pool == LockedTaskPool && victim_task_pool != LockedTaskPool, 
+                  (victim_arena_slot->task_pool == LockedTaskPool && victim_task_pool != LockedTaskPool), 
                   "not really locked victim's task pool?" );
     return victim_task_pool;
 } // GenericScheduler::lock_task_pool
@@ -2724,58 +2394,7 @@ inline void GenericScheduler::unlock_task_pool( ArenaSlot* victim_arena_slot,
     __TBB_store_with_release( victim_arena_slot->task_pool, victim_task_pool );
 }
 
-#else /* !__TBB_TASK_DEQUE */
-
-inline void GenericScheduler::acquire_task_pool() const {
-    __TBB_ASSERT( arena_slot, "arena_slot not set" );
-    __TBB_ASSERT( deepest>=-1, NULL );
-    __TBB_ASSERT( arena_slot->owner_waits==false, "slot ownership corrupt?" );
-    atomic_backoff backoff;
-    bool sync_prepare_done = false;
-    for(;;) {
-#if TEST_ASSEMBLY_ROUTINES
-        __TBB_ASSERT( (arena_slot->steal_end&1)==0, "already acquired" );
-#endif /* TEST_ASSEMBLY_ROUTINES */
-        __TBB_ASSERT( !in_arena() || arena_slot==&arena->slot[dummy_slot.task_pool->prefix().arena_index], "slot ownership corrupt?" );
-        __TBB_ASSERT( arena_slot->task_pool==dummy_slot.task_pool, "slot ownership corrupt?" );
-        depth_type steal_end = arena_slot->steal_end;
-        if( (steal_end&1)==0 && (__TBB_CompareAndSwapW( &arena_slot->steal_end, steal_end|1, steal_end )&1)==0 ) {
-            // We acquired our own slot
-            ITT_NOTIFY(sync_acquired, arena_slot);
-            arena_slot->owner_waits = false;
-            break;
-        } else {
-            // Someone else acquired a lock, so pause and do exponential backoff.
-            if( !sync_prepare_done ) {
-                // Start waiting
-                ITT_NOTIFY(sync_prepare, arena_slot);
-                sync_prepare_done = true;
-            } else {
-                // after 2nd attempt, still can't acquire own pool;
-                // need notify others that the owner is waiting
-                arena_slot->owner_waits = true;
-            }
-            backoff.pause();
-#if TEST_ASSEMBLY_ROUTINES
-            __TBB_ASSERT( arena_slot->task_pool==dummy_slot.task_pool, NULL );
-#endif /* TEST_ASSEMBLY_ROUTINES */
-        }
-    }
-    __TBB_ASSERT( arena_slot->steal_end>>1 <= depth_type(array_size), NULL );
-    __TBB_ASSERT( dummy_slot.task_pool->prefix().steal_begin<=depth_type(array_size), NULL );
-    __TBB_ASSERT( deepest<=depth_type(array_size), NULL );
-} // GenericScheduler::acquire_task_pool
-
-inline void GenericScheduler::release_task_pool() const {
-    __TBB_ASSERT( arena_slot->steal_end>>1 <= depth_type(array_size), NULL );
-    __TBB_ASSERT( dummy_slot.task_pool->prefix().steal_begin<=depth_type(array_size), NULL );
-    __TBB_ASSERT( deepest<=depth_type(array_size), NULL );
-    ITT_NOTIFY(sync_releasing, arena_slot);
-    __TBB_store_with_release( arena_slot->steal_end, 2*deepest );
-}
-#endif /* !__TBB_TASK_DEQUE */
 
-#if __TBB_TASK_DEQUE
 inline task* GenericScheduler::prepare_for_spawning( task* t ) {
     __TBB_ASSERT( t->state()==task::allocated, "attempt to spawn task that is not in 'allocated' state" );
     t->prefix().owner = this;
@@ -2792,7 +2411,7 @@ inline task* GenericScheduler::prepare_for_spawning( task* t ) {
     __TBB_ASSERT( dst_thread == 0 || is_version_3_task(*t), "backwards compatibility to TBB 2.0 tasks is broken" );
     if( dst_thread != 0 && dst_thread != my_affinity_id ) {
         task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), 
-                                                      __TBB_ALLOC_TASK_ARGS(NULL, t->depth(), NULL) );
+                                                      __TBB_CONTEXT_ARG(NULL, NULL) );
         // Mark as a proxy
         proxy.prefix().extra_state = es_task_proxy;
         proxy.outbox = &arena->mailbox(dst_thread);
@@ -2805,18 +2424,12 @@ inline task* GenericScheduler::prepare_for_spawning( task* t ) {
     }
     return t;
 }
-#endif /* __TBB_TASK_DEQUE */
 
 /** Conceptually, this method should be a member of class scheduler.
     But doing so would force us to publish class scheduler in the headers. */
-#if __TBB_RELAXED_OWNERSHIP
 void GenericScheduler::local_spawn( task& first, task*& next ) {
-    __TBB_ASSERT( Governor::local_scheduler() == this, NULL );
-#else /* !__TBB_RELAXED_OWNERSHIP */
-void GenericScheduler::spawn( task& first, task*& next ) {
-#endif /* !__TBB_RELAXED_OWNERSHIP */
+    __TBB_ASSERT( Governor::is_set(this), NULL );
     __TBB_ASSERT( assert_okay(), NULL );
-#if __TBB_TASK_DEQUE
     if ( &first.prefix().next == &next ) {
         // Single task is being spawned
         if ( arena_slot->tail == task_pool_size ) {
@@ -2890,69 +2503,6 @@ void GenericScheduler::spawn( task& first, task*& next ) {
         else
             try_enter_arena();
     }
-#else /* !__TBB_TASK_DEQUE */
-    task* first_ptr = &first;
-    task** link = &first_ptr;
-    for( task* t = first_ptr; ; t=*link ) {
-        __TBB_ASSERT( t->prefix().depth==first.prefix().depth, "tasks must have same depth" );
-        __TBB_ASSERT( t->state()==task::allocated, "attempt to spawn task that is not in 'allocated' state" );
-        t->prefix().owner = this;
-        t->prefix().state = task::ready;
-#if TBB_USE_ASSERT
-        if( task* parent = t->parent() ) {
-            internal::reference_count ref_count = parent->prefix().ref_count;
-            __TBB_ASSERT( ref_count>=0, "attempt to spawn task whose parent has a ref_count<0" );
-            __TBB_ASSERT( ref_count!=0, "attempt to spawn task whose parent has a ref_count==0 (forgot to set_ref_count?)" );
-            parent->prefix().extra_state |= es_ref_count_active;
-        }
-#endif /* TBB_USE_ASSERT */
-        affinity_id dst_thread=t->prefix().affinity;
-        __TBB_ASSERT( dst_thread==0 || is_version_3_task(*t), "backwards compatibility to TBB 2.0 tasks is broken" );
-        if( dst_thread!=0 && dst_thread!=my_affinity_id ) {
-            task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), 
-                                                          __TBB_ALLOC_TASK_ARGS(NULL, t->depth(), NULL) );
-            // Mark as a proxy
-            proxy.prefix().extra_state = es_task_proxy;
-            proxy.outbox = &arena->mailbox(dst_thread);
-            proxy.task_and_tag = intptr(t)|3;
-            proxy.next_in_mailbox = NULL;
-            // Link proxy into list where the original task was.
-            *link = &proxy;
-            link = &proxy.prefix().next;
-            proxy.prefix().next = t->prefix().next;
-            ITT_NOTIFY( sync_releasing, proxy.outbox );
-            // Mail the proxy - after this point, t->prefix().next may be changed by another thread.
-            proxy.outbox->push(proxy);
-        } else {
-            link = &t->prefix().next;
-        }
-        if( &t->prefix().next==&next )
-            break;
-    }
-    task::depth_type d = first_ptr->prefix().depth;
-    __TBB_ASSERT(depth_type(array_size)>0, "casting overflow?");
-    if( d>=depth_type(array_size) ) {
-        grow( d+1 );
-    }
-    __TBB_ASSERT( assert_okay(), NULL );
-    if( !in_arena() ) {
-        try_enter_arena();
-        __TBB_ASSERT( arena_slot->steal_end&1, NULL );
-    } else {
-        acquire_task_pool();
-    }
-    TaskPool* tp = dummy_slot.task_pool;
-
-    *link = tp->array[d];
-    tp->array[d] = first_ptr;
-
-    if( d>deepest )
-        deepest = d;
-    if( d<tp->prefix().steal_begin )
-        tp->prefix().steal_begin = d;
-
-    release_task_pool();
-#endif /* !__TBB_TASK_DEQUE */
 
     arena->mark_pool_full();
     __TBB_ASSERT( assert_okay(), NULL );
@@ -2960,20 +2510,13 @@ void GenericScheduler::spawn( task& first, task*& next ) {
     TBB_TRACE(("%p.internal_spawn exit\n", this ));
 }
 
-#if __TBB_RELAXED_OWNERSHIP
 void GenericScheduler::local_spawn_root_and_wait( task& first, task*& next ) {
-    __TBB_ASSERT( Governor::local_scheduler() == this, NULL );
-#else /* !__TBB_RELAXED_OWNERSHIP */
-void GenericScheduler::spawn_root_and_wait( task& first, task*& next ) {
-#endif /* !__TBB_RELAXED_OWNERSHIP */
+    __TBB_ASSERT( Governor::is_set(this), NULL );
     __TBB_ASSERT( &first, NULL );
-    auto_empty_task dummy( __TBB_ALLOC_TASK_ARGS(this, first.prefix().depth-1, first.prefix().context) );
+    auto_empty_task dummy( __TBB_CONTEXT_ARG(this, first.prefix().context) );
     internal::reference_count n = 0;
     for( task* t=&first; ; t=t->prefix().next ) {
         ++n;
-#if !__TBB_RELAXED_OWNERSHIP
-        __TBB_ASSERT( t->is_owned_by_current_thread(), "root task not owned by current thread" );
-#endif
         __TBB_ASSERT( !t->prefix().parent, "not a root task, or already running" );
         t->prefix().parent = &dummy;
         if( &t->prefix().next==&next ) break;
@@ -2984,7 +2527,7 @@ void GenericScheduler::spawn_root_and_wait( task& first, task*& next ) {
     }
     dummy.prefix().ref_count = n+1;
     if( n>1 )
-        spawn( *first.prefix().next, next );
+        LocalSpawn( *first.prefix().next, next );
     TBB_TRACE(("spawn_root_and_wait((task_list*)%p): calling %p.loop\n",&first,this));
     wait_for_all( dummy, &first );
     TBB_TRACE(("spawn_root_and_wait((task_list*)%p): return\n",&first));
@@ -2995,7 +2538,7 @@ inline task* GenericScheduler::get_mailbox_task() {
     task* result = NULL;
     while( task_proxy* t = inbox.pop() ) {
         intptr tat = __TBB_load_with_acquire(t->task_and_tag);
-        __TBB_ASSERT( tat==task_proxy::mailbox_bit || tat==(tat|3)&&tat!=3, NULL );
+        __TBB_ASSERT( tat==task_proxy::mailbox_bit || (tat==(tat|3)&&tat!=3), NULL );
         if( tat!=task_proxy::mailbox_bit && __TBB_CompareAndSwapW( &t->task_and_tag, task_proxy::pool_bit, tat )==tat ) {
             // Successfully grabbed the task, and left pool seeker with job of freeing the proxy.
             ITT_NOTIFY( sync_acquired, inbox.outbox() );
@@ -3032,7 +2575,6 @@ inline task* GenericScheduler::strip_proxy( task_proxy* tp ) {
     return NULL;
 }
 
-#if __TBB_TASK_DEQUE
 inline task* GenericScheduler::get_task() {
     task* result = NULL;
 retry:
@@ -3120,129 +2662,16 @@ retry:
     return result;
 }
 
-#else /* !__TBB_TASK_DEQUE */
-
-inline task* GenericScheduler::get_task( depth_type d ) {
-    task* result = NULL;
-    // parallel_reduce has a subtle dependence on the order in which tasks are
-    // selected from the deque for execution.  If the task selected is not the
-    // next immediate task -- i.e. there is a hole between the previous task and
-    // the task selected -- then the selected task must be treated as stolen and
-    // the body of the task split in order to ensure the correctness of the join
-    // operations.
-retry:
-    if( deepest>=d ) {
-        acquire_task_pool();
-        task** a = dummy_slot.task_pool->array;
-        depth_type i = deepest;
-        do {
-            if( (result = a[i]) ) {
-                if( !(a[i] = result->prefix().next) )
-                    --i;
-                break;
-            }
-        } while( --i>=d );
-        deepest = i;
-        release_task_pool();
-    }
-    if( result ) {
-        if( is_proxy(*result) ) {
-            result = strip_proxy((task_proxy*)result);
-            if( !result ) {
-                goto retry;
-            }
-            GATHER_STATISTIC( ++proxy_execute_count );
-            // Following assertion should be true because TBB 2.0 tasks never specify affinity, and hence are not proxied.
-            __TBB_ASSERT( is_version_3_task(*result), "backwards compatibility with TBB 2.0 broken" );
-            // Task affinity has changed.
-            innermost_running_task = result;
-            result->note_affinity(my_affinity_id);
-        }
-    }
-    return result;
-} // GenericScheduler::get_task
-
-task* GenericScheduler::steal_task( UnpaddedArenaSlot& arena_slot, depth_type d ) {
-    task* result = NULL;
-    atomic_backoff backoff;
-    bool sync_prepare_done = false;
-    depth_type steal_end = arena_slot.steal_end;
-    for(;;) {
-        if( steal_end>>1<d ) {
-            // Nothing of interest to steal
-            if( sync_prepare_done )
-                ITT_NOTIFY(sync_cancel, &arena_slot);
-            goto done;
-        }
-        if( steal_end&1 ) {
-            // Someone else has lock on it.
-            if( arena_slot.owner_waits ) {
-                // The pool owner is waiting for it, so need to abandon locking attempts
-                if( sync_prepare_done )
-                    ITT_NOTIFY(sync_cancel, &arena_slot);
-                goto done;
-            }
-            if( !sync_prepare_done ) {
-                ITT_NOTIFY(sync_prepare, &arena_slot);
-                sync_prepare_done = true;
-            }
-            // While waiting, do exponential backoff
-            backoff.pause();
-            steal_end = arena_slot.steal_end;
-        } else {
-            depth_type tmp = steal_end;
-            steal_end = __TBB_CompareAndSwapW( &arena_slot.steal_end, steal_end+1, steal_end );
-            if( tmp==steal_end ) {
-                ITT_NOTIFY(sync_acquired, &arena_slot);
-                break;
-            }
-        }
-    }
-{
-    TaskPool* tp = arena_slot.task_pool;
-    depth_type i = tp->prefix().steal_begin;
-    if( i<d )
-        i = d;
-    for(; i<=steal_end>>1; ++i ) {
-        for( task** r = &tp->array[i]; (result=*r)!=NULL; r = &result->prefix().next ) {
-            if( is_proxy(*result) ) {
-                task_proxy& tp = *static_cast<task_proxy*>(result);
-                // If task will likely be grabbed by whom it was mailed to, skip it.
-                if( (tp.task_and_tag&3)==3 && tp.outbox->recipient_is_idle() ) 
-                    continue;
-            }
-            // Remove result from linked list
-            *r = result->prefix().next;
-            // Unlike get_task, we do not adjust i if array[i] becomes NULL.
-            // The reason is that it is a waste of time, because steal_task
-            // is relatively infrequent compared to insert_task, and the
-            // latter updates steal_begin too.
-            goto found;
-        }
-    }
-found:
-    if( tp->prefix().steal_begin>=d ) {
-        tp->prefix().steal_begin = i;
-        if( i>steal_end>>1 ) {
-            // Pool is empty.  This is important information for threads taking snapshots.
-            steal_end = -2;
-        }
-    }
-    // Release the task pool
-    ITT_NOTIFY(sync_releasing, &arena_slot);
-    __TBB_store_with_release( arena_slot.steal_end, steal_end );
-}
-done:
-    return result;
-}
-#endif /* !__TBB_TASK_DEQUE */
 
 #define ConcurrentWaitsEnabled(t) (t.prefix().context->my_version_and_traits & task_group_context::concurrent_wait)
 #define CancellationInfoPresent(t) (t->prefix().context->my_cancellation_requested)
 
 #if TBB_USE_CAPTURED_EXCEPTION
-    #define TbbCurrentException(context, TbbCapturedException) TbbCapturedException
+    inline tbb_exception* TbbCurrentException( task_group_context*, tbb_exception* src) { return src->move(); }
+    inline tbb_exception* TbbCurrentException( task_group_context*, captured_exception* src) { return src; }
 #else
+    // Using macro instead of an inline function here allows to avoid evaluation of the 
+    // TbbCapturedException expression when exact propagation is enabled for the context.
     #define TbbCurrentException(context, TbbCapturedException) \
         context->my_version_and_traits & task_group_context::exact_exception    \
             ? tbb_exception_ptr::allocate()    \
@@ -3257,26 +2686,19 @@ done:
 
 #define TbbCatchAll(context)  \
     catch ( tbb_exception& exc ) {  \
-        TbbRegisterCurrentException( context, exc.move() );   \
+        TbbRegisterCurrentException( context, &exc );   \
     } catch ( std::exception& exc ) {   \
         TbbRegisterCurrentException( context, captured_exception::allocate(typeid(exc).name(), exc.what()) ); \
     } catch ( ... ) {   \
         TbbRegisterCurrentException( context, captured_exception::allocate("...", "Unidentified exception") );\
     }
 
-#if __TBB_RELAXED_OWNERSHIP
 template<typename SchedulerTraits>
 void CustomScheduler<SchedulerTraits>::local_wait_for_all( task& parent, task* child ) {
-    __TBB_ASSERT( Governor::local_scheduler() == this, NULL );
+    __TBB_ASSERT( Governor::is_set(this), NULL );
     if( child ) {
         child->prefix().owner = this;
     }
-#else /* !__TBB_RELAXED_OWNERSHIP */
-template<typename SchedulerTraits>
-void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child ) {
-    __TBB_ASSERT( !child || child->prefix().owner == this, "task child is not owned by the current thread" );
-    __TBB_ASSERT( !child || !child->parent() || child->parent() == &parent, "child has a wrong parent" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     __TBB_ASSERT( parent.ref_count() >= (child && child->parent() == &parent ? 2 : 1), "ref_count is too small" );
     __TBB_ASSERT( assert_okay(), NULL );
     // Using parent's refcount in sync_prepare (in the stealing loop below) is 
@@ -3287,7 +2709,6 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
     __TBB_ASSERT( parent.prefix().context || (is_worker() && &parent == dummy_task), "parent task does not have context" );
 #endif /* __TBB_EXCEPTIONS */
     task* t = child;
-#if __TBB_TASK_DEQUE
     // Constants all_work_done and all_local_work_done are actually unreacheable 
     // refcount values that prevent early quitting the dispatch loop. They are 
     // defined to be in the middle of the range of negative values representable 
@@ -3307,17 +2728,6 @@ void CustomScheduler<SchedulerTraits>::wait_for_all( task& parent, task* child )
     } else {
         quit_point = parents_work_done;
     }
-#else /* !__TBB_TASK_DEQUE */
-    depth_type d;
-    if( innermost_running_task==dummy_task ) {
-        // We are in the outermost task dispatch loop of a master thread.
-        __TBB_ASSERT( !is_worker(), NULL );
-        // Forcefully make this loop operate at zero depth.
-        d = 0;
-    } else {
-        d = parent.prefix().depth+1;
-    }
-#endif /* !__TBB_TASK_DEQUE */
     task* old_innermost_running_task = innermost_running_task;
 #if __TBB_EXCEPTIONS
 exception_was_caught:
@@ -3329,6 +2739,7 @@ exception_was_caught:
         do {
             // Inner loop evaluates tasks that are handed directly to us by other tasks.
             while(t) {
+                __TBB_ASSERT( inbox.assert_is_idle(false), NULL );
 #if TBB_USE_ASSERT
                 __TBB_ASSERT(!is_proxy(*t),"unexpected proxy");
                 __TBB_ASSERT( t->prefix().owner==this, NULL );
@@ -3373,25 +2784,15 @@ exception_was_caught:
                         t->~task();
                         if( s ) {
                             if( tally_completion_of_one_predecessor(*s) ) {
-#if !__TBB_TASK_DEQUE
-                                depth_type s_depth = __TBB_load_with_acquire(s->prefix().depth);
-#endif /* !__TBB_TASK_DEQUE */
 #if TBB_USE_ASSERT
                                 s->prefix().extra_state &= ~es_ref_count_active;
 #endif /* TBB_USE_ASSERT */
                                 s->prefix().owner = this;
-#if __TBB_TASK_DEQUE
+
                                 if( !t_next ) {
-#else /* !__TBB_TASK_DEQUE */
-                                if( !t_next && s_depth>=deepest && s_depth>=d ) {
-                                    // Eliminate spawn/get_task pair.
-                                    // The elimination is valid because the spawn would set deepest==s_depth,
-                                    // and the subsequent call to get_task(d) would grab task s and
-                                    // restore deepest to its former value.
-#endif /* !__TBB_TASK_DEQUE */
                                     t_next = s;
                                 } else {
-                                    CustomScheduler<SchedulerTraits>::spawn(*s, s->prefix().next );
+                                    LocalSpawn( *s, s->prefix().next );
                                     __TBB_ASSERT(assert_okay(),NULL);
                                 }
                             }
@@ -3408,20 +2809,14 @@ exception_was_caught:
                         task* const& s = t;
                         if( tally_completion_of_one_predecessor(*s) ) {
                             // Unused load is put here for sake of inserting an "acquire" fence.
-#if !__TBB_TASK_DEQUE
-                            (void)__TBB_load_with_acquire(s->prefix().depth);
-#endif /* !__TBB_TASK_DEQUE */
 #if TBB_USE_ASSERT
                             s->prefix().extra_state &= ~es_ref_count_active;
                             __TBB_ASSERT( s->prefix().owner==this, "ownership corrupt?" );
-#if !__TBB_TASK_DEQUE
-                            __TBB_ASSERT( s->prefix().depth>=d, NULL );
-#endif /* !__TBB_TASK_DEQUE */
 #endif /* TBB_USE_ASSERT */
                             if( !t_next ) {
                                 t_next = s;
                             } else {
-                                CustomScheduler<SchedulerTraits>::spawn(*s, s->prefix().next );
+                                LocalSpawn( *s, s->prefix().next );
                                 __TBB_ASSERT(assert_okay(),NULL);
                             }
                         }
@@ -3432,7 +2827,7 @@ exception_was_caught:
                         __TBB_ASSERT( t_next && t_next != t, "reexecution requires that method 'execute' return another task" );
                         TBB_TRACE(("%p.wait_for_all: put task %p back into array",this,t));
                         t->prefix().state = task::allocated;
-                        CustomScheduler<SchedulerTraits>::spawn( *t, t->prefix().next );
+                        LocalSpawn( *t, t->prefix().next );
                         __TBB_ASSERT(assert_okay(),NULL);
                         break;
 #if TBB_USE_ASSERT
@@ -3448,14 +2843,11 @@ exception_was_caught:
                         break;
 #endif /* TBB_USE_ASSERT */
                 }
-#if !__TBB_TASK_DEQUE
-                __TBB_ASSERT( !t_next||t_next->prefix().depth>=d, NULL );
-#endif /* !__TBB_TASK_DEQUE */
+
                 t = t_next;
             } // end of scheduler bypass loop
             __TBB_ASSERT(assert_okay(),NULL);
 
-#if __TBB_TASK_DEQUE
             // If the parent's descendants are finished with and we are not in 
             // the outermost dispatch loop of a master thread, then we are done.
             // This is necessary to prevent unbounded stack growth in case of deep
@@ -3467,9 +2859,6 @@ exception_was_caught:
             if ( parent.prefix().ref_count == quit_point )
                 break;
             t = get_task();
-#else /* !__TBB_TASK_DEQUE */
-            t = get_task( d );
-#endif /* !__TBB_TASK_DEQUE */
             __TBB_ASSERT(!t || !is_proxy(*t),"unexpected proxy");
 #if TBB_USE_ASSERT
             __TBB_ASSERT(assert_okay(),NULL);
@@ -3480,13 +2869,11 @@ exception_was_caught:
 #endif /* TBB_USE_ASSERT */
         } while( t ); // end of local task array processing loop
 
-#if __TBB_TASK_DEQUE
         if ( quit_point == all_local_work_done ) {
             __TBB_ASSERT( arena_slot == &dummy_slot && arena_slot->head == 0 && arena_slot->tail == 0, NULL );
             innermost_running_task = old_innermost_running_task;
             return;
         }
-#endif
         inbox.set_is_idle( true );
         __TBB_ASSERT( arena->prefix().number_of_workers>0||parent.prefix().ref_count==1, "deadlock detected" );
         // The state "failure_count==-1" is used only when itt_possible is true,
@@ -3508,13 +2895,10 @@ exception_was_caught:
             size_t n = arena->prefix().limit;
             if( n>1 ) {
                 if( !my_affinity_id || !(t=get_mailbox_task()) ) {
-#if __TBB_TASK_DEQUE
                     if ( !can_steal() )
                         goto fail;
-#endif /* __TBB_TASK_DEQUE */
                     size_t k = random.get() % (n-1);
                     ArenaSlot* victim = &arena->slot[k];
-#if __TBB_TASK_DEQUE
                     // The following condition excludes the master that might have 
                     // already taken our previous place in the arena from the list .
                     // of potential victims. But since such a situation can take 
@@ -3523,11 +2907,6 @@ exception_was_caught:
                     if( k >= arena_index )
                         ++victim;               // Adjusts random distribution to exclude self
                     t = steal_task( *victim );
-#else /* !__TBB_TASK_DEQUE */
-                    if( victim>=arena_slot )
-                        ++victim;               // Adjusts random distribution to exclude self
-                    t = steal_task( *victim, d );
-#endif /* !__TBB_TASK_DEQUE */
                     if( !t ) goto fail;
                     if( is_proxy(*t) ) {
                         t = strip_proxy((task_proxy*)t);
@@ -3550,9 +2929,6 @@ exception_was_caught:
                 }
 #endif /* __TBB_SCHEDULER_OBSERVER */
                 {
-#if !__TBB_TASK_DEQUE
-                    __TBB_ASSERT( t->prefix().depth>=d, NULL );
-#endif /* !__TBB_TASK_DEQUE */
                     if( SchedulerTraits::itt_possible ) {
                         if( failure_count!=-1 ) {
                             // FIXME - might be victim, or might be selected from a mailbox
@@ -3581,26 +2957,14 @@ fail:
             if( failure_count>=yield_threshold ) {
                 __TBB_Yield();
                 if( failure_count>=yield_threshold+100 ) {
-#if __TBB_TASK_DEQUE
-                    bool call_wait = !old_innermost_running_task;
-#else
-                    bool call_wait = d==0 && is_worker();
-#endif
-#if __TBB_RML
-                    if( call_wait && arena->check_if_pool_is_empty() ) {
-                        inbox.set_is_idle( false );
-                        __TBB_ASSERT( !old_innermost_running_task, NULL );
+                    if( !old_innermost_running_task && arena->check_if_pool_is_empty() ) {
+                        // Current thread was created by RML and has nothing to do, so return it to the RML.
+                        // For purposes of affinity support, the thread is considered idle while it is in RML.
                         // Restore innermost_running_task to its original value.
                         innermost_running_task = NULL;
                         return;
                     }
                     failure_count = yield_threshold;
-#else 
-                    if( call_wait && arena->wait_while_pool_is_empty() )
-                        failure_count = 0;
-                    else
-                        failure_count = yield_threshold;
-#endif /* __TBB_RML */
                 }
             }
         }
@@ -3632,11 +2996,6 @@ done:
     parent.prefix().extra_state &= ~es_ref_count_active;
 #endif /* TBB_USE_ASSERT */
     innermost_running_task = old_innermost_running_task;
-#if !__TBB_TASK_DEQUE
-    if( deepest<0 && innermost_running_task==dummy_task && in_arena() ) {
-        leave_arena(/*compress=*/true);
-    }
-#endif /* !__TBB_TASK_DEQUE */
 #if __TBB_EXCEPTIONS
     __TBB_ASSERT(parent.prefix().context && dummy_task->prefix().context, NULL);
     task_group_context* parent_ctx = parent.prefix().context;
@@ -3663,7 +3022,6 @@ done:
 
 #undef CancellationInfoPresent
 
-#if __TBB_TASK_DEQUE
 inline void GenericScheduler::do_enter_arena() {
     arena_slot = &arena->slot[arena_index];
     __TBB_ASSERT ( arena_slot->head == arena_slot->tail, "task deque of a free slot must be empty" );
@@ -3746,142 +3104,24 @@ void GenericScheduler::leave_arena() {
     arena_slot = &dummy_slot;
 }
 
-#else /* !__TBB_TASK_DEQUE */
-
-void GenericScheduler::try_enter_arena() {
-    __TBB_ASSERT( arena, NULL );
-    __TBB_ASSERT( arena_slot, "arena_slot not set" );
-    __TBB_ASSERT( !in_arena(), "already in arena?" );
-    unsigned n = arena->prefix().number_of_slots;
-    unsigned j = unsigned(arena->prefix().limit);
-    for( unsigned k=j; k<n; ++k ) {
-        if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( &arena->slot[k].steal_end, -4|1, -4 )==-4 ) {
-            __TBB_ASSERT( arena->slot[k].steal_end==-3, "slot not really acquired?" );
-            ITT_NOTIFY(sync_acquired,&arena->slot[k]);
-            dummy_slot.task_pool->prefix().arena_index = k;
-            arena->slot[k].task_pool = dummy_slot.task_pool;
-            arena->slot[k].owner_waits = false;
-            arena_slot = &arena->slot[k];
-            // Successfully claimed a spot in the arena.  Update arena->prefix().limit.
-            do {
-                j = unsigned(arena->prefix().limit.compare_and_swap( k+1, j ));
-            } while( j<=k );
-            attach_mailbox( k+1 );
-            break;
-        }
-    }
-    __TBB_store_with_release( arena_slot->steal_end, 2*deepest+1 );
-}
-
-void GenericScheduler::leave_arena( bool compress ) {
-    __TBB_ASSERT( in_arena(), "not in arena" );
-    // Remove myself from the arena.
-    acquire_task_pool();
-#if TBB_USE_ASSERT
-    for( depth_type i=0; i<deepest; ++i )
-        __TBB_ASSERT( !dummy_slot.task_pool->array[i], "leaving arena, but have tasks to do" );
-#endif /* TBB_USE_ASSERT */
-    size_t k = dummy_slot.task_pool->prefix().arena_index;
-    __TBB_ASSERT( &arena->slot[k]==arena_slot, NULL );
-    arena_slot->task_pool = NULL;
-    my_affinity_id = 0;
-    inbox.detach();
-    dummy_slot.task_pool->prefix().arena_index = TaskPoolPrefix::null_arena_index;
-    arena_slot = &dummy_slot;
-    arena_slot->owner_waits  = false;
-    size_t n = arena->prefix().number_of_workers;
-    __TBB_ASSERT( !compress || k>=n, "must be master to compress" );
-    size_t new_limit = arena->prefix().limit;
-    if( compress && new_limit==k+1 ) {
-        // Garbage collect some slots
-        for(;;) {
-            new_limit = arena->prefix().limit.compare_and_swap( k, k+1 );
-            ITT_NOTIFY(sync_releasing, &arena->slot[k]);
-            __TBB_store_with_release( arena->slot[k].steal_end, -4 );
-            if( new_limit!=k+1 ) break;
-            if( --k<n ) break;
-            if( arena->slot[k].steal_end==-4 && __TBB_CompareAndSwapW( &arena->slot[k].steal_end, -4|1, -4 )==-4 ) {
-                ITT_NOTIFY(sync_acquired,&arena->slot[k]);
-            } else {
-                break;
-            }
-        }
-    } else {
-        ITT_NOTIFY(sync_releasing, &arena->slot[k]);
-        __TBB_store_with_release( arena->slot[k].steal_end, -4 );
-    }
-}
-#endif /* !__TBB_TASK_DEQUE */
 
 GenericScheduler* GenericScheduler::create_worker( Arena& a, size_t index ) {
     GenericScheduler* s = GenericScheduler::allocate_scheduler(&a);
 
     // Put myself into the arena
-#if !__TBB_TASK_DEQUE
-    ArenaSlot& slot = a.slot[index];
-    __TBB_ASSERT( slot.steal_end==-3, "slot not allocated as locked worker?" );
-    s->arena_slot = &slot;
-#endif /* !__TBB_TASK_DEQUE */
 #if __TBB_EXCEPTIONS
     s->dummy_task->prefix().context = &dummy_context;
     // Sync up the local cancellation state with the global one. No need for fence here.
     s->local_cancel_count = global_cancel_count;
 #endif /* __TBB_EXCEPTIONS */
     s->attach_mailbox( index+1 );
-#if __TBB_TASK_DEQUE
     s->arena_index = index;
     s->init_stack_info();
-#else /* !__TBB_TASK_DEQUE */
-    TaskPool* t = s->dummy_slot.task_pool;
-    t->prefix().arena_index = index;
-    ITT_NOTIFY(sync_releasing, &slot);
-    slot.task_pool = t;
-    slot.steal_end = -2;
-    slot.owner_waits = false;
-#endif /* !__TBB_TASK_DEQUE */
-
-#if __TBB_RML
+
     __TBB_store_with_release( a.prefix().worker_list[index].scheduler, s );
-#endif /* __TBB_RML */
     return s;
 }
 
-#if !__TBB_RML
-GenericScheduler* GenericScheduler::create_worker_heap( WorkerDescriptor& w ) {
-    __TBB_ASSERT( (uintptr)w.scheduler+1<2u, NULL );
-    unsigned n = w.arena->prefix().number_of_workers;
-    WorkerDescriptor* worker_list = w.arena->prefix().worker_list;
-    __TBB_ASSERT( &w >= worker_list, NULL );
-    unsigned i = unsigned(&w - worker_list);
-    __TBB_ASSERT( i<n, NULL );
-
-    // Start my children
-    if( 2*i+1<n ) {
-        // Have a left child, so start it.
-        worker_list[2*i+1].start_one_worker_thread();
-        if( 2*i+2<n ) {
-            // Have a right child, so start it.
-            worker_list[2*i+2].start_one_worker_thread();
-        }
-    }
-
-    GenericScheduler* s = GenericScheduler::create_worker(*w.arena,i);
-
-    // Attempt to publish worker
-    ITT_NOTIFY(sync_releasing, &w.scheduler);
-    // Note: really need only release fence on the compare-and-swap.
-    if( __TBB_CompareAndSwapW( &w.scheduler, (intptr)s, intptr(0) )==-1 ) {
-        // Master thread has already commenced terminate_workers() and not waited for us to respond.
-        // Thus we are responsible for cleaning up ourselves.
-        s->dummy_task->prefix().ref_count = 0;
-        // Do not register scheduler in thread local storage, because the storage may be gone.
-    } else {
-        __TBB_ASSERT( w.scheduler==s, NULL );
-        Governor::sign_on(s);
-    }
-    return s;
-}
-#endif /* !__TBB_RML */
 
 GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     GenericScheduler* s = GenericScheduler::allocate_scheduler( arena );
@@ -3889,7 +3129,6 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     s->innermost_running_task = &t;
     t.prefix().ref_count = 1;
     Governor::sign_on(s);
-#if __TBB_EXCEPTIONS || __TBB_TASK_DEQUE
 #if __TBB_EXCEPTIONS
     // Context to be used by root tasks by default (if the user has not specified one).
     // Allocation is done by NFS allocator because we cannot reuse memory allocated 
@@ -3903,7 +3142,6 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
         the_scheduler_list_head.my_next->my_prev = &node;
         the_scheduler_list_head.my_next = &node;
 #endif /* __TBB_EXCEPTIONS */
-#if __TBB_TASK_DEQUE
         unsigned last = arena->prefix().number_of_slots,
                  cur_limit = arena->prefix().limit;
         // This slot index assignment is just a hint to ...
@@ -3922,18 +3160,14 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
             unsigned first = arena->prefix().number_of_workers;
             s->arena_index = first + s->random.get() % (last - first);
         }
-#endif /* __TBB_TASK_DEQUE */
 #if __TBB_EXCEPTIONS
     }
 #endif
-#if __TBB_TASK_DEQUE
     s->init_stack_info();
-#endif
 #if __TBB_EXCEPTIONS
     // Sync up the local cancellation state with the global one. No need for fence here.
     s->local_cancel_count = global_cancel_count;
 #endif
-#endif /* __TBB_EXCEPTIONS | __TBB_TASK_DEQUE */
     __TBB_ASSERT( &task::self()==&t, NULL );
 #if __TBB_SCHEDULER_OBSERVER
     // Process any existing observers.
@@ -3942,56 +3176,6 @@ GenericScheduler* GenericScheduler::create_master( Arena* arena ) {
     return s;
 }
 
-#if !__TBB_RML
-thread_routine_return_type __TBB_THREAD_ROUTINE GenericScheduler::worker_routine( void* arg )
-{
-    ITT_THREAD_SET_NAME(_T("TBB Worker Thread"));
-
-    GenericScheduler& scheduler = *create_worker_heap(*(WorkerDescriptor*)arg);
-
-    if( scheduler.dummy_task->prefix().ref_count==0 ) {
-        // No sense to start anything because shutdown has been requested
-        cleanup_worker(&scheduler);
-        return thread_routine_return_type(0);
-    }
-
-#if USE_PTHREAD
-    pthread_cleanup_push( cleanup_worker, &scheduler );
-#else /* USE_WINTHREAD */
-    class raii_finalizer : internal::no_copy {
-        GenericScheduler& scheduler;
-    public:
-        explicit raii_finalizer(GenericScheduler& sch) : scheduler(sch) {}
-        ~raii_finalizer() { cleanup_worker(&scheduler); }
-    } finalizer(scheduler);
-#endif
-
-#if (_WIN32||_WIN64)&&!__TBB_ipf
-    // Deal with 64K aliasing.  The formula for "offset" is a Fibonacci hash function,
-    // which has the desirable feature of spreading out the offsets fairly evenly
-    // without knowing the total number of offsets, and furthermore unlikely to
-    // accidentally cancel out other 64K aliasing schemes that Microsoft might implement later.
-    // See Knuth Vol 3. "Theorem S" for details on Fibonacci hashing.
-#if __TBB_TASK_DEQUE
-    size_t offset = (scheduler.arena_index + 1) * 40503U % (1U << 16);
-#else /* !__TBB_TASK_DEQUE */
-    size_t offset = (scheduler.dummy_slot.task_pool->prefix().arena_index+1) * 40503U % (1U<<16);
-#endif /* !__TBB_TASK_DEQUE */
-    // The following statement is really does need "volatile", otherwise the compiler might remove the _alloca.
-    void* volatile sink_for_alloca = _alloca(offset);
-    __TBB_ASSERT_EX(sink_for_alloca, "_alloca failed");
-#else
-    // Linux thread allocators avoid 64K aliasing.
-#endif /* _WIN32||_WIN64 */
-
-    scheduler.wait_for_all(*scheduler.dummy_task,NULL);
-
-#if USE_PTHREAD
-    pthread_cleanup_pop( true );
-#endif
-    return thread_routine_return_type(0);
-}
-#endif /* __TBB_RML */
 
 void GenericScheduler::cleanup_worker( void* arg ) {
     TBB_TRACE(("%p.cleanup_worker entered\n",arg));
@@ -4000,19 +3184,9 @@ void GenericScheduler::cleanup_worker( void* arg ) {
 #if __TBB_SCHEDULER_OBSERVER
     s.notify_exit_observers(/*is_worker=*/true);
 #endif /* __TBB_SCHEDULER_OBSERVER */
-#if !__TBB_RML
-    Arena* a = s.arena;
-#endif /* !__TBB_RML */
-#if __TBB_TASK_DEQUE
     __TBB_ASSERT( s.arena_slot->task_pool == EmptyTaskPool || s.arena_slot->head == s.arena_slot->tail, 
                   "worker has unfinished work at run down" );
-#else
-    __TBB_ASSERT( s.arena_slot!=&s.dummy_slot, "worker not in arena?" );
-#endif /* __TBB_TASK_DEQUE */
     s.free_scheduler();
-#if !__TBB_RML
-    a->remove_gc_reference();
-#endif /* !__TBB_RML */
 }
 
 void GenericScheduler::cleanup_master() {
@@ -4022,15 +3196,15 @@ void GenericScheduler::cleanup_master() {
 #if __TBB_SCHEDULER_OBSERVER
     s.notify_exit_observers(/*is_worker=*/false);
 #endif /* __TBB_SCHEDULER_OBSERVER */
-#if __TBB_TASK_DEQUE
-    if( arena_slot->task_pool != EmptyTaskPool && arena_slot->head < arena_slot->tail )
+    if ( !is_local_task_pool_empty() ) {
+        __TBB_ASSERT ( Governor::is_set(this), "TLS slot is cleared before the task pool cleanup" );
         s.wait_for_all( *dummy_task, NULL );
-#endif /* __TBB_TASK_DEQUE */
+        __TBB_ASSERT ( Governor::is_set(this), "Other thread reused our TLS key during the task pool cleanup" );
+    }
     s.free_scheduler();
     Governor::finish_with_arena();
 }
 
-#if __TBB_RML
 //------------------------------------------------------------------------
 // UnpaddedArenaPrefix
 //------------------------------------------------------------------------
@@ -4040,7 +3214,7 @@ inline Arena& UnpaddedArenaPrefix::arena() {
 
 void UnpaddedArenaPrefix::process( job& j ) {
     GenericScheduler& s = static_cast<GenericScheduler&>(j);
-    __TBB_ASSERT( &s==Governor::local_scheduler(), NULL );
+    __TBB_ASSERT( Governor::is_set(&s), NULL );
     __TBB_ASSERT( !s.innermost_running_task, NULL );
     s.wait_for_all(*s.dummy_task,NULL);
     __TBB_ASSERT( !s.innermost_running_task, NULL );
@@ -4075,72 +3249,18 @@ void UnpaddedArenaPrefix::acknowledge_close_connection() {
     Governor::sign_on(s);
     return s;
 }
-#else
-//------------------------------------------------------------------------
-// WorkerDescriptor
-//------------------------------------------------------------------------
-void WorkerDescriptor::start_one_worker_thread() {
-// Worker threads are detached right after creation. They must take care of own cleanup.
-#if USE_WINTHREAD
-    unsigned thread_id;
-    unsigned stack_size = (unsigned)arena->prefix().stack_size;
-    __TBB_ASSERT( stack_size == arena->prefix().stack_size, "Requested stack size is too large for Windows" );
-    // The return type of _beginthreadex is "uintptr_t" on new MS compilers,
-    // and 'unsigned long' on old MS compilers.  Our uintptr works for both.
-    uintptr status = _beginthreadex( NULL, stack_size, GenericScheduler::worker_routine, this, 0, &thread_id );
-    if( status==0 )
-        handle_perror(errno,"__beginthreadex");
-    else {
-        // Fake prepare/acquired pair on a fake object (need some thread-specific object 
-        // not used anywhere else) for Intel(R) Parallel Amplifier to correctly attribute the operations below.
-        ITT_SYNC_CREATE(&arena, SyncType_Scheduler, SyncObj_WorkerLifeCycleMgmt);
-        ITT_NOTIFY( sync_prepare, &arena);
-        CloseHandle((HANDLE)status); // detach
-        ITT_NOTIFY( sync_acquired, &arena );
-    }
-#else /* USE_PTHREAD */
-    int status;
-    pthread_attr_t stack_size;
-    status = pthread_attr_init( &stack_size );
-    if( status )
-        handle_perror( status, "pthread_attr_init" );
-    __TBB_ASSERT( arena->prefix().stack_size > 0, "No default worker stack size set" );
-    status = pthread_attr_setstacksize( &stack_size, arena->prefix().stack_size );
-    if( status )
-        handle_perror( status, "pthread_attr_setstacksize" );
-    pthread_t handle;
-    // This if is due to an Intel Compiler Bug, tracker # C70996
-    // This #if should be removed as soon as the bug is fixed
-#if __APPLE__ && __TBB_x86_64
-    static void *(*r)(void*) = GenericScheduler::worker_routine;
-    status = pthread_create( &handle, &stack_size, r, this );
-#else
-    status = pthread_create( &handle, &stack_size, GenericScheduler::worker_routine, this );
-#endif
-    if( status )
-        handle_perror( status, "pthread_create" );
-    status = pthread_detach( handle );
-    if( status )
-        handle_perror( status, "pthread_detach" );
-#endif /* USE_WINTHREAD */
-}
-#endif /*__TBB_RML */
 
 //------------------------------------------------------------------------
 // Methods of allocate_root_proxy
 //------------------------------------------------------------------------
 task& allocate_root_proxy::allocate( size_t size ) {
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-    internal::GenericScheduler* v = Governor::local_scheduler_with_auto_init();
-#else
     internal::GenericScheduler* v = Governor::local_scheduler();
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
     __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" );
 #if __TBB_EXCEPTIONS
     task_prefix& p = v->innermost_running_task->prefix();
 #endif
     // New root task becomes part of the currently running task's cancellation context
-    return v->allocate_task( size, __TBB_ALLOC_TASK_ARGS(NULL, p.depth+1, p.context) );
+    return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) );
 }
 
 void allocate_root_proxy::free( task& task ) {
@@ -4160,7 +3280,7 @@ task& allocate_root_with_context_proxy::allocate( size_t size ) const {
     internal::GenericScheduler* v = Governor::local_scheduler();
     __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" );
     task_prefix& p = v->innermost_running_task->prefix();
-    task& t = v->allocate_task( size, __TBB_ALLOC_TASK_ARGS(NULL, p.depth+1, &my_context) );
+    task& t = v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, &my_context) );
     // The supported usage model prohibits concurrent initial binding. Thus we 
     // do not need interlocked operations or fences here.
     if ( my_context.my_kind == task_group_context::binding_required ) {
@@ -4212,15 +3332,10 @@ void allocate_root_with_context_proxy::free( task& task ) const {
 task& allocate_continuation_proxy::allocate( size_t size ) const {
     task& t = *((task*)this);
     __TBB_ASSERT( AssertOkay(t), NULL );
-#if __TBB_RELAXED_OWNERSHIP
     GenericScheduler* s = Governor::local_scheduler();
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    GenericScheduler* s = static_cast<GenericScheduler*>(t.prefix().owner);
-    __TBB_ASSERT( Governor::local_scheduler()==s, "thread does not own this" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     task* parent = t.parent();
     t.prefix().parent = NULL;
-    return s->allocate_task( size, __TBB_ALLOC_TASK_ARGS(parent, t.prefix().depth, t.prefix().context) );
+    return s->allocate_task( size, __TBB_CONTEXT_ARG(parent, t.prefix().context) );
 }
 
 void allocate_continuation_proxy::free( task& mytask ) const {
@@ -4235,13 +3350,8 @@ void allocate_continuation_proxy::free( task& mytask ) const {
 task& allocate_child_proxy::allocate( size_t size ) const {
     task& t = *((task*)this);
     __TBB_ASSERT( AssertOkay(t), NULL );
-#if __TBB_RELAXED_OWNERSHIP
     GenericScheduler* s = Governor::local_scheduler();
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    GenericScheduler* s = static_cast<GenericScheduler*>(t.prefix().owner);
-    __TBB_ASSERT( Governor::local_scheduler()==s, "thread does not own this" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
-    return s->allocate_task( size, __TBB_ALLOC_TASK_ARGS(&t, t.prefix().depth+1, t.prefix().context) );
+    return s->allocate_task( size, __TBB_CONTEXT_ARG(&t, t.prefix().context) );
 }
 
 void allocate_child_proxy::free( task& mytask ) const {
@@ -4254,12 +3364,8 @@ void allocate_child_proxy::free( task& mytask ) const {
 task& allocate_additional_child_of_proxy::allocate( size_t size ) const {
     __TBB_ASSERT( AssertOkay(self), NULL );
     parent.increment_ref_count();
-#if __TBB_RELAXED_OWNERSHIP
     GenericScheduler* s = Governor::local_scheduler();
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    GenericScheduler* s = static_cast<GenericScheduler*>(self.prefix().owner);
-#endif /* !__TBB_RELAXED_OWNERSHIP */
-    return s->allocate_task( size, __TBB_ALLOC_TASK_ARGS(&parent, parent.prefix().depth+1, parent.prefix().context) );
+    return s->allocate_task( size, __TBB_CONTEXT_ARG(&parent, parent.prefix().context) );
 }
 
 void allocate_additional_child_of_proxy::free( task& task ) const {
@@ -4338,7 +3444,7 @@ void captured_exception::clear () throw() {
 captured_exception* captured_exception::move () throw() {
     captured_exception *e = (captured_exception*)allocate_via_handler_v3(sizeof(captured_exception));
     if ( e ) {
-        new (e) captured_exception();
+        ::new (e) captured_exception();
         e->my_exception_name = my_exception_name;
         e->my_exception_info = my_exception_info;
         e->my_dynamic = true;
@@ -4358,7 +3464,7 @@ void captured_exception::destroy () throw() {
 captured_exception* captured_exception::allocate ( const char* name, const char* info ) {
     captured_exception *e = (captured_exception*)allocate_via_handler_v3( sizeof(captured_exception) );
     if ( e ) {
-        new (e) captured_exception(name, info);
+        ::new (e) captured_exception(name, info);
         e->my_dynamic = true;
     }
     return e;
@@ -4397,8 +3503,10 @@ tbb_exception_ptr* tbb_exception_ptr::allocate ( const tbb_exception& ) {
     return AllocateExceptionContainer( std::current_exception() );
 }
 
-tbb_exception_ptr* tbb_exception_ptr::allocate ( const captured_exception& src ) {
-    return AllocateExceptionContainer( src );
+tbb_exception_ptr* tbb_exception_ptr::allocate ( captured_exception& src ) {
+    tbb_exception_ptr *res = AllocateExceptionContainer( src );
+    src.destroy();
+    return res;
 }
 
 void tbb_exception_ptr::destroy () throw() {
@@ -4416,8 +3524,8 @@ void tbb_exception_ptr::destroy () throw() {
 
 task_group_context::~task_group_context () {
     if ( my_kind != isolated ) {
-        __TBB_ASSERT ( Governor::local_scheduler() == my_owner, "Task group context is destructed by wrong thread" );
         GenericScheduler *s = (GenericScheduler*)my_owner;
+        __TBB_ASSERT ( Governor::is_set(s), "Task group context is destructed by wrong thread" );
         my_node.my_next->my_prev = my_node.my_prev;
         uintptr_t local_count_snapshot = s->local_cancel_count;
         my_node.my_prev->my_next = my_node.my_next;
@@ -4446,11 +3554,7 @@ void task_group_context::init () {
     my_cancellation_requested = 0;
     my_exception = NULL;
     if ( my_kind == bound ) {
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-        GenericScheduler *s = Governor::local_scheduler_with_auto_init();
-#else
         GenericScheduler *s = Governor::local_scheduler();
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
         my_owner = s;
         __TBB_ASSERT ( my_owner, "Thread has not activated a task_scheduler_init object?" );
         // Backward links are used by this thread only, thus no fences are necessary
@@ -4537,28 +3641,17 @@ internal::reference_count task::internal_decrement_ref_count() {
 }
 
 task& task::self() {
-#if __TBB_TASK_SCHEDULER_AUTO_INIT
-    GenericScheduler *v = Governor::local_scheduler_with_auto_init();
-#else
     GenericScheduler *v = Governor::local_scheduler();
-#endif /* __TBB_TASK_SCHEDULER_AUTO_INIT */
     __TBB_ASSERT( v->assert_okay(), NULL );
     __TBB_ASSERT( v->innermost_running_task, NULL );
     return *v->innermost_running_task;
 }
 
 bool task::is_owned_by_current_thread() const {
-#if __TBB_RELAXED_OWNERSHIP
     return true;
-#else /* !__TBB_RELAXED_OWNERSHIP */
-    return Governor::local_scheduler()==prefix().owner;
-#endif /* !__TBB_RELAXED_OWNERSHIP */
 }
 
 void task::destroy( task& victim ) {
-#if !__TBB_RELAXED_OWNERSHIP
-    __TBB_ASSERT( is_owned_by_current_thread(), "task-destroyer is not owned by the current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     __TBB_ASSERT( victim.prefix().ref_count== (ConcurrentWaitsEnabled(victim) ? 1 : 0), "Task being destroyed must not have children" );
     __TBB_ASSERT( victim.state()==task::allocated, "illegal state for victim task" );
     task* parent = victim.parent();
@@ -4571,9 +3664,6 @@ void task::destroy( task& victim ) {
 }
 
 void task::spawn_and_wait_for_all( task_list& list ) {
-#if !__TBB_RELAXED_OWNERSHIP
-    __TBB_ASSERT( is_owned_by_current_thread(), "'this' not owned by current thread" );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     scheduler* s = Governor::local_scheduler();
     task* t = list.first;
     if( t ) {
@@ -4594,6 +3684,7 @@ void task::note_affinity( affinity_id ) {
 // task_scheduler_init
 //------------------------------------------------------------------------
 
+/** Left out-of-line for the sake of the backward binary compatibility **/
 void task_scheduler_init::initialize( int number_of_threads ) {
     initialize( number_of_threads, 0 );
 }
@@ -4603,30 +3694,17 @@ void task_scheduler_init::initialize( int number_of_threads, stack_size_type thr
         __TBB_ASSERT( !my_scheduler, "task_scheduler_init already initialized" );
         __TBB_ASSERT( number_of_threads==-1 || number_of_threads>=1,
                     "number_of_threads for task_scheduler_init must be -1 or positive" );
-        // Double-check
-        if( !__TBB_InitOnce::initialization_done() ) {
-            DoOneTimeInitializations();
-        }
-        GenericScheduler* s = Governor::local_scheduler();
-        if( s ) {
-            s->ref_count += 1;
-        } else {
-            Arena* a = Governor::obtain_arena(number_of_threads,thread_stack_size);
-            s = GenericScheduler::create_master( a );
-        }
-        my_scheduler = s;
+        my_scheduler = Governor::init_scheduler( number_of_threads, thread_stack_size );
     } else {
         __TBB_ASSERT( !thread_stack_size, "deferred initialization ignores stack size setting" );
     }
 }
 
 void task_scheduler_init::terminate() {
-    TBB_TRACE(("task_scheduler_init::terminate(): this=%p\n", this));
     GenericScheduler* s = static_cast<GenericScheduler*>(my_scheduler);
     my_scheduler = NULL;
     __TBB_ASSERT( s, "task_scheduler_init::terminate without corresponding task_scheduler_init::initialize()");
-    if( !--(s->ref_count) )
-        s->cleanup_master();
+    Governor::terminate_scheduler(s);
 }
 
 int task_scheduler_init::default_num_threads() {
diff --git a/src/tbb/tbb_resource.rc b/src/tbb/tbb_resource.rc
index f82c8ce..d61cac4 100644
--- a/src/tbb/tbb_resource.rc
+++ b/src/tbb/tbb_resource.rc
@@ -90,14 +90,14 @@ BEGIN
             VALUE "FileDescription", "Threading Building Blocks library\0"
             VALUE "FileVersion", TBB_VERSION "\0"
 //what is it?            VALUE "InternalName", "tbb\0"
-            VALUE "LegalCopyright", "Copyright (C) 2006\0"
+            VALUE "LegalCopyright", "Copyright 2005-2009 Intel Corporation.  All Rights Reserved.\0"
             VALUE "LegalTrademarks", "\0"
 #ifndef TBB_USE_DEBUG
             VALUE "OriginalFilename", "tbb.dll\0"
 #else
             VALUE "OriginalFilename", "tbb_debug.dll\0"
 #endif
-            VALUE "ProductName", "Threading Building Blocks\0"
+            VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0"
             VALUE "ProductVersion", TBB_VERSION "\0"
             VALUE "Comments", TBB_VERSION_STRINGS "\0"
             VALUE "PrivateBuild", "\0"
diff --git a/src/tbb/win32-tbb-export.def b/src/tbb/win32-tbb-export.def
index ff7ac01..d78bf6d 100644
--- a/src/tbb/win32-tbb-export.def
+++ b/src/tbb/win32-tbb-export.def
@@ -89,6 +89,10 @@ __TBB_machine_trylockbyte
 ?name at captured_exception@tbb@@UBEPBDXZ
 ?what at captured_exception@tbb@@UBEPBDXZ
 ??1captured_exception at tbb@@UAE at XZ
+?move at captured_exception@tbb@@UAEPAV12 at XZ
+?destroy at captured_exception@tbb@@UAEXXZ
+?set at captured_exception@tbb@@QAEXPBD0 at Z
+?clear at captured_exception@tbb@@QAEXXZ
 #endif /* __TBB_EXCEPTIONS */
 
 ; tbb_misc.cpp
diff --git a/src/tbb/win64-tbb-export.def b/src/tbb/win64-tbb-export.def
index 5c18884..4a3debf 100644
--- a/src/tbb/win64-tbb-export.def
+++ b/src/tbb/win64-tbb-export.def
@@ -85,6 +85,10 @@ __TBB_machine_pause
 ?name at captured_exception@tbb@@UEBAPEBDXZ
 ?what at captured_exception@tbb@@UEBAPEBDXZ
 ??1captured_exception at tbb@@UEAA at XZ
+?move at captured_exception@tbb@@UEAAPEAV12 at XZ
+?destroy at captured_exception@tbb@@UEAAXXZ
+?set at captured_exception@tbb@@QEAAXPEBD0 at Z
+?clear at captured_exception@tbb@@QEAAXXZ
 #endif /* __TBB_EXCEPTIONS */
 
 ; tbb_misc.cpp
diff --git a/src/tbbmalloc/Customize.h b/src/tbbmalloc/Customize.h
index 0723018..adc6d4c 100644
--- a/src/tbbmalloc/Customize.h
+++ b/src/tbbmalloc/Customize.h
@@ -90,10 +90,6 @@ inline intptr_t AtomicIncrement( volatile intptr_t& counter ) {
     return __TBB_FetchAndAddW( &counter, 1 )+1;
 }
 
-inline uintptr_t AtomicIncrement( volatile uintptr_t& counter ) {
-    return __TBB_FetchAndAddW( &counter, 1 )+1;
-}
-
 inline uintptr_t AtomicAdd( volatile uintptr_t& counter, uintptr_t value ) {
     return __TBB_FetchAndAddW( &counter, value );
 }
@@ -104,18 +100,21 @@ inline intptr_t AtomicCompareExchange( volatile intptr_t& location, intptr_t new
 
 #define USE_DEFAULT_MEMORY_MAPPING 1
 
-namespace rml {
-namespace internal {
-    void init_tbbmalloc();
-} } // namespaces
-
-#define MALLOC_EXTRA_INITIALIZATION rml::internal::init_tbbmalloc()
-
 // To support malloc replacement with LD_PRELOAD
 #include "proxy.h"
 
 #if MALLOC_LD_PRELOAD
+#define malloc_proxy __TBB_malloc_proxy
 extern "C" void * __TBB_malloc_proxy(size_t)  __attribute__ ((weak));
+#else
+const bool malloc_proxy = false;
 #endif
 
+namespace rml {
+namespace internal {
+    void init_tbbmalloc();
+} } // namespaces
+
+#define MALLOC_EXTRA_INITIALIZATION rml::internal::init_tbbmalloc()
+
 #endif /* _TBB_malloc_Customize_H_ */
diff --git a/src/tbbmalloc/MapMemory.h b/src/tbbmalloc/MapMemory.h
index 77daff0..64bf66b 100644
--- a/src/tbbmalloc/MapMemory.h
+++ b/src/tbbmalloc/MapMemory.h
@@ -29,9 +29,21 @@
 #ifndef _itt_shared_malloc_MapMemory_H
 #define _itt_shared_malloc_MapMemory_H
 
-#if __linux__ || __APPLE__
+#if __linux__ || __APPLE__ || __sun || __FreeBSD__
+
+#if __sun && !defined(_XPG4_2)
+ // To have void* as mmap's 1st argument
+ #define _XPG4_2 1
+ #define XPG4_WAS_DEFINED 1
+#endif
+
 #include <sys/mman.h>
 
+#if XPG4_WAS_DEFINED
+ #undef _XPG4_2
+ #undef XPG4_WAS_DEFINED
+#endif
+
 #define MEMORY_MAPPING_USES_MALLOC 0
 void* MapMemory (size_t bytes)
 {
@@ -68,6 +80,7 @@ int UnmapMemory(void *area, size_t bytes)
 #else
 #include <stdlib.h>
 
+#define MEMORY_MAPPING_USES_MALLOC 1
 void* MapMemory (size_t bytes)
 {
     return malloc( bytes );
@@ -81,4 +94,8 @@ int UnmapMemory(void *area, size_t bytes)
 
 #endif /* OS dependent */
 
+#if MALLOC_CHECK_RECURSION && MEMORY_MAPPING_USES_MALLOC
+#error Impossible to protect against malloc recursion when memory mapping uses malloc.
+#endif
+
 #endif /* _itt_shared_malloc_MapMemory_H */
diff --git a/src/tbbmalloc/MemoryAllocator.cpp b/src/tbbmalloc/MemoryAllocator.cpp
index 8e8fddc..749efda 100644
--- a/src/tbbmalloc/MemoryAllocator.cpp
+++ b/src/tbbmalloc/MemoryAllocator.cpp
@@ -55,13 +55,14 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
-#if MALLOC_LD_PRELOAD 
+#if MALLOC_CHECK_RECURSION
 #include <new>        /* for placement new */
-#endif
+#endif /* MALLOC_CHECK_RECURSION */
 
 extern "C" {
     void * scalable_malloc(size_t size);
     void   scalable_free(void *object);
+    void mallocThreadShutdownNotification(void*);
 }
 
 /********* Various compile-time options        **************/
@@ -100,39 +101,112 @@ namespace rml {
 namespace internal {
 
 /******* A helper class to support overriding malloc with scalable_malloc *******/
-#if MALLOC_LD_PRELOAD 
-class recursive_malloc_call_protector {
+#if MALLOC_CHECK_RECURSION
+
+inline bool isMallocInitialized();
+
+class RecursiveMallocCallProtector {
+    // pointer to an automatic data of holding thread
+    static void       *autoObjPtr;
     static MallocMutex rmc_mutex;
+    static pthread_t   owner_thread;
+/* Under FreeBSD 8.0 1st call to any pthread function including pthread_self
+   leads to pthread initialization, that causes malloc calls. As 1st usage of
+   RecursiveMallocCallProtector can be before pthread initialized, pthread calls
+   can't be used in 1st instance of RecursiveMallocCallProtector.
+   RecursiveMallocCallProtector is used 1st time in checkInitialization(),
+   so there is a guarantee that on 2nd usage pthread is initialized. 
+   No such situation observed with other supported OSes.
+ */
+#if __FreeBSD__
+    static bool        canUsePthread;
+#else
+    static const bool  canUsePthread = true;
+#endif
+/*
+  The variable modified in checkInitialization,
+  so can be read without memory barriers.
+ */
+    static bool mallocRecursionDetected;
 
     MallocMutex::scoped_lock* lock_acquired;
     char scoped_lock_space[sizeof(MallocMutex::scoped_lock)+1];
+
+    static uintptr_t absDiffPtr(void *x, void *y) {
+        uintptr_t xi = (uintptr_t)x, yi = (uintptr_t)y;
+        return xi > yi ? xi - yi : yi - xi;
+    }
 public:
-    recursive_malloc_call_protector(bool condition) : lock_acquired(NULL) {
-        if (condition) {
-            lock_acquired = new (scoped_lock_space) MallocMutex::scoped_lock( rmc_mutex );
-            rml::internal::lockRecursiveMallocFlag();
-        }
+
+    RecursiveMallocCallProtector() : lock_acquired(NULL) {
+        lock_acquired = new (scoped_lock_space) MallocMutex::scoped_lock( rmc_mutex );
+        if (canUsePthread)
+            owner_thread = pthread_self();
+        autoObjPtr = &scoped_lock_space;
     }
-    ~recursive_malloc_call_protector() {
+    ~RecursiveMallocCallProtector() {
         if (lock_acquired) {
-            rml::internal::unlockRecursiveMallocFlag();
+            autoObjPtr = NULL;
             lock_acquired->~scoped_lock();
         }
     }
+    static bool sameThreadActive() {
+        if (!autoObjPtr) // fast path
+            return false;
+        // Some thread has an active recursive call protector; check if the current one.
+        // Exact pthread_self based test
+        if (canUsePthread)
+            if (pthread_equal( owner_thread, pthread_self() )) {
+                mallocRecursionDetected = true;
+                return true;
+            } else
+                return false;
+        // inexact stack size based test
+        const uintptr_t threadStackSz = 2*1024*1024;
+        int dummy;
+        return absDiffPtr(autoObjPtr, &dummy)<threadStackSz;
+    }
+    static bool noRecursion() {
+        MALLOC_ASSERT(isMallocInitialized(), 
+                      "Recursion status can be checked only when initialization was done.");
+        return !mallocRecursionDetected;
+    }
+/* The function is called on 1st scalable_malloc call to check if malloc calls
+   scalable_malloc (nested call must set mallocRecursionDetected). */
+    static void detectNaiveOverload() {
+        if (!malloc_proxy) {
+#if __FreeBSD__
+/* If !canUsePthread, we can't call pthread_self() before, but now pthread 
+   is already on, so can do it. False positives here lead to silent switching 
+   from malloc to mmap for all large allocations with bad performance impact. */
+            if (!canUsePthread) {
+                canUsePthread = true;
+                owner_thread = pthread_self();
+            }
+#endif
+            free(malloc(1));
+        }
+    }
 };
 
-MallocMutex recursive_malloc_call_protector::rmc_mutex;
 
-#define malloc_proxy __TBB_malloc_proxy
+MallocMutex RecursiveMallocCallProtector::rmc_mutex;
+pthread_t   RecursiveMallocCallProtector::owner_thread;
+void       *RecursiveMallocCallProtector::autoObjPtr;
+bool        RecursiveMallocCallProtector::mallocRecursionDetected;
+#if __FreeBSD__
+bool        RecursiveMallocCallProtector::canUsePthread;
+#endif
+
+#else
 
-#else /* MALLOC_LD_PRELOAD */
-class recursive_malloc_call_protector {
+class RecursiveMallocCallProtector {
 public:
-    recursive_malloc_call_protector(bool) {}
-    ~recursive_malloc_call_protector() {}
+    RecursiveMallocCallProtector() {}
+    ~RecursiveMallocCallProtector() {}
 };
-const bool malloc_proxy = false;
-#endif /* MALLOC_LD_PRELOAD */
+
+#endif  /* MALLOC_CHECK_RECURSION */
 
 /*********** Code to provide thread ID and a thread-local void pointer **********/
 
@@ -148,7 +222,7 @@ static inline ThreadId  getThreadId(void)
     ThreadId result;
     result = reinterpret_cast<ThreadId>(TlsGetValue_func(Tid_key));
     if( !result ) {
-        recursive_malloc_call_protector scoped(/*condition=*/malloc_proxy);
+        RecursiveMallocCallProtector scoped;
         // Thread-local value is zero -> first call from this thread,
         // need to initialize with next ID value (IDs start from 1)
         result = AtomicIncrement(ThreadIdCount); // returned new value!
@@ -166,7 +240,7 @@ static inline void* getThreadMallocTLS() {
 }
 
 static inline void  setThreadMallocTLS( void * newvalue ) {
-    recursive_malloc_call_protector scoped(/*condition=*/malloc_proxy);
+    RecursiveMallocCallProtector scoped;
     TlsSetValue_func( TLS_pointer_key, newvalue );
 }
 
@@ -260,17 +334,16 @@ static LifoQueue* globalSizeBins = (LifoQueue*)globalBinSpace;
 static struct LargeObjectCacheStat {
     uintptr_t age;
     size_t cacheSize;
-    size_t memSize;
-    size_t prevMemSize;
 } loCacheStat;
 
-class CachedObjectsList {
-    struct CachedObject {
-        CachedObject *next,
-                     *prev;
-        uintptr_t     age;
-    };
+struct CachedObject {
+    CachedObject *next,
+                 *prev;
+    uintptr_t     age;
+    bool          fromMapMemory;
+};
 
+class CachedObjectsList {
     CachedObject *first,
                  *last;
     /* age of an oldest object in the list; equal to last->age, if last defined,
@@ -288,9 +361,9 @@ class CachedObjectsList {
        ctor not needed. */
     CachedObjectsList();
 public:
-    inline void push(void *buf, uintptr_t currAge);
+    inline void push(void *buf, bool fromMapMemory, uintptr_t currAge);
     inline CachedObject* pop(uintptr_t currAge);
-    bool releaseLastIfOld(uintptr_t currAge, size_t size);
+    void releaseLastIfOld(uintptr_t currAge, size_t size);
 };
 
 /*
@@ -358,6 +431,11 @@ const uint32_t numBlockBins = minFittingIndex+numFittingBins;
 const uint32_t minLargeObjectSize = fittingSize5 + 1;
 
 /*
+ * Block::objectSize value used to mark blocks allocated by startupAlloc
+ */
+const unsigned int startupAllocObjSizeMark = ~(unsigned int)0;
+
+/*
  * Difference between object sizes in large object bins
  */
 const uint32_t largeObjectCacheStep = 8*1024;
@@ -369,35 +447,34 @@ const uint32_t largeObjectCacheStep = 8*1024;
 const unsigned cacheCleanupFreq = 256;
 
 /*
- * 'Previous' memory size is updated with that frequency.
- */
-const unsigned memSizeUpdateFreq = 2*cacheCleanupFreq;
-
-/*
- * 1 / part of memory that can be used for the object cache
- */
-const int invertedMemPartForCache = 2;
-
-/*
  * Get virtual memory in pieces of this size: 0x0100000 is 1 megabyte decimal
  */
 static size_t mmapRequestSize = 0x0100000;
 
 /********** End of numeric parameters controlling allocations *********/
 
+#if !MALLOC_DEBUG
 #if __INTEL_COMPILER || _MSC_VER
 #define NOINLINE(decl) __declspec(noinline) decl
+#define ALWAYSINLINE(decl) __forceinline decl
 #elif __GNUC__
 #define NOINLINE(decl) decl __attribute__ ((noinline))
+#define ALWAYSINLINE(decl) decl __attribute__ ((always_inline))
 #else
 #define NOINLINE(decl) decl
+#define ALWAYSINLINE(decl) decl
 #endif
 
 static NOINLINE( Block* getPublicFreeListBlock(Bin* bin) );
 static NOINLINE( void moveBlockToBinFront(Block *block) );
 static NOINLINE( void processLessUsedBlock(Block *block) );
 
+static ALWAYSINLINE( Bin* getAllocationBin(size_t size) );
+static ALWAYSINLINE( void checkInitialization() );
+
+#undef ALWAYSINLINE
 #undef NOINLINE
+#endif /* !MALLOC_DEBUG */
 
 /*********** Code to acquire memory from the OS or other executive ****************/
 
@@ -407,80 +484,52 @@ static NOINLINE( void processLessUsedBlock(Block *block) );
 /* assume MapMemory and UnmapMemory are customized */
 #endif
 
-/*
- * Returns 0 if failure for any reason
- * otherwise returns a pointer to the newly available memory.
- */
-static void* getMemory (size_t bytes)
-{
-    void *result = 0;
-    // TODO: either make sure the assertion below is always valid, or remove it.
-    /*MALLOC_ASSERT( bytes>=minLargeObjectSize, "request too small" );*/
-#if MEMORY_MAPPING_USES_MALLOC
-    recursive_malloc_call_protector scoped(/*condition=*/malloc_proxy);
-#endif
-    result = MapMemory(bytes);
-#if MALLOC_TRACE
-    if (!result) {
-        TRACEF(( "[ScalableMalloc trace] getMemory unsuccess, can't get %d bytes from OS\n", bytes ));
-    } else {
-        TRACEF(( "[ScalableMalloc trace] - getMemory success returning %p\n", result ));
-    }
-#endif
-    return result;
-}
-
 #if USE_MALLOC_FOR_LARGE_OBJECT
 
 // (get|free)RawMemory only necessary for the USE_MALLOC_FOR_LARGE_OBJECT case
-static inline void* getRawMemory (size_t size)
+static inline void* getRawMemory (size_t size, bool alwaysUseMap = false)
 {
     void *object;
-#if MALLOC_LD_PRELOAD
-    if (malloc_proxy) {
-        if ( rml::internal::original_malloc_found ){
-            object = (*rml::internal::original_malloc_ptr)(size);
-        }else{
-            MALLOC_ASSERT( 0, "Original allocators not found, can't allocate large object." );
-            return NULL;
-        }
-    } else
-#endif /* MALLOC_LD_PRELOAD */
+
+    if (alwaysUseMap) 
+        object = MapMemory(size);
+    else
+#if MALLOC_CHECK_RECURSION
+    if (RecursiveMallocCallProtector::noRecursion())
         object = malloc(size);
+    else if ( rml::internal::original_malloc_found )
+        object = (*rml::internal::original_malloc_ptr)(size);
+    else
+        object = MapMemory(size);
+#else
+    object = malloc(size);
+#endif /* MALLOC_CHECK_RECURSION */
     return object;
 }
 
-static inline void freeRawMemory (void *object, size_t /*size*/)
+static inline void freeRawMemory (void *object, size_t size, bool alwaysUseMap)
 {
-#if MALLOC_LD_PRELOAD
-    if (malloc_proxy) {
-        if ( rml::internal::original_malloc_found ){
-            (*rml::internal::original_free_ptr)(object);
-        }else{
-            MALLOC_ASSERT( 0, ASSERT_TEXT );
-        }
-    } else
-#endif /* MALLOC_LD_PRELOAD */
+    if (alwaysUseMap)
+        UnmapMemory(object, size);
+    else
+#if MALLOC_CHECK_RECURSION
+    if (RecursiveMallocCallProtector::noRecursion())
         free(object);
+    else if ( rml::internal::original_malloc_found )
+        (*rml::internal::original_free_ptr)(object);
+    else
+        UnmapMemory(object, size);
+#else
+    free(object);
+#endif /* MALLOC_CHECK_RECURSION */
 }
 
 #else /* USE_MALLOC_FOR_LARGE_OBJECT */
 
-static void returnMemory(void *area, size_t bytes)
-{
-    int retcode = UnmapMemory(area, bytes);
-#if MALLOC_TRACE
-    if (retcode) {
-        TRACEF(( "[ScalableMalloc trace] returnMemory unsuccess for %p; perhaps it has already been freed or was never allocated.\n", area ));
-    }
-#endif
-    return;
-}
-
-static inline void* getRawMemory (size_t size) { return getMemory(size); }
+static inline void* getRawMemory (size_t size, bool = false) { return MapMemory(size); }
 
-static inline void freeRawMemory (void *object, size_t size) {
-    returnMemory(object, size);
+static inline void freeRawMemory (void *object, size_t size, bool) {
+    UnmapMemory(object, size);
 }
 
 #endif /* USE_MALLOC_FOR_LARGE_OBJECT */
@@ -616,7 +665,7 @@ static int mallocBigBlock()
     void *splitEdge;
     size_t bigBlockSplitSize;
 
-    unalignedBigBlock = getMemory(mmapRequestSize);
+    unalignedBigBlock = getRawMemory(mmapRequestSize, /*alwaysUseMap=*/true);
 
     if (!unalignedBigBlock) {
         TRACEF(( "[ScalableMalloc trace] in mallocBigBlock, getMemory returns 0\n" ));
@@ -678,6 +727,7 @@ static void *bootStrapMalloc(size_t size)
         } else {
             if (!bootStrapBlock) {
                 bootStrapBlock = getEmptyBlock(size);
+                if (!bootStrapBlock) return NULL;
             }
             result = bootStrapBlock->bumpPtr;
             bootStrapBlock->bumpPtr = (FreeObject *)((uintptr_t)bootStrapBlock->bumpPtr - bootStrapBlock->objectSize);
@@ -823,6 +873,7 @@ static Bin* getAllocationBin(size_t size)
     if( !tls ) {
         MALLOC_ASSERT( tlsSize >= sizeof(Bin) * numBlockBins, ASSERT_TEXT );
         tls = (Bin*) bootStrapMalloc(tlsSize);
+        if ( !tls ) return NULL;
         /* the block contains zeroes after bootStrapMalloc, so bins are initialized */
 #if MALLOC_DEBUG
         for (int i = 0; i < numBlockBinLimit; i++) {
@@ -1074,6 +1125,20 @@ static void returnPartialBlock(Bin* bin, Block *block)
     globalSizeBins[index].push((void **)block);
 }
 
+static void cleanBlockHeader(Block *block)
+{
+#if MALLOC_DEBUG
+    memset (block, 0x0e5, blockSize);
+#endif
+    block->next = NULL;
+    block->previous = NULL;
+    block->freeList = NULL;
+    block->allocatedCount = 0;
+    block->isFull = 0;
+
+    block->publicFreeList = NULL;
+}
+
 static void initEmptyBlock(Block *block, size_t size)
 {
     // Having getIndex and getObjectSize called next to each other
@@ -1081,21 +1146,14 @@ static void initEmptyBlock(Block *block, size_t size)
     unsigned int index      = getIndex(size);
     unsigned int objectSize = getObjectSize(size); 
     Bin* tls = (Bin*)getThreadMallocTLS();
-#if MALLOC_DEBUG
-    memset (block, 0x0e5, blockSize);
-#endif
+
+    cleanBlockHeader(block);
     block->mallocUniqueID = theMallocUniqueID;
-    block->next = NULL;
-    block->previous = NULL;
     block->objectSize = objectSize;
     block->owner = getThreadId();
     // bump pointer should be prepared for first allocation - thus mode it down to objectSize
     block->bumpPtr = (FreeObject *)((uintptr_t)block + blockSize - objectSize);
-    block->freeList = NULL;
-    block->allocatedCount = 0;
-    block->isFull = 0;
 
-    block->publicFreeList = NULL;
     // each block should have the address where the head of the list of "privatizable" blocks is kept
     // the only exception is a block for boot strap which is initialized when TLS is yet NULL
     block->nextPrivatizable = tls? (Block*)(tls + index) : NULL;
@@ -1104,7 +1162,7 @@ static void initEmptyBlock(Block *block, size_t size)
   }
 
 /* Return an empty uninitialized block in a non-blocking fashion. */
-static Block *getEmptyBlock(size_t size)
+static Block *getRawBlock()
 {
     Block *result;
     Block *bigBlock;
@@ -1132,8 +1190,18 @@ static Block *getEmptyBlock(size_t size)
         TRACEF(( "[ScalableMalloc trace] Pushing partial rest of block back on.\n" ));
         freeBlockList.push((void **)bigBlock);
     }
-    initEmptyBlock(result, size);
-    STAT_increment(result->owner, getIndex(result->objectSize), allocBlockNew);
+    return result;
+}
+
+/* Return an empty uninitialized block in a non-blocking fashion. */
+static Block *getEmptyBlock(size_t size)
+{
+    Block *result = getRawBlock();
+
+    if (result) {
+        initEmptyBlock(result, size);
+        STAT_increment(result->owner, getIndex(result->objectSize), allocBlockNew);
+    }
 
     return result;
 }
@@ -1151,19 +1219,15 @@ static void returnEmptyBlock (Block *block, bool keepTheBin = true)
     }
     STAT_increment(block->owner, getIndex(block->objectSize), freeBlockBack);
 
-    block->publicFreeList = NULL;
+    cleanBlockHeader(block);
+
     block->nextPrivatizable = NULL;
 
     block->mallocUniqueID=0;
-    block->next = NULL;
-    block->previous = NULL;
     block->objectSize = 0;
     block->owner = (unsigned)-1;
     // for an empty block, bump pointer should point right after the end of the block
     block->bumpPtr = (FreeObject *)((uintptr_t)block + blockSize);
-    block->freeList = NULL;
-    block->allocatedCount = 0;
-    block->isFull = 0;
     freeBlockList.push((void **)block);
 }
 
@@ -1192,6 +1256,123 @@ inline static Block* setPreviousBlockActive( Bin* bin )
     return temp;
 }
 
+#if MALLOC_CHECK_RECURSION
+
+/*
+ * It's a special kind of allocation that can be used when malloc is 
+ * not available (either during startup or when malloc was already called and
+ * we are, say, inside pthread_setspecific's call). 
+ * Block can contain objects of different sizes, 
+ * allocations are performed by moving bump pointer and increasing of object counter, 
+ * releasing is done via counter of objects allocated in the block 
+ * or moving bump pointer if releasing object is on a bound.
+ */
+
+struct StartupBlock : public Block {
+    size_t availableSize() {
+        return blockSize - ((uintptr_t)bumpPtr - (uintptr_t)this);
+    }
+};
+
+static MallocMutex startupMallocLock;
+static StartupBlock *firstStartupBlock;
+
+static StartupBlock *getNewStartupBlock()
+{
+    StartupBlock *block = (StartupBlock *)getRawBlock();
+
+    if (!block) return NULL;
+
+    cleanBlockHeader(block);
+    block->mallocUniqueID = theMallocUniqueID;
+    // use startupAllocObjSizeMark to mark objects from startup block marker
+    block->objectSize = startupAllocObjSizeMark;
+    block->bumpPtr = (FreeObject *)((uintptr_t)block + sizeof(StartupBlock));
+    return block;
+}
+
+/* TODO: Function is called when malloc nested call is detected, so simultaneous
+   usage from different threads are unprobable, so block pre-allocation 
+   can be not useful, and the code might be simplified. */
+static FreeObject *startupAlloc(size_t size)
+{
+    FreeObject *result;
+    StartupBlock *newBlock = NULL;
+    bool newBlockUnused = false;
+
+    /* Objects must be aligned on their natural bounds, 
+       and objects bigger than word on word's bound. */
+    size = alignUp(size, sizeof(size_t));
+    // We need size of an object to implement msize.
+    size_t reqSize = size + sizeof(size_t);
+    // speculatively allocates newBlock to later use or return it as unused
+    if (!firstStartupBlock || firstStartupBlock->availableSize() < reqSize)
+        if (!(newBlock = getNewStartupBlock()))
+            return NULL;
+
+    {
+        MallocMutex::scoped_lock scoped_cs(startupMallocLock);
+    
+        if (!firstStartupBlock || firstStartupBlock->availableSize() < reqSize) {
+            if (!newBlock && !(newBlock = getNewStartupBlock()))
+                return NULL;
+            newBlock->next = (Block*)firstStartupBlock;
+            if (firstStartupBlock)
+                firstStartupBlock->previous = (Block*)newBlock;
+            firstStartupBlock = newBlock;
+        } else
+            newBlockUnused = true;
+        result = firstStartupBlock->bumpPtr;
+        firstStartupBlock->allocatedCount++;
+        firstStartupBlock->bumpPtr = 
+            (FreeObject *)((uintptr_t)firstStartupBlock->bumpPtr + reqSize);
+    }
+    if (newBlock && newBlockUnused)
+        returnEmptyBlock(newBlock);
+
+    // keep object size at the negative offset
+    *((size_t*)result) = size;
+    return (FreeObject*)((size_t*)result+1);
+}
+
+static size_t startupMsize(void *ptr) { return *((size_t*)ptr - 1); }
+
+static void startupFree(StartupBlock *block, void *ptr)
+{
+    Block* blockToRelease = NULL;
+    {
+        MallocMutex::scoped_lock scoped_cs(startupMallocLock);
+    
+        MALLOC_ASSERT(firstStartupBlock, ASSERT_TEXT);
+        MALLOC_ASSERT(startupAllocObjSizeMark==block->objectSize 
+                      && block->allocatedCount>0, ASSERT_TEXT);
+        MALLOC_ASSERT((uintptr_t)ptr>=(uintptr_t)block+sizeof(StartupBlock)
+                      && (uintptr_t)ptr+startupMsize(ptr)<=(uintptr_t)block+blockSize, 
+                      ASSERT_TEXT);
+        if (0 == --block->allocatedCount) {
+            if (block == firstStartupBlock)
+                firstStartupBlock = (StartupBlock*)firstStartupBlock->next;
+            if (block->previous)
+                block->previous->next = block->next;
+            if (block->next)
+                block->next->previous = block->previous;
+            blockToRelease = block;
+        } else if ((uintptr_t)ptr + startupMsize(ptr) == (uintptr_t)block->bumpPtr) {
+            // last object in the block released
+            FreeObject *newBump = (FreeObject*)((size_t*)ptr - 1);
+            MALLOC_ASSERT((uintptr_t)newBump>(uintptr_t)block+sizeof(StartupBlock), 
+                          ASSERT_TEXT);
+            block->bumpPtr = newBump;
+        }
+    }
+    if (blockToRelease) {
+        blockToRelease->previous = blockToRelease->next = NULL;
+        returnEmptyBlock(blockToRelease);
+    }
+}
+
+#endif /* MALLOC_CHECK_RECURSION */
+
 /********* End thread related code  *************/
 
 /********* Library initialization *************/
@@ -1206,7 +1387,7 @@ inline static Block* setPreviousBlockActive( Bin* bin )
 static int mallocInitialized;   // implicitly initialized to 0
 static MallocMutex initAndShutMutex;
 
-extern "C" void mallocThreadShutdownNotification(void*);
+inline bool isMallocInitialized() { return 2 == mallocInitialized; }
 
 /*
  * Allocator initialization routine;
@@ -1245,18 +1426,21 @@ static void initMemoryManager()
 //! Ensures that initMemoryManager() is called once and only once.
 /** Does not return until initMemoryManager() has been completed by a thread.
     There is no need to call this routine if mallocInitialized==2 . */
-static inline void checkInitialization()
+static void checkInitialization()
 {
     if (mallocInitialized==2) return;
     MallocMutex::scoped_lock lock( initAndShutMutex );
     if (mallocInitialized!=2) {
         MALLOC_ASSERT( mallocInitialized==0, ASSERT_TEXT );
         mallocInitialized = 1;
+        RecursiveMallocCallProtector scoped;
         initMemoryManager();
 #ifdef  MALLOC_EXTRA_INITIALIZATION
-        recursive_malloc_call_protector scoped(/*condition=*/malloc_proxy);
         MALLOC_EXTRA_INITIALIZATION;
 #endif
+#if MALLOC_CHECK_RECURSION
+        RecursiveMallocCallProtector::detectNaiveOverload();
+#endif
         MALLOC_ASSERT( mallocInitialized==1, ASSERT_TEXT );
         mallocInitialized = 2;
     }
@@ -1283,25 +1467,28 @@ struct LargeObjectHeader {
     size_t       unalignedSize;     /* The size that was requested from getMemory */
     uint64_t     mallocUniqueID;    /* The field to check whether the memory was allocated by scalable_malloc */
     size_t       objectSize;        /* The size originally requested by a client */
+    bool         fromMapMemory;     /* Memory allocated when MapMemory usage is forced */
 };
 
-void CachedObjectsList::push(void *buf, uintptr_t currAge)
+void CachedObjectsList::push(void *buf, bool fromMapMemory, uintptr_t currAge)
 {   
     CachedObject *ptr = (CachedObject*)buf;
     ptr->prev = NULL;
     ptr->age  = currAge;
+    ptr->fromMapMemory = fromMapMemory;
 
     MallocMutex::scoped_lock scoped_cs(lock);
     ptr->next = first;
     first = ptr;
     if (ptr->next) ptr->next->prev = ptr;
     if (!last) {
+        MALLOC_ASSERT(0 == oldest, ASSERT_TEXT);
         oldest = currAge;
         last = ptr;
     }
 }
 
-CachedObjectsList::CachedObject *CachedObjectsList::pop(uintptr_t currAge)
+CachedObject *CachedObjectsList::pop(uintptr_t currAge)
 {   
     CachedObject *result=NULL;
     {
@@ -1311,8 +1498,10 @@ CachedObjectsList::CachedObject *CachedObjectsList::pop(uintptr_t currAge)
             first = result->next;
             if (first)  
                 first->prev = NULL;
-            else
+            else {
                 last = NULL;
+                oldest = 0;
+            }
         } else {
             /* If cache miss occured, set ageThreshold to twice the difference 
                between current time and last time cache was cleaned. */
@@ -1322,29 +1511,39 @@ CachedObjectsList::CachedObject *CachedObjectsList::pop(uintptr_t currAge)
     return result;
 }
 
-bool CachedObjectsList::releaseLastIfOld(uintptr_t currAge, size_t size)
+void CachedObjectsList::releaseLastIfOld(uintptr_t currAge, size_t size)
 {
-    CachedObject *curr = NULL;
-
+    CachedObject *toRelease = NULL;
+ 
     /* oldest may be more recent then age, that's why cast to signed type
        was used. age overflow is also processed correctly. */
     if (last && (intptr_t)(currAge - oldest) > ageThreshold) {
         MallocMutex::scoped_lock scoped_cs(lock);
-
+        // double check
         if (last && (intptr_t)(currAge - last->age) > ageThreshold) {
-            curr = last;
-            lastCleanedAge = curr->age;
-            last = last->prev;
+            do {
+                last = last->prev;
+            } while (last && (intptr_t)(currAge - last->age) > ageThreshold);
             if (last) {
+                toRelease = last->next;
                 oldest = last->age;
                 last->next = NULL;
-            } else
+            } else {
+                toRelease = first;
                 first = NULL;
-        }
+                oldest = 0;
+            }
+            MALLOC_ASSERT( toRelease, ASSERT_TEXT );
+            lastCleanedAge = toRelease->age;
+        } 
+        else 
+            return;
+    }
+    while ( toRelease ) {
+        CachedObject *helper = toRelease->next;
+        freeRawMemory(toRelease, size, toRelease->fromMapMemory);
+        toRelease = helper;
     }
-    if (curr)
-        freeRawMemory(curr, size);
-    return curr;
 }
 
 /* A predicate checks whether an object starts on blockSize boundary */
@@ -1356,17 +1555,18 @@ static inline unsigned int isLargeObject(void *object)
 static uintptr_t cleanupCacheIfNeed ()
 {
     /* loCacheStat.age overflow is OK, as we only want difference between 
-       its current value and some recent. */
-    uintptr_t currAge = AtomicIncrement(loCacheStat.age);
+     * its current value and some recent.
+     *
+     * Both malloc and free should increment loCacheStat.age, as in 
+     * a different case mulitiple cache object would have same age,
+     * and accuracy of predictors suffers.
+     */
+    uintptr_t currAge = (uintptr_t)AtomicIncrement((intptr_t&)loCacheStat.age);
 
     if ( 0 == currAge % cacheCleanupFreq ) {
         size_t objSize;
         int i;
 
-        // It's used for finding cache size, so no need to update it too often.
-        if ( 0 == currAge % memSizeUpdateFreq )
-            loCacheStat.prevMemSize = loCacheStat.memSize;
-
         for (i = numLargeObjectBins-1, 
              objSize = (numLargeObjectBins-1)*largeObjectCacheStep+blockSize; 
              i >= 0; 
@@ -1375,49 +1575,51 @@ static uintptr_t cleanupCacheIfNeed ()
              * i*largeObjectCacheStep+blockSize, it seems iterative
              * computation of it improves performance.
              */
-            int numReleased=0;
             // release from cache objects that are older then ageThreshold
-            while ( globalCachedObjectBins[i].releaseLastIfOld(currAge, objSize) )
-                numReleased++;
-
-            if (numReleased) {
-                AtomicAdd(loCacheStat.cacheSize, -numReleased*objSize);
-                AtomicAdd(loCacheStat.memSize, -numReleased*objSize);
-            }
+            globalCachedObjectBins[i].releaseLastIfOld(currAge, objSize);
         }
     }
     return currAge;
 }
 
-static void* allocateCachedLargeObject (size_t size)
+static CachedObject* allocateCachedLargeObject (size_t size)
 {
     MALLOC_ASSERT( size%largeObjectCacheStep==0, ASSERT_TEXT );
-    void *block = NULL;
+    CachedObject *block = NULL;
     // blockSize is the minimal alignment and thus the minimal size of a large object.
     size_t idx = (size-blockSize)/largeObjectCacheStep;
     if (idx<numLargeObjectBins) {
         uintptr_t currAge = cleanupCacheIfNeed();
         block = globalCachedObjectBins[idx].pop(currAge);
         if (block) {
-            AtomicAdd(loCacheStat.cacheSize, -size);
             STAT_increment(getThreadId(), ThreadCommonCounters, allocCachedLargeObj);
         }
     }
     return block;
 }
 
-static inline void* mallocLargeObject (size_t size, size_t alignment)
+static inline void* mallocLargeObject (size_t size, size_t alignment, 
+                                       bool startupAlloc = false)
 {
+    void * unalignedArea;
     size_t allocationSize = alignUp(size+sizeof(LargeObjectHeader)+alignment, 
                                     largeObjectCacheStep);
+    bool   blockFromMapMemory = false;
 
-    void * unalignedArea  = allocateCachedLargeObject(allocationSize);
-    if (!unalignedArea) {
-        unalignedArea = getRawMemory(allocationSize);
-        if (!unalignedArea)
-            return NULL; /* We can't get any more memory from the OS or executive */
-        AtomicAdd(loCacheStat.memSize, allocationSize);
-        STAT_increment(getThreadId(), ThreadCommonCounters, allocNewLargeObj);
+    if (startupAlloc) {
+        if (! (unalignedArea = getRawMemory(allocationSize, /*alwaysUseMap=*/true)))
+            return NULL;
+    } else {
+        CachedObject* cachedObj = allocateCachedLargeObject(allocationSize);
+        if (cachedObj) {
+            blockFromMapMemory = cachedObj->fromMapMemory;
+            unalignedArea = cachedObj;
+        } else {
+            unalignedArea = getRawMemory(allocationSize);
+            if (!unalignedArea)
+                return NULL;
+            STAT_increment(getThreadId(), ThreadCommonCounters, allocNewLargeObj);
+        }
     }
     void *alignedArea = (void*)alignUp((uintptr_t)unalignedArea+sizeof(LargeObjectHeader), alignment);
     LargeObjectHeader *header = (LargeObjectHeader*)((uintptr_t)alignedArea-sizeof(LargeObjectHeader));
@@ -1425,20 +1627,11 @@ static inline void* mallocLargeObject (size_t size, size_t alignment)
     header->mallocUniqueID=theMallocUniqueID;
     header->unalignedSize = allocationSize;
     header->objectSize = size;
+    header->fromMapMemory = startupAlloc || blockFromMapMemory;
     MALLOC_ASSERT( isLargeObject(alignedArea), ASSERT_TEXT );
     return alignedArea;
 }
 
-/* To exclude local anomaly (say, bunch of free calls) cache size 
- * is based on maximum for "current" and "previous" raw memory allocated sizes.
- */
-static inline size_t cacheSizeLimit ()
-{
-    return (loCacheStat.memSize > loCacheStat.prevMemSize? 
-            loCacheStat.memSize : loCacheStat.prevMemSize)
-           / invertedMemPartForCache;
-}
-
 static bool freeLargeObjectToCache (LargeObjectHeader* header)
 {
     size_t size = header->unalignedSize;
@@ -1446,15 +1639,11 @@ static bool freeLargeObjectToCache (LargeObjectHeader* header)
     if (idx<numLargeObjectBins) {
         MALLOC_ASSERT( size%largeObjectCacheStep==0, ASSERT_TEXT );
         uintptr_t currAge = cleanupCacheIfNeed ();
-        // optimistically increase cache size; its current size is returned
-        if (AtomicAdd(loCacheStat.cacheSize, size) < cacheSizeLimit()) {
-            globalCachedObjectBins[idx].push(header->unalignedResult, currAge);
-            STAT_increment(getThreadId(), ThreadCommonCounters, cacheLargeObj);
-            return true;
-        } else {
-            // Unluckily, cache already exceeded the limit; revert size increase
-            AtomicAdd(loCacheStat.cacheSize, -size);
-        }
+        globalCachedObjectBins[idx].push(header->unalignedResult, 
+                                         header->fromMapMemory, currAge);
+
+        STAT_increment(getThreadId(), ThreadCommonCounters, cacheLargeObj);
+        return true;
     }
     return false;
 }
@@ -1465,8 +1654,8 @@ static inline void freeLargeObject (void *object)
     header = (LargeObjectHeader *)((uintptr_t)object - sizeof(LargeObjectHeader));
     header->mallocUniqueID = 0;
     if (!freeLargeObjectToCache(header)) {
-        AtomicAdd(loCacheStat.memSize, -header->unalignedSize);
-        freeRawMemory(header->unalignedResult, header->unalignedSize);
+        freeRawMemory(header->unalignedResult, header->unalignedSize, 
+                      /*alwaysUseMap=*/ header->fromMapMemory);
         STAT_increment(getThreadId(), ThreadCommonCounters, freeLargeObj);
     }
 }
@@ -1726,6 +1915,38 @@ extern "C" void mallocProcessShutdownNotification(void)
 #endif
 }
 
+/**** Check if an object was allocated by scalable_malloc ****/
+
+/* 
+ * Bad dereference caused by a foreign pointer is possible only here, not earlier in call chain.
+ * Separate function isolates SEH code, as it has bad influence on compiler optimization.
+ */
+static inline uint64_t safer_dereference (uint64_t *ptr)
+{
+    uint64_t id;
+#if _MSC_VER
+    __try {
+#endif
+        id = *ptr;
+#if _MSC_VER
+    } __except( GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION? 
+                EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH ) {
+        id = 0;
+    }
+#endif
+    return id;
+}
+
+static inline bool isRecognized (void* ptr)
+{
+    uint64_t id = safer_dereference(
+        isLargeObject(ptr)
+            ? &((LargeObjectHeader*)((uintptr_t)ptr-sizeof(LargeObjectHeader)))->mallocUniqueID
+            : &((Block *)alignDown(ptr, blockSize))->mallocUniqueID
+    );
+    return id == theMallocUniqueID;
+}
+
 /********* The malloc code          *************/
 
 extern "C" void * scalable_malloc(size_t size)
@@ -1736,6 +1957,15 @@ extern "C" void * scalable_malloc(size_t size)
 
     if (!size) size = sizeof(size_t);
 
+#if MALLOC_CHECK_RECURSION
+    if (RecursiveMallocCallProtector::sameThreadActive()) {
+        result = size<minLargeObjectSize? startupAlloc(size) : 
+              (FreeObject*)mallocLargeObject(size, blockSize, /*startupAlloc=*/ true);
+        if (!result) errno = ENOMEM;
+        return result;
+    }
+#endif
+
     /* This returns only after malloc is initialized */
     checkInitialization();
 
@@ -1753,6 +1983,10 @@ extern "C" void * scalable_malloc(size_t size)
      * It keeps ptr to the active block for allocations of this size
      */
     bin = getAllocationBin(size);
+    if ( !bin ) {
+        errno = ENOMEM;
+        return NULL;
+    }
 
     /* Get the block of you want to try to allocate in. */
     mallocBlock = getActiveBlock(bin);
@@ -1839,14 +2073,21 @@ extern "C" void scalable_free (void *object) {
     if (isLargeObject(object)) {
         freeLargeObject(object);
         return;
-    }
-
-    myTid = getThreadId();
+    } 
 
     block = (Block *)alignDown(object, blockSize);/* mask low bits to get the block */
     MALLOC_ASSERT( block->mallocUniqueID == theMallocUniqueID, ASSERT_TEXT );
     MALLOC_ASSERT( block->allocatedCount, ASSERT_TEXT );
 
+#if MALLOC_CHECK_RECURSION
+    if (block->objectSize == startupAllocObjSizeMark) {
+        startupFree((StartupBlock *)block, object);
+        return;
+    }
+#endif
+
+    myTid = getThreadId();
+
     // Due to aligned allocations, a pointer passed to scalable_free
     // might differ from the address of internally allocated object.
     // Small objects however should always be fine.    
@@ -1889,27 +2130,6 @@ extern "C" void scalable_free (void *object) {
     }
 }
 
-/* 
- * Unsuccessful dereference is possible only here, not before this call. 
- * Separate function created to isolate SEH code here, as it has bad influence
- * on compiler optimization.
- */
-static inline uint64_t safer_dereference (uint64_t *ptr)
-{
-    uint64_t id;
-#if _MSC_VER
-    __try {
-#endif
-        id = *ptr;
-#if _MSC_VER
-    } __except( GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION? 
-                EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH ) {
-        id = 0;
-    }
-#endif
-    return id;
-}
-
 /*
  * A variant that provides additional memory safety, by checking whether the given address
  * was obtained with this allocator, and if not redirecting to the provided alternative call.
@@ -1919,13 +2139,7 @@ extern "C" void safer_scalable_free (void *object, void (*original_free)(void*))
     if (!object)
         return;
 
-    // Check if the memory was allocated by scalable_malloc
-    uint64_t id =
-        safer_dereference( isLargeObject(object)?
-                           &((LargeObjectHeader*)((uintptr_t)object-sizeof(LargeObjectHeader)))->mallocUniqueID :
-                           &((Block *)alignDown(object, blockSize))->mallocUniqueID );
-
-    if (id==theMallocUniqueID)
+    if (isRecognized(object))
         scalable_free(object);
     else if (original_free)
         original_free(object);
@@ -1962,18 +2176,12 @@ extern "C" void* scalable_realloc(void* ptr, size_t size)
  * A variant that provides additional memory safety, by checking whether the given address
  * was obtained with this allocator, and if not redirecting to the provided alternative call.
  */
-extern "C" void* safer_scalable_realloc (void* ptr, size_t sz, void* (*original_realloc)(void*,size_t)) 
+extern "C" void* safer_scalable_realloc (void* ptr, size_t sz, void* original_realloc) 
 {
     if (!ptr) {
         return scalable_malloc(sz);
     }
-    // Check if the memory was allocated by scalable_malloc
-    uint64_t id =
-        safer_dereference( isLargeObject(ptr)?
-                           &((LargeObjectHeader*)((uintptr_t)ptr-sizeof(LargeObjectHeader)))->mallocUniqueID :
-                           &((Block *)alignDown(ptr, blockSize))->mallocUniqueID );
-
-    if (id==theMallocUniqueID) {
+    if (isRecognized(ptr)) {
         if (!sz) {
             scalable_free(ptr);
             return NULL;
@@ -1982,10 +2190,30 @@ extern "C" void* safer_scalable_realloc (void* ptr, size_t sz, void* (*original_
         if (!tmp) errno = ENOMEM;
         return tmp;
     }
-    else if (original_realloc)
-        return original_realloc(ptr,sz);
-    else
-        return NULL;
+#if USE_WINTHREAD
+    else if (original_realloc && sz) {
+            orig_ptrs *original_ptrs = static_cast<orig_ptrs*>(original_realloc);
+            if ( original_ptrs->orig_msize ){
+                size_t oldSize = original_ptrs->orig_msize(ptr);
+                void *newBuf = scalable_malloc(sz);
+                if (newBuf) {
+                    memcpy(newBuf, ptr, sz<oldSize? sz : oldSize);
+                    if ( original_ptrs->orig_free ){
+                        original_ptrs->orig_free( ptr );
+                    }
+                }
+                return newBuf;
+             }
+    }
+#else
+    else if (original_realloc) {
+        typedef void* (*realloc_ptr_t)(void*,size_t);
+        realloc_ptr_t original_realloc_ptr;
+        (void *&)original_realloc_ptr = original_realloc;
+        return original_realloc_ptr(ptr,sz);
+    }
+#endif
+    return NULL;
 }
 
 /********* End code for scalable_realloc   ***********/
@@ -2046,24 +2274,63 @@ extern "C" void * scalable_aligned_realloc(void *ptr, size_t size, size_t alignm
     if (!ptr) {
         return allocateAligned(size, alignment);
     }
-    // Check if the memory was allocated by scalable_malloc
-    uint64_t id = isLargeObject(ptr)?
-                    ((LargeObjectHeader*)((uintptr_t)ptr-sizeof(LargeObjectHeader)))->mallocUniqueID:
-                    ((Block *)alignDown(ptr, blockSize))->mallocUniqueID;
     if (!size) {
-        if (id==theMallocUniqueID)
-            scalable_free(ptr);
+        scalable_free(ptr);
         return NULL;
     }
-    if (id!=theMallocUniqueID)
-        return NULL;
 
     void* tmp = reallocAligned(ptr, size, alignment);
     if (!tmp) errno = ENOMEM;
     return tmp;
 }
 
-/********* End code for scalable_aligned_realloc   ***********/
+extern "C" void * safer_scalable_aligned_realloc(void *ptr, size_t size, size_t alignment, void* orig_function)
+{
+    /* corner cases left out of reallocAligned to not deal with errno there */
+    if (!isPowerOfTwo(alignment)) {
+        errno = EINVAL;
+        return NULL;
+    }
+    if (!ptr) {
+        return allocateAligned(size, alignment);
+    }
+    if (isRecognized(ptr)) {
+        if (!size) {
+            scalable_free(ptr);
+            return NULL;
+        }
+        void* tmp = reallocAligned(ptr, size, alignment);
+        if (!tmp) errno = ENOMEM;
+        return tmp;
+    }
+#if USE_WINTHREAD
+    else {
+        orig_ptrs *original_ptrs = static_cast<orig_ptrs*>(orig_function);
+        if (size) {
+            if ( original_ptrs->orig_msize ){
+                size_t oldSize = original_ptrs->orig_msize(ptr);
+                void *newBuf = allocateAligned(size, alignment);
+                if (newBuf) {
+                    memcpy(newBuf, ptr, size<oldSize? size : oldSize);
+                    if ( original_ptrs->orig_free ){
+                        original_ptrs->orig_free( ptr );
+                    }
+                }
+                return newBuf;
+            }else{
+                //We can't do anything with this. Just keeping old pointer
+                return NULL;
+            }
+        } else {
+            if ( original_ptrs->orig_free ){
+                original_ptrs->orig_free( ptr );
+            }
+            return NULL;
+        }
+    }
+#endif
+    return NULL;
+}
 
 extern "C" void scalable_aligned_free(void *ptr)
 {
@@ -2086,8 +2353,15 @@ extern "C" size_t scalable_msize(void* ptr)
                 return loh->unalignedSize-((uintptr_t)ptr-(uintptr_t)loh->unalignedResult);
         } else {
             Block* block = (Block *)alignDown(ptr, blockSize);
-            if (block->mallocUniqueID==theMallocUniqueID)
-                return block->objectSize;
+            if (block->mallocUniqueID==theMallocUniqueID) {
+#if MALLOC_CHECK_RECURSION
+                size_t size = block->objectSize? block->objectSize : startupMsize(ptr);
+#else
+                size_t size = block->objectSize;
+#endif
+                MALLOC_ASSERT(size>0 && size<minLargeObjectSize, ASSERT_TEXT);
+                return size;
+            }
         }
     }
     errno = EINVAL;
@@ -2096,4 +2370,22 @@ extern "C" size_t scalable_msize(void* ptr)
     return 0;
 }
 
+/*
+ * A variant that provides additional memory safety, by checking whether the given address
+ * was obtained with this allocator, and if not redirecting to the provided alternative call.
+ */
+extern "C" size_t safer_scalable_msize (void *object, size_t (*original_msize)(void*)) 
+{
+    if (object) {
+        // Check if the memory was allocated by scalable_malloc
+        if (isRecognized(object))
+            return scalable_msize(object);
+        else if (original_msize)
+            return original_msize(object);
+    }
+    // object is NULL or unknown
+    errno = EINVAL;
+    return 0;
+}
+
 /********* End code for scalable_msize   ***********/
diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h
index 0fa9580..20a03b7 100644
--- a/src/tbbmalloc/TypeDefinitions.h
+++ b/src/tbbmalloc/TypeDefinitions.h
@@ -55,14 +55,23 @@
 #endif
 
 // Include files containing declarations of intptr_t and uintptr_t
+#include <stddef.h>  // size_t
 #if _MSC_VER
-#include <stddef.h>
 typedef unsigned __int32 uint32_t;
 typedef unsigned __int64 uint64_t;
 #else
 #include <stdint.h>
 #endif
 
+namespace rml {
+namespace internal {
+
+extern bool  original_malloc_found;
+extern void* (*original_malloc_ptr)(size_t);
+extern void  (*original_free_ptr)(void*);
+
+} } // namespaces
+
 //! PROVIDE YOUR OWN Customize.h IF YOU FEEL NECESSARY
 #include "Customize.h"
 
@@ -92,16 +101,4 @@ static inline bool isPowerOfTwoMultiple(uintptr_t arg, uintptr_t divisor) {
     return arg && (0==(arg & (arg-divisor)));
 }
 
-namespace rml {
-namespace internal {
-
-void lockRecursiveMallocFlag();
-void unlockRecursiveMallocFlag();
-
-extern bool  original_malloc_found;
-extern void* (*original_malloc_ptr)(size_t);
-extern void  (*original_free_ptr)(void*);
-
-} } // namespaces
-
 #endif /* _itt_shared_malloc_TypeDefinitions_H_ */
diff --git a/src/tbbmalloc/lin-tbbmalloc-export.def b/src/tbbmalloc/lin-tbbmalloc-export.def
index 8613438..49a4590 100644
--- a/src/tbbmalloc/lin-tbbmalloc-export.def
+++ b/src/tbbmalloc/lin-tbbmalloc-export.def
@@ -42,6 +42,7 @@ __TBB_internal_free;
 __TBB_internal_malloc;
 __TBB_internal_realloc;
 __TBB_internal_posix_memalign;
+scalable_msize;
 
 local:
 
diff --git a/src/tbbmalloc/mac32-tbbmalloc-export.def b/src/tbbmalloc/mac32-tbbmalloc-export.def
index 6736ba0..c211ce5 100644
--- a/src/tbbmalloc/mac32-tbbmalloc-export.def
+++ b/src/tbbmalloc/mac32-tbbmalloc-export.def
@@ -33,3 +33,4 @@ _scalable_posix_memalign
 _scalable_aligned_malloc
 _scalable_aligned_realloc
 _scalable_aligned_free
+_scalable_msize
diff --git a/src/tbbmalloc/mac64-tbbmalloc-export.def b/src/tbbmalloc/mac64-tbbmalloc-export.def
index 6736ba0..c211ce5 100644
--- a/src/tbbmalloc/mac64-tbbmalloc-export.def
+++ b/src/tbbmalloc/mac64-tbbmalloc-export.def
@@ -33,3 +33,4 @@ _scalable_posix_memalign
 _scalable_aligned_malloc
 _scalable_aligned_realloc
 _scalable_aligned_free
+_scalable_msize
diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp
index 455fb4e..5f27d3c 100644
--- a/src/tbbmalloc/proxy.cpp
+++ b/src/tbbmalloc/proxy.cpp
@@ -117,8 +117,8 @@ void * valloc(size_t size) __THROW
 void * pvalloc(size_t size) __THROW
 {
     if (! memoryPageSize) initPageSize();
-	// align size up to the page size
-	size = ((size-1) | (memoryPageSize-1)) + 1;
+    // align size up to the page size
+    size = ((size-1) | (memoryPageSize-1)) + 1;
 
     return scalable_aligned_malloc(size, memoryPageSize);
 }
@@ -185,32 +185,79 @@ void operator delete[](void* ptr, const std::nothrow_t&) throw() {
 #include <stdio.h>
 #include "tbb_function_replacement.h"
 
-#define HEAP_INIT_SIZE 0x100000
-#define HEAP_MAX_SIZE 0x1000000
+void safer_scalable_free2( void *ptr)
+{
+    safer_scalable_free( ptr, NULL );
+}
 
-// Replace the CRT malloc with heap allocation, using my private heap
-HANDLE myHeap = 0;
+// we do not support _expand();
+void* safer_expand( void *, size_t )
+{
+    return NULL;
+}
 
-typedef struct PAGE_DB_t {
-    CRITICAL_SECTION cs;
-    DWORD alloc;
-    DWORD last;
-    LPVOID *db;
-} PAGE_DB;
+#define __TBB_QV(EXP) #EXP
+#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(CRTLIB)\
+void (*orig_free_##CRTLIB)(void*);                                                        \
+void safer_scalable_free_##CRTLIB( void *ptr)                                             \
+{                                                                                         \
+    safer_scalable_free( ptr, orig_free_##CRTLIB );                                       \
+}                                                                                         \
+                                                                                          \
+size_t (*orig_msize_##CRTLIB)(void*);                                                     \
+size_t safer_scalable_msize_##CRTLIB( void *ptr)                                          \
+{                                                                                         \
+    return safer_scalable_msize( ptr, orig_msize_##CRTLIB );                              \
+}                                                                                         \
+                                                                                          \
+void* safer_scalable_realloc_##CRTLIB( void *ptr, size_t size )                           \
+{                                                                                         \
+    orig_ptrs func_ptrs = {orig_free_##CRTLIB, orig_msize_##CRTLIB};                      \
+    return safer_scalable_realloc( ptr, size, &func_ptrs );                               \
+}                                                                                         \
+                                                                                          \
+void* safer_scalable_aligned_realloc_##CRTLIB( void *ptr, size_t size, size_t aligment )  \
+{                                                                                         \
+    orig_ptrs func_ptrs = {orig_free_##CRTLIB, orig_msize_##CRTLIB};                      \
+    return safer_scalable_aligned_realloc( ptr, size, aligment, &func_ptrs );             \
+} 
 
-static PAGE_DB pageDB;
+#if _WIN64
+#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(CRT_VER)\
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "free",  (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d,  9, (FUNCPTR*)&orig_free_ ## CRT_VER ## d );  \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "free",  (FUNCPTR)safer_scalable_free_ ## CRT_VER,       0, NULL );                                   \
+    orig_free_ ## CRT_VER = NULL;                                                                                                                               \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER ## d, 9, (FUNCPTR*)&orig_msize_ ## CRT_VER ## d ); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER,      7, (FUNCPTR*)&orig_msize_ ## CRT_VER );      \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "realloc",         (FUNCPTR)safer_scalable_realloc_ ## CRT_VER ## d,         0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "realloc",         (FUNCPTR)safer_scalable_realloc_ ## CRT_VER,              0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_aligned_free",   (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d,            0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_aligned_free",   (FUNCPTR)safer_scalable_free_ ## CRT_VER,                 0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER ## d, 0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER,      0, NULL);
+#else
+#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(CRT_VER)\
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "free",  (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d,  5, (FUNCPTR*)&orig_free_ ## CRT_VER ## d );  \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "free",  (FUNCPTR)safer_scalable_free_ ## CRT_VER,       7, (FUNCPTR*)&orig_free_ ## CRT_VER );       \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER ## d, 5, (FUNCPTR*)&orig_msize_ ## CRT_VER ## d ); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER,      7, (FUNCPTR*)&orig_msize_ ## CRT_VER );      \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "realloc",         (FUNCPTR)safer_scalable_realloc_ ## CRT_VER ## d,         0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "realloc",         (FUNCPTR)safer_scalable_realloc_ ## CRT_VER,              0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_aligned_free",   (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d,            0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_aligned_free",   (FUNCPTR)safer_scalable_free_ ## CRT_VER,                 0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ## d.dll), "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER ## d, 0, NULL); \
+    ReplaceFunctionWithStore( __TBB_QV(CRT_VER ##.dll),   "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER,      0, NULL);
+#endif
 
-extern "C" void safer_scalable_free( void *ptr, void*);
-extern "C" void* safer_scalable_realloc( void *ptr, size_t, void* );
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70d);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71d);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80d);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90d);
+__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90);
 
-void safer_scalable_free2( void *ptr)
-    {
-    safer_scalable_free( ptr, NULL );
-    }
-void* safer_scalable_realloc2( void *ptr, size_t size )
-    {
-    return safer_scalable_realloc( ptr, size, NULL );
-    }
 
 /*** replacements for global operators new and delete ***/
 
@@ -269,12 +316,8 @@ const char* modules_to_replace[] = {
 We need to replace following functions:
 malloc
 calloc
-realloc
-free
-_msize
 _aligned_malloc
-_aligned_realloc
-_aligned_free
+_expand (by dummy implementation)
 ??2 at YAPAXI@Z      operator new                         (ia32)
 ??_U at YAPAXI@Z     void * operator new[] (size_t size)  (ia32)
 ??3 at YAXPAX@Z      operator delete                      (ia32)  
@@ -285,6 +328,13 @@ _aligned_free
 ??_V at YAXPEAX@Z    operator delete[]                       (intel64)
 ??2 at YAPAXIABUnothrow_t@std@@@Z      void * operator new (size_t sz, const std::nothrow_t&) throw()  (optional)
 ??_U at YAPAXIABUnothrow_t@std@@@Z     void * operator new[] (size_t sz, const std::nothrow_t&) throw() (optional)
+
+and these functions have runtime-specific replacement:
+realloc
+free
+_msize
+_aligned_realloc
+_aligned_free
 */
 
 typedef struct FRData_t {
@@ -297,12 +347,8 @@ typedef struct FRData_t {
 FRDATA routines_to_replace[] = {
     { "malloc",  (FUNCPTR)scalable_malloc, FRR_FAIL },
     { "calloc",  (FUNCPTR)scalable_calloc, FRR_FAIL },
-    { "realloc", (FUNCPTR)safer_scalable_realloc2, FRR_FAIL },
-    { "free",    (FUNCPTR)safer_scalable_free2, FRR_FAIL },
-    { "_msize",  (FUNCPTR)scalable_msize, FRR_FAIL },
     { "_aligned_malloc",  (FUNCPTR)scalable_aligned_malloc, FRR_FAIL },
-    { "_aligned_realloc", (FUNCPTR)scalable_aligned_realloc, FRR_FAIL },
-    { "_aligned_free",    (FUNCPTR)safer_scalable_free2, FRR_FAIL },
+    { "_expand",  (FUNCPTR)safer_expand, FRR_IGNORE },
 #if _WIN64
     { "??2 at YAPEAX_K@Z", (FUNCPTR)operator_new, FRR_FAIL },
     { "??_U at YAPEAX_K@Z", (FUNCPTR)operator_new_arr, FRR_FAIL },
@@ -318,33 +364,33 @@ FRDATA routines_to_replace[] = {
     { "??_U at YAPAXIABUnothrow_t@std@@@Z", (FUNCPTR)operator_new_arr_t, FRR_IGNORE }
 };
 
-// Initialize the malloc replacement data structures
-void initializeMallocReplacement()
+#ifndef UNICODE
+void ReplaceFunctionWithStore( const char*dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc )
+#else
+void ReplaceFunctionWithStore( const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc )
+#endif
 {
-    int i,j;
-    myHeap = HeapCreate(HEAP_NO_SERIALIZE, HEAP_INIT_SIZE, HEAP_MAX_SIZE);
-    if (myHeap == 0)
+    FRR_TYPE type = ReplaceFunction( dllName, funcName, newFunc, opcodesNumber, origFunc );
+    if (type == FRR_NODLL) return;
+    if ( type != FRR_OK )
     {
-        fprintf(stderr, "Can't create private heap\n");
+        fprintf(stderr, "Failed to replace function %s in module %s\n",
+                funcName, dllName);
         exit(1);
     }
-    pageDB.alloc = 100;
-    pageDB.last = 0;
-    pageDB.db = (LPVOID *)HeapAlloc(myHeap, HEAP_ZERO_MEMORY, pageDB.alloc * sizeof(LPVOID));
-    if (pageDB.db == 0)
-    {
-        fprintf(stderr, "Can't create my pointer database\n");
-        exit(1);
-    }
-    InitializeCriticalSection(&pageDB.cs);
+}
 
-    // Replace malloc functions
+void doMallocReplacement()
+{
+    int i,j;
+
+    // Replace functions without storing original code
     int modules_to_replace_count = sizeof(modules_to_replace) / sizeof(modules_to_replace[0]);
     int routines_to_replace_count = sizeof(routines_to_replace) / sizeof(routines_to_replace[0]);
     for ( j=0; j<modules_to_replace_count; j++ )
         for (i = 0; i < routines_to_replace_count; i++)
         {
-            FRR_TYPE type = ReplaceFunction( modules_to_replace[j], routines_to_replace[i]._func, routines_to_replace[i]._fptr );
+            FRR_TYPE type = ReplaceFunction( modules_to_replace[j], routines_to_replace[i]._func, routines_to_replace[i]._fptr, NULL, NULL );
             if (type == FRR_NODLL) break;
             if (type != FRR_OK && routines_to_replace[i]._on_error==FRR_FAIL)
             {
@@ -354,21 +400,25 @@ void initializeMallocReplacement()
             }
         }
 
+    // Replace functions and keep backup of original code (separate for each runtime)
+    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr70)
+    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr71)
+    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr80)
+    __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr90)
 }
 
 extern "C" BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID reserved )
 {
 
-    if ( callReason==DLL_PROCESS_ATTACH && reserved && hInst )
-    {
+    if ( callReason==DLL_PROCESS_ATTACH && reserved && hInst ) {
 #if TBBMALLOC_USE_TBB_FOR_ALLOCATOR_ENV_CONTROLLED
         char pinEnvVariable[50];
         if( GetEnvironmentVariable("TBBMALLOC_USE_TBB_FOR_ALLOCATOR", pinEnvVariable, 50))
         {
-            initializeMallocReplacement();
+            doMallocReplacement();
         }
 #else
-    initializeMallocReplacement();
+        doMallocReplacement();
 #endif
     }
 
diff --git a/src/tbbmalloc/proxy.h b/src/tbbmalloc/proxy.h
index 67bd1bb..8a12fc6 100644
--- a/src/tbbmalloc/proxy.h
+++ b/src/tbbmalloc/proxy.h
@@ -33,6 +33,11 @@
 #define MALLOC_LD_PRELOAD 1
 #endif
 
+// MALLOC_LD_PRELOAD depends on MALLOC_CHECK_RECURSION stuff
+#if __linux__ || __APPLE__ || __sun || __FreeBSD__ || MALLOC_LD_PRELOAD
+#define MALLOC_CHECK_RECURSION 1
+#endif
+
 #include <stddef.h>
 
 extern "C" {
@@ -44,6 +49,10 @@ extern "C" {
     void * scalable_aligned_realloc(void* ptr, size_t size, size_t alignment);
     int    scalable_posix_memalign(void **memptr, size_t alignment, size_t size);
     size_t scalable_msize(void *ptr);
+    void   safer_scalable_free( void *ptr, void (*original_free)(void*));
+    void * safer_scalable_realloc( void *ptr, size_t, void* );
+    void * safer_scalable_aligned_realloc( void *ptr, size_t, size_t, void* );
+    size_t safer_scalable_msize( void *ptr, size_t (*orig_msize_crt80d)(void*));
 
     void * __TBB_internal_malloc(size_t size);
     void * __TBB_internal_calloc(size_t num, size_t size);
@@ -54,4 +63,10 @@ extern "C" {
     bool   __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]);
 } // extern "C"
 
+// Struct with original free() and _msize() pointers
+struct orig_ptrs {
+    void   (*orig_free) (void*);  
+    size_t (*orig_msize)(void*); 
+};
+
 #endif /* _TBB_malloc_proxy_H_ */
diff --git a/src/tbbmalloc/tbb_function_replacement.cpp b/src/tbbmalloc/tbb_function_replacement.cpp
index 8b08d45..f4b0d92 100644
--- a/src/tbbmalloc/tbb_function_replacement.cpp
+++ b/src/tbbmalloc/tbb_function_replacement.cpp
@@ -48,37 +48,11 @@ inline LPVOID Addrint2Ptr(UINT_PTR ptr)
     return i2p.lpv;
 }
 
-// We need to remember which pointer was allocated from myHeap and which
-// was allocated before replacing malloc (therefore allocated from the 
-// CRT heap).
-// Keep page database, since entire pages belong to the same heap, just
-// remember the pages.
-#define PAGE_SIZE 0x1000
-
-// Use this value as the maximum size the trampoline region
-const int MAX_PROBE_SIZE = 16;
-
-// The size of a jump relative instruction "e9 00 00 00 00"
-const int SIZE_OF_RELJUMP = 5;
-
-// The size of jump RIP relative indirect "ff 25 00 00 00 00"
-const int SIZE_OF_INDJUMP = 6;
-
-// The size of address we put in the location (in Intel64)
-const int SIZE_OF_ADDRESS = 8;
-
-// The max distance covered in 32 bits
-const __int64 MAX_DISTANCE = (((__int64)1 << 31) - 1);
-
-// The maximum number of distinct buffers in memory
-const int MAX_NUM_BUFFERS = 256;
-
 // Is the distance between addr1 and addr2 smaller than dist
-inline BOOL IsInDistance(UINT_PTR addr1, UINT_PTR addr2, __int64 dist)
+inline bool IsInDistance(UINT_PTR addr1, UINT_PTR addr2, __int64 dist)
 {
-    __int64 diff = addr1 - addr2;
-    if (diff < 0) diff = -diff;
-    return (diff < dist);
+    __int64 diff = addr1>addr2 ? addr1-addr2 : addr2-addr1;
+    return diff<dist;
 }
 
 /*
@@ -177,12 +151,12 @@ public:
     UINT_PTR GetLocation(UINT_PTR addr)
     {
         MemoryBuffer *pBuff = m_pages;
-        for (; pBuff<m_lastBuffer && IsInDistance(pBuff->m_base, addr, MAX_DISTANCE); ++pBuff)
+        for (; pBuff<m_lastBuffer && IsInDistance(pBuff->m_next, addr, MAX_DISTANCE); ++pBuff)
         {
             if (pBuff->m_next < pBuff->m_base + pBuff->m_size)
             {
                 UINT_PTR loc = pBuff->m_next;
-                pBuff->m_next += SIZE_OF_ADDRESS;
+                pBuff->m_next += MAX_PROBE_SIZE;
                 return loc;
             }
         }
@@ -192,7 +166,7 @@ public:
             return 0;
 
         UINT_PTR loc = pBuff->m_next;
-        pBuff->m_next += SIZE_OF_ADDRESS;
+        pBuff->m_next += MAX_PROBE_SIZE;
         return loc;
     }
 
@@ -206,31 +180,58 @@ static MemoryProvider memProvider;
 
 // Insert jump relative instruction to the input address
 // RETURN: the size of the trampoline or 0 on failure
-static DWORD InsertTrampoline32(void *inpAddr, void *targetAddr)
+static DWORD InsertTrampoline32(void *inpAddr, void *targetAddr, UINT opcodesNumber, FUNCPTR* storedAddr)
 {
     UINT_PTR srcAddr = Ptr2Addrint(inpAddr);
     UINT_PTR tgtAddr = Ptr2Addrint(targetAddr);
-    UINT_PTR offset = tgtAddr - srcAddr - SIZE_OF_RELJUMP;
-    UINT offset32 = (UINT)(offset & 0xFFFFFFFF);
-    UCHAR *codePtr = (UCHAR *)inpAddr;
-
     // Check that the target fits in 32 bits
     if (!IsInDistance(srcAddr, tgtAddr, MAX_DISTANCE))
         return 0;
 
-    // Fill the buffer
-    *codePtr++ = 0xE9;
-    memcpy(codePtr, &offset32, sizeof(offset32));
+    UINT_PTR offset;
+    UINT offset32;
+    UCHAR *codePtr = (UCHAR *)inpAddr;
+
+    // If requested, store original function code
+    if ( storedAddr ){
+        UINT_PTR strdAddr = memProvider.GetLocation(srcAddr);
+        if (!strdAddr)
+            return 0;
+        *storedAddr = (FUNCPTR)Addrint2Ptr(strdAddr);
+        // Set 'executable' flag for original instructions in the new place
+        DWORD pageFlags = PAGE_EXECUTE_READWRITE;
+        if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0;
+        // Copy original instructions to the new place
+        memcpy(*storedAddr, codePtr, opcodesNumber);
+        // Set jump to the code after replacement
+        offset = srcAddr - strdAddr - SIZE_OF_RELJUMP;
+        offset32 = (UINT)((offset & 0xFFFFFFFF));
+        *((UCHAR*)*storedAddr+opcodesNumber) = 0xE9;
+        memcpy(((UCHAR*)*storedAddr+opcodesNumber+1), &offset32, sizeof(offset32));
+    }
+
+    // The following will work correctly even if srcAddr>tgtAddr, as long as
+    // address difference is less than 2^31, which is guaranteed by IsInDistance.
+    offset = tgtAddr - srcAddr - SIZE_OF_RELJUMP;
+    offset32 = (UINT)(offset & 0xFFFFFFFF);
+    // Insert the jump to the new code
+    *codePtr = 0xE9;
+    memcpy(codePtr+1, &offset32, sizeof(offset32));
+
+    // Fill the rest with NOPs to correctly see disassembler of old code in debugger.
+    for( unsigned i=SIZE_OF_RELJUMP; i<opcodesNumber; i++ ){
+        *(codePtr+i) = 0x90;
+    }
+
     return SIZE_OF_RELJUMP;
 }
 
-
 // This function is called when the offset doesn't fit in 32 bits
 // 1  Find and allocate a page in the small distance (<2^31) from input address
 // 2  Put jump RIP relative indirect through the address in the close page
 // 3  Put the absolute address of the target in the allocated location
 // RETURN: the size of the trampoline or 0 on failure
-static DWORD InsertTrampoline64(void *inpAddr, void *targetAddr)
+static DWORD InsertTrampoline64(void *inpAddr, void *targetAddr, UINT opcodesNumber, FUNCPTR* storedAddr)
 {
     UINT_PTR srcAddr = Ptr2Addrint(inpAddr);
     UINT_PTR tgtAddr = Ptr2Addrint(targetAddr);
@@ -240,40 +241,63 @@ static DWORD InsertTrampoline64(void *inpAddr, void *targetAddr)
     if (!location)
         return 0;
 
-    UINT_PTR offset = location - srcAddr - SIZE_OF_INDJUMP;
-    UINT offset32 = (INT)(offset & 0xFFFFFFFF);
+    UINT_PTR offset;
+    UINT offset32;
+    UCHAR *codePtr = (UCHAR *)inpAddr;
 
     // Fill the location
     UINT_PTR *locPtr = (UINT_PTR *)Addrint2Ptr(location);
     *locPtr = tgtAddr;
 
+    // If requested, store original function code
+    if( storedAddr ){
+        UINT_PTR strdAddr = memProvider.GetLocation(srcAddr);
+        if (!strdAddr)
+            return 0;
+        *storedAddr = (FUNCPTR)Addrint2Ptr(strdAddr);
+        // Set 'executable' flag for original instructions in the new place
+        DWORD pageFlags = PAGE_EXECUTE_READWRITE;
+        if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0;
+        // Copy original instructions to the new place
+        memcpy(*storedAddr, codePtr, opcodesNumber);
+        // Set jump to the code after replacement. It is within the distance of relative jump!
+        offset = srcAddr - strdAddr - SIZE_OF_RELJUMP;
+        offset32 = (UINT)((offset & 0xFFFFFFFF));
+        *((UCHAR*)*storedAddr+opcodesNumber) = 0xE9;
+        memcpy(((UCHAR*)*storedAddr+opcodesNumber+1), &offset32, sizeof(offset32));
+    }
+
     // Fill the buffer
-    UCHAR *codePtr = (UCHAR *)inpAddr;
-    *codePtr++ = 0xFF;
-    *codePtr++ = 0x25;
-    memcpy(codePtr, &offset32, sizeof(offset32));
+     offset = location - srcAddr - SIZE_OF_INDJUMP;
+     offset32 = (UINT)(offset & 0xFFFFFFFF);
+    *(codePtr) = 0xFF;
+    *(codePtr+1) = 0x25;
+    memcpy(codePtr+2, &offset32, sizeof(offset32));
+
+    // Fill the rest with NOPs to correctly see disassembler of old code in debugger.
+    for( unsigned i=SIZE_OF_INDJUMP; i<opcodesNumber; i++ ){
+        *(codePtr+i) = 0x90;
+    }
+
     return SIZE_OF_INDJUMP;
 }
 
-
 // Insert a jump instruction in the inpAddr to the targetAddr
 // 1. Get the memory protection of the page containing the input address
 // 2. Change the memory protection to writable
 // 3. Call InsertTrampoline32 or InsertTrampoline64
 // 4. Restore memory protection
 // RETURN: FALSE on failure, TRUE on success
-static BOOL InsertTrampoline(void *inpAddr, void *targetAddr)
+static bool InsertTrampoline(void *inpAddr, void *targetAddr, UINT opcodesNumber, FUNCPTR* origFunc)
 {
     DWORD probeSize;
-
     // Change page protection to EXECUTE+WRITE
     DWORD origProt = 0;
     if (!VirtualProtect(inpAddr, MAX_PROBE_SIZE, PAGE_EXECUTE_WRITECOPY, &origProt))
         return FALSE;
-
-    probeSize = InsertTrampoline32(inpAddr, targetAddr);
+    probeSize = InsertTrampoline32(inpAddr, targetAddr, opcodesNumber, origFunc);
     if (!probeSize)
-        probeSize = InsertTrampoline64(inpAddr, targetAddr);
+        probeSize = InsertTrampoline64(inpAddr, targetAddr, opcodesNumber, origFunc);
 
     // Restore original protection
     VirtualProtect(inpAddr, MAX_PROBE_SIZE, origProt, &origProt);
@@ -282,10 +306,14 @@ static BOOL InsertTrampoline(void *inpAddr, void *targetAddr)
         return FALSE;
 
     FlushInstructionCache(GetCurrentProcess(), inpAddr, probeSize);
+    FlushInstructionCache(GetCurrentProcess(), origFunc, probeSize);
+
     return TRUE;
 }
 
-FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc)
+// Routine to replace the functions
+// TODO: replace opcodesNumber with opcodes and opcodes number to check if we replace right code.
+FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc)
 {
     // Cache the results of the last search for the module
     // Assume that there was no DLL unload between 
@@ -317,8 +345,7 @@ FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR new
         return FRR_NOFUNC;
     }
 
-    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc))
-    {
+    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodesNumber, origFunc)){
         // Failed to insert the trampoline to the target address
         return FRR_FAILED;
     }
@@ -326,7 +353,7 @@ FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR new
     return FRR_OK;
 }
 
-FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc)
+FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc)
 {
     // Cache the results of the last search for the module
     // Assume that there was no DLL unload between 
@@ -358,8 +385,7 @@ FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR
         return FRR_NOFUNC;
     }
 
-    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc))
-    {
+    if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodesNumber, origFunc)){
         // Failed to insert the trampoline to the target address
         return FRR_FAILED;
     }
diff --git a/src/tbbmalloc/tbb_function_replacement.h b/src/tbbmalloc/tbb_function_replacement.h
index 90d1eef..28a8248 100644
--- a/src/tbbmalloc/tbb_function_replacement.h
+++ b/src/tbbmalloc/tbb_function_replacement.h
@@ -49,8 +49,8 @@ typedef void (*FUNCPTR)();
 #define ReplaceFunction ReplaceFunctionW
 #endif //UNICODE
 
-FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc);
-FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc);
+FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc=NULL);
+FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, UINT opcodesNumber, FUNCPTR* origFunc=NULL);
 
 // Utilities to convert between ADDRESS and LPVOID
 union Int2Ptr {
@@ -61,4 +61,24 @@ union Int2Ptr {
 inline UINT_PTR Ptr2Addrint(LPVOID ptr);
 inline LPVOID Addrint2Ptr(UINT_PTR ptr);
 
+// Use this value as the maximum size the trampoline region
+const int MAX_PROBE_SIZE = 32;
+
+// The size of a jump relative instruction "e9 00 00 00 00"
+const int SIZE_OF_RELJUMP = 5;
+
+// The size of jump RIP relative indirect "ff 25 00 00 00 00"
+const int SIZE_OF_INDJUMP = 6;
+
+// The size of address we put in the location (in Intel64)
+const int SIZE_OF_ADDRESS = 8;
+
+// The max distance covered in 32 bits: 2^31 - 1 - C
+// where C should not be smaller than the size of a probe.
+// The latter is important to correctly handle "backward" jumps.
+const __int64 MAX_DISTANCE = (((__int64)1 << 31) - 1) - MAX_PROBE_SIZE;
+
+// The maximum number of distinct buffers in memory
+const int MAX_NUM_BUFFERS = 256;
+
 #endif //__TBB_function_replacement_H
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp
index d742e48..e9bc808 100644
--- a/src/tbbmalloc/tbbmalloc.cpp
+++ b/src/tbbmalloc/tbbmalloc.cpp
@@ -30,7 +30,7 @@
 
 #include "tbb/itt_notify.cpp"
 
-#if MALLOC_LD_PRELOAD
+#if MALLOC_CHECK_RECURSION
 
 #include <pthread.h>
 #include <stdio.h>
@@ -40,30 +40,31 @@
 #include <errno.h>
 #endif
 
+#if MALLOC_LD_PRELOAD
+
 extern "C" {
 
 void   safer_scalable_free( void*, void (*)(void*) );
-void * safer_scalable_realloc( void*, size_t, void* (*)(void*,size_t) );
+void * safer_scalable_realloc( void*, size_t, void* );
 
 bool __TBB_internal_find_original_malloc(int num, const char *names[], void *table[])  __attribute__ ((weak));
 
 }
 
-#define malloc_proxy __TBB_malloc_proxy
-
 #endif /* MALLOC_LD_PRELOAD */
+#endif /* MALLOC_CHECK_RECURSION */
 
 namespace rml {
 namespace internal {
 
-#if MALLOC_LD_PRELOAD
+#if MALLOC_CHECK_RECURSION
 
 void* (*original_malloc_ptr)(size_t) = 0;
 void  (*original_free_ptr)(void*) = 0;
 static void* (*original_calloc_ptr)(size_t,size_t) = 0;
 static void* (*original_realloc_ptr)(void*,size_t) = 0;
 
-#endif /* MALLOC_LD_PRELOAD */
+#endif /* MALLOC_CHECK_RECURSION */
 
 #if __TBB_NEW_ITT_NOTIFY
 extern "C" 
@@ -127,75 +128,32 @@ struct RegisterProcessShutdownNotification {
 static RegisterProcessShutdownNotification reg;
 #endif
 
-#if MALLOC_LD_PRELOAD
+#if MALLOC_CHECK_RECURSION
 
 bool  original_malloc_found;
 
-pthread_t   recursive_malloc_call_thread;
-int         recursive_malloc_call_flag;
-
-void lockRecursiveMallocFlag()
-{
-    recursive_malloc_call_thread = pthread_self();
-    recursive_malloc_call_flag = 1;
-}
-void unlockRecursiveMallocFlag()
-{
-    recursive_malloc_call_flag = 0;
-}
-static inline bool underRecursiveMallocFlag()
-{
-    return recursive_malloc_call_flag
-        && pthread_equal( recursive_malloc_call_thread, pthread_self());
-}
+#if MALLOC_LD_PRELOAD
 
 extern "C" {
 
 void * __TBB_internal_malloc(size_t size)
 {
-    if ( underRecursiveMallocFlag() ) {
-        if ( original_malloc_found ){
-            return original_malloc_ptr(size);
-        }else{
-            return NULL;
-        }
-    }else{
-        return (void*)scalable_malloc(size);
-    }
+    return scalable_malloc(size);
 }
 
 void * __TBB_internal_calloc(size_t num, size_t size)
 {
-    if ( underRecursiveMallocFlag() ) {
-        if ( original_malloc_found ){
-#if __sun
-            /* There seem to be run time problems on Solaris if original_calloc_ptr is used. */
-            size_t arraySize = num * size;
-            void *result = original_malloc_ptr(arraySize);
-            if (result)
-                memset(result, 0, arraySize);
-            return result;
-#else
-            return original_calloc_ptr(num, size);
-#endif
-        }else{
-            return NULL;
-        }
-    }else{
-        return scalable_calloc(num, size);
-    }
+    return scalable_calloc(num, size);
 }
 
 int __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size)
 {
-    MALLOC_ASSERT( !underRecursiveMallocFlag(), 
-                   "posix_memalign not expected to create a cyclic dependency" );
     return scalable_posix_memalign(memptr, alignment, size);
 }
 
 void* __TBB_internal_realloc(void* ptr, size_t sz)
 {
-    return safer_scalable_realloc(ptr, sz, original_realloc_ptr);
+    return safer_scalable_realloc(ptr, sz, (void*&)original_realloc_ptr);
 }
 
 void __TBB_internal_free(void *object)
@@ -206,6 +164,7 @@ void __TBB_internal_free(void *object)
 } /* extern "C" */
 
 #endif /* MALLOC_LD_PRELOAD */
+#endif /* MALLOC_CHECK_RECURSION */
 
 } } // namespaces
 
diff --git a/src/tbbmalloc/tbbmalloc.rc b/src/tbbmalloc/tbbmalloc.rc
index 389ac7c..89830eb 100644
--- a/src/tbbmalloc/tbbmalloc.rc
+++ b/src/tbbmalloc/tbbmalloc.rc
@@ -93,14 +93,14 @@ BEGIN
             VALUE "FileDescription", "Scalable Allocator library\0"
             VALUE "FileVersion", TBBMALLOC_VERSION "\0"
 //what is it?            VALUE "InternalName", "tbbmalloc\0"
-            VALUE "LegalCopyright", "Copyright (C) 2006\0"
+            VALUE "LegalCopyright", "Copyright 2005-2009 Intel Corporation.  All Rights Reserved.\0"
             VALUE "LegalTrademarks", "\0"
 #ifndef TBB_USE_DEBUG
             VALUE "OriginalFilename", "tbbmalloc.dll\0"
 #else
             VALUE "OriginalFilename", "tbbmalloc_debug.dll\0"
 #endif
-            VALUE "ProductName", "Threading Building Blocks\0"
+            VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0"
             VALUE "ProductVersion", TBB_VERSION "\0"
             VALUE "Comments", TBB_VERSION_STRINGS "\0"
             VALUE "PrivateBuild", "\0"
diff --git a/src/tbbmalloc/win-gcc-tbbmalloc-export.def b/src/tbbmalloc/win-gcc-tbbmalloc-export.def
index afefd89..0e55b4d 100644
--- a/src/tbbmalloc/win-gcc-tbbmalloc-export.def
+++ b/src/tbbmalloc/win-gcc-tbbmalloc-export.def
@@ -30,5 +30,8 @@ scalable_aligned_realloc;
 scalable_aligned_free;
 safer_scalable_free;
 safer_scalable_realloc;
+scalable_msize;
+safer_scalable_msize;
+safer_scalable_aligned_realloc;
 local:*;
 };
diff --git a/src/tbbmalloc/win32-tbbmalloc-export.def b/src/tbbmalloc/win32-tbbmalloc-export.def
index a048103..e040263 100644
--- a/src/tbbmalloc/win32-tbbmalloc-export.def
+++ b/src/tbbmalloc/win32-tbbmalloc-export.def
@@ -38,3 +38,5 @@ scalable_aligned_free
 safer_scalable_free
 safer_scalable_realloc
 scalable_msize
+safer_scalable_msize
+safer_scalable_aligned_realloc
diff --git a/src/tbbmalloc/win64-tbbmalloc-export.def b/src/tbbmalloc/win64-tbbmalloc-export.def
index a048103..e040263 100644
--- a/src/tbbmalloc/win64-tbbmalloc-export.def
+++ b/src/tbbmalloc/win64-tbbmalloc-export.def
@@ -38,3 +38,5 @@ scalable_aligned_free
 safer_scalable_free
 safer_scalable_realloc
 scalable_msize
+safer_scalable_msize
+safer_scalable_aligned_realloc
diff --git a/src/test/harness.h b/src/test/harness.h
index 00dcc5f..d8b4a45 100644
--- a/src/test/harness.h
+++ b/src/test/harness.h
@@ -34,19 +34,24 @@
 #ifndef tbb_tests_harness_H
 #define tbb_tests_harness_H
 
-#define __TBB_LAMBDAS_PRESENT  ( _MSC_VER >= 1600 && !__INTEL_COMPILER || __INTEL_COMPILER >= 1100 && _TBB_CPP0X )
+#define __TBB_LAMBDAS_PRESENT  ( _MSC_VER >= 1600 && !__INTEL_COMPILER || __INTEL_COMPILER > 1100 && _TBB_CPP0X )
 
 #if __SUNPRO_CC
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #else
-#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #endif
 #include <new>
 
+#if __LRB__
+#include "harness_lrb.h"
+#else
+#define __TBB_TEST_EXPORT
+#define REPORT_FATAL_ERROR REPORT
+#endif /* !__LRB__ */
+
 #if _WIN32||_WIN64
     #include <windows.h>
     #include <process.h>
@@ -58,6 +63,8 @@
 #include <errno.h>       /* for use in LinuxKernelVersion() */
 #endif
 
+#include "harness_report.h"
+
 #if !HARNESS_NO_ASSERT
 #include "harness_assert.h"
 
@@ -70,10 +77,16 @@ void SetHarnessErrorProcessing( test_error_extra_t extra_call ) {
 }
 //! Reports errors issued by failed assertions
 void ReportError( const char* filename, int line, const char* expression, const char * message ) {
+#if __TBB_ICL_11_1_CODE_GEN_BROKEN
     printf("%s:%d, assertion %s: %s\n", filename, line, expression, message ? message : "failed" );
+#else
+    REPORT_FATAL_ERROR("%s:%d, assertion %s: %s\n", filename, line, expression, message ? message : "failed" );
+#endif
     if( ErrorExtraCall )
         (*ErrorExtraCall)();
-#if TBB_EXIT_ON_ASSERT
+#if TBB_TERMINATE_ON_ASSERT
+    TerminateProcess(GetCurrentProcess(), 1);
+#elif TBB_EXIT_ON_ASSERT
     exit(1);
 #else
     abort();
@@ -81,7 +94,7 @@ void ReportError( const char* filename, int line, const char* expression, const
 }
 //! Reports warnings issued by failed warning assertions
 void ReportWarning( const char* filename, int line, const char* expression, const char * message ) {
-    printf("Warning: %s:%d, assertion %s: %s\n", filename, line, expression, message ? message : "failed" );
+    REPORT("Warning: %s:%d, assertion %s: %s\n", filename, line, expression, message ? message : "failed" );
 }
 #else
 #define ASSERT(p,msg) ((void)0)
@@ -122,21 +135,29 @@ static void ParseCommandLine( int argc, char* argv[] ) {
         else if( *endptr=='\0' ) 
             MaxThread = MinThread;
         if( *endptr!='\0' ) {
-            printf("garbled nthread range\n");
+            REPORT_FATAL_ERROR("garbled nthread range\n");
             exit(1);
         }    
         if( MinThread<0 ) {
-            printf("nthread must be nonnegative\n");
+            REPORT_FATAL_ERROR("nthread must be nonnegative\n");
             exit(1);
         }
         if( MaxThread<MinThread ) {
-            printf("nthread range is backwards\n");
+            REPORT_FATAL_ERROR("nthread range is backwards\n");
             exit(1);
         }
         ++i;
     }
+#if __TBB_STDARGS_BROKEN
+    if ( !argc )
+        argc = 1;
+    else {
+        while ( i < argc && argv[i][0] == 0 )
+            ++i;
+    }
+#endif /* __TBB_STDARGS_BROKEN */
     if( i!=argc ) {
-        printf("Usage: %s [-v] [nthread|minthread:maxthread]\n", argv[0] );
+        REPORT_FATAL_ERROR("Usage: %s [-v] [nthread|minthread:maxthread]\n", argv[0] );
         exit(1);
     }
 }
@@ -316,11 +337,11 @@ inline unsigned LinuxKernelVersion()
     struct utsname utsnameBuf;
     
     if (-1 == uname(&utsnameBuf)) {
-        printf("Can't call uname: errno %d\n", errno);
+        REPORT_FATAL_ERROR("Can't call uname: errno %d\n", errno);
         exit(1);
     }
     if (3 != sscanf(utsnameBuf.release, "%u.%u.%u", &a, &b, &c)) {
-        printf("Unable to parse OS release '%s'\n", utsnameBuf.release);
+        REPORT_FATAL_ERROR("Unable to parse OS release '%s'\n", utsnameBuf.release);
         exit(1);
     }
     return 1000000*a+1000*b+c;
diff --git a/src/test/harness_allocator.h b/src/test/harness_allocator.h
index 92302d9..db335b4 100644
--- a/src/test/harness_allocator.h
+++ b/src/test/harness_allocator.h
@@ -222,6 +222,57 @@ public:
     }
 };
 
+template <typename T, template<typename X> class Allocator = std::allocator>
+class debug_allocator : public Allocator<T>
+{
+public:
+    typedef Allocator<T> base_allocator_type;
+    typedef typename base_allocator_type::value_type value_type;
+    typedef typename base_allocator_type::pointer pointer;
+    typedef typename base_allocator_type::const_pointer const_pointer;
+    typedef typename base_allocator_type::reference reference;
+    typedef typename base_allocator_type::const_reference const_reference;
+    typedef typename base_allocator_type::size_type size_type;
+    typedef typename base_allocator_type::difference_type difference_type;
+    template<typename U> struct rebind {
+        typedef debug_allocator<U, Allocator> other;
+    };
+
+    debug_allocator() throw() { }
+    debug_allocator(const debug_allocator &a) throw() : base_allocator_type( a ) { }
+    template<typename U>
+    debug_allocator(const debug_allocator<U> &a) throw() : base_allocator_type( Allocator<U>( a ) ) { }
+
+    pointer allocate(const size_type n, const void *hint = 0 ) {
+        pointer ptr = base_allocator_type::allocate( n, hint );
+        std::memset( ptr, 0xE3E3E3E3, n * sizeof(value_type) );
+        return ptr;
+    }
+};
+
+//! Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
+/** @ingroup memory_allocation */
+template<template<typename T> class Allocator> 
+class debug_allocator<void, Allocator> : public Allocator<void> {
+public:
+    typedef Allocator<void> base_allocator_type;
+    typedef typename base_allocator_type::value_type value_type;
+    typedef typename base_allocator_type::pointer pointer;
+    typedef typename base_allocator_type::const_pointer const_pointer;
+    template<typename U> struct rebind {
+        typedef debug_allocator<U, Allocator> other;
+    };
+};
+
+template<typename T1, template<typename X1> class B1, typename T2, template<typename X2> class B2>
+inline bool operator==( const debug_allocator<T1,B1> &a, const debug_allocator<T2,B2> &b) {
+    return static_cast< B1<T1> >(a) == static_cast< B2<T2> >(b);
+}
+template<typename T1, template<typename X1> class B1, typename T2, template<typename X2> class B2>
+inline bool operator!=( const debug_allocator<T1,B1> &a, const debug_allocator<T2,B2> &b) {
+    return static_cast< B1<T1> >(a) != static_cast< B2<T2> >(b);
+}
+
 #if defined(_MSC_VER) && defined(_Wp64)
     // Workaround for overzealous compiler warnings in /Wp64 mode
     #pragma warning (pop)
diff --git a/src/test/harness_bad_expr.h b/src/test/harness_bad_expr.h
index ba9353e..ce9591a 100644
--- a/src/test/harness_bad_expr.h
+++ b/src/test/harness_bad_expr.h
@@ -67,13 +67,13 @@ void AssertionFailureHandler( const char* filename, int line, const char* expres
 
 void CheckAssertionFailure( int line, const char* expression, bool okay, const char* message, const char* substr ) {
     if( !okay ) {
-        printf("Line %d, %s failed to fail\n", line, expression );
+        REPORT("Line %d, %s failed to fail\n", line, expression );
         abort();
     } else if( !message ) {
-        printf("Line %d, %s failed without a message\n", line, expression );
+        REPORT("Line %d, %s failed without a message\n", line, expression );
         abort();
     } else if( strstr(message,substr)==0 ) {                            
-        printf("Line %d, %s failed with message '%s' missing substring '%s'\n", __LINE__, expression, message, substr );
+        REPORT("Line %d, %s failed with message '%s' missing substring '%s'\n", __LINE__, expression, message, substr );
         abort();
     }
 }
diff --git a/src/test/harness_cpu.h b/src/test/harness_cpu.h
index 3ccc836..ca27b18 100644
--- a/src/test/harness_cpu.h
+++ b/src/test/harness_cpu.h
@@ -100,9 +100,9 @@ static void TestCPUUserTime( int nthreads, int nactive = 1 ) {
     double avg_worker_usrtime = (usrtime-nactive*waittime)/nworkers;
 
     if( avg_worker_usrtime > waittime/2 )
-        printf( "ERROR: %d worker threads are spinning; waittime: %g; usrtime: %g; avg worker usrtime: %g\n",
+        REPORT( "ERROR: %d worker threads are spinning; waittime: %g; usrtime: %g; avg worker usrtime: %g\n",
                 nworkers, waittime, usrtime, avg_worker_usrtime);
-    else if( Verbose )
-        printf("%d worker threads; waittime: %g; usrtime: %g; avg worker usrtime: %g\n",
+    else
+        REMARK("%d worker threads; waittime: %g; usrtime: %g; avg worker usrtime: %g\n",
                         nworkers, waittime, usrtime, avg_worker_usrtime);
 }
diff --git a/src/test/harness_eh.h b/src/test/harness_eh.h
index 9eece9b..9650688 100644
--- a/src/test/harness_eh.h
+++ b/src/test/harness_eh.h
@@ -29,7 +29,6 @@
 #include <typeinfo>
 #include "tbb/atomic.h"
 #include "harness.h"
-#include "harness_trace.h"
 #include "harness_concurrency_tracker.h"
 
 namespace Harness {
@@ -69,8 +68,8 @@ public:
 #define EXCEPTION_DESCR "Test exception"
 
 tbb::atomic<intptr_t> g_CurExecuted,
-                      g_ExecutedAtCatch;
-volatile intptr_t g_ExceptionThrown = 0;
+                      g_ExecutedAtCatch,
+                      g_ExceptionsThrown;
 volatile bool g_ExceptionCaught = false,
               g_UnknownException = false;
 
@@ -80,7 +79,8 @@ volatile bool g_ThrowException = true,
 bool    g_ExceptionInMaster = false;
 bool    g_SolitaryException = false;
 
-tbb::atomic<intptr_t> g_Exceptions; // number of exceptions propagated into the user users (i.e. intercepted by the tests)
+//! Number of exceptions propagated into the user code (i.e. intercepted by the tests)
+tbb::atomic<intptr_t> g_Exceptions;
 
 inline void ResetEhGlobals ( bool throwException = true, bool flog = false ) {
     Harness::ConcurrencyTracker::Reset();
@@ -89,14 +89,13 @@ inline void ResetEhGlobals ( bool throwException = true, bool flog = false ) {
     g_UnknownException = false;
     g_ThrowException = throwException;
     g_Flog = flog;
-    g_ExceptionThrown = 0;
-    g_Exceptions = 0;
+    g_ExceptionsThrown = g_Exceptions = 0;
 }
 
 #if HARNESS_EH_SIMPLE_MODE
 
 static void ThrowTestException () { 
-    g_ExceptionThrown = 1;
+    ++g_ExceptionsThrown;
     throw test_exception(EXCEPTION_DESCR);
 }
 
@@ -108,14 +107,11 @@ static void ThrowTestException ( intptr_t threshold ) {
     while ( Existed() < threshold )
         __TBB_Yield();
     if ( !g_SolitaryException ) {
-        g_ExceptionThrown = 1;
-        REMARK ("About to throw one of multiple test_exceptions (thread %08x):", Harness::CurrentTid());
+        ++g_ExceptionsThrown;
         throw test_exception(EXCEPTION_DESCR);
     }
-    if ( __TBB_CompareAndSwapW(&g_ExceptionThrown, 1, 0) == 0 ) {
-        REMARK ("About to throw solitary test_exception... :");
+    if ( g_ExceptionsThrown.compare_and_swap(1, 0) == 0 )
         throw solitary_test_exception(EXCEPTION_DESCR);
-    }
 }
 #endif /* !HARNESS_EH_SIMPLE_MODE */
 
@@ -130,13 +126,22 @@ static void ThrowTestException ( intptr_t threshold ) {
         ASSERT (strcmp(e.what(), EXCEPTION_DESCR) == 0, "Unexpected original exception info"); \
         g_ExceptionCaught = exceptionCaught = true; \
         ++g_Exceptions; \
+    } catch ( tbb::tbb_exception& e ) { \
+        REPORT("Unexpected %s\n", e.name()); \
+        ASSERT (g_UnknownException && !g_UnknownException, "Unexpected tbb::tbb_exception" ); \
+    } catch ( std::exception& e ) { \
+        REPORT("Unexpected %s\n", typeid(e).name()); \
+        ASSERT (g_UnknownException && !g_UnknownException, "Unexpected std::exception" ); \
     } catch ( ... ) { \
         g_ExceptionCaught = exceptionCaught = true; \
         g_UnknownException = unknownException = true; \
-    }
+    } \
+    if ( !g_SolitaryException ) \
+        REMARK_ONCE ("Multiple exceptions mode: %d throws", (intptr_t)g_ExceptionsThrown);
 
 #define ASSERT_EXCEPTION() \
-    ASSERT (g_ExceptionThrown ? g_ExceptionCaught : !g_ExceptionCaught, "throw without catch or catch without throw"); \
+    ASSERT (g_ExceptionsThrown ? g_ExceptionCaught : true, "throw without catch"); \
+    ASSERT (!g_ExceptionsThrown ? !g_ExceptionCaught : true, "catch without throw"); \
     ASSERT (g_ExceptionCaught, "no exception occurred"); \
     ASSERT (!g_UnknownException, "unknown exception was caught")
 
@@ -144,16 +149,27 @@ static void ThrowTestException ( intptr_t threshold ) {
     CATCH() \
     ASSERT_EXCEPTION()
 
-const int c_Timeout = 10000;
+const int c_Timeout = 1000000;
 
-void WaitUntilConcurrencyPeaks () {
+void WaitUntilConcurrencyPeaks ( int expected_peak ) {
     if ( g_Flog )
         return;
     int n = 0;
-    while ( ++n < c_Timeout && (int)Harness::ConcurrencyTracker::InstantParallelism() < g_NumThreads )
+retry:
+    while ( ++n < c_Timeout && (int)Harness::ConcurrencyTracker::PeakParallelism() < expected_peak )
         __TBB_Yield();
+    ASSERT_WARNING( n < c_Timeout, "Missed wakeup or machine is overloaded?" );
+    // Workaround in case a missed wakeup takes place
+    if ( n == c_Timeout ) {
+        tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task();
+        r.spawn(r);
+        n = 0;
+        goto retry;
+    }
 }
 
+inline void WaitUntilConcurrencyPeaks () { WaitUntilConcurrencyPeaks(g_NumThreads); }
+
 inline bool IsMaster() {
     return Harness::CurrentTid() == g_Master;
 }
@@ -168,6 +184,7 @@ class CancellatorTask : public tbb::task {
     intptr_t m_cancellationThreshold;
 
     tbb::task* execute () {
+        Harness::ConcurrencyTracker ct;
         s_Ready = true;
         while ( g_CurExecuted < m_cancellationThreshold )
             __TBB_Yield();
diff --git a/src/test/harness_iterator.h b/src/test/harness_iterator.h
index 226db98..cc20b0f 100644
--- a/src/test/harness_iterator.h
+++ b/src/test/harness_iterator.h
@@ -38,11 +38,13 @@ template <class T>
 class InputIterator {
     T * my_ptr;
 public:
+#if HARNESS_EXTENDED_STD_COMPLIANCE
     typedef std::input_iterator_tag iterator_category;
     typedef T value_type;
     typedef typename std::allocator<T>::difference_type difference_type;
     typedef typename std::allocator<T>::pointer pointer;
     typedef typename std::allocator<T>::reference reference;
+#endif /* HARNESS_EXTENDED_STD_COMPLIANCE */
    
     explicit InputIterator( T * ptr): my_ptr(ptr){}
     
@@ -57,11 +59,13 @@ template <class T>
 class ForwardIterator {
     T * my_ptr;
 public:
+#if HARNESS_EXTENDED_STD_COMPLIANCE
     typedef std::forward_iterator_tag iterator_category;
     typedef T value_type;
     typedef typename std::allocator<T>::difference_type difference_type;
     typedef typename std::allocator<T>::pointer pointer;
     typedef typename std::allocator<T>::reference reference;
+#endif /* HARNESS_EXTENDED_STD_COMPLIANCE */
    
     explicit ForwardIterator ( T * ptr ) : my_ptr(ptr){}
     
@@ -77,12 +81,18 @@ public:
 template <class T>
 class RandomIterator {
     T * my_ptr;
+#if !HARNESS_EXTENDED_STD_COMPLIANCE
+    typedef typename std::allocator<T>::difference_type difference_type;
+#endif
+
 public:
+#if HARNESS_EXTENDED_STD_COMPLIANCE
     typedef std::random_access_iterator_tag iterator_category;
     typedef T value_type;
-    typedef typename std::allocator<T>::difference_type difference_type;
     typedef typename std::allocator<T>::pointer pointer;
     typedef typename std::allocator<T>::reference reference;
+    typedef typename std::allocator<T>::difference_type difference_type;
+#endif /* HARNESS_EXTENDED_STD_COMPLIANCE */
 
     explicit RandomIterator ( T * ptr ) : my_ptr(ptr){}
     RandomIterator ( const RandomIterator& r ) : my_ptr(r.my_ptr){}
@@ -93,6 +103,28 @@ public:
     RandomIterator operator+ (difference_type n) {return RandomIterator(my_ptr + n);}
 };
 
-}
+} // namespace Harness
+
+#if !HARNESS_EXTENDED_STD_COMPLIANCE
+namespace std {
+    template<typename T>
+    struct iterator_traits< Harness::InputIterator<T> > {
+        typedef std::input_iterator_tag iterator_category;
+        typedef T value_type;
+    };
+
+    template<typename T>
+    struct iterator_traits< Harness::ForwardIterator<T> > {
+        typedef std::forward_iterator_tag iterator_category;
+        typedef T value_type;
+    };
+
+    template<typename T>
+    struct iterator_traits< Harness::RandomIterator<T> > {
+        typedef std::random_access_iterator_tag iterator_category;
+        typedef T value_type;
+    };
+} // namespace std
+#endif /* !HARNESS_EXTENDED_STD_COMPLIANCE */
 
 #endif //harness_iterator_H
diff --git a/src/test/harness_lrb.h b/src/test/harness_lrb.h
new file mode 100644
index 0000000..5bda198
--- /dev/null
+++ b/src/test/harness_lrb.h
@@ -0,0 +1,102 @@
+/*
+    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks.
+
+    Threading Building Blocks is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public License
+    version 2 as published by the Free Software Foundation.
+
+    Threading Building Blocks is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Threading Building Blocks; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    As a special exception, you may use this file as part of a free software
+    library without restriction.  Specifically, if other files instantiate
+    templates or use macros or inline functions from this file, or you compile
+    this file and link it with other files to produce an executable, this
+    file does not by itself cause the resulting executable to be covered by
+    the GNU General Public License.  This exception does not however
+    invalidate any other reasons why the executable file might be covered by
+    the GNU General Public License.
+*/
+
+#ifndef tbb_test_harness_lrb_H
+#define tbb_test_harness_lrb_H
+
+#if !(__LRB__||__TBB_LRB_HOST)
+    #error test/harness_lrb.h should be included only when building for LRB platform
+#endif
+
+#define __TBB_LRB_COMM_MSG_SIZE_MAX 1024
+#define __TBB_LRB_COMMUNICATOR_NAME "__TBB_LRB_COMMUNICATOR"
+
+#define __TBB_MSG_DONE "done\n"
+#define __TBB_MSG_SKIP "skip\n"
+#define __TBB_MSG_ABORT "__TBB_abort__"
+
+#if __TBB_LRB_HOST
+
+#include "host/XN0_host.h"
+
+#else /* !__TBB_LRB_HOST */
+
+#include "lrb/XN0_lrb.h"
+#include <assert.h>
+
+#define __TBB_STDARGS_BROKEN 1
+#define __TBB_TEST_EXPORT XNNATIVELIBEXPORT
+
+#if XENSIM || __TBB_LRB_NATIVE
+    #define __TBB_EXCEPTION_HANDLING_BROKEN 1
+    #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
+    #define __TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN 1
+#endif /* XENSIM || __TBB_LRB_NATIVE */
+
+namespace Harness {
+    namespace internal {
+
+    class LrbReporter {
+        XNCOMMUNICATOR  m_communicator;
+
+    public:
+        LrbReporter () {
+            XNERROR res = XN0MessageCreateCommunicator( __TBB_LRB_COMMUNICATOR_NAME, 
+                                                        __TBB_LRB_COMM_MSG_SIZE_MAX, 
+                                                        &m_communicator );
+            assert( XN_SUCCESS == res );
+        }
+        
+        ~LrbReporter () {
+            XN0MessageDestroyCommunicator( m_communicator );
+        }
+
+        void Report ( const char* msg ) {
+            XN0MessageSend( m_communicator, msg, __TBB_LRB_COMM_MSG_SIZE_MAX );
+        }
+    }; // class LrbReporter
+
+    } // namespace internal
+} // namespace Harness
+
+#define TbbHarnessReporter LrbReporter
+
+#define REPORT_FATAL_ERROR  REPORT(__TBB_MSG_ABORT); REPORT
+
+#if __TBB_LRB_NATIVE
+    #define TBB_EXIT_ON_ASSERT 1
+#else
+    #define TBB_TERMINATE_ON_ASSERT 1
+#endif
+
+// Suppress warnings caused by windows.h during NetSim build
+#pragma warning (disable: 4005)
+
+#endif /* !__TBB_LRB_HOST */
+
+#endif /* tbb_test_harness_lrb_H */
diff --git a/src/test/harness_lrb_host.cpp b/src/test/harness_lrb_host.cpp
new file mode 100644
index 0000000..5f62101
--- /dev/null
+++ b/src/test/harness_lrb_host.cpp
@@ -0,0 +1,136 @@
+/*
+    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks.
+
+    Threading Building Blocks is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public License
+    version 2 as published by the Free Software Foundation.
+
+    Threading Building Blocks is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Threading Building Blocks; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    As a special exception, you may use this file as part of a free software
+    library without restriction.  Specifically, if other files instantiate
+    templates or use macros or inline functions from this file, or you compile
+    this file and link it with other files to produce an executable, this
+    file does not by itself cause the resulting executable to be covered by
+    the GNU General Public License.  This exception does not however
+    invalidate any other reasons why the executable file might be covered by
+    the GNU General Public License.
+*/
+
+/** @file harness_lrb_host.cpp     
+    This is the launcher for TBB tests compiled for LrbFSim or NetSim environments.
+**/
+
+#include <windows.h>
+#include <stdio.h>
+#include <assert.h>
+
+#define __TBB_LRB_HOST 1
+#include "harness_lrb.h"
+
+#define __TBB_HOST_EXIT(status)  exitStatus = status; goto hard_stop;
+
+bool IsSupportedTest ( int argc, char* argv[] ) {
+    const char* test[] = {
+        "test_model_plugin", 
+        "test_tbb_version",
+        "malloc_overload",
+        NULL
+        };
+    for ( size_t i = 0; test[i]; ++i ) {
+        for ( size_t j = 1; j < argc; ++j ) {
+            if ( strstr(argv[j], test[i]) )
+                return false;
+        }
+    }
+    return true;
+}
+
+bool IsCompletionMsg ( const char* msg ) {
+    return strncmp(msg, __TBB_MSG_DONE, __TBB_LRB_COMM_MSG_SIZE_MAX) == 0 ||
+           strncmp(msg, __TBB_MSG_SKIP, __TBB_LRB_COMM_MSG_SIZE_MAX) == 0;
+}
+
+int main( int argc, char* argv[] ) {
+    int exitStatus = 0;
+
+    if (argc < 2) {
+        printf( "Usage: %s test_name test_args\n", argv[0] );
+        __TBB_HOST_EXIT(-1);
+    }
+    if ( !IsSupportedTest(argc, argv) ) {
+        printf(__TBB_MSG_SKIP);
+        __TBB_HOST_EXIT(0);
+    }
+
+    XNENGINE engine;
+    XNERROR result = XN0EngineGetHandle(0, &engine);
+    assert( XN_SUCCESS == result );
+
+    // Try with a run schedule of one second
+    XN_RUN_SCHEDULE runSchedule;
+    runSchedule.executionQuantumInUsecs = 500000;
+    runSchedule.frequencyInHz = 1;
+
+    XNCONTEXT ctxHandle;
+    result = XN0ContextCreate(engine, &runSchedule, &ctxHandle);
+    assert( XN_SUCCESS == result );
+
+    XNCOMMUNICATOR communicator;
+    result = XN0MessageCreateCommunicator( __TBB_LRB_COMMUNICATOR_NAME, __TBB_LRB_COMM_MSG_SIZE_MAX, &communicator );
+    assert( XN_SUCCESS == result );
+
+    XNLIBRARY libHandle;
+    if ( argc == 2 )
+        result = XN0ContextLoadLib(ctxHandle, argv[1], &libHandle);
+    else
+        result = XN0ContextLoadLib1(ctxHandle, argv[1], argc - 1, argv + 1, &libHandle);
+    if( result != XN_SUCCESS ) {
+        printf( "ERROR: Loading module \"%s\" failed", argv[1] );
+        __TBB_HOST_EXIT(-2);
+    }
+
+    char msg[__TBB_LRB_COMM_MSG_SIZE_MAX + 1] = { 0 };
+    bool abort_signalled = false;
+    for( ; !IsCompletionMsg(msg); ) {
+        XN0MessageReceive( communicator, msg, __TBB_LRB_COMM_MSG_SIZE_MAX, NULL );
+        if ( strncmp(msg, __TBB_MSG_ABORT, __TBB_LRB_COMM_MSG_SIZE_MAX ) == 0 ) {
+            abort_signalled = true;
+            // The next message should provide the reason
+            continue;
+        }
+        printf("%s\n", msg); fflush(stdout);
+        if ( abort_signalled ) {
+            // After exit() or abort() was invoked in a LRB library, it cannot be 
+            // unloaded, and the host hangs in XN0ContextDestroy. Thus we have to 
+            // bypass the graceful termination code.
+            __TBB_HOST_EXIT(1);
+        }
+    }
+    XN0MessageDestroyCommunicator( communicator );
+
+    result = XN0ContextUnloadLib(libHandle, 10 * 1000, &exitStatus);
+    if( result == XN_TIME_OUT_REACHED ) {
+        printf("ERROR: timed out waiting for LRB module unload\n");
+    }
+    else {
+        result = XN0ContextDestroy(ctxHandle);
+        assert( XN_SUCCESS == result );
+    }
+    if ( exitStatus != 0 )
+        printf("ERROR: %s returned failure status %d", argv[1], exitStatus);
+hard_stop:
+    fflush(stdout);
+    // We do not need a dump of memory leaks statistics
+    TerminateProcess( GetCurrentProcess(), 0 );
+    return 0;
+}
diff --git a/src/test/harness_memory.h b/src/test/harness_memory.h
index 0b02999..509b3a2 100644
--- a/src/test/harness_memory.h
+++ b/src/test/harness_memory.h
@@ -64,7 +64,7 @@ size_t GetMemoryUsage() {
     long total_mem;
     int n = fscanf(statsfile,"%lu",&total_mem);
     if( n!=1 ) {
-        printf("Warning: memory usage statistics wasn't obtained\n");
+        REPORT("Warning: memory usage statistics wasn't obtained\n");
         return 0;
     }
     fclose(statsfile);
diff --git a/src/test/harness_trace.h b/src/test/harness_report.h
similarity index 65%
rename from src/test/harness_trace.h
rename to src/test/harness_report.h
index 61141b2..cbf0575 100644
--- a/src/test/harness_trace.h
+++ b/src/test/harness_report.h
@@ -28,7 +28,7 @@
 
 // Just the tracing portion of the harness.
 //
-// This header defines TRACE and TRCAENL macros, which use printf like syntax and 
+// This header defines TRACE and TRCAENL macros, which use REPORT like syntax and 
 // are useful for duplicating trace output to the standard debug output on Windows.
 // It is possible to add the ability of automatic extending messages with additional
 // info (file, line, function, time, thread ID, ...).
@@ -37,8 +37,8 @@
 //
 // The full "harness.h" must be included before this header.
 
-#ifndef tbb_tests_harness_trace_H
-#define tbb_tests_harness_trace_H
+#ifndef tbb_tests_harness_report_H
+#define tbb_tests_harness_report_H
 
 #if defined(MAX_TRACE_SIZE) && MAX_TRACE_SIZE < 1024
     #undef MAX_TRACE_SIZE
@@ -47,8 +47,18 @@
     #define MAX_TRACE_SIZE  1024
 #endif
 
+#if __SUNPRO_CC
+#include <stdio.h>
+#else
+#include <cstdio>
+#endif
+
 #include <cstdarg>
 
+#if __LRB__
+#include "harness_lrb.h"
+#endif
+
 #if _MSC_VER
     #define snprintf _snprintf
 #if _MSC_VER<=1400
@@ -56,57 +66,66 @@
 #endif
 #endif
 
-namespace harness_internal {
+namespace Harness {
+    namespace internal {
+
+#ifndef TbbHarnessReporter
+    struct TbbHarnessReporter {
+        void Report ( const char* msg ) {
+            printf( "%s", msg );
+            fflush(stdout);
+#ifdef _WINDOWS_
+            OutputDebugStringA(msg);
+#endif
+        }
+    }; // struct TbbHarnessReporter
+#endif /* !TbbHarnessReporter */
+
+    class Tracer {
+        int         m_flags;
+        const char  *m_file;
+        const char  *m_func;
+        size_t      m_line;
 
-    struct tracer_t
-    {
-        int         my_flags;
-        const char  *my_file;
-        const char  *my_func;
-        size_t      my_line;
+        TbbHarnessReporter m_reporter;
 
+    public:
         enum  { 
             prefix = 1,
             need_lf = 2
         };
 
-	    tracer_t*  set_trace_info ( int flags, const char *file, size_t line, const char *func )
-	    {
-		    my_flags = flags;
-		    my_line = line;
-            my_file = file;
-            my_func = func;
-		    return  this;
-	    }
-
-        void  trace ( const char* fmt, ... )
-        {
+        Tracer*  set_trace_info ( int flags, const char *file, size_t line, const char *func ) {
+            m_flags = flags;
+            m_line = line;
+            m_file = file;
+            m_func = func;
+            return  this;
+        }
+
+        void  trace ( const char* fmt, ... ) {
             char    msg[MAX_TRACE_SIZE];
             char    msg_fmt_buf[MAX_TRACE_SIZE];
             const char  *msg_fmt = fmt;
-            if ( my_flags & prefix ) {
-                snprintf (msg_fmt_buf, MAX_TRACE_SIZE, "[%s] %s", my_func, fmt);
+            if ( m_flags & prefix ) {
+                snprintf (msg_fmt_buf, MAX_TRACE_SIZE, "[%s] %s", m_func, fmt);
                 msg_fmt = msg_fmt_buf;
             }
             std::va_list argptr;
             va_start (argptr, fmt);
             int len = vsnprintf (msg, MAX_TRACE_SIZE, msg_fmt, argptr);
             va_end (argptr);
-            if ( my_flags & need_lf &&  
+            if ( m_flags & need_lf &&  
                  len < MAX_TRACE_SIZE - 1  &&  msg_fmt[len-1] != '\n' )
             {
                 msg[len] = '\n';
                 msg[len + 1] = 0;
             }
-            printf ("%s",msg);
-            fflush(stdout);
-#if _WIN32 || _WIN64
-            OutputDebugStringA(msg);
-#endif
+            m_reporter.Report(msg);
         }
-    }; // class tracer_t
+    }; // class Tracer
 
-    static tracer_t tracer;
+    static Tracer tracer;
 
     template<int>
     bool not_the_first_call () {
@@ -115,26 +134,28 @@ namespace harness_internal {
         first_call = true;
         return res;
     }
-} // namespace harness_internal
+
+    } // namespace internal
+} // namespace Harness
 
 #if defined(_MSC_VER)  &&  _MSC_VER >= 1300  ||  defined(__GNUC__)  ||  defined(__GNUG__)
-	#define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, __FUNCTION__
+    #define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, __FUNCTION__
 #else
-	#define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, ""
+    #define HARNESS_TRACE_ORIG_INFO __FILE__, __LINE__, ""
     #define __FUNCTION__ ""
 #endif
 
 
 //! printf style tracing macro
 /** This variant of TRACE adds trailing line-feed (new line) character, if it is absent. **/
-#define TRACE  harness_internal::tracer.set_trace_info(harness_internal::tracer_t::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
+#define TRACE Harness::internal::tracer.set_trace_info(Harness::internal::Tracer::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
 
 //! printf style tracing macro without automatic new line character adding
-#define TRACENL harness_internal::tracer.set_trace_info(0, HARNESS_TRACE_ORIG_INFO)->trace
+#define TRACENL Harness::internal::tracer.set_trace_info(0, HARNESS_TRACE_ORIG_INFO)->trace
 
 //! printf style tracing macro with additional information prefix (e.g. current function name)
-#define TRACEP harness_internal::tracer.set_trace_info(harness_internal::tracer_t::prefix | \
-                                    harness_internal::tracer_t::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
+#define TRACEP Harness::internal::tracer.set_trace_info(Harness::internal::Tracer::prefix | \
+                                    Harness::internal::Tracer::need_lf, HARNESS_TRACE_ORIG_INFO)->trace
 
 //! printf style remark macro
 /** Produces output only when the test is run with the -v (verbose) option. **/
@@ -143,6 +164,10 @@ namespace harness_internal {
 //! printf style remark macro
 /** Produces output only when invoked first time. 
     Only one instance of this macro is allowed per source code line. **/
-#define REMARK_ONCE  (!Verbose || harness_internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACE
+#define REMARK_ONCE (!Verbose || Harness::internal::not_the_first_call<__LINE__>()) ? (void)0 : TRACE
+
+//! printf style reporting macro
+/** On heterogeneous platforms redirects its output to the host side. **/
+#define REPORT TRACENL
 
-#endif /* tbb_tests_harness_trace_H */
+#endif /* tbb_tests_harness_report_H */
diff --git a/src/test/test_ScalableAllocator.cpp b/src/test/test_ScalableAllocator.cpp
index 6c58bbc..18a04a7 100644
--- a/src/test/test_ScalableAllocator.cpp
+++ b/src/test/test_ScalableAllocator.cpp
@@ -39,8 +39,8 @@
 #include <windows.h>
 #endif /* _MSC_VER */
 
-int main(void)
-{
+__TBB_TEST_EXPORT
+int main() {
 #if _MSC_VER && !__TBBMALLOC_NO_IMPLICIT_LINKAGE
     #ifdef _DEBUG
         ASSERT(!GetModuleHandle("tbbmalloc.dll") && GetModuleHandle("tbbmalloc_debug.dll"),
@@ -51,6 +51,6 @@ int main(void)
     #endif
 #endif /* _MSC_VER && !__TBBMALLOC_NO_IMPLICIT_LINKAGE */
     int result = TestMain<tbb::scalable_allocator<void> >();
-    printf("done\n");
+    REPORT("done\n");
     return result;
 }
diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/test/test_ScalableAllocator_STL.cpp
index 87d892e..c54ad0a 100644
--- a/src/test/test_ScalableAllocator_STL.cpp
+++ b/src/test/test_ScalableAllocator_STL.cpp
@@ -34,8 +34,9 @@
 // The actual body of the test is there:
 #include "test_allocator_STL.h"
 
+__TBB_TEST_EXPORT
 int main() {
     TestAllocatorWithSTL<tbb::scalable_allocator<void> >();
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_aligned_space.cpp b/src/test/test_aligned_space.cpp
index 647a083..9ac9e06 100644
--- a/src/test/test_aligned_space.cpp
+++ b/src/test/test_aligned_space.cpp
@@ -26,6 +26,12 @@
     the GNU General Public License.
 */
 
+#include "tbb/tbb_config.h"
+
+#if __TBB_GCC_WARNING_SUPPRESSION_ENABLED
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
 //! Wrapper around T where all members are private.
 /** Used to prove that aligned_space<T,N> never calls member of T. */
 template<typename T>
@@ -35,12 +41,15 @@ class Minimal {
     ~Minimal();
     void operator=( const Minimal& );
     T pad;
-public:
-    friend void AssignToCheckAlignment( Minimal& dst, const Minimal& src ) {
-        dst.pad = src.pad;
-    }  
+    template<typename U>
+    friend void AssignToCheckAlignment( Minimal<U>& dst, const Minimal<U>& src ) ;
 };
 
+template<typename T>
+void AssignToCheckAlignment( Minimal<T>& dst, const Minimal<T>& src ) {
+    dst.pad = src.pad;
+}
+
 #include "tbb/aligned_space.h"
 #include "harness_assert.h"
 
@@ -85,9 +94,12 @@ void TestAlignedSpace() {
         PrintSpaceWastingWarning( typeid(T).name() );
 }
 
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+
 #include "harness_m128.h"
-#include <cstdio>         // Inclusion of <cstdio> deferred, to improve odds of detecting accidental dependences on it.
 
+__TBB_TEST_EXPORT
 int main() {
     TestAlignedSpace<char>();
     TestAlignedSpace<short>();
@@ -99,14 +111,11 @@ int main() {
 #if HAVE_m128
     TestAlignedSpace<__m128>();
 #endif /* HAVE_m128 */
-    std::printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
-
 static void PrintSpaceWastingWarning( const char* type_name ) {
-    std::printf("Consider rewriting aligned_space<%s,N> to waste less space\n", type_name ); 
+    REPORT("Consider rewriting aligned_space<%s,N> to waste less space\n", type_name ); 
 }
 
diff --git a/src/test/test_assembly.cpp b/src/test/test_assembly.cpp
index c952733..b2dcea1 100644
--- a/src/test/test_assembly.cpp
+++ b/src/test/test_assembly.cpp
@@ -30,6 +30,18 @@
 // This program deliberately #includes ../internal/task.cpp so that
 // it can get intimate access to the scheduler.
 
+// Test correctness of forceful TBB initialization before any dynamic initialization
+// of static objects inside the library took place.
+namespace tbb { 
+namespace internal {
+    // Forward declaration of the TBB general initialization routine from task.cpp
+    void DoOneTimeInitializations();
+}}
+
+struct StaticInitializationChecker {
+    StaticInitializationChecker () { tbb::internal::DoOneTimeInitializations(); }
+} theChecker;
+
 #define TEST_ASSEMBLY_ROUTINES 1
 #define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
 // to avoid usage of #pragma comment
@@ -54,7 +66,6 @@ public:
 
 void GenericScheduler::test_assembly_routines() {
     __TBB_ASSERT( assert_okay(), NULL );
-#if __TBB_TASK_DEQUE
     try_enter_arena();
     ASSERT( arena_slot->task_pool == dummy_slot.task_pool, "entering arena must not lock the task pool" );
     arena->mark_pool_full();
@@ -62,117 +73,12 @@ void GenericScheduler::test_assembly_routines() {
     release_task_pool();
     acquire_task_pool();    // leave_arena requires the pool to be locked
     leave_arena();
-#else /* !__TBB_TASK_DEQUE */
-    try_enter_arena();
-    arena->mark_pool_full();
-    release_task_pool();
-    long steal_count = 0;
-    long get_count = 0;
-    const depth_type n = 5;
-    const depth_type array_size_proxy = array_size; // using proxy to reduce compilation warnings
-    ASSERT( array_size-array_size_proxy==0, NULL ); // check validity of the replacement
-    ASSERT( array_size_proxy>=n, NULL );
-    // Loop over insertion levels
-    for( depth_type i=0; i<n; ++i ) 
-        // Loop over values for "deepest"
-        for( depth_type d=-1; d<n; ++d )     
-            // Loop over values for "shallowest"
-            for( depth_type s=0; s<n; ++s ) 
-                // Loop over depth limits
-                for( depth_type limit=0; limit<n; ++limit ) 
-                    // Loop over whether to insert or not
-                    for( int insert=0; insert<2; ++insert ) 
-                        // Loop over whether to steal or get
-                        for( int steal=0; steal<2; ++steal ) {
-                            __TBB_ASSERT( assert_okay(), NULL );
-                            task** array = dummy_slot.task_pool->array;  
-                            for( depth_type k=0; k<array_size_proxy; ++k )
-                                array[k] = NULL;
-                            dummy_slot.task_pool->prefix().steal_begin = s;
-                            __TBB_ASSERT( assert_okay(), NULL );
-
-                            TestTask& w = *new( task::allocate_root() ) TestTask("w");
-                            __TBB_ASSERT( assert_okay(), NULL );
-                            if( d>=0 ) {
-                                w.prefix().depth = int(d);
-                                w.prefix().next = NULL;
-                                w.prefix().state = task::ready;
-                                dummy_slot.task_pool->array[d] = &w;
-                            }
-                            deepest = d;
-                            arena_slot->steal_end = 2*d;
-
-                            __TBB_ASSERT( assert_okay(), NULL );
-                            TestTask& x = *new( task::allocate_root() ) TestTask("x");
-                            TestTask& y = *new( task::allocate_root() ) TestTask("y");
-                            TestTask& z = *new( task::allocate_root() ) TestTask("z");
-                            __TBB_ASSERT( assert_okay(), NULL );
-                            x.prefix().next = &y;
-                            y.prefix().next = &z;       
-                            z.prefix().next = NULL;
-                            ASSERT( x.prefix().next==&y, NULL );
-                            for( task* p=&x; p; p=p->prefix().next ) 
-                                p->prefix().depth = int(i);
-                            __TBB_ASSERT( assert_okay(), NULL );
-                            z.prefix().next = (task*)(void*)-1;
-                            if( insert ) {
-                                spawn( x, z.prefix().next );
-                                __TBB_ASSERT( assert_okay(), NULL );
-                                depth_type expected_deepest = d>=i ? d : i;
-                                ASSERT( deepest==expected_deepest, NULL );
-                                depth_type expected_shallowest = i<=s ? i : s;
-                                ASSERT( dummy_slot.task_pool->prefix().steal_begin==expected_shallowest, NULL );
-                                ASSERT( array[i]==&x, NULL );
-                                ASSERT( x.prefix().next==&y, NULL );
-                            } 
-                            if( steal ) {
-                                task* expected_task = NULL;
-                                depth_type shallowest = dummy_slot.task_pool->prefix().steal_begin;
-                                depth_type expected_shallowest = shallowest;
-                                for( depth_type k=shallowest; k<array_size_proxy; ++k ) {
-                                    if( k>=limit && array[k] ) {
-                                        expected_task = array[k];
-                                        if( shallowest>=limit )
-                                            expected_shallowest = k;
-                                        break;
-                                    }
-                                }
-                                __TBB_ASSERT( assert_okay(), NULL );
-                                task* t = steal_task( *arena_slot, limit );
-                                ASSERT( (arena_slot->steal_end&1)==0, "forgot to release lock?" );
-                                __TBB_ASSERT( assert_okay(), NULL );
-                                ASSERT( t==expected_task, NULL );       
-                                shallowest = dummy_slot.task_pool->prefix().steal_begin;
-                                ASSERT( shallowest==expected_shallowest, NULL );        
-                                ++steal_count;
-                            } else {
-                                task* expected_task = NULL;
-                                for( depth_type k=array_size_proxy-1; k>=limit; --k ) {
-                                    if( array[k] ) {
-                                        expected_task = array[k];
-                                        ASSERT( deepest==k, NULL ); 
-                                        break;
-                                    }
-                                }
-                                __TBB_ASSERT( assert_okay(), NULL );
-                                task* t = get_task( limit );
-                                ASSERT( (arena_slot->steal_end&1)==0, "forgot to release lock?" );
-                                __TBB_ASSERT( assert_okay(), NULL );
-                                ASSERT( t==expected_task, NULL );       
-                                ++get_count;
-                            }
-                        }
-    ASSERT( array_size-array_size_proxy==0, NULL ); // check for any side effects affecting array_size
-    if( Verbose )
-        printf("%ld successful gets and %ld successful steals\n", get_count, steal_count );
-#endif /* !__TBB_TASK_DEQUE */
 }
 
 //! Test __TBB_CompareAndSwapW
 static void TestCompareExchange() {
     ASSERT( intptr(-10)<10, "intptr not a signed integral type?" ); 
-    if( Verbose ) 
-        printf("testing __TBB_CompareAndSwapW\n");
+    REMARK("testing __TBB_CompareAndSwapW\n");
     for( intptr a=-10; a<10; ++a )
         for( intptr b=-10; b<10; ++b )
             for( intptr c=-10; c<10; ++c ) {
@@ -196,8 +102,7 @@ static void TestCompareExchange() {
 static void TestAtomicCounter() {
     // "canary" is a value used to detect illegal overwrites.
     const internal::reference_count canary = ~(internal::uintptr)0/3;
-    if( Verbose ) 
-        printf("testing __TBB_FetchAndIncrement\n");
+    REMARK("testing __TBB_FetchAndIncrement\n");
     struct {
         internal::reference_count prefix, i, suffix;
     } x;
@@ -211,8 +116,7 @@ static void TestAtomicCounter() {
         ASSERT( x.i==k+1, NULL );
         ASSERT( j==k, NULL );
     }
-    if( Verbose ) 
-        printf("testing __TBB_FetchAndDecrement\n");
+    REMARK("testing __TBB_FetchAndDecrement\n");
     x.i = 10;
     for( int k=10; k>0; --k ) {
         internal::reference_count j = __TBB_FetchAndDecrementWrelease((volatile void *)&x.i);
@@ -224,8 +128,7 @@ static void TestAtomicCounter() {
 }
 
 static void TestTinyLock() {
-    if( Verbose ) 
-        printf("testing __TBB_LockByte\n");
+    REMARK("testing __TBB_LockByte\n");
     unsigned char flags[16];
     for( int i=0; i<16; ++i )
         flags[i] = i;
@@ -240,8 +143,7 @@ static void TestTinyLock() {
 }
 
 static void TestLog2() {
-    if( Verbose ) 
-        printf("testing __TBB_Log2\n");
+    REMARK("testing __TBB_Log2\n");
     for( uintptr_t i=1; i; i<<=1 ) {
         for( uintptr_t j=1; j<1<<16; ++j ) {
             if( uintptr_t k = i*j ) {
@@ -255,8 +157,7 @@ static void TestLog2() {
 }
 
 static void TestPause() {
-    if( Verbose ) 
-        printf("testing __TBB_Pause\n");
+    REMARK("testing __TBB_Pause\n");
     __TBB_Pause(1);
 }
 
@@ -266,6 +167,7 @@ static void TestPause() {
 
 using namespace tbb;
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     try {
         ParseCommandLine( argc, argv );
@@ -277,14 +179,13 @@ int main( int argc, char* argv[] ) {
 
         task_scheduler_init init(1);
 
-        if( Verbose ) 
-            printf("testing __TBB_(scheduler assists)\n");
+        REMARK("testing __TBB_(scheduler assists)\n");
         GenericScheduler* scheduler = internal::Governor::local_scheduler();
         scheduler->test_assembly_routines();
 
     } catch(...) {
         ASSERT(0,"unexpected exception");
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_atomic.cpp b/src/test/test_atomic.cpp
index dbf31a9..3ee79b7 100644
--- a/src/test/test_atomic.cpp
+++ b/src/test/test_atomic.cpp
@@ -253,14 +253,13 @@ struct AlignmentChecker {
 /** T is an integral type. */
 template<typename T>
 void TestAtomicInteger( const char* name ) {
-    if( Verbose )
-        printf("testing atomic<%s>\n",name);
+    REMARK("testing atomic<%s>\n",name);
 #if ( __linux__ && __TBB_x86_32 && __GNUC__==3 && __GNUC_MINOR__==3 ) || defined(__SUNPRO_CC)
     // gcc 3.3 has known problem for 32-bit Linux, so only warn if there is a problem.
     // SUNPRO_CC does have this problem as well
     if( sizeof(T)==8 ) {
         if( sizeof(AlignmentChecker<T>)!=2*sizeof(tbb::atomic<T>) ) {
-            printf("Warning: alignment for atomic<%s> is wrong (known issue with gcc 3.3 and sunCC 5.9 2008/01/28 for IA32)\n",name);
+            REPORT("Warning: alignment for atomic<%s> is wrong (known issue with gcc 3.3 and sunCC 5.9 2008/01/28 for IA32)\n",name);
         }
     } else
 #endif /* ( __linux__ && __TBB_x86_32 && __GNUC__==3 && __GNUC_MINOR__==3 ) || defined(__SUNPRO_CC) */
@@ -309,8 +308,7 @@ void TestIndirection() {
 //! Test atomic<T*>
 template<typename T>
 void TestAtomicPointer() {
-    if( Verbose )
-        printf("testing atomic pointer (%d)\n",int(sizeof(T)));
+    REMARK("testing atomic pointer (%d)\n",int(sizeof(T)));
     T array[1000];
     TestOperations<T*>(&array[500],&array[250],&array[750]);
     TestFetchAndAdd<T*>(&array[500]);
@@ -321,16 +319,14 @@ void TestAtomicPointer() {
 //! Test atomic<Ptr> where Ptr is a pointer to a type of unknown size
 template<typename Ptr>
 void TestAtomicPointerToTypeOfUnknownSize( const char* name ) {
-    if( Verbose )
-        printf("testing atomic<%s>\n",name);
+    REMARK("testing atomic<%s>\n",name);
     char array[1000];
     TestOperations<Ptr>((Ptr)(void*)&array[500],(Ptr)(void*)&array[250],(Ptr)(void*)&array[750]);
     TestParallel<Ptr>( name );
 }
 
 void TestAtomicBool() {
-    if( Verbose )
-        printf("testing atomic<bool>\n");
+    REMARK("testing atomic<bool>\n");
     TestOperations<bool>(true,true,false);
     TestOperations<bool>(false,false,true);
     TestParallel<bool>( "bool" );
@@ -339,8 +335,7 @@ void TestAtomicBool() {
 enum Color {Red=0,Green=1,Blue=-1};
 
 void TestAtomicEnum() {
-    if( Verbose )
-        printf("testing atomic<Color>\n");
+    REMARK("testing atomic<Color>\n");
     TestOperations<Color>(Red,Green,Blue);
     TestParallel<Color>( "Color" );
 }
@@ -348,8 +343,7 @@ void TestAtomicEnum() {
 #if !__TBB_FLOATING_POINT_BROKEN 
 template<typename T>
 void TestAtomicFloat( const char* name ) {
-    if( Verbose )
-        printf("testing atomic<%s>\n", name );
+    REMARK("testing atomic<%s>\n", name );
     TestOperations<T>(0.5,3.25,10.75);
     TestParallel<T>( name );
 }
@@ -443,8 +437,7 @@ intptr_t getCorrectContendedValue() {
 
 template<typename T>
 void TestMaskedCAS() {
-    if( Verbose )
-        printf("testing masked CAS<%d>\n",int(sizeof(T)));
+    REMARK("testing masked CAS<%d>\n",int(sizeof(T)));
 
     const int num_slots = sizeof(T)*testSpaceSize/sizeof(intptr_t);
     intptr_t arr1[num_slots+2]; // two more "canary" slots at boundaries
@@ -469,13 +462,14 @@ class ArrayElement {
     char item[N];
 };
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine( argc, argv );
 #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400
     TestAtomicInteger<unsigned long long>("unsigned long long");
     TestAtomicInteger<long long>("long long");
 #else
-    printf("Warning: atomic<64-bits> not tested because of known problem in Microsoft compiler\n");
+    REPORT("Warning: atomic<64-bits> not tested because of known problem in Microsoft compiler\n");
 #endif /*defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */
     TestAtomicInteger<unsigned long>("unsigned long");
     TestAtomicInteger<long>("long");
@@ -508,7 +502,7 @@ int main( int argc, char* argv[] ) {
     ASSERT( !ParallelError, NULL );
     TestMaskedCAS<unsigned char>();
     TestMaskedCAS<unsigned short>();
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
@@ -587,11 +581,11 @@ public:
                 }
                 if( flag ) {
                     if( flag!=(T)-1 ) {
-                        printf("ERROR: flag!=(T)-1 k=%d i=%d trial=%x type=%s (atomicity problem?)\n", k, i, trial, name );
+                        REPORT("ERROR: flag!=(T)-1 k=%d i=%d trial=%x type=%s (atomicity problem?)\n", k, i, trial, name );
                         ParallelError = true;
                     } 
                     if( message!=(T)-1 ) {
-                        printf("ERROR: message!=(T)-1 k=%d i=%d trial=%x type=%s (memory fence problem?)\n", k, i, trial, name );
+                        REPORT("ERROR: message!=(T)-1 k=%d i=%d trial=%x type=%s (memory fence problem?)\n", k, i, trial, name );
                         ParallelError = true;
                     }
                     s->message = T(0); 
@@ -719,7 +713,7 @@ public:
                 if( -epsilon<=error && error<=epsilon ) {
                     return true;
                 } else {
-                    printf("Warning: excessive floating-point error encountered j=%d x=%.15g error=%.15g\n",j,x,error);
+                    REPORT("Warning: excessive floating-point error encountered j=%d x=%.15g error=%.15g\n",j,x,error);
                 }
             }
             return false;
@@ -751,7 +745,7 @@ public:
                 // Read x atomically into z.
                 z = x;
                 if( !set.contains(z) ) {
-                    printf("ERROR: assignment of atomic<%s> is not atomic\n", name);
+                    REPORT("ERROR: assignment of atomic<%s> is not atomic\n", name);
                     ParallelError = true;
                     return;
                 }
diff --git a/src/test/test_blocked_range.cpp b/src/test/test_blocked_range.cpp
index ececef5..ed69cdf 100644
--- a/src/test/test_blocked_range.cpp
+++ b/src/test/test_blocked_range.cpp
@@ -118,6 +118,7 @@ void ParallelTest() {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine(argc,argv);
     SerialTest();
@@ -125,6 +126,6 @@ int main( int argc, char* argv[] ) {
         tbb::task_scheduler_init init(p);
         ParallelTest();
     }
-    std::printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_blocked_range2d.cpp b/src/test/test_blocked_range2d.cpp
index 7fce101..d6d3280 100644
--- a/src/test/test_blocked_range2d.cpp
+++ b/src/test/test_blocked_range2d.cpp
@@ -40,7 +40,8 @@ public:
     template<typename OtherTag>
     friend AbstractValueType<OtherTag> MakeAbstractValueType( int i );
 
-    friend int GetValueOf( const AbstractValueType& v ) {return v.value;}
+    template<typename OtherTag>
+    friend int GetValueOf( const AbstractValueType<OtherTag>& v ) ;
 };
 
 template<typename Tag>
@@ -51,6 +52,9 @@ AbstractValueType<Tag> MakeAbstractValueType( int i ) {
 }
 
 template<typename Tag>
+int GetValueOf( const AbstractValueType<Tag>& v ) {return v.value;}
+
+template<typename Tag>
 bool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
     return GetValueOf(u)<GetValueOf(v);
 }
@@ -142,6 +146,7 @@ void ParallelTest() {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine(argc,argv);
     SerialTest();
@@ -149,6 +154,6 @@ int main( int argc, char* argv[] ) {
         tbb::task_scheduler_init init(p);
         ParallelTest();
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_blocked_range3d.cpp b/src/test/test_blocked_range3d.cpp
index 36ede8d..2b904be 100644
--- a/src/test/test_blocked_range3d.cpp
+++ b/src/test/test_blocked_range3d.cpp
@@ -40,7 +40,8 @@ public:
     template<typename OtherTag>
     friend AbstractValueType<OtherTag> MakeAbstractValueType( int i );
 
-    friend int GetValueOf( const AbstractValueType& v ) {return v.value;}
+    template<typename OtherTag>
+    friend int GetValueOf( const AbstractValueType<OtherTag>& v ) ;
 };
 
 template<typename Tag>
@@ -51,6 +52,9 @@ AbstractValueType<Tag> MakeAbstractValueType( int i ) {
 }
 
 template<typename Tag>
+int GetValueOf( const AbstractValueType<Tag>& v ) {return v.value;}
+
+template<typename Tag>
 bool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) {
     return GetValueOf(u)<GetValueOf(v);
 }
@@ -173,6 +177,7 @@ void ParallelTest() {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine(argc,argv);
     SerialTest(); 
@@ -180,6 +185,6 @@ int main( int argc, char* argv[] ) {
             tbb::task_scheduler_init init(p);
             ParallelTest();
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/test/test_cache_aligned_allocator.cpp
index 7d46d2b..59865f7 100644
--- a/src/test/test_cache_aligned_allocator.cpp
+++ b/src/test/test_cache_aligned_allocator.cpp
@@ -40,12 +40,12 @@ struct is_zero_filling<tbb::zero_allocator<void> > {
     static const bool value = true;
 };
 
-int main(void)
-{
+__TBB_TEST_EXPORT
+int main() {
     int result = TestMain<tbb::cache_aligned_allocator<void> >();
     result += TestMain<tbb::tbb_allocator<void> >();
     result += TestMain<tbb::zero_allocator<void> >();
 
-    printf("done\n");
+    REPORT("done\n");
     return result;
 }
diff --git a/src/test/test_cache_aligned_allocator_STL.cpp b/src/test/test_cache_aligned_allocator_STL.cpp
index 20565e8..b2922a1 100644
--- a/src/test/test_cache_aligned_allocator_STL.cpp
+++ b/src/test/test_cache_aligned_allocator_STL.cpp
@@ -34,11 +34,12 @@
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
 #include "test_allocator_STL.h"
 
+__TBB_TEST_EXPORT
 int main() {
     TestAllocatorWithSTL<tbb::cache_aligned_allocator<void> >();
     TestAllocatorWithSTL<tbb::tbb_allocator<void> >();
     TestAllocatorWithSTL<tbb::zero_allocator<void> >();
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_combinable.cpp b/src/test/test_combinable.cpp
index d6dbb64..cee1e9b 100644
--- a/src/test/test_combinable.cpp
+++ b/src/test/test_combinable.cpp
@@ -37,14 +37,14 @@
 
 #include <cstring>
 #include <vector>
-#include <deque>
-#include <list>
-#include <map>
 #include <utility>
 
 #include "harness_assert.h"
 #include "harness.h"
-#include <iostream>
+
+#if __TBB_GCC_WARNING_SUPPRESSION_ENABLED
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
 
 static tbb::atomic<int> construction_counter;
 static tbb::atomic<int> destruction_counter;
@@ -57,44 +57,23 @@ const double EXPECTED_SUM = (REPETITIONS + 1) * N;
 //
 // A minimal class
 // Define: default and copy constructor, and allow implicit operator&
-// Hide: operator=
+// also operator=
 //
 
-class minimal: NoAssign {
+class minimal {
 private:
     int my_value;
 public:
     minimal(int val=0) : my_value(val) { ++construction_counter; }
     minimal( const minimal &m ) : my_value(m.my_value) { ++construction_counter; }
+    minimal& operator=(const minimal& other) { my_value = other.my_value; return *this; }
+    minimal& operator+=(const minimal& other) { my_value += other.my_value; return *this; }
+    operator int() const { return my_value; }
     ~minimal() { ++destruction_counter; }
     void set_value( const int i ) { my_value = i; }
     int value( ) const { return my_value; }
 };
 
-//
-// A helper class that simplifies writing the tests since minimal does not 
-// define = or + operators.
-//
-
-template< typename T >
-struct test_helper {
-   static inline void init(T &e) { e = static_cast<T>(0); }  
-   static inline void sum(T &e, const int addend ) { e += static_cast<T>(addend); }
-   static inline void sum(T &e, const double addend ) { e += static_cast<T>(addend); }
-   static inline void set(T &e, const int value ) { e = static_cast<T>(value); }
-   static inline double get(const T &e ) { return static_cast<double>(e); }
-};
-
-template< >
-struct test_helper<minimal> {
-   static inline void init(minimal &sum) { sum.set_value( 0 ); }  
-   static inline void sum(minimal &sum, const int addend ) { sum.set_value( sum.value() + addend); }
-   static inline void sum(minimal &sum, const double addend ) { sum.set_value( sum.value() + static_cast<int>(addend)); }
-   static inline void sum(minimal &sum, const minimal &addend ) { sum.set_value( sum.value() + addend.value()); }
-   static inline void set(minimal &v, const int value ) { v.set_value( static_cast<int>(value) ); }
-   static inline double get(const minimal &sum ) { return static_cast<double>(sum.value()); }
-};
-
 //// functors for initialization and combine
 
 // Addition
@@ -103,21 +82,11 @@ struct FunctorAddFinit {
     T operator()() { return 0; }
 };
 
-template <>
-struct FunctorAddFinit<minimal> {
-    minimal operator()() { return minimal(0); }
-};
-
 template <typename T>
 struct FunctorAddFinit7 {
     T operator()() { return 7; }
 };
 
-template <>
-struct FunctorAddFinit7<minimal> {
-    minimal operator()() { return minimal(7); }
-};
-
 template <typename T>
 struct FunctorAddCombine {
     T operator()(T left, T right ) const {
@@ -125,13 +94,6 @@ struct FunctorAddCombine {
     }
 };
 
-template <>
-struct FunctorAddCombine<minimal> {
-    minimal operator()(minimal left, minimal right ) {
-        return minimal(left.value() + right.value()); 
-    }
-};
-
 template <typename T>
 struct FunctorAddCombineRef {
     T operator()(const T& left, const T& right ) const {
@@ -139,13 +101,6 @@ struct FunctorAddCombineRef {
     }
 };
 
-template <>
-struct FunctorAddCombineRef<minimal> {
-    minimal operator()(const minimal& left, const minimal& right ) const {
-        return minimal(left.value() + right.value());
-    }
-};
-
 template <typename T>
 T my_finit( ) { return 0; }
 
@@ -155,39 +110,45 @@ T my_combine( T left, T right) { return left + right; }
 template <typename T>
 T my_combine_ref( const T &left, const T &right) { return left + right; }
 
-template <>
-minimal my_finit( ) { return minimal(0); }
-
-template <>
-minimal my_combine( minimal left, minimal right) { return minimal(left.value() + right.value()); }
-
-template <>
-minimal my_combine_ref( const minimal &left, const minimal &right) { return minimal(left.value() + right.value()); }
+template <typename T>
+class CombineEachHelper {
+public:
+    CombineEachHelper(T& _result) : my_result(_result) {}
+    void operator()(const T& new_bit) { my_result +=  new_bit; }
+    CombineEachHelper& operator=(const CombineEachHelper& other) { 
+        my_result =  other; 
+        return *this; 
+    }
+private:
+    T& my_result;
+};
 
 template <typename T>
-class combine_each_helper {
+class CombineEachHelperCnt {
 public:
-    combine_each_helper(T& _result) : my_result(_result) {}
-    void operator()(const T& new_bit) { test_helper<T>::sum(my_result, new_bit); }
-    combine_each_helper& operator=(const combine_each_helper& other) { 
-        test_helper<T>::set(my_result, test_helper<T>::get(other)); 
+    CombineEachHelperCnt(T& _result, int& _nbuckets) : my_result(_result), nBuckets(_nbuckets) {}
+    void operator()(const T& new_bit) { my_result +=  new_bit; ++nBuckets; }
+    CombineEachHelperCnt& operator=(const CombineEachHelperCnt& other) { 
+        my_result =  other.my_result; 
+        nBuckets = other.nBuckets;
         return *this; 
     }
 private:
     T& my_result;
+    int& nBuckets;
 };
 
 template <typename T>
-class combine_each_vector_helper: NoAssign {
+class CombineEachVectorHelper {
 public:
-    typedef std::vector<T, tbb::tbb_allocator<T> > container_type;
-    combine_each_vector_helper(T& _result) : my_result(_result) { }
-    // void operator()(const T& new_bit) { test_helper<T>::sum(my_result, new_bit); }
-    void operator()(const container_type& new_bit) { 
-        for(typename container_type::const_iterator ci = new_bit.begin(); ci != new_bit.end(); ++ci) {
-            test_helper<T>::sum(my_result, *ci);
+    typedef std::vector<T, tbb::tbb_allocator<T> > ContainerType;
+    CombineEachVectorHelper(T& _result) : my_result(_result) { }
+    void operator()(const ContainerType& new_bit) { 
+        for(typename ContainerType::const_iterator ci = new_bit.begin(); ci != new_bit.end(); ++ci) {
+            my_result +=  *ci;
         }
     }
+    CombineEachVectorHelper& operator=(const CombineEachVectorHelper& other) { my_result=other.my_result; return *this;}
 private:
     T& my_result;
 };
@@ -199,39 +160,37 @@ private:
 template< typename T >
 void run_serial_scalar_tests(const char *test_name) {
     tbb::tick_count t0;
-    T sum;
-    test_helper<T>::init(sum);
+    T sum = 0;
 
-    if (Verbose) printf("Testing serial %s... ", test_name);  
+    REMARK("Testing serial %s... ", test_name);
     for (int t = -1; t < REPETITIONS; ++t) {
         if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
         for (int i = 0; i < N; ++i) {
-            test_helper<T>::sum(sum,1); 
+            sum += 1; 
         }
     }
  
-    double result_value = test_helper<T>::get(sum);
-    ASSERT( EXPECTED_SUM == result_value, NULL);
-    if (Verbose)
-        printf("done\nserial %s, 0, %g, %g\n", test_name, result_value, ( tbb::tick_count::now() - t0).seconds());
+    double ResultValue = sum;
+    ASSERT( EXPECTED_SUM == ResultValue, NULL);
+    REMARK("done\nserial %s, 0, %g, %g\n", test_name, ResultValue, ( tbb::tick_count::now() - t0).seconds());
 }
 
 
 template <typename T>
-class parallel_scalar_body: NoAssign {
+class ParallelScalarBody: NoAssign {
     
     tbb::combinable<T> &sums;
  
 public:
 
-    parallel_scalar_body ( tbb::combinable<T> &_sums ) : sums(_sums) { }
+    ParallelScalarBody ( tbb::combinable<T> &_sums ) : sums(_sums) { }
 
     void operator()( const tbb::blocked_range<int> &r ) const {
         for (int i = r.begin(); i != r.end(); ++i) { 
             bool was_there;
             T& my_local = sums.local(was_there);
-            if(!was_there) test_helper<T>::init(my_local);
-            test_helper<T>::sum( my_local, 1 );
+            if(!was_there) my_local = 0;
+             my_local +=  1 ;
         }
     }
    
@@ -239,84 +198,80 @@ public:
 
 // parallel body with no test for first access.
 template <typename T>
-class parallel_scalar_body_noinit: NoAssign {
+class ParallelScalarBodyNoInit: NoAssign {
     
     tbb::combinable<T> &sums;
  
 public:
 
-    parallel_scalar_body_noinit ( tbb::combinable<T> &_sums ) : sums(_sums) { }
+    ParallelScalarBodyNoInit ( tbb::combinable<T> &_sums ) : sums(_sums) { }
 
     void operator()( const tbb::blocked_range<int> &r ) const {
         for (int i = r.begin(); i != r.end(); ++i) { 
-            test_helper<T>::sum( sums.local(), 1 );
+             sums.local() +=  1 ;
         }
     }
    
 };
 
 template< typename T >
-void run_parallel_scalar_tests(const char *test_name) {
+void RunParallelScalarTests(const char *test_name) {
 
     tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
-    T exemplar;
-    test_helper<T>::init(exemplar);
-    T exemplar23;
-    test_helper<T>::set(exemplar23,23);
 
     for (int p = MinThread; p <= MaxThread; ++p) { 
 
 
         if (p == 0) continue;
 
-        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p); 
+        REMARK("Testing parallel %s on %d thread(s)... ", test_name, p); 
         init.initialize(p);
 
         tbb::tick_count t0;
 
-        T assign_sum;
-        test_helper<T>::init(assign_sum);
+        T assign_sum(0);
+
+        T combine_sum(0);
 
-        T combine_sum;
-        test_helper<T>::init(combine_sum);
+        T combine_ref_sum(0);
 
-        T combine_ref_sum;
-        test_helper<T>::init(combine_ref_sum);
+        T combine_each_sum(0);
 
-        T combine_each_sum;
-        test_helper<T>::init(combine_each_sum);
+        T combine_finit_sum(0);
 
         for (int t = -1; t < REPETITIONS; ++t) {
             if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
 
             tbb::combinable<T> sums;
-            FunctorAddFinit<T> my_finit;
-            tbb::combinable<T> finit_combinable(my_finit);
+            FunctorAddFinit<T> my_finit_decl;
+            tbb::combinable<T> finit_combinable(my_finit_decl);
                                     
 
-            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body_noinit<T>( finit_combinable ) );
-            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body<T>( sums ) );
+            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), ParallelScalarBodyNoInit<T>( finit_combinable ) );
+            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), ParallelScalarBody<T>( sums ) );
 
             // Use combine
-            test_helper<T>::sum(combine_sum, sums.combine(my_combine<T>));
-            test_helper<T>::sum(combine_ref_sum, sums.combine(my_combine_ref<T>));
+            combine_sum +=  sums.combine(my_combine<T>);
+            combine_ref_sum +=  sums.combine(my_combine_ref<T>);
 
-            combine_each_helper<T> my_helper(combine_each_sum);
+            CombineEachHelper<T> my_helper(combine_each_sum);
             sums.combine_each(my_helper);
            
             // test assignment
             tbb::combinable<T> assigned;
             assigned = sums;
 
-            test_helper<T>::sum(assign_sum, assigned.combine(my_combine<T>));
+            assign_sum +=  assigned.combine(my_combine<T>);
+
+            combine_finit_sum += finit_combinable.combine(my_combine<T>);
         }
 
-        ASSERT( EXPECTED_SUM == test_helper<T>::get(combine_sum), NULL);
-        ASSERT( EXPECTED_SUM == test_helper<T>::get(combine_ref_sum), NULL);
-        ASSERT( EXPECTED_SUM == test_helper<T>::get(assign_sum), NULL);
+        ASSERT( EXPECTED_SUM == combine_sum, NULL);
+        ASSERT( EXPECTED_SUM == combine_ref_sum, NULL);
+        ASSERT( EXPECTED_SUM == assign_sum, NULL);
+        ASSERT( EXPECTED_SUM == combine_finit_sum, NULL);
 
-        if (Verbose)
-            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, test_helper<T>::get(combine_sum), 
+        REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, static_cast<double>(combine_sum), 
                                                       ( tbb::tick_count::now() - t0).seconds());
         init.terminate();
     }
@@ -324,17 +279,16 @@ void run_parallel_scalar_tests(const char *test_name) {
 
 
 template <typename T>
-class parallel_vector_for_body: NoAssign {
+class ParallelVectorForBody: NoAssign {
     
     tbb::combinable< std::vector<T, tbb::tbb_allocator<T> > > &locals;
  
 public:
 
-    parallel_vector_for_body ( tbb::combinable< std::vector<T, tbb::tbb_allocator<T> > > &_locals ) : locals(_locals) { }
+    ParallelVectorForBody ( tbb::combinable< std::vector<T, tbb::tbb_allocator<T> > > &_locals ) : locals(_locals) { }
 
     void operator()( const tbb::blocked_range<int> &r ) const {
-        T one;
-        test_helper<T>::set(one, 1);
+        T one = 1;
 
         for (int i = r.begin(); i < r.end(); ++i) {
             locals.local().push_back( one );
@@ -343,136 +297,159 @@ public:
    
 };
 
-template <typename R, typename T>
-struct parallel_vector_reduce_body {
-
-    T sum;    
-    size_t count;    
-
-    parallel_vector_reduce_body ( ) : count(0) { test_helper<T>::init(sum); }
-    parallel_vector_reduce_body ( parallel_vector_reduce_body<R, T> &, tbb::split ) : count(0) {  test_helper<T>::init(sum); }
-
-    void operator()( const R &r ) {
-        for (typename R::iterator ri = r.begin(); ri != r.end(); ++ri) {
-            const std::vector< T, tbb::tbb_allocator<T>  > &v = *ri; 
-            ++count;
-            for (typename std::vector<T, tbb::tbb_allocator<T> >::const_iterator vi = v.begin(); vi != v.end(); ++vi) {
-                test_helper<T>::sum(sum, *vi);
-            }
-        }
-    }
-
-    void join( const parallel_vector_reduce_body &b ) {
-        test_helper<T>::sum(sum,b.sum);
-        count += b.count;
-    }
-   
-};
-
 template< typename T >
-void run_parallel_vector_tests(const char *test_name) {
+void RunParallelVectorTests(const char *test_name) {
     tbb::tick_count t0;
     tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
-    typedef std::vector<T, tbb::tbb_allocator<T> > container_type;
+    typedef std::vector<T, tbb::tbb_allocator<T> > ContainerType;
 
     for (int p = MinThread; p <= MaxThread; ++p) { 
 
         if (p == 0) continue;
-        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p);
+        REMARK("Testing parallel %s on %d thread(s)... ", test_name, p);
         init.initialize(p);
 
-        T sum;
-        T sum2;
-        T sum3;
-        test_helper<T>::init(sum);
-        test_helper<T>::init(sum2);
-        test_helper<T>::init(sum3);
+        T sum = 0;
+        T sum2 = 0;
+        T sum3 = 0;
 
         for (int t = -1; t < REPETITIONS; ++t) {
             if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
-            typedef typename tbb::combinable< container_type > combinable_type;
-            combinable_type vs;
+            typedef typename tbb::combinable< ContainerType > CombinableType;
+            CombinableType vs;
 
-            tbb::parallel_for ( tbb::blocked_range<int> (0, N, 10000), parallel_vector_for_body<T>( vs ) );
+            tbb::parallel_for ( tbb::blocked_range<int> (0, N, 10000), ParallelVectorForBody<T>( vs ) );
 
             // copy construct
-            combinable_type vs2(vs); // this causes an assertion failure, related to allocators...
+            CombinableType vs2(vs); // this causes an assertion failure, related to allocators...
 
             // assign
-            combinable_type vs3;
+            CombinableType vs3;
             vs3 = vs;
 
-            combine_each_vector_helper<T> my_combine_each(sum);
-            vs.combine_each(my_combine_each);
+            CombineEachVectorHelper<T> MyCombineEach(sum);
+            vs.combine_each(MyCombineEach);
 
-            combine_each_vector_helper<T> my_combine_each2(sum2);
-            vs2.combine_each(my_combine_each2);
+            CombineEachVectorHelper<T> MyCombineEach2(sum2);
+            vs2.combine_each(MyCombineEach2);
 
-            combine_each_vector_helper<T> my_combine_each3(sum3);
-            vs2.combine_each(my_combine_each3);
+            CombineEachVectorHelper<T> MyCombineEach3(sum3);
+            vs2.combine_each(MyCombineEach3);
             // combine_each sums all elements of each vector into the result.
         }
 
-        double result_value = test_helper<T>::get(sum);
-        ASSERT( EXPECTED_SUM == result_value, NULL);
-        result_value = test_helper<T>::get(sum2);
-        ASSERT( EXPECTED_SUM == result_value, NULL);
-        result_value = test_helper<T>::get(sum3);
-        ASSERT( EXPECTED_SUM == result_value, NULL);
-        if (Verbose)
-            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, result_value, ( tbb::tick_count::now() - t0).seconds());
+        double ResultValue = sum;
+        ASSERT( EXPECTED_SUM == ResultValue, NULL);
+        ResultValue = sum2;
+        ASSERT( EXPECTED_SUM == ResultValue, NULL);
+        ResultValue = sum3;
+        ASSERT( EXPECTED_SUM == ResultValue, NULL);
+        REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, ResultValue, ( tbb::tick_count::now() - t0).seconds());
         init.terminate();
     }
 }
 
+#include "harness_barrier.h"
+
+Harness::SpinBarrier sBarrier;
+
+struct Body : NoAssign {
+    tbb::combinable<int>* locals;
+    const int nthread;
+    const int nIters;
+    Body( int nthread_, int niters_ ) : nthread(nthread_), nIters(niters_) { sBarrier.initialize(nthread_); }
+
+
+    void operator()(int thread_id ) const {
+        bool existed;
+        sBarrier.wait();
+        for(int i = 0; i < nIters; ++i ) {
+            existed = thread_id & 1;
+            int oldval = locals->local(existed);
+            ASSERT(existed == (i > 0), "Error on first reference");
+            ASSERT(!existed || (oldval == thread_id), "Error on fetched value");
+            existed = thread_id & 1;
+            locals->local(existed) = thread_id;
+            ASSERT(existed, "Error on assignment");
+        }
+    }
+};
+
+void
+TestLocalAllocations( int nthread ) {
+    ASSERT(nthread > 0, "nthread must be positive");
+#define NITERATIONS 1000
+    Body myBody(nthread, NITERATIONS);
+    tbb::combinable<int> myCombinable;
+    myBody.locals = &myCombinable;
+
+    NativeParallelFor( nthread, myBody );
+
+    int mySum = 0;
+    int mySlots = 0;
+    CombineEachHelperCnt<int> myCountCombine(mySum, mySlots);
+    myCombinable.combine_each(myCountCombine);
+
+    ASSERT(nthread == mySlots, "Incorrect number of slots");
+    ASSERT(mySum == (nthread - 1) * nthread / 2, "Incorrect values in result");
+}
+
+
 void 
-run_parallel_tests() {
-    run_parallel_scalar_tests<int>("int");
-    run_parallel_scalar_tests<double>("double");
-    run_parallel_scalar_tests<minimal>("minimal");
-    run_parallel_vector_tests<int>("std::vector<int, tbb::tbb_allocator<int> >");
-    run_parallel_vector_tests<double>("std::vector<double, tbb::tbb_allocator<double> >");
+RunParallelTests() {
+    RunParallelScalarTests<int>("int");
+    RunParallelScalarTests<double>("double");
+    RunParallelScalarTests<minimal>("minimal");
+    RunParallelVectorTests<int>("std::vector<int, tbb::tbb_allocator<int> >");
+    RunParallelVectorTests<double>("std::vector<double, tbb::tbb_allocator<double> >");
 }
 
 template <typename T>
 void
-run_assign_and_copy_constructor_test(const char *test_name) {
-    if (Verbose) printf("Testing assignment and copy construction for %s\n", test_name);
+RunAssignmentAndCopyConstructorTest(const char *test_name) {
+    REMARK("Testing assignment and copy construction for %s\n", test_name);
 
     // test creation with finit function (combine returns finit return value if no threads have created locals)
-    FunctorAddFinit7<T> my_finit7;
-    tbb::combinable<T> create2(my_finit7);
-    ASSERT(7 == test_helper<T>::get(create2.combine(my_combine<T>)), NULL);
+    FunctorAddFinit7<T> my_finit7_decl;
+    tbb::combinable<T> create2(my_finit7_decl);
+    ASSERT(7 == create2.combine(my_combine<T>), NULL);
 
     // test copy construction with function initializer
     tbb::combinable<T> copy2(create2);
-    ASSERT(7 == test_helper<T>::get(copy2.combine(my_combine<T>)), NULL);
+    ASSERT(7 == copy2.combine(my_combine<T>), NULL);
 
     // test copy assignment with function initializer
-    FunctorAddFinit<T> my_finit;
-    tbb::combinable<T> assign2(my_finit);
+    FunctorAddFinit<T> my_finit_decl;
+    tbb::combinable<T> assign2(my_finit_decl);
     assign2 = create2;
-    ASSERT(7 == test_helper<T>::get(assign2.combine(my_combine<T>)), NULL);
+    ASSERT(7 == assign2.combine(my_combine<T>), NULL);
 }
 
 void
-run_assignment_and_copy_constructor_tests() {
-    if(Verbose) printf("Running assignment and copy constructor tests\n");
-    run_assign_and_copy_constructor_test<int>("int");
-    run_assign_and_copy_constructor_test<double>("double");
-    run_assign_and_copy_constructor_test<minimal>("minimal");
+RunAssignmentAndCopyConstructorTests() {
+    REMARK("Running assignment and copy constructor tests\n");
+    RunAssignmentAndCopyConstructorTest<int>("int");
+    RunAssignmentAndCopyConstructorTest<double>("double");
+    RunAssignmentAndCopyConstructorTest<minimal>("minimal");
 }
 
+__TBB_TEST_EXPORT
 int main(int argc, char *argv[]) {
    ParseCommandLine(argc, argv);
 
    if (MaxThread > 0) {
-      run_parallel_tests();
+      RunParallelTests();
    }
 
-    run_assignment_and_copy_constructor_tests();
+    RunAssignmentAndCopyConstructorTests();
+    for(int i = 1 <= MinThread ? MinThread : 1; i <= MaxThread; ++i) {
+        REMARK("Testing local() allocation with nthreads=%d\n", i);
+        for(int j = 0; j < 100; ++j) {
+            TestLocalAllocations(i);
+        }
+    }
 
-   printf("done\n");
+   REPORT("done\n");
    return 0;
 }
 
diff --git a/src/test/test_compiler.cpp b/src/test/test_compiler.cpp
index a6b6583..827d427 100644
--- a/src/test/test_compiler.cpp
+++ b/src/test/test_compiler.cpp
@@ -26,7 +26,8 @@
     the GNU General Public License.
 */
 
-#include <stdio.h>
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
 
 union char2bool {
     unsigned char c;
@@ -44,17 +45,18 @@ int test_bool_representation() {
         u.c = (unsigned char)i;
         unsigned char x = (unsigned char)u.b;
         if( x != i ) {
-            printf("Test failed at iteration i=%d\n",i);
+            REPORT("Test failed at iteration i=%d\n",i);
             return 1;
         }
     }
     return 0;
 }
 
+__TBB_TEST_EXPORT
 int main() {
     if( test_bool_representation()!=0 )
-        printf("ERROR: bool representation test failed\n");
+        REPORT("ERROR: bool representation test failed\n");
     else
-        printf("done\n");
+        REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_concurrent_hash_map.cpp b/src/test/test_concurrent_hash_map.cpp
index 9f24220..001ecdd 100644
--- a/src/test/test_concurrent_hash_map.cpp
+++ b/src/test/test_concurrent_hash_map.cpp
@@ -72,7 +72,7 @@ public:
     virtual ~MyException() throw() {}
 };
 
-/** Has tighly controlled interface so that we can verify
+/** Has tightly controlled interface so that we can verify
     that concurrent_hash_map uses only the required interface. */
 class MyKey {
 private:
@@ -100,7 +100,7 @@ protected:
         LIVE=0x1234,
         DEAD=0x5678
     } my_state;
-    void operator=( const MyData& );    // Deny acces
+    void operator=( const MyData& );    // Deny access
 public:
     MyData(int i = 0) {
         my_state = LIVE;
@@ -195,8 +195,7 @@ template<typename MyTable>
 inline void CheckAllocator(MyTable &table, size_t expected_allocs, size_t expected_frees, bool exact = true) {
     size_t items_allocated = table.get_allocator().items_allocated, items_freed = table.get_allocator().items_freed;
     size_t allocations = table.get_allocator().allocations, frees = table.get_allocator().frees;
-    if(Verbose)
-        printf("checking allocators: items %u/%u, allocs %u/%u\n",
+    REMARK("checking allocators: items %u/%u, allocs %u/%u\n",
             unsigned(items_allocated), unsigned(items_freed), unsigned(allocations), unsigned(frees) );
     ASSERT( items_allocated == allocations, NULL); ASSERT( items_freed == frees, NULL);
     if(exact) {
@@ -243,7 +242,7 @@ struct Find {
         ASSERT( b==!a.empty(), NULL );
         if( b ) {
             if( !UseKey(i) )
-                printf("Line %d: unexpected key %d present\n",__LINE__,i);
+                REPORT("Line %d: unexpected key %d present\n",__LINE__,i);
             AssertSameType( &*a, static_cast<MyTable::value_type*>(0) );
             ASSERT( ca->second.value_of()==i*i, NULL );
             ASSERT( (*ca).second.value_of()==i*i, NULL );
@@ -253,7 +252,7 @@ struct Find {
                 (*ca).second.set_value( ~ca->second.value_of() );
         } else {
             if( UseKey(i) ) 
-                printf("Line %d: key %d missing\n",__LINE__,i);
+                REPORT("Line %d: key %d missing\n",__LINE__,i);
         }
     }
 };
@@ -344,19 +343,16 @@ public:
 
 template<typename Op, typename TableType>
 void DoConcurrentOperations( TableType& table, int n, const char* what, int nthread ) {
-    if( Verbose ) 
-        printf("testing %s with %d threads\n",what,nthread);
+    REMARK("testing %s with %d threads\n",what,nthread);
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for( tbb::blocked_range<int>(0,n,100), TableOperation<Op,TableType>(table) );
     tbb::tick_count t1 = tbb::tick_count::now();
-    if( Verbose )
-        printf("time for %s = %g with %d threads\n",what,(t1-t0).seconds(),nthread);
+    REMARK("time for %s = %g with %d threads\n",what,(t1-t0).seconds(),nthread);
 }
 
 //! Test traversing the table with an iterator.
 void TraverseTable( MyTable& table, size_t n, size_t expected_size ) {
-    if( Verbose ) 
-        printf("testing traversal\n");
+    REMARK("testing traversal\n");
     size_t actual_size = table.size();
     ASSERT( actual_size==expected_size, NULL );
     size_t count = 0;
@@ -389,7 +385,7 @@ void TraverseTable( MyTable& table, size_t n, size_t expected_size ) {
     ASSERT( ci==const_table.end(), NULL );
     delete[] array;
     if( count!=expected_size ) {
-        printf("Line %d: count=%ld but should be %ld\n",__LINE__,long(count),long(expected_size));
+        REPORT("Line %d: count=%ld but should be %ld\n",__LINE__,long(count),long(expected_size));
     }
 }
 
@@ -416,7 +412,7 @@ void Check( AtomicByte array[], size_t n, size_t expected_size ) {
     if( expected_size )
         for( size_t k=0; k<n; ++k ) {
             if( array[k] != int(UseKey(k)) ) {
-                printf("array[%d]=%d != %d=UseKey(%d)\n",
+                REPORT("array[%d]=%d != %d=UseKey(%d)\n",
                        int(k), int(array[k]), int(UseKey(k)), int(k));
                 ASSERT(false,NULL);
             }
@@ -425,8 +421,7 @@ void Check( AtomicByte array[], size_t n, size_t expected_size ) {
 
 //! Test travering the tabel with a parallel range
 void ParallelTraverseTable( MyTable& table, size_t n, size_t expected_size ) {
-    if( Verbose ) 
-        printf("testing parallel traversal\n");
+    REMARK("testing parallel traversal\n");
     ASSERT( table.size()==expected_size, NULL );
     AtomicByte* array = new AtomicByte[n];
 
@@ -560,8 +555,7 @@ public:
 
 //! Test for memory leak in concurrent_hash_map (TR #153).
 void TestConcurrency( int nthread ) {
-    if( Verbose ) 
-        printf("testing multiple insertions/deletions of same key with %d threads\n", nthread);
+    REMARK("testing multiple insertions/deletions of same key with %d threads\n", nthread);
     {
         ASSERT( MyDataCount==0, NULL );
         MyTable table;
@@ -570,16 +564,14 @@ void TestConcurrency( int nthread ) {
         tbb::tick_count t0 = tbb::tick_count::now();
         NativeParallelFor( nthread, AddToTable(table,nthread,m) );
         tbb::tick_count t1 = tbb::tick_count::now();
-        if( Verbose )
-            printf("time for %u insertions = %g with %d threads\n",unsigned(MyDataCount),(t1-t0).seconds(),nthread);
+        REMARK("time for %u insertions = %g with %d threads\n",unsigned(MyDataCount),(t1-t0).seconds(),nthread);
         ASSERT( MyDataCount==m, "memory leak detected" );
 
         EraseCount = 0;
         t0 = tbb::tick_count::now();
         NativeParallelFor( nthread, RemoveFromTable(table,nthread,m) );
         t1 = tbb::tick_count::now();
-        if( Verbose )
-            printf("time for %u deletions = %g with %d threads\n",unsigned(EraseCount),(t1-t0).seconds(),nthread);
+        REMARK("time for %u deletions = %g with %d threads\n",unsigned(EraseCount),(t1-t0).seconds(),nthread);
         ASSERT( MyDataCount==0, "memory leak detected" );
         ASSERT( EraseCount==m, "return value of erase() is broken" );
 
@@ -629,10 +621,10 @@ void TestRangeAssignment( Range2 r2 ) {
 template<typename MyTable>
 static void FillTable( MyTable& x, int n ) {
     for( int i=1; i<=n; ++i ) {
-        MyKey key( MyKey::make(i) );
+        MyKey key( MyKey::make(-i) ); // hash values must not be specified in direct order
         typename MyTable::accessor a;
         bool b = x.insert(a,key); 
-        ASSERT(b,NULL); 
+        ASSERT(b, NULL);
         a->second.set_value( i*i );
     }
 }
@@ -643,7 +635,7 @@ static void CheckTable( const MyTable& x, int n ) {
     ASSERT( x.empty()==(n==0), NULL );
     ASSERT( x.size()<=x.max_size(), NULL );
     for( int i=1; i<=n; ++i ) {
-        MyKey key( MyKey::make(i) );
+        MyKey key( MyKey::make(-i) );
         typename MyTable::const_accessor a;
         bool b = x.find(a,key); 
         ASSERT( b, NULL ); 
@@ -653,21 +645,20 @@ static void CheckTable( const MyTable& x, int n ) {
     int key_sum = 0;
     for( typename MyTable::const_iterator i(x.begin()); i!=x.end(); ++i ) {
         ++count;
-        key_sum += i->first.value_of();
+        key_sum += -i->first.value_of();
     }
     ASSERT( count==n, NULL );
     ASSERT( key_sum==n*(n+1)/2, NULL );
 }
 
 static void TestCopy() {
-    if( Verbose )
-        printf("testing copy\n");
+    REMARK("testing copy\n");
     MyTable t1;
     for( int i=0; i<10000; i=(i<100 ? i+1 : i*3) ) {
         MyDataCount = 0;
 
-        FillTable( t1, i );
-        CheckTable(t1,i);
+        FillTable(t1,i);
+        // Do not call CheckTable(t1,i) before copying, it enforces rehashing
 
         MyTable t2(t1);
         // Check that copy constructor did not mangle source table.
@@ -692,8 +683,7 @@ static void TestCopy() {
 }
 
 void TestAssignment() {
-    if( Verbose )
-        printf("testing assignment\n");
+    REMARK("testing assignment\n");
     for( int i=0; i<1000; i=(i<30 ? i+1 : i*5) ) {
         for( int j=0; j<1000; j=(j<30 ? j+1 : j*7) ) {
             MyTable t1;
@@ -701,11 +691,11 @@ void TestAssignment() {
             FillTable(t1,i);
             FillTable(t2,j);
             ASSERT( (t1 == t2) == (i == j), NULL );
-            CheckTable(t1,i);
             CheckTable(t2,j);
 
             MyTable& tref = t2=t1; 
             ASSERT( &tref==&t2, NULL );
+            ASSERT( t1 == t2, NULL );
             CheckTable(t1,i);
             CheckTable(t2,i);
 
@@ -723,8 +713,7 @@ void TestAssignment() {
 }
 
 void TestIteratorsAndRanges() {
-    if( Verbose )
-        printf("testing iterators compliance\n");
+    REMARK("testing iterators compliance\n");
     TestIteratorTraits<MyTable::iterator,MyTable::value_type>();
     TestIteratorTraits<MyTable::const_iterator,const MyTable::value_type>();
 
@@ -740,15 +729,13 @@ void TestIteratorsAndRanges() {
     ASSERT(v.equal_range(MyKey::make(-1)) == std::make_pair(v.end(), v.end()), NULL);
     ASSERT(u.equal_range(MyKey::make(-1)) == std::make_pair(u.end(), u.end()), NULL);
 
-    if( Verbose )
-        printf("testing ranges compliance\n");
+    REMARK("testing ranges compliance\n");
     TestRangeAssignment<MyTable::const_range_type>( u.range() );
     TestRangeAssignment<MyTable::const_range_type>( v.range() );
     TestRangeAssignment<MyTable::range_type>( v.range() );
     // doesn't compile as expected: TestRangeAssignment<typename V::range_type>( u.range() );
 
-    if( Verbose )
-        printf("testing construction and insertion from iterators range\n");
+    REMARK("testing construction and insertion from iterators range\n");
     FillTable( v, 1000 );
     MyTable2 t(v.begin(), v.end());
     CheckTable(t, 1000);
@@ -758,15 +745,14 @@ void TestIteratorsAndRanges() {
     t.insert(v.begin(), v.end()); // restore
     CheckTable(t, 1000);
 
-    if( Verbose )
-        printf("testing comparison\n");
+    REMARK("testing comparison\n");
     typedef tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare,MyAllocator> YourTable1;
     typedef tbb::concurrent_hash_map<MyKey,MyData2,YourHashCompare> YourTable2;
     YourTable1 t1;
     FillTable( t1, 10 );
     CheckTable(t1, 10 );
     YourTable2 t2(t1.begin(), t1.end());
-    MyKey key( MyKey::make(5) ); MyData2 data;
+    MyKey key( MyKey::make(-5) ); MyData2 data;
     ASSERT(t2.erase(key), NULL);
     YourTable2::accessor a;
     ASSERT(t2.insert(a, key), NULL);
@@ -784,8 +770,7 @@ void TestExceptions() {
         ctor_copy, op_assign, op_insert,
         all_methods
     };
-    if( Verbose )
-        printf("testing exception-safety guarantees\n");
+    REMARK("testing exception-safety guarantees\n");
     ThrowingTable src;
     FillTable( src, 1000 );
     ASSERT( MyDataCount==1000, NULL );
@@ -834,7 +819,7 @@ void TestExceptions() {
 
                 default:; // nothing to check here
                 }
-                if( Verbose ) printf("Exception %d: %s\t- ok ()\n", m, e.what());
+                REMARK("Exception %d: %s\t- ok ()\n", m, e.what());
             }
         }
     } catch(...) {
@@ -849,14 +834,14 @@ void TestExceptions() {
 
 #include "tbb/task_scheduler_init.h"
 
-//! Test driver
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Default minimum number of threads is 1.
     MinThread = 1;
 
     ParseCommandLine(argc,argv);
     if( MinThread<0 ) {
-        printf("ERROR: must use at least one thread\n");
+        REPORT("ERROR: must use at least one thread\n");
         exit(1);
     }
 
@@ -865,7 +850,9 @@ int main( int argc, char* argv[] ) {
     TestCopy();
     TestAssignment();
     TestIteratorsAndRanges();
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
     TestExceptions();
+#endif
 
     // Do concurrency tests.
     for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) {
@@ -878,6 +865,6 @@ int main( int argc, char* argv[] ) {
         tbb::internal::runtime_warning("none\nERROR: it must not be executed");
     }
 
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_concurrent_queue.cpp b/src/test/test_concurrent_queue.cpp
index a5351ef..b0a3cf6 100644
--- a/src/test/test_concurrent_queue.cpp
+++ b/src/test/test_concurrent_queue.cpp
@@ -213,8 +213,9 @@ void TestPushPop( size_t prefill, ptrdiff_t capacity, int nthread ) {
         tbb::tick_count t1 = tbb::tick_count::now();
 #if !__TBB_FLOATING_POINT_BROKEN
         double timing = (t1-t0).seconds();
-        if( Verbose )
-            printf("prefill=%d capacity=%d time = %g = %g nsec/operation\n", int(prefill), int(capacity), timing, timing/(2*M*nthread)*1.E9);
+        REMARK("prefill=%d capacity=%d time = %g = %g nsec/operation\n", int(prefill), int(capacity), timing, timing/(2*M*nthread)*1.E9);
+#else
+        ((void)capacity);   // touch it to suppress the warning
 #endif /* !__TBB_FLOATING_POINT_BROKEN */
         int sum = 0;
         for( int k=0; k<nthread; ++k )
@@ -231,7 +232,7 @@ void TestPushPop( size_t prefill, ptrdiff_t capacity, int nthread ) {
         ASSERT( queue.empty(), NULL );
         ASSERT( queue.SIZE()==0, NULL );
         if( sum!=expected )
-            printf("sum=%d expected=%d\n",sum,expected);
+            REPORT("sum=%d expected=%d\n",sum,expected);
         ASSERT( FooConstructed==FooDestroyed, NULL );
         // TODO: checks by counting allocators
 
@@ -252,12 +253,12 @@ void TestPushPop( size_t prefill, ptrdiff_t capacity, int nthread ) {
                 if( PopKind[k]<min_requirement ) {
                     if( trial>=max_trial ) {
                         if( Verbose )
-                            printf("Warning: %d threads had only %ld pop_if_present operations %s after %d trials (expected at least %d). "
+                            REPORT("Warning: %d threads had only %ld pop_if_present operations %s after %d trials (expected at least %d). "
                                "This problem may merely be unlucky scheduling. "
                                "Investigate only if it happens repeatedly.\n",
                                nthread, long(PopKind[k]), k==0?"failed":"succeeded", max_trial, min_requirement);
                         else
-                            printf("Warning: the number of %s pop_if_present operations is less than expected for %d threads. Investigate if it happens repeatedly.\n",
+                            REPORT("Warning: the number of %s pop_if_present operations is less than expected for %d threads. Investigate if it happens repeatedly.\n",
                                k==0?"failed":"succeeded", nthread ); 
 
                     } else {
@@ -502,7 +503,7 @@ void TestConstructors ()
     ASSERT( iter==src_queue.unsafe_end(), "different size?" );
 
 #if __TBB_EXCEPTION_HANDLING_BROKEN || __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN
-    printf("Warning: Part of the constructor test is skipped due to a known issue.\n");
+    REPORT("Warning: Part of the constructor test is skipped due to a known issue.\n");
 #else
     k = 0;
 #if TBB_DEPRECATED==0
@@ -754,8 +755,7 @@ void TestExceptions() {
         m_pop
     };  
 
-    if( Verbose )
-        printf("Testing exception safety\n");
+    REMARK("Testing exception safety\n");
     // verify 'clear()' on exception; queue's destructor calls its clear()
     {
         concur_queue_t queue_clear;
@@ -768,8 +768,7 @@ void TestExceptions() {
             // TODO: some assert here?
         }
     }
-    if( Verbose )
-        printf("... queue destruction test passed\n");
+    REMARK("... queue destruction test passed\n");
 
     try {
         int n_pushed=0, n_popped=0;
@@ -846,8 +845,7 @@ void TestExceptions() {
                             break;
                     }
                 }
-                if( Verbose )
-                    printf("... for t=%d and m=%d, exception test passed\n", t, m);
+                REMARK("... for t=%d and m=%d, exception test passed\n", t, m);
             }
         }
     } catch(...) {
@@ -855,6 +853,7 @@ void TestExceptions() {
     }
 }
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Set default for minimum number of threads.
     MinThread = 1;
@@ -884,10 +883,10 @@ int main( int argc, char* argv[] ) {
         }
     }
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-    printf("Warning: Exception safety test is skipped due to a known issue.\n");
+    REPORT("Warning: Exception safety test is skipped due to a known issue.\n");
 #else
     TestExceptions();
 #endif
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_concurrent_vector.cpp b/src/test/test_concurrent_vector.cpp
index f620301..37a7100 100644
--- a/src/test/test_concurrent_vector.cpp
+++ b/src/test/test_concurrent_vector.cpp
@@ -33,11 +33,12 @@
 #include <cstdio>
 #include <cstdlib>
 #include <stdexcept>
+#include "harness_report.h"
 #include "harness_assert.h"
 #include "harness_allocator.h"
 
 static bool known_issue_verbose = false;
-#define KNOWN_ISSUE(msg) if(!known_issue_verbose) known_issue_verbose = true, printf(msg)
+#define KNOWN_ISSUE(msg) if(!known_issue_verbose) known_issue_verbose = true, REPORT(msg)
 
 tbb::atomic<long> FooCount;
 long MaxFooCount = 0;
@@ -52,63 +53,73 @@ public:
     virtual ~Foo_exception() throw() {}
 };
 
+static const int initial_value_of_bar = 42;
 struct Foo {
     int my_bar;
 public:
     enum State {
         ZeroInitialized=0,
-        DefaultInitialized=0x1234,
-        CopyInitialized=0x8765,
-        Destroyed=0x5678
+        DefaultInitialized=0xDEFAUL,
+        CopyInitialized=0xC0314,
+        Destroyed=0xDEADF00
     } state;
+    bool is_valid() const {
+        return state==DefaultInitialized||state==CopyInitialized;
+    }
+    bool is_valid_or_zero() const {
+        return is_valid()||(state==ZeroInitialized && !my_bar);
+    }
     int& zero_bar() {
-        ASSERT( state==DefaultInitialized||state==CopyInitialized||state==ZeroInitialized, NULL );
+        ASSERT( is_valid_or_zero(), NULL );
         return my_bar;
     }
     int& bar() {
-        ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL );
+        ASSERT( is_valid(), NULL );
         return my_bar;
     }
     int bar() const {
-        ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL );
+        ASSERT( is_valid(), NULL );
         return my_bar;
     }
-    static const int initial_value_of_bar = 42;
     Foo( int bar = initial_value_of_bar ) {
-        state = DefaultInitialized;
+        my_bar = bar;
         if(MaxFooCount && FooCount >= MaxFooCount)
             throw Foo_exception();
-        ++FooCount;
-        my_bar = bar;
+        FooCount++;
+        state = DefaultInitialized;
     }
     Foo( const Foo& foo ) {
-        state = CopyInitialized;
+        my_bar = foo.my_bar;
+        ASSERT( foo.is_valid_or_zero(), "bad source for copy" );
         if(MaxFooCount && FooCount >= MaxFooCount)
             throw Foo_exception();
-        ++FooCount;
-        my_bar = foo.my_bar;
+        FooCount++;
+        state = CopyInitialized;
     }
     ~Foo() {
-        ASSERT( state==DefaultInitialized||state==CopyInitialized||(state==ZeroInitialized && !my_bar), NULL );
-        state = Destroyed;
+        ASSERT( is_valid_or_zero(), NULL );
         my_bar = ~initial_value_of_bar;
-        --FooCount;
+        if(state != ZeroInitialized) --FooCount;
+        state = Destroyed;
     }
     bool operator==(const Foo &f) const { return my_bar == f.my_bar; }
     bool operator<(const Foo &f) const { return my_bar < f.my_bar; }
     bool is_const() const {return true;}
     bool is_const() {return false;}
-private:
+protected:
     char reserve[1];
+    void operator=( const Foo& ) {}
 };
 
 class FooWithAssign: public Foo {
 public:
     void operator=( const FooWithAssign& x ) {
-        ASSERT( x.state==DefaultInitialized||x.state==CopyInitialized, NULL );
-        ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL );
         my_bar = x.my_bar;
+        ASSERT( x.is_valid_or_zero(), "bad source for assignment" );
+        ASSERT( is_valid(), NULL );
     } 
+    bool operator==(const Foo &f) const { return my_bar == f.my_bar; }
+    bool operator<(const Foo &f) const { return my_bar < f.my_bar; }
 };
 
 class FooIterator: public std::iterator<std::input_iterator_tag,FooWithAssign> {
@@ -140,13 +151,13 @@ static void CheckVector( const vector_t& cv, size_t expected_size, size_t old_si
     ASSERT( cv.empty()==(expected_size==0), NULL );
     for( int j=0; j<int(expected_size); ++j ) {
         if( cv[j].bar()!=~j )
-            std::printf("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
+            REPORT("ERROR on line %d for old_size=%ld expected_size=%ld j=%d\n",__LINE__,long(old_size),long(expected_size),j);
     }
 }
 
 //! Test of assign, grow, copying with various sizes
 void TestResizeAndCopy() {
-    typedef static_counting_allocator<std::allocator<Foo>, std::size_t> allocator_t;
+    typedef static_counting_allocator<debug_allocator<Foo,std::allocator>, std::size_t> allocator_t;
     typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
     allocator_t::init_counters();
     for( int old_size=0; old_size<=128; NextSize( old_size ) ) {
@@ -164,7 +175,7 @@ void TestResizeAndCopy() {
             for( int j=0; j<new_size; ++j ) {
                 int expected = j<old_size ? j : 33;
                 if( v[j].bar()!=expected ) 
-                    std::printf("ERROR on line %d for old_size=%ld new_size=%ld v[%ld].bar()=%d != %d\n",__LINE__,long(old_size),long(new_size),long(j),v[j].bar(), expected);
+                    REPORT("ERROR on line %d for old_size=%ld new_size=%ld v[%ld].bar()=%d != %d\n",__LINE__,long(old_size),long(new_size),long(j),v[j].bar(), expected);
             }
             ASSERT( v.size()==size_t(new_size), NULL );
             for( int j=0; j<new_size; ++j ) {
@@ -188,7 +199,7 @@ void TestResizeAndCopy() {
 
 //! Test reserve, compact, capacity
 void TestCapacity() {
-    typedef static_counting_allocator<tbb::cache_aligned_allocator<Foo>, std::size_t> allocator_t;
+    typedef static_counting_allocator<debug_allocator<Foo,tbb::cache_aligned_allocator>, std::size_t> allocator_t;
     typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
     allocator_t::init_counters();
     for( size_t old_size=0; old_size<=11000; old_size=(old_size<5 ? old_size+1 : 3*old_size) ) {
@@ -233,7 +244,7 @@ struct AssignElement {
     void operator()( const tbb::concurrent_vector<int>::range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i ) {
             if( *i!=0 )
-                std::printf("ERROR for v[%ld]\n", long(i-base));
+                REPORT("ERROR for v[%ld]\n", long(i-base));
             *i = int(i-base);
         }
     }
@@ -246,7 +257,7 @@ struct CheckElement {
     void operator()( const tbb::concurrent_vector<int>::const_range_type& range ) const {
         for( iterator i=range.begin(); i!=range.end(); ++i )
             if( *i != int(i-base) )
-                std::printf("ERROR for v[%ld]\n", long(i-base));
+                REPORT("ERROR for v[%ld]\n", long(i-base));
     }
     CheckElement( iterator base_ ) : base(base_) {}
 };
@@ -261,19 +272,17 @@ void TestParallelFor( int nthread ) {
     vector_t v;
     v.resize(N);
     tbb::tick_count t0 = tbb::tick_count::now();
-    if( Verbose )
-        std::printf("Calling parallel_for with %ld threads\n",long(nthread));
+    REMARK("Calling parallel_for with %ld threads\n",long(nthread));
     tbb::parallel_for( v.range(10000), AssignElement(v.begin()) );
     tbb::tick_count t1 = tbb::tick_count::now();
     const vector_t& u = v;
     tbb::parallel_for( u.range(10000), CheckElement(u.begin()) );
     tbb::tick_count t2 = tbb::tick_count::now();
-    if( Verbose )
-        std::printf("Time for parallel_for: assign time = %8.5f, check time = %8.5f\n",
+    REMARK("Time for parallel_for: assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
     for( long i=0; size_t(i)<v.size(); ++i )
         if( v[i]!=i )
-            std::printf("ERROR for v[%ld]\n", i);
+            REPORT("ERROR for v[%ld]\n", i);
 }
 
 template<typename Iterator1, typename Iterator2>
@@ -308,11 +317,11 @@ template<typename Vector, typename Iterator>
 void CheckConstIterator( const Vector& u, int i, const Iterator& cp ) {
     typename Vector::const_reference pref = *cp;
     if( pref.bar()!=i )
-        std::printf("ERROR for u[%ld] using const_iterator\n", long(i));
+        REPORT("ERROR for u[%ld] using const_iterator\n", long(i));
     typename Vector::difference_type delta = cp-u.begin();
     ASSERT( delta==i, NULL );
     if( u[i].bar()!=i )
-        std::printf("ERROR for u[%ld] using subscripting\n", long(i));
+        REPORT("ERROR for u[%ld] using subscripting\n", long(i));
     ASSERT( u.begin()[i].bar()==i, NULL );
 }
 
@@ -345,9 +354,9 @@ void CheckIteratorComparison( V& u ) {
 /** Also does timing. */
 template<typename T>
 void TestSequentialFor() {
-    typedef tbb::concurrent_vector<Foo> V;
+    typedef tbb::concurrent_vector<FooWithAssign> V;
     V v(N);
-    ASSERT(v.grow_by(0) == v.grow_by(0, Foo()), NULL);
+    ASSERT(v.grow_by(0) == v.grow_by(0, FooWithAssign()), NULL);
 
     // Check iterator 
     tbb::tick_count t0 = tbb::tick_count::now();
@@ -356,7 +365,7 @@ void TestSequentialFor() {
     ASSERT( !p->is_const(), NULL );
     for( int i=0; size_t(i)<v.size(); ++i, ++p ) {
         if( (*p).state!=Foo::DefaultInitialized )
-            std::printf("ERROR for v[%ld]\n", long(i));
+            REPORT("ERROR for v[%ld]\n", long(i));
         typename V::reference pref = *p;
         pref.bar() = i;
         typename V::difference_type delta = p-v.begin();
@@ -378,8 +387,7 @@ void TestSequentialFor() {
         ASSERT( &cpr == &cp, "preincrement not returning a reference?");
     }
     tbb::tick_count t2 = tbb::tick_count::now();
-    if( Verbose )
-        std::printf("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
+    REMARK("Time for serial for:  assign time = %8.5f, check time = %8.5f\n",
                (t1-t0).seconds(),(t2-t1).seconds());
 
     // Now go backwards
@@ -483,8 +491,8 @@ void TestSequentialFor() {
 #if !defined(_WIN64) || defined(_CPPLIB_VER)
     typedef local_counting_allocator<std::allocator<int>, size_t> allocator1_t;
     typedef tbb::cache_aligned_allocator<void> allocator2_t;
-    typedef tbb::concurrent_vector<Foo, allocator1_t> V1;
-    typedef tbb::concurrent_vector<Foo, allocator2_t> V2;
+    typedef tbb::concurrent_vector<FooWithAssign, allocator1_t> V1;
+    typedef tbb::concurrent_vector<FooWithAssign, allocator2_t> V2;
     V1 v1( v ); // checking cross-allocator copying
     V2 v2( 10 ); v2 = v1; // checking cross-allocator assignment
     ASSERT( (v1 == v) && !(v2 != v), NULL);
@@ -495,9 +503,10 @@ void TestSequentialFor() {
 
 static const size_t Modulus = 7;
 
-typedef static_counting_allocator<tbb::zero_allocator<Foo> > MyAllocator;
+typedef static_counting_allocator<debug_allocator<Foo> > MyAllocator;
 typedef tbb::concurrent_vector<Foo, MyAllocator> MyVector;
 
+template<typename MyVector>
 class GrowToAtLeast: NoAssign {
     MyVector& my_vector;
 public:
@@ -508,8 +517,8 @@ public:
 #if TBB_DEPRECATED
             my_vector.grow_to_at_least(req);
 #else
-            MyVector::iterator p = my_vector.grow_to_at_least(req);
-            if( p-my_vector.begin() < MyVector::difference_type(req) )
+            typename MyVector::iterator p = my_vector.grow_to_at_least(req);
+            if( p-my_vector.begin() < typename MyVector::difference_type(req) )
                 ASSERT( p->state == Foo::DefaultInitialized || p->state == Foo::ZeroInitialized, NULL);
 #endif
             ASSERT( my_vector.size()>=req, NULL );
@@ -519,10 +528,12 @@ public:
 };
 
 void TestConcurrentGrowToAtLeast() {
+    typedef static_counting_allocator< tbb::zero_allocator<Foo> > MyAllocator;
+    typedef tbb::concurrent_vector<Foo, MyAllocator> MyVector;
     MyAllocator::init_counters();
     MyVector v(2, Foo(), MyAllocator());
     for( size_t s=1; s<1000; s*=10 ) {
-        tbb::parallel_for( tbb::blocked_range<size_t>(0,10000*s,s), GrowToAtLeast(v) );
+        tbb::parallel_for( tbb::blocked_range<size_t>(0,10000*s,s), GrowToAtLeast<MyVector>(v), tbb::simple_partitioner() );
     }
     v.clear();
     ASSERT( 0 == v.get_allocator().frees, NULL);
@@ -541,16 +552,26 @@ class GrowBy: NoAssign {
     MyVector& my_vector;
 public:
     void operator()( const tbb::blocked_range<int>& range ) const {
-        for( int i=range.begin(); i!=range.end(); ++i ) {
+        ASSERT( range.begin() < range.end(), NULL );
+#if TBB_DEPRECATED
+        for( int i=range.begin(); i!=range.end(); ++i )
+#else
+        int i = range.begin(), h = (range.end() - i) / 2;
+        typename MyVector::iterator s = my_vector.grow_by(h);
+        for( h += i; i < h; ++i, ++s )
+            s->bar() = i;
+        for(; i!=range.end(); ++i )
+#endif
+        {
             if( i&1 ) {
 #if TBB_DEPRECATED
-                Foo& element = my_vector[my_vector.grow_by(1)]; 
+                typename MyVector::reference element = my_vector[my_vector.grow_by(1)]; 
                 element.bar() = i;
 #else
                 my_vector.grow_by(1)->bar() = i;
 #endif
             } else {
-                Foo f;
+                typename MyVector::value_type f;
                 f.bar() = i;
 #if TBB_DEPRECATED
                 size_t r;
@@ -578,16 +599,21 @@ void TestConcurrentGrowBy( int nthread ) {
     {
         int m = 100000; MyAllocator a;
         MyVector v( a );
-        tbb::parallel_for( tbb::blocked_range<int>(0,m,1000), GrowBy<MyVector>(v) );
+        tbb::parallel_for( tbb::blocked_range<int>(0,m,100), GrowBy<MyVector>(v), tbb::simple_partitioner() );
         ASSERT( v.size()==size_t(m), NULL );
 
         // Verify that v is a permutation of 0..m
-        int inversions = 0;
+        int inversions = 0, def_inits = 0, copy_inits = 0;
         bool* found = new bool[m];
         memset( found, 0, m );
         for( int i=0; i<m; ++i ) {
+            if( v[i].state == Foo::DefaultInitialized ) ++def_inits;
+            else if( v[i].state == Foo::CopyInitialized ) ++copy_inits;
+            else {
+                REMARK("i: %d ", i);
+                ASSERT( false, "v[i] seems not initialized");
+            }
             int index = v[i].bar();
-            ASSERT( v[i].state == (index&1 ? Foo::DefaultInitialized : Foo::CopyInitialized), NULL);
             ASSERT( !found[index], NULL );
             found[index] = true;
             if( i>0 )
@@ -598,8 +624,11 @@ void TestConcurrentGrowBy( int nthread ) {
             ASSERT( nthread>1 || v[i].bar()==i, "sequential execution is wrong" );
         }
         delete[] found;
-        if( nthread>1 && inversions<m/10 )
-            std::printf("Warning: not much concurrency in TestConcurrentGrowBy\n");
+        REMARK("Initialization by default constructor: %d, by copy: %d\n", def_inits, copy_inits);
+        ASSERT( def_inits >= m/2, NULL );
+        ASSERT( copy_inits >= m/4, NULL );
+        if( nthread>1 && inversions<m/20 )
+            REPORT("Warning: not much concurrency in TestConcurrentGrowBy (%d inversions)\n", inversions);
     }
     size_t items_allocated = MyAllocator::items_allocated,
            items_freed = MyAllocator::items_freed;
@@ -708,8 +737,9 @@ public:
     }
 };
 
-static double TimeFindPrimes( int nthread ) {
-    Primes.clear();     // clear behavior has been changed since 2.0
+double TimeFindPrimes( int nthread ) {
+    Primes.clear();
+    Primes.reserve(1000000);// TODO: or compact()?
     tbb::task_scheduler_init init(nthread);
     tbb::tick_count t0 = tbb::tick_count::now();
     tbb::parallel_for( tbb::blocked_range<Number>(0,1000000,500), FindPrimes() );
@@ -717,26 +747,21 @@ static double TimeFindPrimes( int nthread ) {
     return (t1-t0).seconds();
 }
 
-static void TestFindPrimes() {
+void TestFindPrimes() {
     // Time fully subscribed run.
     double t2 = TimeFindPrimes( tbb::task_scheduler_init::automatic );
 
     // Time parallel run that is very likely oversubscribed.  
     double t128 = TimeFindPrimes(128);
 
-    if( Verbose ) 
-        std::printf("TestFindPrimes: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
+    REMARK("TestFindPrimes: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
 
     // We allow the 128-thread run a little extra time to allow for thread overhead.
     // Theoretically, following test will fail on machine with >128 processors.
     // But that situation is not going to come up in the near future,
     // and the generalization to fix the issue is not worth the trouble.
-    //
-    // [05.09.2007] Anton M has modified coefficient below from value 1.1 to 1.3 due to
-    // changes have been made in clear() behavior since 2.0 [U1] version.
-    // Originally, clear() kept segments allocated before which led to inaccurate measurment of t128.
     if( t128 > 1.3*t2 ) {
-        std::printf("Warning: grow_by is pathetically slow: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
+        REPORT("Warning: grow_by is pathetically slow: t2==%g t128=%g k=%g\n", t2, t128, t128/t2);
     } 
 }
 
@@ -762,23 +787,26 @@ void TestSort() {
 //------------------------------------------------------------------------
 #if __TBB_EXCEPTIONS
 void TestExceptions() {
-    typedef static_counting_allocator<std::allocator<Foo>, std::size_t> allocator_t;
-    typedef tbb::concurrent_vector<Foo, allocator_t> vector_t;
+    typedef static_counting_allocator<debug_allocator<FooWithAssign>, std::size_t> allocator_t;
+    typedef tbb::concurrent_vector<FooWithAssign, allocator_t> vector_t;
 
     enum methods {
         zero_method = 0,
         ctor_copy, ctor_size, assign_nt, assign_ir, op_equ, reserve, compact, grow,
         all_methods
     };
+    ASSERT( !FooCount, NULL );
+
     try {
         vector_t src(FooIterator(0), FooIterator(N)); // original data
 
         for(int t = 0; t < 2; ++t) // exception type
         for(int m = zero_method+1; m < all_methods; ++m)
         {
+            ASSERT( FooCount == N, "Previous iteration miss some Foo's de-/initialization" );
             allocator_t::init_counters();
-            if(t) MaxFooCount = FooCount + N/2;
-            else allocator_t::set_limits(N/2);
+            if(t) MaxFooCount = FooCount + N/4;
+            else allocator_t::set_limits(N/4);
             vector_t victim;
             try {
                 switch(m) {
@@ -790,7 +818,7 @@ void TestExceptions() {
                     } break; // auto destruction after exception is checked by ~Foo
                 // Do not test assignment constructor due to reusing of same methods as below 
                 case assign_nt: {
-                        victim.assign(N, Foo());
+                        victim.assign(N, FooWithAssign());
                     } break;
                 case assign_ir: {
                         victim.assign(FooIterator(0), FooIterator(N));
@@ -810,15 +838,20 @@ void TestExceptions() {
                 case compact: {
                         if(t) MaxFooCount = 0; else allocator_t::set_limits(); // reset limits
                         victim.reserve(2); victim = src; // fragmented assignment
-                        if(t) MaxFooCount = 1; else allocator_t::set_limits(1, false); // block any allocation, check NULL return from allocator
+                        if(t) MaxFooCount = FooCount + 10; else allocator_t::set_limits(1, false); // block any allocation, check NULL return from allocator
                         victim.shrink_to_fit(); // should start defragmenting first segment
                     } break;
                 case grow: {
-                        tbb::task_scheduler_init init;
+                        tbb::task_scheduler_init init(2);
+                        if(t) MaxFooCount = FooCount + 31; // these numbers help to reproduce the live lock for versions < TBB2.2
                         try {
-                            tbb::parallel_for( tbb::blocked_range<int>(0, N, 5), GrowBy<vector_t>(victim) );
+                            tbb::parallel_for( tbb::blocked_range<int>(0, N, 70), GrowBy<vector_t>(victim) );
                         } catch(...) {
+#if TBB_USE_CAPTURED_EXCEPTION
                             throw tbb::bad_last_alloc();
+#else
+                            throw;
+#endif
                         }
                     } break;
                 default:;
@@ -850,7 +883,7 @@ void TestExceptions() {
                         int i;
                         for(i = 1; ; ++i)
                             if(!victim[i].zero_bar()) break;
-                            else ASSERT(victim[i].bar() == (m == assign_ir)? i : Foo::initial_value_of_bar, NULL);
+                            else ASSERT(victim[i].bar() == (m == assign_ir)? i : initial_value_of_bar, NULL);
                         for(; size_t(i) < size; ++i) ASSERT(!victim[i].zero_bar(), NULL);
                         ASSERT(size_t(i) == size, NULL);
                         break;
@@ -866,12 +899,16 @@ void TestExceptions() {
                         ASSERT(copy_of_victim.size() > 0, NULL);
                         for(int i = 0; ; ++i) {
                             try {
-                                Foo &foo = victim.at(i);
-                                int bar = t? foo.zero_bar() : foo.bar();
+                                FooWithAssign &foo = victim.at(i);
+                                if( !foo.is_valid_or_zero() ) {
+                                    std::printf("i: %d size: %zd req_size: %zd  state: %d\n", i, size, req_size, foo.state);
+                                }
+                                int bar = foo.zero_bar();
                                 if(m != grow) ASSERT( bar == i || (t && bar == 0), NULL);
                                 if(size_t(i) < copy_of_victim.size()) ASSERT( copy_of_victim[i].bar() == bar, NULL);
                             } catch(std::range_error &) { // skip broken segment
-                                ASSERT( size_t(i) < req_size, NULL ); if(m == op_equ) break;
+                                ASSERT( size_t(i) < req_size, NULL );
+                                if(m == op_equ) break;
                             } catch(std::out_of_range &){
                                 ASSERT( i > 0, NULL ); break;
                             } catch(...) {
@@ -880,13 +917,15 @@ void TestExceptions() {
                         }
                         vector_t copy_of_victim2(10); copy_of_victim2 = victim;
                         ASSERT(copy_of_victim == copy_of_victim2, "assignment doesn't match copying");
-                        try {
-                            victim = copy_of_victim;
-                        } catch(tbb::bad_last_alloc &) { break;
-                        } catch(...) {
-                            KNOWN_ISSUE("ERROR: unrecognized exception - known compiler issue\n"); break;
+                        if(m == op_equ) {
+                            try {
+                                victim = copy_of_victim2;
+                            } catch(tbb::bad_last_alloc &) { break;
+                            } catch(...) {
+                                KNOWN_ISSUE("ERROR: unrecognized exception - known compiler issue\n"); break;
+                            }
+                            ASSERT(t, NULL);
                         }
-                        ASSERT(t, NULL);
                     } break;
                 case compact:
                     ASSERT(capacity > 0, "unexpected capacity");
@@ -895,7 +934,7 @@ void TestExceptions() {
 
                 default:; // nothing to check here
                 }
-                if( Verbose ) std::printf("Exception %d: %s\t- ok ()\n", m, e.what());
+                REMARK("Exception %d: %s\t- ok\n", m, e.what());
             }
         }
     } catch(...) {
@@ -905,28 +944,30 @@ void TestExceptions() {
 #endif// __TBB_EXCEPTIONS
 //------------------------------------------------------------------------
 
-//! Test driver
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Test requires at least one thread.
     MinThread = 1;
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        std::printf("ERROR: MinThread=%d, but must be at least 1\n",MinThread); MinThread = 1;
+        REPORT("ERROR: MinThread=%d, but must be at least 1\n",MinThread); MinThread = 1;
     }
 #if !TBB_DEPRECATED
     TestIteratorTraits<tbb::concurrent_vector<Foo>::iterator,Foo>();
     TestIteratorTraits<tbb::concurrent_vector<Foo>::const_iterator,const Foo>();
-    TestSequentialFor<Foo> ();
+    TestSequentialFor<FooWithAssign> ();
     TestResizeAndCopy();
     TestAssign();
 #endif
     TestCapacity();
+    ASSERT( !FooCount, NULL );
     for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) {
         tbb::task_scheduler_init init( nthread );
         TestParallelFor( nthread );
         TestConcurrentGrowToAtLeast();
         TestConcurrentGrowBy( nthread );
     }
+    ASSERT( !FooCount, NULL );
 #if !TBB_DEPRECATED
     TestComparison();
 #if !__TBB_FLOATING_POINT_BROKEN
@@ -935,14 +976,14 @@ int main( int argc, char* argv[] ) {
     TestSort();
 #if __TBB_EXCEPTIONS
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-    printf("Warning: Exception safety test is skipped due to a known issue.\n");
+    REPORT("Warning: Exception safety test is skipped due to a known issue.\n");
 #else
     TestExceptions();
 #endif
 #endif//__TBB_EXCEPTIONS
 #endif//!TBB_DEPRECATED
-    if( Verbose ) 
-        std::printf("sizeof(concurrent_vector<int>) == %d\n", (int)sizeof(tbb::concurrent_vector<int>));
-    std::printf("done\n");
+    ASSERT( !FooCount, NULL );
+    REMARK("sizeof(concurrent_vector<int>) == %d\n", (int)sizeof(tbb::concurrent_vector<int>));
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_eh_algorithms.cpp b/src/test/test_eh_algorithms.cpp
index 80f9fdd..9e08330 100644
--- a/src/test/test_eh_algorithms.cpp
+++ b/src/test/test_eh_algorithms.cpp
@@ -26,6 +26,7 @@
     the GNU General Public License.
 */
 
+#include <limits.h> // for INT_MAX
 #include "tbb/task_scheduler_init.h"
 #include "tbb/tbb_exception.h"
 #include "tbb/task.h"
@@ -37,10 +38,10 @@
 #include "tbb/blocked_range.h"
 #include "harness_assert.h"
 
-#if __TBB_EXCEPTIONS
+#if __TBB_EXCEPTIONS && !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
 
 #define FLAT_RANGE  100000
-#define FLAT_GRAIN  1000
+#define FLAT_GRAIN  100
 #define NESTING_RANGE  100
 #define NESTING_GRAIN  10
 #define NESTED_RANGE  (FLAT_RANGE / NESTING_RANGE)
@@ -48,8 +49,6 @@
 
 tbb::atomic<intptr_t> g_FedTasksCount; // number of tasks added by parallel_do feeder
 
-#include <limits.h> // for INT_MAX
-
 inline intptr_t Existed () { return INT_MAX; }
 
 #include "harness_eh.h"
@@ -316,7 +315,7 @@ void Test6 () {
     ResetGlobals();
     RunCancellationTest<ParForLauncherTask<ParForBodyToCancel2>, CancellatorTask2>();
     ASSERT (g_ExecutedAtCatch < g_NumThreads, "Somehow worker tasks started their execution before the cancellator task");
-    ASSERT (g_CurExecuted <= g_ExecutedAtCatch, "Some tasks were executed after cancellation");
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Some tasks were executed after cancellation");
 } // void Test6 ()
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -389,6 +388,7 @@ void RunParForAndReduceTests () {
     Test0();
 #if !__TBB_EXCEPTION_HANDLING_BROKEN
     Test1();
+    Test2();
     Test3();
     Test4();
 #endif
@@ -588,7 +588,7 @@ void Test4_parallel_do () {
         minExecuted = g_Exceptions;
         ASSERT (g_Exceptions > 1 && g_Exceptions <= nestingCalls, "Unexpected actual number of exceptions");
         ASSERT (g_CurExecuted >= minExecuted, "Too many executed tasks reported");
-        ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived multiple exceptions");
+        ASSERT (g_CurExecuted < g_ExecutedAtCatch + g_NumThreads + nestingCalls, "Too many tasks survived multiple exceptions");
         ASSERT (g_CurExecuted <= nestingCalls * (1 + g_NumThreads), "Too many tasks survived exception");
     }
 } // void Test4_parallel_do ()
@@ -646,6 +646,7 @@ class ParDoBodyToCancel2 {
 public:
     void operator()( size_t& /*value*/ ) const {
         ++g_CurExecuted;
+        Harness::ConcurrencyTracker ct;
         // The test will hang (and be timed out by the test system) if is_cancelled() is broken
         while( !tbb::task::self().is_cancelled() )
             __TBB_Yield();
@@ -666,7 +667,7 @@ template <class Iterator, class body_to_cancel>
 void Test6_parallel_do () {
     ResetGlobals();
     RunCancellationTest<ParDoWorkerTask<body_to_cancel, Iterator>, CancellatorTask2>();
-    ASSERT (g_CurExecuted <= g_ExecutedAtCatch, "Some tasks were executed after cancellation");
+    ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Some tasks were executed after cancellation");
 } // void Test6_parallel_do ()
 
 // This body throws an exception only if the task was added by feeder
@@ -730,7 +731,7 @@ void RunParDoTests() {
 
 const size_t c_DataEndTag = size_t(~0);
 
-size_t g_NumTokens = 0;
+int g_NumTokens = 0;
 
 // Simple input filter class, it assigns 1 to all array members
 // It stops when it receives item equal to -1
@@ -811,45 +812,36 @@ void Test0_pipeline () {
 
 // Simple filter with exception throwing
 class SimpleFilter : public tbb::filter {
+    bool m_canThrow;
 public:
-    SimpleFilter (tbb::filter::mode _mode ) : filter (_mode) {}
+    SimpleFilter (tbb::filter::mode _mode, bool canThrow ) : filter (_mode), m_canThrow(canThrow) {}
 
     void* operator()(void* item) {
-        Harness::ConcurrencyTracker ct;
         ++g_CurExecuted;
-        WaitUntilConcurrencyPeaks();
-        ThrowTestException(1);
+        if ( m_canThrow ) {
+            if ( !is_serial() ) {
+                Harness::ConcurrencyTracker ct;
+                WaitUntilConcurrencyPeaks( min(g_NumTokens, g_NumThreads) );
+            }
+            ThrowTestException(1);
+        }
         return item;
     }
 }; // class SimpleFilter
 
 // This enumeration represents filters order in pipeline
-enum FilterSet {
-    parallel__parallel=0,
-    parallel__serial=1,
-    parallel__serial_out_of_order=2,
-    serial__parallel=4,
-    serial__serial=5,
-    serial__serial_out_of_order=6,
-    serial_out_of_order__parallel=8,
-    serial_out_of_order__serial=9,
-    serial_out_of_order__serial_out_of_order=10
-};
+struct FilterSet {
+    tbb::filter::mode   mode1,
+                        mode2;
+    bool                throw1,
+                        throw2;
+
+    FilterSet( tbb::filter::mode m1, tbb::filter::mode m2, bool t1, bool t2 )
+        : mode1(m1), mode2(m2), throw1(t1), throw2(t2)
+    {}
+}; // struct FilterSet
 
-// The function returns filter type using filter number in set
-tbb::filter::mode filter_mode (FilterSet set, int number) {
-    size_t tmp = set << (2 * (2 - number));
-    switch (tmp&12){
-        case 0:
-            return tbb::filter::parallel;
-        case 4:
-            return tbb::filter::serial_in_order;
-        case 8:
-            return tbb::filter::serial_out_of_order;
-    }
-    ASSERT(0, "Wrong filter set passed to get_filter_type");
-    return tbb::filter::parallel; // We should never get here, just to prevent compiler warnings
-}
+FilterSet serial_parallel( tbb::filter::serial, tbb::filter::parallel, false, true );
 
 template<typename InFilter, typename Filter>
 class CustomPipeline : protected tbb::pipeline {
@@ -857,9 +849,8 @@ class CustomPipeline : protected tbb::pipeline {
     Filter filter1;
     Filter filter2;
 public:
-    CustomPipeline( FilterSet FilterSet )
-        : filter1(filter_mode(FilterSet, 1))
-        , filter2(filter_mode(FilterSet, 2))
+    CustomPipeline( const FilterSet& filters )
+        : filter1(filters.mode1, filters.throw1), filter2(filters.mode2, filters.throw2)
     {
        add_filter(inputFilter);
        add_filter(filter1);
@@ -874,9 +865,9 @@ public:
 typedef CustomPipeline<InputFilter, SimpleFilter> SimplePipeline;
 
 // Tests exceptions without nesting
-void Test1_pipeline ( FilterSet mode ) {
+void Test1_pipeline ( const FilterSet& filters ) {
     ResetGlobals();
-    SimplePipeline testPipeline(mode);
+    SimplePipeline testPipeline(filters);
     TRY();
         testPipeline.run();
         if ( g_CurExecuted == 2 * NUM_ITEMS ) {
@@ -895,11 +886,11 @@ void Test1_pipeline ( FilterSet mode ) {
 // Filter with nesting
 class NestingFilter : public tbb::filter {
 public:
-    NestingFilter( tbb::filter::mode _mode ) : tbb::filter( _mode) {}
+    NestingFilter (tbb::filter::mode _mode, bool ) : filter (_mode) {}
 
     void* operator()(void* item) {
         ++g_CurExecuted;
-        SimplePipeline testPipeline(serial__parallel);
+        SimplePipeline testPipeline(serial_parallel);
         testPipeline.run();
         return item;
     }
@@ -910,9 +901,9 @@ public:
     exceptions thrown from the nested pipeline are not handled by the caller
     (nesting pipeline body) in this test, they will cancel all the sibling nested
     algorithms. **/
-void Test2_pipeline ( FilterSet mode ) {
+void Test2_pipeline ( const FilterSet& filters ) {
     ResetGlobals();
-    CustomPipeline<InputFilter, NestingFilter> testPipeline(mode);
+    CustomPipeline<InputFilter, NestingFilter> testPipeline(filters);
     TRY();
         testPipeline.run();
     CATCH_AND_ASSERT();
@@ -925,12 +916,12 @@ void Test2_pipeline ( FilterSet mode ) {
 
 class NestingFilterWithIsolatedCtx : public tbb::filter {
 public:
-    NestingFilterWithIsolatedCtx(tbb::filter::mode m ) : filter (m) {}
+    NestingFilterWithIsolatedCtx(tbb::filter::mode m, bool ) : filter(m) {}
 
     void* operator()(void* item) {
         ++g_CurExecuted;
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        SimplePipeline testPipeline(serial__parallel);
+        SimplePipeline testPipeline(serial_parallel);
         testPipeline.run(ctx);
         return item;
     }
@@ -942,11 +933,11 @@ public:
     already running because of the isolated contexts. However because the first
     exception cancels the root parallel_do only the first g_NumThreads subranges
     will be processed (which launch nested pipelines) **/
-void Test3_pipeline ( FilterSet mode ) {
+void Test3_pipeline ( const FilterSet& filters ) {
     ResetGlobals();
     intptr_t nestedCalls = 100,
              minExecuted = (g_NumThreads - 1) * nestedCalls;
-    CustomPipeline<InputFilter, NestingFilterWithIsolatedCtx> testPipeline(mode);
+    CustomPipeline<InputFilter, NestingFilterWithIsolatedCtx> testPipeline(filters);
     TRY();
         testPipeline.run();
     CATCH_AND_ASSERT();
@@ -962,11 +953,11 @@ void Test3_pipeline ( FilterSet mode ) {
 
 class NestingFilterWithEhBody : public tbb::filter {
 public:
-    NestingFilterWithEhBody(tbb::filter::mode m ) : filter(m) {}
+    NestingFilterWithEhBody(tbb::filter::mode m, bool ) : filter(m) {}
 
     void* operator()(void* item) {
         tbb::task_group_context ctx(tbb::task_group_context::isolated);
-        SimplePipeline testPipeline(serial__parallel);
+        SimplePipeline testPipeline(serial_parallel);
         TRY();
             testPipeline.run(ctx);
         CATCH();
@@ -979,7 +970,7 @@ public:
     in this test, they do not affect neither other tasks of the the root pipeline
     nor sibling nested algorithms. **/
 
-void Test4_pipeline ( FilterSet mode ) {
+void Test4_pipeline ( const FilterSet& filters ) {
 #if __GNUC__ && !__INTEL_COMPILER
     if ( strncmp(__VERSION__, "4.1.0", 5) == 0 ) {
         REMARK_ONCE("Warning: One of exception handling tests is skipped due to a known issue.\n");
@@ -990,7 +981,7 @@ void Test4_pipeline ( FilterSet mode ) {
     intptr_t nestedCalls = NUM_ITEMS + 1,
              nestingCalls = 2 * (NUM_ITEMS + 1),
              maxExecuted = nestingCalls * nestedCalls;
-    CustomPipeline<InputFilter, NestingFilterWithEhBody> testPipeline(mode);
+    CustomPipeline<InputFilter, NestingFilterWithEhBody> testPipeline(filters);
     TRY();
         testPipeline.run();
     CATCH_AND_ASSERT();
@@ -998,7 +989,7 @@ void Test4_pipeline ( FilterSet mode ) {
     intptr_t  minExecuted = 0;
     if ( g_SolitaryException ) {
         minExecuted = maxExecuted - nestedCalls;
-        ASSERT (g_Exceptions == 1, "No exception registered");
+        ASSERT (g_Exceptions != 0, "No exception registered");
         ASSERT (g_CurExecuted <= minExecuted + g_NumThreads, "Too many tasks survived exception");
     }
     else {
@@ -1006,7 +997,6 @@ void Test4_pipeline ( FilterSet mode ) {
         ASSERT (g_Exceptions > 1 && g_Exceptions <= nestingCalls, "Unexpected actual number of exceptions");
         ASSERT (g_CurExecuted >= minExecuted, "Too many executed tasks reported");
         ASSERT (g_CurExecuted <= g_ExecutedAtCatch + g_NumThreads, "Too many tasks survived multiple exceptions");
-        ASSERT (g_CurExecuted <= nestingCalls * (1 + g_NumThreads), "Too many tasks survived exception");
     }
 } // void Test4_pipeline ()
 
@@ -1068,6 +1058,7 @@ public:
 
     void* operator()(void* item) {
         ++g_CurExecuted;
+        Harness::ConcurrencyTracker ct;
         // The test will hang (and be timed out by the tesst system) if is_cancelled() is broken
         while( !tbb::task::self().is_cancelled() )
             __TBB_Yield();
@@ -1124,7 +1115,7 @@ public:
 // The filter multiplies each buffer item by 10.
 class ProcessingFilterWithFinalization : public FinalizationBaseFilter {
 public:
-    ProcessingFilterWithFinalization (tbb::filter::mode _mode) : FinalizationBaseFilter (_mode) {}
+    ProcessingFilterWithFinalization (tbb::filter::mode _mode, bool) : FinalizationBaseFilter (_mode) {}
 
     void* operator()( void* item) {
         if (g_TotalCount > NUM_BUFFERS / 2)
@@ -1150,10 +1141,10 @@ public:
 };
 
 //! Tests filter::finalize method
-void Test8_pipeline (FilterSet mode) {
+void Test8_pipeline ( const FilterSet& filters ) {
     ResetGlobals();
     g_AllocatedCount = 0;
-    CustomPipeline<InputFilterWithFinalization, ProcessingFilterWithFinalization> testPipeline(mode);
+    CustomPipeline<InputFilterWithFinalization, ProcessingFilterWithFinalization> testPipeline(filters);
     OutputFilterWithFinalization my_output_filter(tbb::filter::parallel);
 
     testPipeline.add_filter(my_output_filter);
@@ -1164,17 +1155,20 @@ void Test8_pipeline (FilterSet mode) {
 } // void Test8_pipeline ()
 
 // Tests pipeline function passed with different combination of filters
-template<void testFunc(FilterSet)>
+template<void testFunc(const FilterSet&)>
 void TestWithDifferentFilters() {
-    testFunc(parallel__parallel);
-    testFunc(parallel__serial);
-    testFunc(parallel__serial_out_of_order);
-    testFunc(serial__parallel);
-    testFunc(serial__serial);
-    testFunc(serial__serial_out_of_order);
-    testFunc(serial_out_of_order__parallel);
-    testFunc(serial_out_of_order__serial);
-    testFunc(serial_out_of_order__serial_out_of_order);
+    const int NumFilterTypes = 3;
+    const tbb::filter::mode modes[NumFilterTypes] = {
+            tbb::filter::parallel,
+            tbb::filter::serial,
+            tbb::filter::serial_out_of_order
+        };
+    for ( int i = 0; i < NumFilterTypes; ++i ) {
+        for ( int j = 0; j < NumFilterTypes; ++j ) {
+            for ( int k = 0; k < 2; ++k )
+                testFunc( FilterSet(modes[i], modes[j], k == 0, k != 0) );
+        }
+    }
 }
 
 void RunPipelineTests() {
@@ -1198,17 +1192,64 @@ void RunPipelineTests() {
 }
 #endif /* __TBB_EXCEPTIONS */
 
+class MyCapturedException : public tbb::captured_exception {
+public:
+    static int m_refCount;
+
+    MyCapturedException () : tbb::captured_exception("MyCapturedException", "test") { ++m_refCount; }
+    ~MyCapturedException () throw() { --m_refCount; }
+
+    MyCapturedException* move () throw() {
+        MyCapturedException* movee = (MyCapturedException*)malloc(sizeof(MyCapturedException));
+        return ::new (movee) MyCapturedException;
+    }
+    void destroy () throw() {
+        this->~MyCapturedException();
+        free(this);
+    }
+    void operator delete ( void* p ) { free(p); }
+};
+
+int MyCapturedException::m_refCount = 0;
+
+void DeleteTbbException ( volatile tbb::tbb_exception* pe ) {
+    delete pe;
+}
+
+void TestTbbExceptionAPI () {
+    const char *name = "Test captured exception",
+               *reason = "Unit testing";
+    tbb::captured_exception e(name, reason);
+    ASSERT (strcmp(e.name(), name) == 0, "Setting captured exception name failed");
+    ASSERT (strcmp(e.what(), reason) == 0, "Setting captured exception reason failed");
+    tbb::captured_exception c(e);
+    ASSERT (strcmp(c.name(), e.name()) == 0, "Copying captured exception name failed");
+    ASSERT (strcmp(c.what(), e.what()) == 0, "Copying captured exception reason failed");
+    tbb::captured_exception *m = e.move();
+    ASSERT (strcmp(m->name(), name) == 0, "Moving captured exception name failed");
+    ASSERT (strcmp(m->what(), reason) == 0, "Moving captured exception reason failed");
+    ASSERT (!e.name() && !e.what(), "Moving semantics broken");
+    m->destroy();
+
+    MyCapturedException mce;
+    MyCapturedException *mmce = mce.move();
+    ASSERT( MyCapturedException::m_refCount == 2, NULL );
+    DeleteTbbException(mmce);
+    ASSERT( MyCapturedException::m_refCount == 1, NULL );
+}
 
 /** If min and max thread numbers specified on the command line are different,
     the test is run only for 2 sizes of the thread pool (MinThread and MaxThread)
     to be able to test the high and low contention modes while keeping the test reasonably fast **/
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
+    REMARK ("Using %s", TBB_USE_CAPTURED_EXCEPTION ? "tbb:captured_exception" : "exact exception propagation");
     MinThread = max(2, MinThread);
     MaxThread = max(MinThread, MaxThread);
     ASSERT (FLAT_RANGE >= FLAT_GRAIN * MaxThread, "Fix defines");
 #if __TBB_EXCEPTIONS
-    int step = max(MaxThread - MinThread, 1);
+    int step = max((MaxThread - MinThread + 1)/2, 1);
     for ( g_NumThreads = MinThread; g_NumThreads <= MaxThread; g_NumThreads += step ) {
         REMARK ("Number of threads %d", g_NumThreads);
         // Execute in all the possible modes
@@ -1220,12 +1261,13 @@ int main(int argc, char* argv[]) {
             RunPipelineTests();
         }
     }
+    TestTbbExceptionAPI();
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-    printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+    REPORT("Warning: Exception handling tests are skipped due to a known issue.\n");
 #endif
-    printf("done\n");
-#else  /* !__TBB_EXCEPTIONS */
-    printf("skipped\n");
+    REPORT("done\n");
+#else  /* !__TBB_EXCEPTION_HANDLING_BROKEN */
+    REPORT("skip\n");
 #endif /* !__TBB_EXCEPTIONS */
     return 0;
 }
diff --git a/src/test/test_eh_tasks.cpp b/src/test/test_eh_tasks.cpp
index 506b0bf..efe6b77 100644
--- a/src/test/test_eh_tasks.cpp
+++ b/src/test/test_eh_tasks.cpp
@@ -26,14 +26,16 @@
     the GNU General Public License.
 */
 
-// to avoid usage of #pragma comment
+// Suppress usage of #pragma comment
 #define __TBB_NO_IMPLICIT_LINKAGE 1
 
 #define  COUNT_TASK_NODES 1
 #define __TBB_TASK_CPP_DIRECTLY_INCLUDED 1
 #include "../tbb/task.cpp"
 
-#if __TBB_EXCEPTIONS
+#if __TBB_EXCEPTIONS && !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
+
+#define __TBB_ATOMICS_CODEGEN_BROKEN __SUNPRO_CC
 
 #include "tbb/task_scheduler_init.h"
 #include "tbb/spin_mutex.h"
@@ -93,8 +95,10 @@ inline void ResetGlobals () {
 }
 
 inline void WaitForException () {
-    while ( !g_ExceptionCaught )
+    int n = 0;
+    while ( ++n < c_Timeout && !__TBB_load_with_acquire(g_ExceptionCaught) )
         __TBB_Yield();
+    ASSERT_WARNING( n < c_Timeout, "WaitForException failed" );
 }
 
 #define ASSERT_TEST_POSTCOND() \
@@ -108,9 +112,6 @@ public:
     tbb::task* execute () { throw 0; }
 
     ~SimpleThrowingTask() {
-#if !__TBB_RELAXED_OWNERSHIP
-        ASSERT( tbb::task::self().is_owned_by_current_thread(), NULL );
-#endif /* !__TBB_RELAXED_OWNERSHIP */
     }
 };
 
@@ -234,7 +235,7 @@ class RootLauncherTask : public TaskBase {
     tbb::task_group_context::kind_type m_CtxKind;
  
     tbb::task* do_execute () {
-        tbb::task_group_context  ctx (tbb::task_group_context::isolated);
+        tbb::task_group_context  ctx(m_CtxKind);
         SimpleRootTask &r = *new( allocate_root(ctx) ) SimpleRootTask;
         TRY();
             spawn_root_and_wait(r);
@@ -469,19 +470,20 @@ void Test9 () {
 
 template<typename T>
 void ThrowMovableException ( intptr_t threshold, const T& data ) {
-    if ( IsThrowingThread() )
+    if ( !IsThrowingThread() )
         return; 
     if ( !g_SolitaryException ) {
-        g_ExceptionThrown = 1;
-        REMARK ("About to throw one of multiple movable_exceptions... :");
+#if __TBB_ATOMICS_CODEGEN_BROKEN
+        g_ExceptionsThrown = g_ExceptionsThrown + 1;
+#else
+        ++g_ExceptionsThrown;
+#endif
         throw tbb::movable_exception<T>(data);
     }
     while ( g_CurStat.Existed() < threshold )
         __TBB_Yield();
-    if ( __TBB_CompareAndSwapW(&g_ExceptionThrown, 1, 0) == 0 ) {
-        REMARK ("About to throw solitary movable_exception... :");
+    if ( g_ExceptionsThrown.compare_and_swap(1, 0) == 0 )
         throw tbb::movable_exception<T>(data);
-    }
 }
 
 const int g_IntExceptionData = -375;
@@ -652,8 +654,7 @@ void TestCtxDestruction () {
     }
 } // void TestCtxDestruction()
 
-void RunTests ()
-{
+void RunTests () {
     REMARK ("Number of threads %d", g_NumThreads);
     tbb::task_scheduler_init init (g_NumThreads);
     g_Master = Harness::CurrentTid();
@@ -671,24 +672,22 @@ void RunTests ()
 }
 #endif /* __TBB_EXCEPTIONS */
 
-
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
+    REMARK ("Using %s", TBB_USE_CAPTURED_EXCEPTION ? "tbb:captured_exception" : "exact exception propagation");
     MinThread = min(NUM_ROOTS_IN_GROUP, max(2, MinThread));
     MaxThread = min(NUM_ROOTS_IN_GROUP, max(MinThread, MaxThread));
     ASSERT (NUM_ROOTS_IN_GROUP < NUM_ROOT_TASKS, "Fix defines");
 #if __TBB_EXCEPTIONS
     // Test0 always runs on one thread
     Test0();
-    for ( g_NumThreads = MinThread; g_NumThreads <= MaxThread; ++g_NumThreads ) {
-        for ( size_t j = 0; j < 2; ++j ) {
-            g_SolitaryException = (j & 2) == 1;
-            RunTests();
-        }
-    }
-    printf("done\n");
+    g_SolitaryException = 0;
+    for ( g_NumThreads = MinThread; g_NumThreads <= MaxThread; ++g_NumThreads )
+        RunTests();
+    REPORT("done\n");
 #else
-    printf("skipped\n");
+    REPORT("skip\n");
 #endif /* __TBB_EXCEPTIONS */
     return 0;
 }
diff --git a/src/test/test_enumerable_thread_specific.cpp b/src/test/test_enumerable_thread_specific.cpp
index 36009d7..a47d9c2 100644
--- a/src/test/test_enumerable_thread_specific.cpp
+++ b/src/test/test_enumerable_thread_specific.cpp
@@ -45,6 +45,10 @@
 #include "harness_assert.h"
 #include "harness.h"
 
+#if __TBB_GCC_WARNING_SUPPRESSION_ENABLED
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
+
 static tbb::atomic<int> construction_counter;
 static tbb::atomic<int> destruction_counter;
 
@@ -186,7 +190,7 @@ void run_serial_scalar_tests(const char *test_name) {
     T sum;
     test_helper<T>::init(sum);
 
-    if (Verbose) printf("Testing serial %s... ", test_name);  
+    REMARK("Testing serial %s... ", test_name);  
     for (int t = -1; t < REPETITIONS; ++t) {
         if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
         for (int i = 0; i < N; ++i) {
@@ -196,8 +200,7 @@ void run_serial_scalar_tests(const char *test_name) {
  
     double result_value = test_helper<T>::get(sum);
     ASSERT( EXPECTED_SUM == result_value, NULL);
-    if (Verbose)
-        printf("done\nserial %s, 0, %g, %g\n", test_name, result_value, ( tbb::tick_count::now() - t0).seconds());
+    REMARK("done\nserial %s, 0, %g, %g\n", test_name, result_value, ( tbb::tick_count::now() - t0).seconds());
 }
 
 
@@ -220,6 +223,8 @@ public:
 template< typename T >
 void run_parallel_scalar_tests(const char *test_name) {
 
+    static tbb::enumerable_thread_specific<T> static_sums(static_cast<T>(0));
+
     tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred);
     T exemplar;
     test_helper<T>::init(exemplar);
@@ -231,7 +236,7 @@ void run_parallel_scalar_tests(const char *test_name) {
 
         if (p == 0) continue;
 
-        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p); 
+        REMARK("Testing parallel %s on %d thread(s)... ", test_name, p); 
         init.initialize(p);
 
         tbb::tick_count t0;
@@ -271,9 +276,14 @@ void run_parallel_scalar_tests(const char *test_name) {
         T combine_one_sum;
         test_helper<T>::init(combine_one_sum);
 
+        T static_sum;
+        test_helper<T>::init(static_sum);
+
         for (int t = -1; t < REPETITIONS; ++t) {
             if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
 
+            static_sums.clear();
+
             tbb::enumerable_thread_specific<T> sums(exemplar);
             FunctorAddFinit<T> my_finit;
             tbb::enumerable_thread_specific<T> finit_ets(my_finit);
@@ -286,9 +296,15 @@ void run_parallel_scalar_tests(const char *test_name) {
             tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body<T>( finit_ets ) );
             ASSERT( !finit_ets.empty(), NULL);
 
+            ASSERT(static_sums.empty(), NULL);
+            tbb::parallel_for( tbb::blocked_range<int>( 0, N, 10000 ), parallel_scalar_body<T>( static_sums ) );
+            ASSERT( !static_sums.empty(), NULL);
+
+
             // Use combine
             test_helper<T>::sum(combine_sum, sums.combine(my_combine<T>));
             test_helper<T>::sum(combine_ref_sum, sums.combine(my_combine_ref<T>));
+            test_helper<T>::sum(static_sum, static_sums.combine(my_combine<T>));
 
             combine_one_helper<T> my_helper(combine_one_sum);
             sums.combine_each(my_helper);
@@ -369,9 +385,9 @@ void run_parallel_scalar_tests(const char *test_name) {
         ASSERT( EXPECTED_SUM == test_helper<T>::get(cassgn_sum), NULL);
         ASSERT( EXPECTED_SUM == test_helper<T>::get(non_cassgn_sum), NULL);
         ASSERT( EXPECTED_SUM == test_helper<T>::get(finit_ets_sum), NULL);
+        ASSERT( EXPECTED_SUM == test_helper<T>::get(static_sum), NULL);
 
-        if (Verbose)
-            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, test_helper<T>::get(iterator_sum), 
+        REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, test_helper<T>::get(iterator_sum), 
                                                       ( tbb::tick_count::now() - t0).seconds());
         init.terminate();
     }
@@ -433,7 +449,7 @@ void run_parallel_vector_tests(const char *test_name) {
     for (int p = MinThread; p <= MaxThread; ++p) { 
 
         if (p == 0) continue;
-        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p);
+        REMARK("Testing parallel %s on %d thread(s)... ", test_name, p);
         init.initialize(p);
 
         T sum;
@@ -479,8 +495,7 @@ void run_parallel_vector_tests(const char *test_name) {
 
         double result_value = test_helper<T>::get(sum);
         ASSERT( EXPECTED_SUM == result_value, NULL);
-        if (Verbose)
-            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, result_value, ( tbb::tick_count::now() - t0).seconds());
+        REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, result_value, ( tbb::tick_count::now() - t0).seconds());
         init.terminate();
     }
 }
@@ -494,7 +509,7 @@ void run_cross_type_vector_tests(const char *test_name) {
     for (int p = MinThread; p <= MaxThread; ++p) { 
 
         if (p == 0) continue;
-        if (Verbose) printf("Testing parallel %s on %d thread(s)... ", test_name, p);
+        REMARK("Testing parallel %s on %d thread(s)... ", test_name, p);
         init.initialize(p);
 
         T sum;
@@ -541,8 +556,7 @@ void run_cross_type_vector_tests(const char *test_name) {
 
         double result_value = test_helper<T>::get(sum);
         ASSERT( EXPECTED_SUM == result_value, NULL);
-        if (Verbose)
-            printf("done\nparallel %s, %d, %g, %g\n", test_name, p, result_value, ( tbb::tick_count::now() - t0).seconds());
+        REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, result_value, ( tbb::tick_count::now() - t0).seconds());
         init.terminate();
     }
 }
@@ -555,7 +569,7 @@ void run_serial_vector_tests(const char *test_name) {
     T one;
     test_helper<T>::set(one, 1);
 
-    if (Verbose) printf("Testing serial %s... ", test_name);
+    REMARK("Testing serial %s... ", test_name);
     for (int t = -1; t < REPETITIONS; ++t) {
         if (Verbose && t == 0) t0 = tbb::tick_count::now(); 
         std::vector<T, tbb::tbb_allocator<T> > v; 
@@ -568,8 +582,7 @@ void run_serial_vector_tests(const char *test_name) {
 
     double result_value = test_helper<T>::get(sum);
     ASSERT( EXPECTED_SUM == result_value, NULL);
-    if (Verbose)
-        printf("done\nserial %s, 0, %g, %g\n", test_name, result_value, ( tbb::tick_count::now() - t0).seconds());
+    REMARK("done\nserial %s, 0, %g, %g\n", test_name, result_value, ( tbb::tick_count::now() - t0).seconds());
 }
 
 void 
@@ -639,7 +652,7 @@ flog_key_creation_and_deletion() {
 
         if (p == 0) continue;
 
-        if (Verbose) printf("Testing repeated deletes on %d threads... ", p);
+        REMARK("Testing repeated deletes on %d threads... ", p);
 
         for (int j = 0; j < FLOG_REPETITIONS; ++j) {
             construction_counter = 0;
@@ -666,7 +679,7 @@ flog_key_creation_and_deletion() {
         ASSERT( int(construction_counter) == (p+1)*VALID_NUMBER_OF_KEYS, NULL );
         ASSERT( int(destruction_counter) == (p+1)*VALID_NUMBER_OF_KEYS, NULL );
 
-        if (Verbose) printf("done\nTesting repeated clears on %d threads... ", p);
+        REMARK("done\nTesting repeated clears on %d threads... ", p);
 
         construction_counter = 0;
         destruction_counter = 0;
@@ -700,7 +713,7 @@ flog_key_creation_and_deletion() {
         ASSERT( int(construction_counter) == (FLOG_REPETITIONS*p+1)*VALID_NUMBER_OF_KEYS, NULL );
         ASSERT( int(destruction_counter) == (FLOG_REPETITIONS*p+1)*VALID_NUMBER_OF_KEYS, NULL );
 
-        if (Verbose) printf("done\n");
+        REMARK("done\n");
     }
 
 }
@@ -731,7 +744,7 @@ flog_segmented_interator() {
     for(my_si=my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {
         if((*my_si) != ii) {
             found_error = true;
-            if(Verbose) printf( "*my_si=%d\n", int(*my_si));
+            REMARK( "*my_si=%d\n", int(*my_si));
         }
     }
 
@@ -763,7 +776,7 @@ flog_segmented_interator() {
     for(my_si = my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {
         if((*my_si) != ii) {
             found_error = true;
-            if(Verbose) printf("*my_si=%d, ii=%d\n", (int)(*my_si), (int)ii);
+            REMARK("*my_si=%d, ii=%d\n", (int)(*my_si), (int)ii);
         }
     }
 
@@ -771,7 +784,7 @@ flog_segmented_interator() {
     for(my_csi=my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {
         if((*my_csi) != ii) {
             found_error = true;
-            if(Verbose) printf( "*my_csi=%d\n", int(*my_csi));
+            REMARK( "*my_csi=%d\n", int(*my_csi));
         }
     }
 
@@ -803,12 +816,12 @@ flog_segmented_interator() {
     for(my_csi = my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {
         if((*my_csi) != ii) {
             found_error = true;
-            if(Verbose) printf("*my_csi=%d, ii=%d\n", (int)(*my_csi), (int)ii);
+            REMARK("*my_csi=%d, ii=%d\n", (int)(*my_csi), (int)ii);
         }
     }
 
 
-    if(found_error) printf("segmented_iterator failed\n");
+    if(found_error) REPORT("segmented_iterator failed\n");
 }
 
 template <typename Key, typename Val>
@@ -836,7 +849,7 @@ flog_segmented_iterator_map() {
    for(my_si=my_vec.begin(), ii=0; my_si != my_vec.end(); ++my_si, ++ii) {
        if(((*my_si).first != ii) || ((*my_si).second != 2*ii)) {
            found_error = true;
-           if(Verbose) printf( "ii=%d, (*my_si).first=%d, second=%d\n",ii, int((*my_si).first), int((*my_si).second));
+           REMARK( "ii=%d, (*my_si).first=%d, second=%d\n",ii, int((*my_si).first), int((*my_si).second));
        }
    }
 
@@ -844,7 +857,7 @@ flog_segmented_iterator_map() {
    for(my_csi=my_vec.begin(), ii=0; my_csi != my_vec.end(); ++my_csi, ++ii) {
        if(((*my_csi).first != ii) || ((*my_csi).second != 2*ii)) {
            found_error = true;
-           if(Verbose) printf( "ii=%d, (*my_csi).first=%d, second=%d\n",ii, int((*my_csi).first), int((*my_csi).second));
+           REMARK( "ii=%d, (*my_csi).first=%d, second=%d\n",ii, int((*my_csi).first), int((*my_csi).second));
        }
    }
 }
@@ -852,7 +865,7 @@ flog_segmented_iterator_map() {
 void
 run_segmented_iterator_tests() {
    // only the following containers can be used with the segmented iterator.
-    if(Verbose) printf("Running Segmented Iterator Tests\n");
+   REMARK("Running Segmented Iterator Tests\n");
    flog_segmented_interator<std::vector< int > >();
    flog_segmented_interator<std::vector< double > >();
    flog_segmented_interator<std::deque< int > >();
@@ -867,7 +880,7 @@ run_segmented_iterator_tests() {
 template <typename T>
 void
 run_assign_and_copy_constructor_test(const char *test_name) {
-    if (Verbose) printf("Testing assignment and copy construction for %s\n", test_name);
+    REMARK("Testing assignment and copy construction for %s\n", test_name);
 
     // test initializer with exemplar (combine returns the exemplar value if no threads have created locals.)
     T initializer0;
@@ -904,12 +917,13 @@ run_assign_and_copy_constructor_test(const char *test_name) {
 
 void
 run_assignment_and_copy_constructor_tests() {
-    if(Verbose) printf("Running assignment and copy constructor tests\n");
+    REMARK("Running assignment and copy constructor tests\n");
     run_assign_and_copy_constructor_test<int>("int");
     run_assign_and_copy_constructor_test<double>("double");
     run_assign_and_copy_constructor_test<minimal>("minimal");
 }
 
+__TBB_TEST_EXPORT
 int main(int argc, char *argv[]) {
    ParseCommandLine(argc, argv);
    run_segmented_iterator_tests();
@@ -926,7 +940,7 @@ int main(int argc, char *argv[]) {
 
     run_assignment_and_copy_constructor_tests();
 
-   printf("done\n");
+   REPORT("done\n");
    return 0;
 }
 
diff --git a/src/test/test_halt.cpp b/src/test/test_halt.cpp
index b8f9c79..f16c83c 100644
--- a/src/test/test_halt.cpp
+++ b/src/test/test_halt.cpp
@@ -84,8 +84,7 @@ void Measure(const char *name, MeasureFunc func, int n)
 {
     tick_count t0;
     tick_count::interval_t T;
-    if( Verbose )
-        printf("%s",name);
+    REMARK("%s",name);
     t0 = tick_count::now();
     for(int number = 2; number <= n; number++)
         func(number);
@@ -93,16 +92,15 @@ void Measure(const char *name, MeasureFunc func, int n)
     double avg = Tnum? Tsum/Tnum : 1;
     if (avg == 0.0) avg = 1;
     if(avg * 100 < T.seconds()) {
-        printf("Warning: halting detected (%g sec, av: %g)\n", T.seconds(), avg);
+        REPORT("Warning: halting detected (%g sec, av: %g)\n", T.seconds(), avg);
         ASSERT(avg * 1000 > T.seconds(), "Too long halting period");
     } else {
         Tsum += T.seconds(); Tnum++;
     }
-    if( Verbose )
-        printf("\t- in %f msec\n", T.seconds()*1000);
+    REMARK("\t- in %f msec\n", T.seconds()*1000);
 }
 
-//! program entry
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     MaxThread = 8; MinThread = 2;
     ParseCommandLine( argc, argv );
@@ -113,14 +111,12 @@ int main( int argc, char* argv[] ) {
         for(int threads = 2; threads <= MaxThread; threads++)
         {
             task_scheduler_init scheduler_init(threads);
-            if( Verbose )
-                printf("Threads number is %d\t", threads);
+            REMARK("Threads number is %d\t", threads);
             Measure("Shared serial (wrapper mutex)\t", SharedSerialFib<mutex>, NumbersCount);
             //sum = Measure("Shared serial (spin_mutex)", SharedSerialFib<tbb::spin_mutex>, NumbersCount);
             //sum = Measure("Shared serial (queuing_mutex)", SharedSerialFib<tbb::queuing_mutex>, NumbersCount);
         }
     } while(--recycle);
-    if(!Verbose)
-        printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_handle_perror.cpp b/src/test/test_handle_perror.cpp
index db2c0f2..2c567a7 100644
--- a/src/test/test_handle_perror.cpp
+++ b/src/test/test_handle_perror.cpp
@@ -39,8 +39,7 @@ static void TestHandlePerror() {
     try {
         tbb::internal::handle_perror( EAGAIN, "apple" );
     } catch( std::runtime_error& e ) {
-	if( Verbose )
-	    printf("caught runtime_exception('%s')\n",e.what());
+	REMARK("caught runtime_exception('%s')\n",e.what());
  	ASSERT( memcmp(e.what(),"apple: ",7)==0, NULL );
         ASSERT( strstr(e.what(),"unavailable")!=NULL, "bad error message?" ); 
 	caught = true;
@@ -48,9 +47,12 @@ static void TestHandlePerror() {
     ASSERT(caught,NULL);
 }
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine( argc, argv );
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
     TestHandlePerror();
-    printf("done\n");
+#endif
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_inits_loop.cpp b/src/test/test_inits_loop.cpp
index 88c5235..7211732 100644
--- a/src/test/test_inits_loop.cpp
+++ b/src/test/test_inits_loop.cpp
@@ -26,8 +26,6 @@
     the GNU General Public License.
 */
 
-#include <stdio.h>
-
 #if __APPLE__
 
 #include "harness.h"
@@ -44,36 +42,37 @@ bool exec_test(const char *self) {
     int status = 1;
     pid_t p = fork();
     if(p < 0) {
-        printf("fork error: errno=%d: %s\n", errno, strerror(errno));
+        REPORT("fork error: errno=%d: %s\n", errno, strerror(errno));
         return true;
     }
     else if(p) { // parent
         if(waitpid(p, &status, 0) != p) {
-            printf("wait error: errno=%d: %s\n", errno, strerror(errno));
+            REPORT("wait error: errno=%d: %s\n", errno, strerror(errno));
             return true;
         }
         if(WIFEXITED(status)) {
             if(!WEXITSTATUS(status)) return false; // ok
-            else printf("child has exited with return code 0x%x\n", WEXITSTATUS(status));
+            else REPORT("child has exited with return code 0x%x\n", WEXITSTATUS(status));
         } else {
-            printf("child error 0x%x:%s%s ", status, WIFSIGNALED(status)?" signalled":"",
+            REPORT("child error 0x%x:%s%s ", status, WIFSIGNALED(status)?" signalled":"",
                 WIFSTOPPED(status)?" stopped":"");
             if(WIFSIGNALED(status))
-                printf("%s%s", sys_siglist[WTERMSIG(status)], WCOREDUMP(status)?" core dumped":"");
+                REPORT("%s%s", sys_siglist[WTERMSIG(status)], WCOREDUMP(status)?" core dumped":"");
             if(WIFSTOPPED(status))
-                printf("with %d stop-code", WSTOPSIG(status));
-            printf("\n");
+                REPORT("with %d stop-code", WSTOPSIG(status));
+            REPORT("\n");
         }
     }
     else { // child
         // reproduces error much often
         execl(self, self, "0", NULL);
-        printf("exec fails %s: %d: %s\n", self, errno, strerror(errno));
+        REPORT("exec fails %s: %d: %s\n", self, errno, strerror(errno));
         exit(2);
     }
     return true;
 }
 
+__TBB_TEST_EXPORT
 int main( int argc, char * argv[] ) {
     MinThread = 3000;
     ParseCommandLine( argc, argv );
@@ -82,20 +81,24 @@ int main( int argc, char * argv[] ) {
     } else {
         for(int i = 0; i<MinThread; i++)
             if(exec_test(argv[0])) {
-                printf("ERROR: execution fails at %d-th iteration!\n", i);
+                REPORT("ERROR: execution fails at %d-th iteration!\n", i);
                 exit(1);
             }
 
-        printf("done\n");
+        REPORT("done\n");
     }
     return 0;
 }
 
-#else
+#else /* !__APPLE__ */
+
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
 
+__TBB_TEST_EXPORT
 int main() {
-    printf("skip\n");
+    REPORT("skip\n");
     return 0;
 }
 
-#endif /* __APPLE__ */
+#endif /* !__APPLE__ */
diff --git a/src/test/test_ittnotify.cpp b/src/test/test_ittnotify.cpp
index 42dde99..655dabd 100644
--- a/src/test/test_ittnotify.cpp
+++ b/src/test/test_ittnotify.cpp
@@ -43,7 +43,6 @@
 #include "tbb/parallel_for.h"
 #include "tbb/blocked_range.h"
 #include "tbb/task_scheduler_init.h"
-#include "harness_trace.h"
 
 
 #include "../tbb/itt_notify.h"
@@ -82,6 +81,7 @@ void Test( const char * name ) {
 
 #endif /* !DO_ITT_NOTIFY */
 
+__TBB_TEST_EXPORT
 int main( int argc, char * argv[] ) {
     // Default is to run on two threads
     MinThread = MaxThread = 2;
@@ -95,9 +95,9 @@ int main( int argc, char * argv[] ) {
         TEST_MUTEX( queuing_rw_mutex, "Queuing RW Mutex" );
         TEST_MUTEX( spin_rw_mutex, "Spin RW Mutex" );
     }
-    std::printf("done\n");
+    REPORT("done\n");
 #else /* !DO_ITT_NOTIFY */
-    std::printf("skip\n");
+    REPORT("skip\n");
 #endif /* !DO_ITT_NOTIFY */
     return 0;
 }
diff --git a/src/test/test_lambda.cpp b/src/test/test_lambda.cpp
new file mode 100644
index 0000000..057597b
--- /dev/null
+++ b/src/test/test_lambda.cpp
@@ -0,0 +1,235 @@
+/*
+    Copyright 2005-2009 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks.
+
+    Threading Building Blocks is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public License
+    version 2 as published by the Free Software Foundation.
+
+    Threading Building Blocks is distributed in the hope that it will be
+    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Threading Building Blocks; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    As a special exception, you may use this file as part of a free software
+    library without restriction.  Specifically, if other files instantiate
+    templates or use macros or inline functions from this file, or you compile
+    this file and link it with other files to produce an executable, this
+    file does not by itself cause the resulting executable to be covered by
+    the GNU General Public License.  This exception does not however
+    invalidate any other reasons why the executable file might be covered by
+    the GNU General Public License.
+*/
+
+#define NOMINMAX
+#include <cstdio>
+#include <list>
+
+#include "tbb/tbb.h"
+#include "tbb/combinable.h"
+
+using namespace std;
+using namespace tbb;
+
+typedef pair<int,int> max_element_t;
+const int N = 1000;
+const int Grainsize = N/1000;
+int a[N];
+
+void f(int val, int *arr, int start, int stop) {
+    for (int i=start; i<=stop; ++i) {
+        arr[i] = val;
+    }
+}
+
+#include "harness.h"
+
+int Fib(int n) {
+    if( n<2 ) {
+        return n;
+    } else {
+        int x=0, y=0;
+        task_group g;
+#if __TBB_LAMBDAS_PRESENT
+        g.run( [&]{x=Fib(n-1);} ); // spawn a task
+        g.run( [&]{y=Fib(n-2);} ); // spawn another task
+        g.wait();                  // wait for both tasks to complete
+#endif
+        return x+y;
+    }
+}
+
+#include "harness_report.h"
+#include "harness_assert.h"
+
+int main(int argc, char* argv[]) {
+    MinThread = 1;
+    ParseCommandLine(argc, argv);
+
+#if __TBB_LAMBDAS_PRESENT
+    ASSERT( MinThread>=1, "Error: Number of threads must be positive.\n");
+
+    for(int p=MinThread; p<=MaxThread; ++p) {
+        task_scheduler_init init(p);
+
+        REMARK("Running lambda expression tests on %d threads...\n", p);
+
+        //test parallel_for
+        REMARK("Testing parallel_for... ");
+        parallel_for(blocked_range<int>(0,N,Grainsize),
+                     [&] (blocked_range<int>& r) {
+                         for (int i=r.begin(); i!=r.end(); ++i)    a[i] = i;
+                     });
+        ASSERT(a[0]==0 && a[N-1]==N-1, "parallel_for w/lambdas failed.\n");
+        REMARK("passed.\n");
+
+        //test parallel_reduce
+        REMARK("Testing parallel_reduce... ");
+        int sum = parallel_reduce(blocked_range<int>(0,N,Grainsize), int(0),
+                                  [&] (blocked_range<int>& r, int current_sum) -> int {
+                                      for (int i=r.begin(); i!=r.end(); ++i)
+                                          current_sum += a[i]*(1000-i);
+                                      return current_sum;
+                                  },
+                                  [] (const int x1, const int x2) {
+                                      return x1+x2;
+                                  } );
+
+        max_element_t max_el =
+            parallel_reduce(blocked_range<int>(0,N,Grainsize), make_pair(a[0], 0),
+                            [&] (blocked_range<int>& r, max_element_t current_max)
+                            -> max_element_t {
+                                for (int i=r.begin(); i!=r.end(); ++i)
+                                    if (a[i]>current_max.first)
+                                        current_max = make_pair(a[i], i);
+                                return current_max;
+                            },
+                            [] (const max_element_t x1, const max_element_t x2) {
+                                return (x1.first>x2.first)?x1:x2;
+                            });
+        ASSERT(sum==166666500 && max_el.first==999 && max_el.second==999,
+               "parallel_reduce w/lambdas failed.\n");
+        REMARK("passed.\n");
+
+        //test parallel_do
+        REMARK("Testing parallel_do... ");
+        list<int> s;
+        s.push_back(0);
+
+        parallel_do(s.begin(), s.end(),
+                    [&](int foo, parallel_do_feeder<int>& feeder) {
+                        if (foo == 42) return;
+                        else if (foo>42) {
+                            s.push_back(foo-3);
+                            feeder.add(foo-3);
+                        } else {
+                            s.push_back(foo+5);
+                            feeder.add(foo+5);
+                        }
+                    });
+        ASSERT(s.back()==42, "parallel_do w/lambda failed.\n");
+        REMARK("passed.\n");
+
+        //test parallel_invoke
+        REMARK("Testing parallel_invoke... ");
+        parallel_invoke([&]{ f(2, a, 0, N/3); },
+                        [&]{ f(1, a, N/3+1, 2*(N/3)); },
+                        [&]{ f(0, a, 2*(N/3)+1, N-1); });
+        ASSERT(a[0]==2.0 && a[N-1]==0.0, "parallel_invoke w/lambda failed.\n");
+        REMARK("passed.\n");
+
+        //test tbb_thread
+        REMARK("Testing tbb_thread... ");
+        tbb_thread::id myId;
+        tbb_thread myThread([](int x, int y) {
+                                ASSERT(x==42 && y==64, "tbb_thread w/lambda failed.\n");
+                                REMARK("passed.\n");
+                            }, 42, 64);
+        myThread.join();
+
+        // test task_group
+        REMARK("Testing task_group... ");
+        int result;
+        result = Fib(32);
+        ASSERT(result==2178309, "task_group w/lambda failed.\n");
+        REMARK("passed.\n");
+
+        // Reset array a to index values
+        parallel_for(blocked_range<int>(0,N,Grainsize),
+                     [&] (blocked_range<int>& r) {
+                         for (int i=r.begin(); i!=r.end(); ++i)    a[i] = i;
+                     });
+        // test parallel_sort
+        REMARK("Testing parallel_sort... ");
+        int pivot = 42;
+
+        // sort nearest by increasing distance from pivot
+        parallel_sort(a, a+N,
+                      [&](int x, int y) { return(abs(pivot-x) < abs(pivot-y)); });
+        ASSERT(a[0]==42 && a[N-1]==N-1, "parallel_sort w/lambda failed.\n");
+        REMARK("passed.\n");
+
+        //test combinable
+        REMARK("Testing combinable... ");
+        combinable<std::pair<int,int> > minmax_c([]() { return std::make_pair(a[0], a[0]); } );
+
+        parallel_for(blocked_range<int>(0,N),
+                     [&] (const blocked_range<int> &r) {
+                         std::pair<int,int>& mmr = minmax_c.local();
+                         for(int i=r.begin(); i!=r.end(); ++i) {
+                             if (mmr.first > a[i]) mmr.first = a[i];
+                             if (mmr.second < a[i]) mmr.second = a[i];
+                         }
+                     });
+        minmax_c.combine_each([](std::pair<int,int> x) {
+                                  int sum;
+                                  sum = x.first + x.second;
+                              });
+        std::pair<int,int> minmax_result_c;
+        minmax_result_c =
+            minmax_c.combine([](std::pair<int,int> x, std::pair<int,int> y) {
+                                 return std::make_pair(x.first<y.first?x.first:y.first,
+                                                       x.second>y.second?x.second:y.second);
+                             });
+        ASSERT(minmax_result_c.first==0 && minmax_result_c.second==999, 
+               "combinable w/lambda failed.\n");
+        REMARK("passed.\n");
+
+        //test enumerable_thread_specific
+        REMARK("Testing enumerable_thread_specific... ");
+        enumerable_thread_specific< std::pair<int,int> > minmax_ets([]() { return std::make_pair(a[0], a[0]); } );
+
+        parallel_for(blocked_range<int>(0,N),
+                     [&] (const blocked_range<int> &r) {
+                         std::pair<int,int>& mmr = minmax_ets.local();
+                         for(int i=r.begin(); i!=r.end(); ++i) {
+                             if (mmr.first > a[i]) mmr.first = a[i];
+                             if (mmr.second < a[i]) mmr.second = a[i];
+                         }
+                     });
+        minmax_ets.combine_each([](std::pair<int,int> x) {
+                                    int sum;
+                                    sum = x.first + x.second;
+                                });
+        std::pair<int,int> minmax_result_ets;
+        minmax_result_ets =
+            minmax_ets.combine([](std::pair<int,int> x, std::pair<int,int> y) {
+                                   return std::make_pair(x.first<y.first?x.first:y.first,
+                                                         x.second>y.second?x.second:y.second);
+                               });
+        ASSERT(minmax_result_ets.first==0 && minmax_result_ets.second==999,
+               "enumerable_thread_specific w/lambda failed.\n");
+        REMARK("passed.\n");
+    }
+    REPORT("done\n");
+    return 0;
+#else
+    REPORT("skip\n");
+    return 0;
+#endif
+}
diff --git a/src/test/test_malloc_compliance.cpp b/src/test/test_malloc_compliance.cpp
index c4363d6..c2c48f7 100644
--- a/src/test/test_malloc_compliance.cpp
+++ b/src/test/test_malloc_compliance.cpp
@@ -31,11 +31,13 @@ const int MByte = 1048576; //1MB
 /* _WIN32_WINNT should be defined at the very beginning, 
    because other headers might include <windows.h>
 */
+
 #if _WIN32 || _WIN64
 #undef _WIN32_WINNT
 #define _WIN32_WINNT 0x0500
 #include <windows.h>
 #include <stdio.h>
+#include "harness_report.h"
 
 void limitMem( int limit )
 {
@@ -46,17 +48,17 @@ void limitMem( int limit )
     jobInfo.ProcessMemoryLimit = limit? limit*MByte : 2*1024LL*MByte;
     if (NULL == hJob) {
         if (NULL == (hJob = CreateJobObject(NULL, NULL))) {
-            printf("Can't assign create job object: %ld\n", GetLastError());
+            REPORT("Can't assign create job object: %ld\n", GetLastError());
             exit(1);
         }
         if (0 == AssignProcessToJobObject(hJob, GetCurrentProcess())) {
-            printf("Can't assign process to job object: %ld\n", GetLastError());
+            REPORT("Can't assign process to job object: %ld\n", GetLastError());
             exit(1);
         }
     }
     if (0 == SetInformationJobObject(hJob, JobObjectExtendedLimitInformation, 
                                      &jobInfo, sizeof(jobInfo))) {
-        printf("Can't set limits: %ld\n", GetLastError());
+        REPORT("Can't set limits: %ld\n", GetLastError());
         exit(1);
     }
 }
@@ -66,6 +68,7 @@ void limitMem( int limit )
 #include <stdio.h>
 #include <errno.h>
 #include <sys/types.h>  // uint64_t on FreeBSD, needed for rlim_t
+#include "harness_report.h"
 
 void limitMem( int limit )
 {
@@ -74,7 +77,7 @@ void limitMem( int limit )
     rlim.rlim_max = (rlim_t)RLIM_INFINITY;
     int ret = setrlimit(RLIMIT_AS,&rlim);
     if (0 != ret) {
-        printf("Can't set limits: errno %d\n", errno);
+        REPORT("Can't set limits: errno %d\n", errno);
         exit(1);
     }
 }
@@ -98,7 +101,7 @@ void limitMem( int limit )
 
 const size_t COUNT_ELEM_CALLOC = 2;
 const int COUNT_TESTS = 1000;
-const int COUNT_ELEM = 50000;
+const int COUNT_ELEM = 25000;
 const size_t MAX_SIZE = 1000;
 const int COUNTEXPERIMENT = 10000;
 
@@ -179,22 +182,20 @@ struct MemStruct
 class CMemTest: NoAssign
 {
     UINT CountErrors;
-    int total_threads;
     bool FullLog;
     Harness::SpinBarrier *limitBarrier;
     static bool firstTime;
 
 public:
-    CMemTest(int total_threads, Harness::SpinBarrier *limitBarrier,
-             bool isVerbose=false) :
-        CountErrors(0), total_threads(total_threads), limitBarrier(limitBarrier)
+    CMemTest(Harness::SpinBarrier *limitBarrier, bool isVerbose=false) :
+        CountErrors(0), limitBarrier(limitBarrier)
         {
             srand((UINT)time(NULL));
             FullLog=isVerbose;
             rand();
         }
     void InvariantDataRealloc(bool aligned); //realloc does not change data
-    void NULLReturn(UINT MinSize, UINT MaxSize); // NULL pointer + check errno
+    void NULLReturn(UINT MinSize, UINT MaxSize, int total_threads); // NULL pointer + check errno
     void UniquePointer(); // unique pointer - check with padding
     void AddrArifm(); // unique pointer - check with pointer arithmetic
     bool ShouldReportError();
@@ -222,7 +223,7 @@ struct RoundRobin: NoAssign {
     mutable CMemTest test;
 
     RoundRobin( long p, Harness::SpinBarrier *limitBarrier, bool verbose ) :
-        number_of_threads(p), test(p, limitBarrier, verbose) {}
+        number_of_threads(p), test(limitBarrier, verbose) {}
     void operator()( int /*id*/ ) const 
         {
             test.RunAllTests(number_of_threads);
@@ -284,8 +285,8 @@ void ReallocParam()
         Trealloc(bufs[j], 0);
 }
 
-int main(int argc, char* argv[])
-{
+__TBB_TEST_EXPORT
+int main(int argc, char* argv[]) {
     argC=argc;
     argV=argv;
     MaxThread = MinThread = 1;
@@ -326,13 +327,12 @@ int main(int argc, char* argv[])
     limitMem(0);
 #endif
     for( int p=MaxThread; p>=MinThread; --p ) {
-        if( Verbose )
-            printf("testing with %d threads\n", p );
+        REMARK("testing with %d threads\n", p );
         Harness::SpinBarrier *barrier = new Harness::SpinBarrier(p);
         NativeParallelFor( p, RoundRobin(p, barrier, Verbose) );
         delete barrier;
     }
-    if( !error_occurred ) printf("done\n");
+    if( !error_occurred ) REPORT("done\n");
     return 0;
 }
 
@@ -390,7 +390,7 @@ void CMemTest::InvariantDataRealloc(bool aligned)
 {
     size_t size, sizeMin;
     CountErrors=0;
-    if (FullLog) printf("\nInvariant data by realloc....");
+    if (FullLog) REPORT("\nInvariant data by realloc....");
     UCHAR* pchar;
     sizeMin=size=rand()%MAX_SIZE+10;
     pchar = aligned?
@@ -416,8 +416,8 @@ void CMemTest::InvariantDataRealloc(bool aligned)
                 CountErrors++;
                 if (ShouldReportError())
                 {
-                    printf("stand '%c', must stand '%c'\n",pchar[k],(UCHAR)k%255+1);
-                    printf("error: data changed (at %llu, SizeMin=%llu)\n",
+                    REPORT("stand '%c', must stand '%c'\n",pchar[k],(UCHAR)k%255+1);
+                    REPORT("error: data changed (at %llu, SizeMin=%llu)\n",
                            (long long unsigned)k,(long long unsigned)sizeMin);
                 }
             }
@@ -426,10 +426,10 @@ void CMemTest::InvariantDataRealloc(bool aligned)
         Taligned_realloc(pchar,0,choose_random_alignment());
     else
         Trealloc(pchar,0);
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
-    //printf("end check\n");
+    //REPORT("end check\n");
 }
 
 struct PtrSize {
@@ -449,8 +449,8 @@ void CMemTest::AddrArifm()
 {
     PtrSize *arr = (PtrSize*)Tmalloc(COUNT_ELEM*sizeof(PtrSize));
 
-    if (FullLog) printf("\nUnique pointer using Address arithmetics\n");
-    if (FullLog) printf("malloc....");
+    if (FullLog) REPORT("\nUnique pointer using Address arithmetics\n");
+    if (FullLog) REPORT("malloc....");
     ASSERT(arr, NULL);
     for (int i=0; i<COUNT_ELEM; i++)
     {
@@ -466,7 +466,7 @@ void CMemTest::AddrArifm()
                    "intersection detected");
     }
     //----------------------------------------------------------------
-    if (FullLog) printf("realloc....");
+    if (FullLog) REPORT("realloc....");
     for (int i=0; i<COUNT_ELEM; i++)
     {
         size_t count=arr[i].size*2;
@@ -492,7 +492,7 @@ void CMemTest::AddrArifm()
         Tfree(arr[i].ptr);
     }
     //-------------------------------------------
-    if (FullLog) printf("calloc....");
+    if (FullLog) REPORT("calloc....");
     for (int i=0; i<COUNT_ELEM; i++)
     {
         arr[i].size=rand()%MAX_SIZE;
@@ -518,7 +518,7 @@ void CMemTest::Zerofilling()
     TestStruct* TSMas;
     size_t CountElement;
     CountErrors=0;
-    if (FullLog) printf("\nzeroings elements of array....");
+    if (FullLog) REPORT("\nzeroings elements of array....");
     //test struct
     for (int i=0; i<COUNTEXPERIMENT; i++)
     {
@@ -531,53 +531,76 @@ void CMemTest::Zerofilling()
             if (!(TSMas+j)->IzZero())
             {
                 CountErrors++;
-                if (ShouldReportError()) printf("detect nonzero element at TestStruct\n");
+                if (ShouldReportError()) REPORT("detect nonzero element at TestStruct\n");
             }
         }
         Tfree(TSMas);
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
 }
 
-// As several threads concurrently trying to push to memory limits, adding to 
-// vectors may have intermittent failures.  
-void reliablePushBack(std::vector<MemStruct> *vec, const MemStruct &mStruct)
+#if !__APPLE__
+void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize, int total_threads)
 {
-    for (int i=0; i<10000; i++) {
-        try {
-            vec->push_back(mStruct);
-        } catch(std::bad_alloc) {
-            continue;
-        }
-        return;
-    }
-    ASSERT(0, "Unable to get free memory.");
-}
+    // find size to guarantee getting NULL for 1024 B allocations
+    const int MAXNUM_1024 = (200+50)*1024;
 
-void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
-{
     std::vector<MemStruct> PointerList;
     void *tmp;
     CountErrors=0;
-    int CountNULL;
-    if (FullLog) printf("\nNULL return & check errno:\n");
+    int CountNULL, num_1024;
+    if (FullLog) REPORT("\nNULL return & check errno:\n");
     UINT Size;
+    Limit limit_200M(200*total_threads), no_limit(0);
+    void **buf_1024 = (void**)Tmalloc(MAXNUM_1024*sizeof(void*));
+
+    ASSERT(buf_1024, NULL);
+    /* We must have space for pointers when memory limit is hit. 
+       Reserve enough for the worst case. 
+    */
+    PointerList.reserve(200*MByte/MinSize);
+
+    /* There is a bug in the specific verion of GLIBC (2.5-12) shipped 
+       with RHEL5 that leads to erroneous working of the test 
+       on Intel64 and IPF systems when setrlimit-related part is enabled.
+       Switching to GLIBC 2.5-18 from RHEL5.1 resolved the issue.
+     */
+    if (perProcessLimits)
+        limitBarrier->wait(limit_200M);
+    else
+        limitMem(200);
+
+    /* regression test against the bug in allocator when it dereference NULL 
+       while lack of memory 
+    */
+    for (num_1024=0; num_1024<MAXNUM_1024; num_1024++) {
+        buf_1024[num_1024] = Tcalloc(1024, 1);
+        if (! buf_1024[num_1024]) {
+            ASSERT(errno == ENOMEM, NULL);
+            break;
+        }
+    }
+    for (int i=0; i<num_1024; i++)
+        Tfree(buf_1024[i]);
+    Tfree(buf_1024);
+
     do {
         Size=rand()%(MaxSize-MinSize)+MinSize;
         tmp=Tmalloc(Size);
         if (tmp != NULL)
         {
             memset(tmp, 0, Size);
-            reliablePushBack(&PointerList, MemStruct(tmp, Size));
+            PointerList.push_back(MemStruct(tmp, Size));
         }
     } while(tmp != NULL);
-    if (FullLog) printf("\n");
+    ASSERT(errno == ENOMEM, NULL);
+    if (FullLog) REPORT("\n");
 
     // preparation complete, now running tests
     // malloc
-    if (FullLog) printf("malloc....");
+    if (FullLog) REPORT("malloc....");
     CountNULL = 0;
     while (CountNULL==0)
         for (int j=0; j<COUNT_TESTS; j++)
@@ -590,7 +613,7 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
                 CountNULL++;
                 if (errno != ENOMEM) {
                     CountErrors++;
-                    if (ShouldReportError()) printf("NULL returned, error: errno (%d) != ENOMEM\n", errno);
+                    if (ShouldReportError()) REPORT("NULL returned, error: errno (%d) != ENOMEM\n", errno);
                 }
             }
             else
@@ -603,20 +626,20 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
 #endif /* __linux__ */
                 if (errno != ENOMEM+j+1 && !known_issue) {
                     CountErrors++;
-                    if (ShouldReportError()) printf("error: errno changed to %d though valid pointer was returned\n", errno);
+                    if (ShouldReportError()) REPORT("error: errno changed to %d though valid pointer was returned\n", errno);
                 }      
                 memset(tmp, 0, Size);
-                reliablePushBack(&PointerList, MemStruct(tmp, Size));
+                PointerList.push_back(MemStruct(tmp, Size));
             }
         }
-    if (FullLog) printf("end malloc\n");
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (FullLog) REPORT("end malloc\n");
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
 
     CountErrors=0;
     //calloc
-    if (FullLog) printf("calloc....");
+    if (FullLog) REPORT("calloc....");
     CountNULL = 0;
     while (CountNULL==0)
         for (int j=0; j<COUNT_TESTS; j++)
@@ -629,7 +652,7 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
                 CountNULL++;
                 if (errno != ENOMEM) {
                     CountErrors++;
-                    if (ShouldReportError()) printf("NULL returned, error: errno(%d) != ENOMEM\n", errno);
+                    if (ShouldReportError()) REPORT("NULL returned, error: errno(%d) != ENOMEM\n", errno);
                 }
             }
             else
@@ -642,17 +665,17 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
 #endif /* __linux__ */
                 if (errno != ENOMEM+j+1 && !known_issue) {
                     CountErrors++;
-                    if (ShouldReportError()) printf("error: errno changed to %d though valid pointer was returned\n", errno);
+                    if (ShouldReportError()) REPORT("error: errno changed to %d though valid pointer was returned\n", errno);
                 }      
-                reliablePushBack(&PointerList, MemStruct(tmp, Size));
+                PointerList.push_back(MemStruct(tmp, Size));
             }
         }
-    if (FullLog) printf("end calloc\n");
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (FullLog) REPORT("end calloc\n");
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
     CountErrors=0;
-    if (FullLog) printf("realloc....");
+    if (FullLog) REPORT("realloc....");
     CountNULL = 0;
     if (PointerList.size() > 0)
         while (CountNULL==0)
@@ -668,7 +691,7 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
 #endif /* __linux__ */
                     if (errno != 0 && !known_issue) {
                         CountErrors++;
-                        if (ShouldReportError()) printf("valid pointer returned, error: errno not kept\n");
+                        if (ShouldReportError()) REPORT("valid pointer returned, error: errno not kept\n");
                     }      
                     PointerList[i].Size *= 2;
                 }
@@ -680,7 +703,7 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
 #endif /* __linux__ */
                     if (errno != 0 && !known_issue) {
                         CountErrors++;
-                        if (ShouldReportError()) printf("valid pointer returned, error: errno not kept\n");
+                        if (ShouldReportError()) REPORT("valid pointer returned, error: errno not kept\n");
                     }      
                     PointerList[i].Pointer = tmp;
                     PointerList[i].Size *= 2;
@@ -691,7 +714,7 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
                     if (errno != ENOMEM)
                     {
                         CountErrors++;
-                        if (ShouldReportError()) printf("NULL returned, error: errno(%d) != ENOMEM\n", errno);
+                        if (ShouldReportError()) REPORT("NULL returned, error: errno(%d) != ENOMEM\n", errno);
                     }
                     // check data integrity
                     BYTE *zer=(BYTE*)PointerList[i].Pointer;
@@ -699,27 +722,31 @@ void CMemTest::NULLReturn(UINT MinSize, UINT MaxSize)
                         if (zer[k] != 0)
                         {
                             CountErrors++;
-                            if (ShouldReportError()) printf("NULL returned, error: data changed\n");
+                            if (ShouldReportError()) REPORT("NULL returned, error: data changed\n");
                         }
                 }
             }
-    if (FullLog) printf("realloc end\n");
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (FullLog) REPORT("realloc end\n");
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
     for (UINT i=0; i<PointerList.size(); i++)
     {
         Tfree(PointerList[i].Pointer);
     }
+    if (perProcessLimits)
+        limitBarrier->wait(no_limit);
+    else
+        limitMem(0);
 }
-
+#endif /* #if __APPLE__ */
 
 void CMemTest::UniquePointer()
 {
     CountErrors=0;
     int **MasPointer = (int **)Tmalloc(sizeof(int*)*COUNT_ELEM);
     size_t *MasCountElem = (size_t*)Tmalloc(sizeof(size_t)*COUNT_ELEM);
-    if (FullLog) printf("\nUnique pointer using 0\n");
+    if (FullLog) REPORT("\nUnique pointer using 0\n");
     ASSERT(MasCountElem && MasPointer, NULL);
     //
     //-------------------------------------------------------
@@ -733,7 +760,7 @@ void CMemTest::UniquePointer()
         for (UINT j=0; j<MasCountElem[i]; j++)
             *(MasPointer[i]+j)=0;
     }
-    if (FullLog) printf("malloc....");
+    if (FullLog) REPORT("malloc....");
     for (UINT i=0; i<COUNT_ELEM-1; i++)
     {
         for (UINT j=0; j<MasCountElem[i]; j++)
@@ -741,13 +768,13 @@ void CMemTest::UniquePointer()
             if (*(*(MasPointer+i)+j)!=0)
             {
                 CountErrors++;
-                if (ShouldReportError()) printf("error, detect 1 with 0x%p\n",(*(MasPointer+i)+j));
+                if (ShouldReportError()) REPORT("error, detect 1 with 0x%p\n",(*(MasPointer+i)+j));
             }
             *(*(MasPointer+i)+j)+=1;
         }
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
     //----------------------------------------------------------
     //calloc
@@ -760,7 +787,7 @@ void CMemTest::UniquePointer()
         if (NULL == MasPointer[i])
             MasCountElem[i]=0;
     }
-    if (FullLog) printf("calloc....");
+    if (FullLog) REPORT("calloc....");
     for (int i=0; i<COUNT_ELEM-1; i++)
     {
         for (UINT j=0; j<*(MasCountElem+i); j++)
@@ -768,13 +795,13 @@ void CMemTest::UniquePointer()
             if (*(*(MasPointer+i)+j)!=0)
             {
                 CountErrors++;
-                if (ShouldReportError()) printf("error, detect 1 with 0x%p\n",(*(MasPointer+i)+j));
+                if (ShouldReportError()) REPORT("error, detect 1 with 0x%p\n",(*(MasPointer+i)+j));
             }
             *(*(MasPointer+i)+j)+=1;
         }
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
     //---------------------------------------------------------
     //realloc
@@ -789,7 +816,7 @@ void CMemTest::UniquePointer()
         for (UINT j=0; j<MasCountElem[i]; j++)
             *(*(MasPointer+i)+j)=0;
     }
-    if (FullLog) printf("realloc....");
+    if (FullLog) REPORT("realloc....");
     for (int i=0; i<COUNT_ELEM-1; i++)
     {
         for (UINT j=0; j<*(MasCountElem+i); j++)
@@ -801,8 +828,8 @@ void CMemTest::UniquePointer()
             *(*(MasPointer+i)+j)+=1;
         }
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
     for (int i=0; i<COUNT_ELEM; i++)
         Tfree(MasPointer[i]);
@@ -825,7 +852,7 @@ bool CMemTest::ShouldReportError()
 void CMemTest::Free_NULL()
 {
     CountErrors=0;
-    if (FullLog) printf("\ncall free with parameter NULL....");
+    if (FullLog) REPORT("\ncall free with parameter NULL....");
     errno = 0;
     for (int i=0; i<COUNTEXPERIMENT; i++)
     {
@@ -833,11 +860,11 @@ void CMemTest::Free_NULL()
         if (errno != 0)
         {
             CountErrors++;
-            if (ShouldReportError()) printf("error is found by a call free with parameter NULL\n");
+            if (ShouldReportError()) REPORT("error is found by a call free with parameter NULL\n");
         }
     }
-    if (CountErrors) printf("%s\n",strError);
-    else if (FullLog) printf("%s\n",strOk);
+    if (CountErrors) REPORT("%s\n",strError);
+    else if (FullLog) REPORT("%s\n",strOk);
     error_occurred |= ( CountErrors>0 ) ;
 }
 
@@ -914,7 +941,6 @@ void CMemTest::TestAlignedParameters()
 
 void CMemTest::RunAllTests(int total_threads)
 {
-    Limit limit_200M(200*total_threads), no_limit(0);
 
     Zerofilling();
     Free_NULL();
@@ -923,24 +949,13 @@ void CMemTest::RunAllTests(int total_threads)
         InvariantDataRealloc(/*aligned=*/true);
     TestAlignedParameters();
 #if __APPLE__
-    printf("Warning: skipping some tests (known issue on Mac OS* X)\n");
+    REPORT("Warning: skipping some tests (known issue on Mac OS* X)\n");
 #else
     UniquePointer();
     AddrArifm();
-    /* There is a bug in the specific verion of GLIBC (2.5-12) shipped 
-       with RHEL5 that leads to erroneous working of the test 
-       on Intel64 and IPF systems when setrlimit-related part is enabled.
-       Switching to GLIBC 2.5-18 from RHEL5.1 resolved the issue.
-     */
-    if (perProcessLimits)
-        limitBarrier->wait(limit_200M);
-    else
-        limitMem(200);
-    NULLReturn(1*MByte,100*MByte);
-    if (perProcessLimits)
-        limitBarrier->wait(no_limit);
-    else
-        limitMem(0);
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
+    NULLReturn(1*MByte,100*MByte,total_threads);
+#endif
 #endif
-    if (FullLog) printf("All tests ended\nclearing memory...");
+    if (FullLog) REPORT("All tests ended\nclearing memory...");
 }
diff --git a/src/test/test_malloc_overload.cpp b/src/test/test_malloc_overload.cpp
index 0affffc..f965cf8 100644
--- a/src/test/test_malloc_overload.cpp
+++ b/src/test/test_malloc_overload.cpp
@@ -36,8 +36,14 @@
 
 #if MALLOC_REPLACEMENT_AVAILABLE
 
+#if _WIN32 || _WIN64
+// to use strdup and putenv w/o warnings
+#define _CRT_NONSTDC_NO_DEPRECATE 1
+#endif
+#include "harness_report.h"
 #include "harness_assert.h"
 #include <stdlib.h>
+#include <string.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <new>
@@ -87,6 +93,7 @@ struct LargeObjectHeader {
     size_t       unalignedSize;     /* The size that was requested from getMemory */
     uint64_t     mallocUniqueID;    /* The field to check whether the memory was allocated by scalable_malloc */
     size_t       objectSize;        /* The size originally requested by a client */
+    bool         getMemoryBlock;    /* Is memory allocated by getMemory or by getRawMemory? */
 };
 
 /*
@@ -113,17 +120,37 @@ struct BigStruct {
     char f[minLargeObjectSize];
 };
 
-int main(int , char *[])
-{
+int main(int , char *[]) {
     void *ptr, *ptr1;
 
 #if MALLOC_REPLACEMENT_AVAILABLE == 1
     if (NULL == dlsym(RTLD_DEFAULT, "scalable_malloc")) {
-        printf("libtbbmalloc not found\nfail\n");
+        REPORT("libtbbmalloc not found\nfail\n");
         return 1;
     }
 #endif
 
+/* On Windows, memory block size returned by _msize() is sometimes used 
+   to calculate the size for an extended block. Substituting _msize, 
+   scalable_msize initially returned 0 for regions not allocated by the scalable 
+   allocator, which led to incorrect memory reallocation and subsequent crashes.
+   It was found that adding a new environment variable triggers the error.
+*/
+    ASSERT(getenv("PATH"), "We assume that PATH is set everywhere.");
+    char *pathCopy = strdup(getenv("PATH"));
+    const char *newEnvName = "__TBBMALLOC_OVERLOAD_REGRESSION_TEST_FOR_REALLOC_AND_MSIZE";
+    char *newEnv = (char*)malloc(3 + strlen(newEnvName));
+    
+    ASSERT(!getenv(newEnvName), "Environment variable should not be used before.");
+    strcpy(newEnv, newEnvName);
+    strcat(newEnv, "=1");
+    int r = putenv(newEnv);
+    ASSERT(!r, NULL);
+    char *path = getenv("PATH");
+    ASSERT(path && 0==strcmp(path, pathCopy), "Environment was changed erroneously.");
+    free(pathCopy);
+    free(newEnv);
+
     ptr = malloc(minLargeObjectSize);
     ASSERT(ptr!=NULL && scalableMallocLargeBlock(ptr, minLargeObjectSize), NULL);
     free(ptr);
@@ -194,18 +221,17 @@ int main(int , char *[])
 #else
     const char* s = "done";
 #endif
-    printf("%s\n", s);
+    REPORT("%s\n", s);
     return 0;
 }
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
 #include "harness.h"
 
-#else  /* MALLOC_REPLACEMENT_AVAILABLE */
+#else  /* !MALLOC_REPLACEMENT_AVAILABLE */
 #include <stdio.h>
 
-int main(int , char *[])
-{
+int main(int , char *[]) {
     printf("skip\n");
 }
-#endif /* MALLOC_REPLACEMENT_AVAILABLE */
+#endif /* !MALLOC_REPLACEMENT_AVAILABLE */
diff --git a/src/test/test_malloc_pure_c.c b/src/test/test_malloc_pure_c.c
index 5cbc56a..a9f1f2e 100644
--- a/src/test/test_malloc_pure_c.c
+++ b/src/test/test_malloc_pure_c.c
@@ -39,8 +39,7 @@
  *  can be used from pure C programs; also some regression checks are done
  */
 
-int main(void)
-{
+int main(void) {
     size_t i, j;
     void *p1, *p2;
     for( i=0; i<=1<<16; ++i) {
diff --git a/src/test/test_malloc_regression.cpp b/src/test/test_malloc_regression.cpp
index c827762..a6e5162 100644
--- a/src/test/test_malloc_regression.cpp
+++ b/src/test/test_malloc_regression.cpp
@@ -87,7 +87,7 @@ bool test_bootstrap_leak(void) {
 
     ptrdiff_t memory_leak = GetMemoryUsage() - memory_in_use;
     if( memory_leak>0 ) { // possibly too strong?
-        printf( "Error: memory leak of up to %ld bytes\n", static_cast<long>(memory_leak));
+        REPORT( "Error: memory leak of up to %ld bytes\n", static_cast<long>(memory_leak));
     }
 
     for( int i=0; i<take_out_count; ++i )
@@ -96,13 +96,14 @@ bool test_bootstrap_leak(void) {
     return memory_leak<=0;
 }
 
+__TBB_TEST_EXPORT
 int main( int /*argc*/, char* argv[] ) {
     bool passed = true;
 
     passed &= test_bootstrap_leak();
 
-    if(passed) printf("done\n");
-    else       printf("%s failed\n", argv[0]);
+    if(passed) REPORT("done\n");
+    else       REPORT("%s failed\n", argv[0]);
 
     return passed?0:1;
 }
diff --git a/src/test/test_malloc_functionality.cpp b/src/test/test_malloc_whitebox.cpp
similarity index 54%
rename from src/test/test_malloc_functionality.cpp
rename to src/test/test_malloc_whitebox.cpp
index dbc6f1b..75d74be 100644
--- a/src/test/test_malloc_functionality.cpp
+++ b/src/test/test_malloc_whitebox.cpp
@@ -30,10 +30,13 @@
 #include "harness.h"
 #include "harness_barrier.h"
 
-// current minimal size of object that treated as large object
-const size_t minLargeObjectSize = 8065;
-// current difference between size of consequent cache bins
-const int largeObjectCacheStep = 8*1024;
+// To not depends on ITT support stuff
+#ifdef DO_ITT_NOTIFY
+ #undef DO_ITT_NOTIFY
+#endif
+
+#include "MemoryAllocator.cpp" // can be in ../tbbmalloc or another directory
+#include "../tbbmalloc/tbbmalloc.cpp"
 
 const int LARGE_MEM_SIZES_NUM = 10;
 const size_t MByte = 1024*1024;
@@ -59,19 +62,16 @@ public:
     }
 };
 
-class Run: NoAssign {
-    const int allThreads;
-    Harness::SpinBarrier *barrier;
+class TestLargeObjCache: NoAssign {
+    static Harness::SpinBarrier barrier;
 public:
     static int largeMemSizes[LARGE_MEM_SIZES_NUM];
 
-    Run( int allThreads, Harness::SpinBarrier *barrier ) : 
-        allThreads(allThreads), barrier(barrier) {}
+    static void initBarrier(unsigned thrds) { barrier.initialize(thrds); }
+
+    TestLargeObjCache( ) {}
+
     void operator()( int /*mynum*/ ) const {
-        testObjectCaching();
-    }
-private:
-    void testObjectCaching() const {
         AllocInfo allocs[LARGE_MEM_SIZES_NUM];
 
         // push to maximal cache limit
@@ -90,10 +90,10 @@ private:
             }
         }
         
-        barrier->wait();
+        barrier.wait();
 
         // check caching correctness
-        for (int i=0; i<10; i++) {
+        for (int i=0; i<1000; i++) {
             size_t curr = 0;
             for (int j=0; j<LARGE_MEM_SIZES_NUM-1; j++, curr++)
                 new (allocs+curr) AllocInfo(largeMemSizes[j]);
@@ -111,49 +111,79 @@ private:
     }
 };
 
-int Run::largeMemSizes[LARGE_MEM_SIZES_NUM];
+Harness::SpinBarrier TestLargeObjCache::barrier;
+int TestLargeObjCache::largeMemSizes[LARGE_MEM_SIZES_NUM];
+
+#if MALLOC_CHECK_RECURSION
 
-int main(int argc, char* argv[])
-{
+class TestStartupAlloc: NoAssign {
+    static Harness::SpinBarrier init_barrier;
+    struct TestBlock {
+        void *ptr;
+        size_t sz;
+    };
+    static const int ITERS = 100;
+public:
+    TestStartupAlloc() {}
+    static void initBarrier(unsigned thrds) { init_barrier.initialize(thrds); }
+    void operator()(int) const {
+        TestBlock blocks1[ITERS], blocks2[ITERS];
+
+        init_barrier.wait();
+
+        for (int i=0; i<ITERS; i++) {
+            blocks1[i].sz = rand() % minLargeObjectSize;
+            blocks1[i].ptr = startupAlloc(blocks1[i].sz);
+            ASSERT(blocks1[i].ptr && startupMsize(blocks1[i].ptr)>=blocks1[i].sz 
+                   && 0==(uintptr_t)blocks1[i].ptr % sizeof(void*), NULL);
+            memset(blocks1[i].ptr, i, blocks1[i].sz);
+        }
+        for (int i=0; i<ITERS; i++) {
+            blocks2[i].sz = rand() % minLargeObjectSize;
+            blocks2[i].ptr = startupAlloc(blocks2[i].sz);
+            ASSERT(blocks2[i].ptr && startupMsize(blocks2[i].ptr)>=blocks2[i].sz 
+                   && 0==(uintptr_t)blocks2[i].ptr % sizeof(void*), NULL);
+            memset(blocks2[i].ptr, i, blocks2[i].sz);
+
+            for (size_t j=0; j<blocks1[i].sz; j++)
+                ASSERT(*((char*)blocks1[i].ptr+j) == i, NULL);
+            Block *block = (Block *)alignDown(blocks1[i].ptr, blockSize);
+            startupFree((StartupBlock *)block, blocks1[i].ptr);
+        }
+        for (int i=ITERS-1; i>=0; i--) {
+            for (size_t j=0; j<blocks2[i].sz; j++)
+                ASSERT(*((char*)blocks2[i].ptr+j) == i, NULL);
+            Block *block = (Block *)alignDown(blocks2[i].ptr, blockSize);
+            startupFree((StartupBlock *)block, blocks2[i].ptr);
+        }
+    }
+};
+
+Harness::SpinBarrier TestStartupAlloc::init_barrier;
+
+#endif /* MALLOC_CHECK_RECURSION */
+
+__TBB_TEST_EXPORT
+int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
 
+#if MALLOC_CHECK_RECURSION
+    for( int p=MaxThread; p>=MinThread; --p ) {
+        TestStartupAlloc::initBarrier( p );
+        NativeParallelFor( p, TestStartupAlloc() );
+        ASSERT(!firstStartupBlock, "Startup heap memory leak detected");
+    }
+#endif
+
     for (int i=0; i<LARGE_MEM_SIZES_NUM; i++)
-        Run::largeMemSizes[i] = (int)(minLargeObjectSize + 
-                                      2*minLargeObjectSize*(1.*rand()/RAND_MAX));
+        TestLargeObjCache::largeMemSizes[i] = 
+            (int)(minLargeObjectSize + 2*minLargeObjectSize*(1.*rand()/RAND_MAX));
 
     for( int p=MaxThread; p>=MinThread; --p ) {
-        Harness::SpinBarrier *barrier = new Harness::SpinBarrier(p);
-        NativeParallelFor( p, Run(p, barrier) );
-        delete barrier;
+        TestLargeObjCache::initBarrier( p );
+        NativeParallelFor( p, TestLargeObjCache() );
     }
 
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
-
-/* On this platforms __TBB_machine_pause is defined in TBB library,
- * so have to provide it manually. 
- */
-#if (_WIN32||_WIN64) && defined(_M_AMD64)
-
-extern "C" void __TBB_machine_pause(__int32) { __TBB_Yield(); }
-
-#elif __linux__ && __ia64__
-extern "C" void __TBB_machine_pause(int32_t) { __TBB_Yield(); }
-
-pthread_mutex_t counter_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-/* As atomics are used only as atomic addition in Harness::SpinBarrier 
- * implementation, it's OK to have this mutex.
- */
-int32_t __TBB_machine_fetchadd4__TBB_full_fence (volatile void *ptr, 
-                                                 int32_t value)
-{
-    pthread_mutex_lock(&counter_mutex);
-    int32_t result = *(int32_t*)ptr;
-    *(int32_t*)ptr = result + value;
-    pthread_mutex_unlock(&counter_mutex);
-    return result;
-}
-
-#endif
diff --git a/src/test/test_model_plugin.cpp b/src/test/test_model_plugin.cpp
index 111091e..37117c1 100644
--- a/src/test/test_model_plugin.cpp
+++ b/src/test/test_model_plugin.cpp
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdexcept>
+#include "harness_report.h"
 
 #ifdef _USRDLL
 #include "tbb/task_scheduler_init.h"
@@ -87,7 +88,7 @@ void plugin_call(int maxthread)
         CModel model;
         model.init_and_terminate(maxthread);
     } catch( std::runtime_error& error ) {
-        printf("ERROR: %s\n", error.what());
+        REPORT("ERROR: %s\n", error.what());
     }
 }
 
@@ -112,7 +113,7 @@ void report_error_in(const char* function_name)
     char* message = (char*)dlerror();
     int code = 0;
 #endif
-    printf( "%s failed with error %d: %s\n", function_name, code, message);
+    REPORT( "%s failed with error %d: %s\n", function_name, code, message);
 
 #if _WIN32 || _WIN64
     LocalFree(message);
@@ -139,7 +140,7 @@ int use_lot_of_tls() {
            && count < 4096 ) // Sun Solaris doesn't have any built-in limit, so we set something big enough
     {
         last_handles[++count%10] = result;
-        if(Verbose) printf("%d\n", count);
+        REMARK("%d\n", count);
         pthread_setspecific(result,&setspecific_dummy);
     }
     for( int i=0; i<10; ++i )
@@ -150,15 +151,14 @@ int use_lot_of_tls() {
 
 typedef void (*PLUGIN_CALL)(int);
 
-int main(int argc, char* argv[])
-{
+__TBB_TEST_EXPORT
+int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
 
     PLUGIN_CALL my_plugin_call;
 
     int tls_key_count = use_lot_of_tls();
-    if( Verbose )
-        printf("%d thread local objects allocated in advance\n", tls_key_count);
+    REMARK("%d thread local objects allocated in advance\n", tls_key_count);
 
     for( int i=1; i<100; ++i ) {  
 #if _WIN32 || _WIN64
@@ -168,7 +168,7 @@ int main(int argc, char* argv[])
             report_error_in("LoadLibrary");
             return -1;
 #else
-            printf("skip\n");
+            REPORT("skip\n");
             return 0;
 #endif
         }
@@ -189,7 +189,7 @@ int main(int argc, char* argv[])
             report_error_in("dlopen");
             return -1;
 #else
-            printf("skip\n");
+            REPORT("skip\n");
             return 0;
 #endif
         }
@@ -200,11 +200,9 @@ int main(int argc, char* argv[])
         }
 #endif
 
-        if( Verbose )
-            printf("Iteration %d, calling plugin... ", i);
+        REMARK("Iteration %d, calling plugin... ", i);
         my_plugin_call(MaxThread);
-        if( Verbose )
-            printf("succeeded\n");
+        REMARK("succeeded\n");
 
 #if _WIN32 || _WIN64
         FreeLibrary(hLib);
@@ -213,7 +211,7 @@ int main(int argc, char* argv[])
 #endif
     } // end for(1,100)
 
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_mutex.cpp b/src/test/test_mutex.cpp
index 2b2198f..5576fc5 100644
--- a/src/test/test_mutex.cpp
+++ b/src/test/test_mutex.cpp
@@ -48,7 +48,6 @@
 #include "tbb/tick_count.h"
 #include "tbb/atomic.h"
 #include "harness.h"
-#include "harness_trace.h"
 #include <cstdlib>
 #include <cstdio>
 #if _OPENMP
@@ -191,7 +190,7 @@ void Test( const char * name ) {
     tbb::tick_count t1 = tbb::tick_count::now();
     REMARK("%g usec\n",(t1-t0).seconds());
     if( counter.value!=n )
-        std::printf("ERROR for %s: counter.value=%ld\n",name,counter.value);
+        REPORT("ERROR for %s: counter.value=%ld\n",name,counter.value);
 }
 
 template<typename M, size_t N>
@@ -217,7 +216,7 @@ struct Invariant {
         long tmp;
         for( size_t k=0; k<N; ++k )
             if( (tmp=value[k])!=expected_value ) {
-                printf("ERROR: %ld!=%ld\n", tmp, expected_value);
+                REPORT("ERROR: %ld!=%ld\n", tmp, expected_value);
                 return false;
             }
         return true;
@@ -288,7 +287,7 @@ struct TwiddleInvariant: NoAssign {
                 }
             }
             if( !okay ) {
-                std::printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(i),
+                REPORT( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(i),
                              write?"write,":"read,", write?(i%16==7?"downgrade,":""):(i%8==3?"upgrade,":""),
                              lock_kept?"lock kept,":"lock not kept,", (i/8)&1?"imp/exp":"exp/imp" );
             }
@@ -313,7 +312,7 @@ void TestReaderWriterLock( const char * mutex_name ) {
     // There is either a writer or a reader upgraded to a writer for each 4th iteration
     long expected_value = n/4;
     if( !invariant.value_is(expected_value) )
-        std::printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
+        REPORT("ERROR for %s: final invariant value is wrong\n",mutex_name);
     REMARK( "%g usec\n", (t1-t0).seconds() );
 }
 
@@ -332,20 +331,20 @@ void TestTryAcquireReader_OneThread( const char * mutex_name ) {
         if( lock1.try_acquire(tested_mutex, false) )
             lock1.release();
         else
-            std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+            REPORT("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
         {
             typename M::scoped_lock lock2(tested_mutex, false);
             if( lock1.try_acquire(tested_mutex) )
-                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+                REPORT("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
             lock2.release();
             lock2.acquire(tested_mutex, true);
             if( lock1.try_acquire(tested_mutex, false) )
-                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+                REPORT("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
         }
         if( lock1.try_acquire(tested_mutex, false) )
             lock1.release();
         else
-            std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+            REPORT("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
     }
 }
 
@@ -357,25 +356,25 @@ void TestTryAcquire_OneThread( const char * mutex_name ) {
     if( lock1.try_acquire(tested_mutex) )
         lock1.release();
     else
-        std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+        REPORT("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
     {
         if( M::is_recursive_mutex ) {
             typename M::scoped_lock lock2(tested_mutex);
             if( lock1.try_acquire(tested_mutex) )
                 lock1.release();
             else
-                std::printf("ERROR for %s: try_acquire on recursive lock failed though it should not\n", mutex_name);
+                REPORT("ERROR for %s: try_acquire on recursive lock failed though it should not\n", mutex_name);
             //windows.. -- both are recursive
         } else {
             typename M::scoped_lock lock2(tested_mutex);
             if( lock1.try_acquire(tested_mutex) )
-                std::printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
+                REPORT("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name);
         }
     }
     if( lock1.try_acquire(tested_mutex) )
         lock1.release();
     else
-        std::printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
+        REPORT("ERROR for %s: try_acquire failed though it should not\n", mutex_name);
 } 
 
 #if _MSC_VER && !defined(__INTEL_COMPILER)
@@ -492,11 +491,11 @@ struct NullUpgradeDowngrade: NoAssign {
             if( i&1 ) {
                 typename M::scoped_lock lock1(my_mutex, true) ;
                 if( lock1.downgrade_to_reader()==false )
-                    std::printf("ERROR for %s: downgrade should always succeed\n", name);
+                    REPORT("ERROR for %s: downgrade should always succeed\n", name);
             } else {
                 lock2.acquire( my_mutex, false );
                 if( lock2.upgrade_to_writer()==false )
-                    std::printf("ERROR for %s: upgrade should always succeed\n", name);
+                    REPORT("ERROR for %s: upgrade should always succeed\n", name);
                 lock2.release();
             }
         }
@@ -512,7 +511,7 @@ void TestNullMutex( const char * name ) {
     Counter<M> counter;
     counter.value = 0;
     const int n = 100;
-    if( Verbose ) printf("%s ",name);
+    REMARK("%s ",name);
     {
         tbb::parallel_for(tbb::blocked_range<size_t>(0,n,10),AddOne<Counter<M> >(counter));
     }
@@ -525,7 +524,7 @@ void TestNullMutex( const char * name ) {
 
 template<typename M>
 void TestNullRWMutex( const char * name ) {
-    if( Verbose ) printf("%s ",name);
+    REMARK("%s ",name);
     const int n = 100;
     M m;
     tbb::parallel_for(tbb::blocked_range<size_t>(0,n,10),NullUpgradeDowngrade<M>(m, name));
@@ -562,6 +561,7 @@ void TestRecursiveMutexISO( const char * name ) {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char * argv[] ) {
     // Default is to run on two threads
     MinThread = MaxThread = 2;
@@ -625,6 +625,6 @@ int main( int argc, char * argv[] ) {
         }
         REMARK( "calling destructor for task_scheduler_init\n" );
     }
-    std::printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_mutex_native_threads.cpp b/src/test/test_mutex_native_threads.cpp
index dc75bc5..8bc4301 100644
--- a/src/test/test_mutex_native_threads.cpp
+++ b/src/test/test_mutex_native_threads.cpp
@@ -85,7 +85,7 @@ struct Invariant {
         long tmp;
         for( long k=0; k<N; ++k )
             if( (tmp=value[k])!=expected_value ) {
-                printf("ERROR: %ld!=%ld\n", tmp, expected_value);
+                REPORT("ERROR: %ld!=%ld\n", tmp, expected_value);
                 return false;
             }
         return true;
@@ -153,7 +153,7 @@ void Invariant<M,N>::flog_once( size_t mode )
         }
     }
     if( !okay ) {
-        printf( "ERROR for %s at %ld: %s %s %s %s\n",mutex_name, long(mode),
+        REPORT( "ERROR for %s at %ld: %s %s %s %s\n",mutex_name, long(mode),
                 write?"write,":"read,", write?(mode%16==7?"downgrade,":""):(mode%8==3?"upgrade,":""),
                 lock_kept?"lock kept,":"lock not kept,", (mode/8)&1?"imp/exp":"exp/imp" );
     }
@@ -178,8 +178,7 @@ struct Work: NoAssign {
 /** Does not test features specific to reader-writer locks. */
 template<typename M>
 void Test( const char * name, int nthread ) {
-    if( Verbose )
-        printf("testing %s\n",name);
+    REMARK("testing %s\n",name);
     Counter<M> counter;
     counter.value = 0;
     Order = 0;
@@ -188,18 +187,16 @@ void Test( const char * name, int nthread ) {
     NativeParallelFor( nthread, Work<Counter<M>, test_size>(counter) );
     tbb::tick_count t1 = tbb::tick_count::now();
 
-    if( Verbose )
-        printf("%s time = %g usec\n",name, (t1-t0).seconds() );
+    REMARK("%s time = %g usec\n",name, (t1-t0).seconds() );
     if( counter.value!=test_size )
-        printf("ERROR for %s: counter.value=%ld != %ld=test_size\n",name,counter.value,test_size);
+        REPORT("ERROR for %s: counter.value=%ld != %ld=test_size\n",name,counter.value,test_size);
 }
 
 
 //! Generic test of TBB ReaderWriterMutex type M
 template<typename M>
 void TestReaderWriter( const char * mutex_name, int nthread ) {
-    if( Verbose )
-        printf("testing %s\n",mutex_name);
+    REMARK("testing %s\n",mutex_name);
     Invariant<M,8> invariant(mutex_name);
     Order = 0;
     static const long test_size = 1000000;
@@ -209,16 +206,15 @@ void TestReaderWriter( const char * mutex_name, int nthread ) {
     // There is either a writer or a reader upgraded to a writer for each 4th iteration
     long expected_value = test_size/4;
     if( !invariant.value_is(expected_value) )
-        printf("ERROR for %s: final invariant value is wrong\n",mutex_name);
-    if( Verbose )
-        printf("%s readers & writers time = %g usec\n",mutex_name,(t1-t0).seconds());
+        REPORT("ERROR for %s: final invariant value is wrong\n",mutex_name);
+    REMARK("%s readers & writers time = %g usec\n",mutex_name,(t1-t0).seconds());
 }
 
+__TBB_TEST_EXPORT
 int main( int argc, char * argv[] ) {
     ParseCommandLine( argc, argv );
     for( int p=MinThread; p<=MaxThread; ++p ) {
-        if( Verbose )
-            printf( "testing with %d threads\n", p );
+        REMARK( "testing with %d threads\n", p );
         Test<tbb::spin_mutex>( "spin_mutex", p );
         Test<tbb::queuing_mutex>( "queuing_mutex", p );
         Test<tbb::queuing_rw_mutex>( "queuing_rw_mutex", p );
@@ -226,6 +222,6 @@ int main( int argc, char * argv[] ) {
         TestReaderWriter<tbb::queuing_rw_mutex>( "queuing_rw_mutex", p );
         TestReaderWriter<tbb::spin_rw_mutex>( "spin_rw_mutex", p );
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_openmp.cpp b/src/test/test_openmp.cpp
index 5c85573..9ce3d89 100644
--- a/src/test/test_openmp.cpp
+++ b/src/test/test_openmp.cpp
@@ -144,8 +144,7 @@ public:
 
 //! Test OpenMMP loop around TBB loop
 void OpenMP_TBB_Convolve( T c[], const T a[], int m, const T b[], int n ) {
-    if( Verbose )
-        printf("testing OpenMP loop around TBB loop\n");
+    REMARK("testing OpenMP loop around TBB loop\n");
 #pragma omp parallel 
     {
         task_scheduler_init init;
@@ -186,8 +185,7 @@ public:
 
 //! Test TBB loop around OpenMP loop
 void TBB_OpenMP_Convolve( T c[], const T a[], int m, const T b[], int n ) {
-    if( Verbose )
-        printf("testing TBB loop around OpenMP loop\n");
+    REMARK("testing TBB loop around OpenMP loop\n");
     parallel_for( blocked_range<int>(0,m+n-1,10), OuterBody( c, a, m, b, n ) );
 }
 
@@ -196,9 +194,10 @@ void TBB_OpenMP_Convolve( T c[], const T a[], int m, const T b[], int n ) {
 const int M = 17*17;
 const int N = 13*13;
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
 #ifdef _PGO_INSTRUMENT
-    printf("Warning: test_openmp.exe has problems if compiled with -prof-genx; skipping\n");
+    REPORT("Warning: test_openmp.exe has problems if compiled with -prof-genx; skipping\n");
     return 0;
 #endif
     ParseCommandLine(argc,argv);
@@ -231,6 +230,6 @@ int main( int argc, char* argv[] ) {
             }
         } 
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_do.cpp b/src/test/test_parallel_do.cpp
index ff155b0..3b74538 100644
--- a/src/test/test_parallel_do.cpp
+++ b/src/test/test_parallel_do.cpp
@@ -217,12 +217,13 @@ void Run( int nthread ) {
     }
 }
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     MinThread=1;
     MaxThread=2;
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        printf("number of threads must be positive\n");
+        REPORT("number of threads must be positive\n");
         exit(1);
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -234,6 +235,6 @@ int main( int argc, char* argv[] ) {
     // This check must be performed after the scheduler terminated because only in this 
     // case there is a guarantee that the workers already destroyed their last tasks. 
     ASSERT( g_values_counter == 0, "Value objects were leaked" );
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_for.cpp b/src/test/test_parallel_for.cpp
index 5459b08..6be3a23 100644
--- a/src/test/test_parallel_for.cpp
+++ b/src/test/test_parallel_for.cpp
@@ -28,6 +28,18 @@
 
 // Test for function template parallel_for.h
 
+#if _MSC_VER
+#pragma warning (push)
+#if !defined(__INTEL_COMPILER)
+    // Suppress pointless "unreachable code" warning.
+    #pragma warning (disable: 4702)
+#endif
+#if defined(_Wp64)
+    // Workaround for overzealous compiler warnings in /Wp64 mode
+    #pragma warning (disable: 4267)
+#endif
+#endif //#if _MSC_VER 
+
 #include "tbb/parallel_for.h"
 #include "tbb/atomic.h"
 #include "harness_assert.h"
@@ -134,8 +146,7 @@ void Flog( int nthread ) {
         }
     }
     tbb::tick_count T1 = tbb::tick_count::now();
-    if( Verbose )
-        printf("time=%g\tnthread=%d\tpad=%d\n",(T1-T0).seconds(),nthread,int(Pad));
+    REMARK("time=%g\tnthread=%d\tpad=%d\n",(T1-T0).seconds(),nthread,int(Pad));
 }
 
 // Testing parallel_for with step support
@@ -145,9 +156,12 @@ const size_t PFOR_BUFFER_ACTUAL_SIZE = PFOR_BUFFER_TEST_SIZE + 1024;
 size_t pfor_buffer[PFOR_BUFFER_ACTUAL_SIZE];
 
 template<typename T>
-void TestFunction(T index){
-    pfor_buffer[index]++;
-}
+class TestFunctor{
+public:
+    void operator ()(T index) const {
+        pfor_buffer[index]++;
+    }
+};
 
 #include <stdexcept> // std::invalid_argument
 template <typename T>
@@ -160,7 +174,11 @@ void TestParallelForWithStepSupport()
         T step;
         for (step = 1; step < pfor_buffer_test_size; step++) {
             memset(pfor_buffer, 0, pfor_buffer_actual_size * sizeof(size_t));
-            tbb::parallel_for(begin, pfor_buffer_test_size, step, TestFunction<T>);
+            if (step == 1){
+                tbb::parallel_for(begin, pfor_buffer_test_size, TestFunctor<T>());
+            } else {
+                tbb::parallel_for(begin, pfor_buffer_test_size, step, TestFunctor<T>());
+            }
             // Verifying that parallel_for processed all items it should
             for (T i = begin; i < pfor_buffer_test_size; i = i + step) {
                 ASSERT(pfor_buffer[i] == 1, "parallel_for didn't process all required elements");
@@ -174,13 +192,15 @@ void TestParallelForWithStepSupport()
     }
 
     // Testing some corner cases
-    tbb::parallel_for(static_cast<T>(2), static_cast<T>(1), static_cast<T>(1), TestFunction<T>);
+    tbb::parallel_for(static_cast<T>(2), static_cast<T>(1), static_cast<T>(1), TestFunctor<T>());
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
     try{
-        tbb::parallel_for(static_cast<T>(1), static_cast<T>(100), static_cast<T>(0), TestFunction<T>);  // should cause std::invalid_argument
+        tbb::parallel_for(static_cast<T>(1), static_cast<T>(100), static_cast<T>(0), TestFunctor<T>());  // should cause std::invalid_argument
     }catch(std::invalid_argument){
         return;
     }
     ASSERT(0, "std::invalid_argument should be thrown");
+#endif
 }
 
 // Exception support test
@@ -188,33 +208,52 @@ void TestParallelForWithStepSupport()
 #include "tbb/tbb_exception.h"
 #include "harness_eh.h"
 
-void test_function_with_exception(size_t)
+class test_functor_with_exception
 {
-    ThrowTestException();
-}
+public:
+    void operator ()(size_t) const{
+        ThrowTestException();
+    }
+};
 
 void TestExceptionsSupport()
 {
     REMARK (__FUNCTION__);
-    ResetEhGlobals();
-    TRY();
-        tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, (size_t)1, test_function_with_exception);
-    CATCH_AND_ASSERT();
+    { // Tests version with a step provided
+        ResetEhGlobals();
+        TRY();
+            tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, (size_t)1, test_functor_with_exception());
+        CATCH_AND_ASSERT();
+    }
+    { // Tests version without a step
+        ResetEhGlobals();
+        TRY();
+            tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, test_functor_with_exception());
+        CATCH_AND_ASSERT();
+    }
 }
 
-// Cancellaton support test
-void function_to_cancel(size_t ) {
-    ++g_CurExecuted;
-    CancellatorTask::WaitUntilReady();
-}
+// Cancellation support test
+class functor_to_cancel {
+public:
+    void operator()(size_t) const {
+        ++g_CurExecuted;
+        CancellatorTask::WaitUntilReady();
+    }
+};
+
+size_t g_worker_task_step = 0;
 
 class my_worker_pfor_step_task : public tbb::task
 {
     tbb::task_group_context &my_ctx;
 
     tbb::task* execute () {
-        tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, (size_t)1, function_to_cancel, my_ctx);
-        
+        if (g_worker_task_step == 0){
+            tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, functor_to_cancel(), my_ctx);
+        }else{
+            tbb::parallel_for((size_t)0, (size_t)PFOR_BUFFER_TEST_SIZE, g_worker_task_step, functor_to_cancel(), my_ctx);
+        }
         return NULL;
     }
 public:
@@ -223,6 +262,13 @@ public:
 
 void TestCancellation()
 {
+    // tests version without a step
+    g_worker_task_step = 0;
+    ResetEhGlobals();
+    RunCancellationTest<my_worker_pfor_step_task, CancellatorTask>();
+
+    // tests version with step
+    g_worker_task_step = 1;
     ResetEhGlobals();
     RunCancellationTest<my_worker_pfor_step_task, CancellatorTask>();
 }
@@ -231,11 +277,12 @@ void TestCancellation()
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     MinThread = 1;
     ParseCommandLine(argc,argv);
     if( MinThread<1 ) {
-        printf("number of threads must be positive\n");
+        REPORT("number of threads must be positive\n");
         exit(1);
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -266,8 +313,12 @@ int main( int argc, char* argv[] ) {
         }
     }
 #if __TBB_EXCEPTION_HANDLING_BROKEN || (__GNUC__==4 && __GNUC_MINOR__==1 && __TBB_ipf)
-    printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+    REPORT("Warning: Exception handling tests are skipped due to a known issue.\n");
 #endif
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
+
+#if _MSC_VER
+#pragma warning (pop)
+#endif
diff --git a/src/test/test_parallel_for_each.cpp b/src/test/test_parallel_for_each.cpp
index 7e7c36f..54bf01b 100644
--- a/src/test/test_parallel_for_each.cpp
+++ b/src/test/test_parallel_for_each.cpp
@@ -128,12 +128,13 @@ void TestCancellation()
 
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     MinThread=1;
     MaxThread=2;
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        printf("number of threads must be positive\n");
+        REPORT("number of threads must be positive\n");
         exit(1);
     }
 
@@ -157,8 +158,8 @@ int main( int argc, char* argv[] ) {
         TestCPUUserTime(p);
     }
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-    printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+    REPORT("Warning: Exception handling tests are skipped due to a known issue.\n");
 #endif
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_invoke.cpp b/src/test/test_parallel_invoke.cpp
index c4a9361..d629508 100644
--- a/src/test/test_parallel_invoke.cpp
+++ b/src/test/test_parallel_invoke.cpp
@@ -31,7 +31,6 @@
 #include "tbb/atomic.h"
 #include "tbb/tbb_exception.h"
 #include "harness.h"
-#include "harness_trace.h"
 
 static const size_t MAX_NUMBER_OF_PINVOKE_ARGS = 10;
 tbb::atomic<size_t> function_counter;
@@ -271,6 +270,7 @@ void TestCancellation ()
 
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     // Set default minimum number of threads
     MinThread = 2;
@@ -282,7 +282,7 @@ int main(int argc, char* argv[]) {
         test_parallel_invoke();
         if (p > 1) {
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-            printf("Warning: Exception handling tests are skipped due to a known issue.\n");
+            REPORT("Warning: Exception handling tests are skipped due to a known issue.\n");
 #else
             TestExceptionHandling();
 #endif
@@ -290,7 +290,7 @@ int main(int argc, char* argv[]) {
         }
         TestCPUUserTime(p);
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_parallel_reduce.cpp b/src/test/test_parallel_reduce.cpp
index a110ea4..bd58deb 100644
--- a/src/test/test_parallel_reduce.cpp
+++ b/src/test/test_parallel_reduce.cpp
@@ -146,8 +146,7 @@ void Flog( int nthread, bool interference=false ) {
             ASSERT( f.end==(i==0 ? ~size_t(0) : i), NULL );
         }
         tbb::tick_count T1 = tbb::tick_count::now();
-        if( Verbose )
-            printf("time=%g join_count=%ld ForkCount=%ld nthread=%d%s\n",
+        REMARK("time=%g join_count=%ld ForkCount=%ld nthread=%d%s\n",
                    (T1-T0).seconds(),join_count,long(ForkCount), nthread, interference ? " with interference)":"");
     }
 }
@@ -204,25 +203,74 @@ void FlogWithInterference( int nthread ) {
     root->destroy( *root );
 }
 
+#include "tbb/blocked_range.h"
+
+#if _MSC_VER
+    typedef tbb::internal::uint64_t ValueType;
+#else
+    typedef uint64_t ValueType;
+#endif
+
+struct Sum {
+    template<typename T>
+    T operator() ( const T& v1, const T& v2 ) const {
+        return v1 + v2;
+    }
+};
+
+struct Accumulator {
+    ValueType operator() ( const tbb::blocked_range<ValueType*>& r, ValueType value ) const {
+        for ( ValueType* pv = r.begin(); pv != r.end(); ++pv )
+            value += *pv;
+        return value;
+    }
+};
+
+void ParallelSum () {
+    const ValueType I = 0,
+                    N = 1000000,
+                    R = N * (N + 1) / 2;
+    ValueType *array = new ValueType[N + 1];
+    for ( ValueType i = 0; i < N; ++i )
+        array[i] = i + 1;
+    tbb::blocked_range<ValueType*> range(array, array + N);
+    ValueType r1 = tbb::parallel_reduce( range, I, Accumulator(), Sum() );
+    ASSERT( r1 == R, NULL );
+#if __TBB_LAMBDAS_PRESENT
+    ValueType r2 = tbb::parallel_reduce( range, I, 
+        [](const tbb::blocked_range<ValueType*>& r, ValueType value) -> ValueType { 
+            for ( ValueType* pv = r.begin(); pv != r.end(); ++pv )
+                value += *pv;
+            return value;
+        },
+        Sum()
+    );
+    ASSERT( r2 == R, NULL );
+#endif /* LAMBDAS */
+    delete array;
+}
+
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Set default number of threads
     MinThread = MaxThread = 2;
     ParseCommandLine( argc, argv );
     if( MinThread<0 ) {
-        printf("Usage: nthread must be positive\n");
+        REPORT("Usage: nthread must be positive\n");
         exit(1);
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
         tbb::task_scheduler_init init( p );
         Flog(p);
-        if( p>=2 ) FlogWithInterference(p);
-
+        if( p>=2 )
+            FlogWithInterference(p);
+        ParallelSum();
         // Test that all workers sleep when no work
         TestCPUUserTime(p);
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_scan.cpp b/src/test/test_parallel_scan.cpp
index c70cedb..d93c4e0 100644
--- a/src/test/test_parallel_scan.cpp
+++ b/src/test/test_parallel_scan.cpp
@@ -97,12 +97,12 @@ class Accumulator: BodyId {
 public:
 #if PRINT_DEBUG
     void print() const {
-        printf("%d [%ld..%ld)\n", id,my_range.begin(),my_range.end() );
+        REPORT("%d [%ld..%ld)\n", id,my_range.begin(),my_range.end() );
     }
 #endif /* PRINT_DEBUG */
     ~Accumulator() {
 #if PRINT_DEBUG
-        printf("%d [%ld..%ld) destroyed\n",id,my_range.begin(),my_range.end() ); 
+        REPORT("%d [%ld..%ld) destroyed\n",id,my_range.begin(),my_range.end() ); 
 #endif /* PRINT_DEBUG */
         // Clear self as first action of destructor, to indicate that object is not fully constructed.
         self = 0;
@@ -113,7 +113,7 @@ public:
     {
         ++NumberOfLiveAccumulator;
 #if PRINT_DEBUG
-        printf("%d forked from %d\n",id,a.id);
+        REPORT("%d forked from %d\n",id,a.id);
 #endif /* PRINT_DEBUG */
         Snooze(true);
         // Set self as last action of constructor, to indicate that object is fully constructed.
@@ -124,9 +124,9 @@ public:
         Snooze(true);
 #if PRINT_DEBUG
         if( my_range.empty() )
-            printf("%d computing %s [%ld..%ld)\n",id,Tag::is_final_scan()?"final":"lookahead",r.begin(),r.end() );
+            REPORT("%d computing %s [%ld..%ld)\n",id,Tag::is_final_scan()?"final":"lookahead",r.begin(),r.end() );
         else
-            printf("%d computing %s [%ld..%ld) [%ld..%ld)\n",id,Tag::is_final_scan()?"final":"lookahead",my_range.begin(),my_range.end(),r.begin(),r.end());
+            REPORT("%d computing %s [%ld..%ld) [%ld..%ld)\n",id,Tag::is_final_scan()?"final":"lookahead",my_range.begin(),my_range.end(),r.begin(),r.end());
 #endif /* PRINT_DEBUG */
         ASSERT( !Tag::is_final_scan() || (my_range.begin()==0 && my_range.end()==r.begin()) || (my_range.empty() && r.begin()==0), NULL );
         for( long i=r.begin(); i<r.end(); ++i ) {
@@ -150,7 +150,7 @@ public:
     }
     void reverse_join( const Accumulator& left ) {
 #if PRINT_DEBUG
-        printf("reverse join %d [%ld..%ld) %d [%ld..%ld)\n",
+        REPORT("reverse join %d [%ld..%ld) %d [%ld..%ld)\n",
                left.id,left.my_range.begin(),left.my_range.end(),
                id,my_range.begin(),my_range.end());
 #endif /* PRINT_DEBUG */
@@ -179,7 +179,7 @@ public:
 static void VerifySum( long start_index, long finish_index, int sum, int line ) {
     int expected = TriangularSum( finish_index ) - TriangularSum( start_index );
     if( expected!=sum ) {
-        printf( "line %d: sum[%ld..%ld] should be = %d, but was computed as %d\n",
+        REPORT( "line %d: sum[%ld..%ld] should be = %d, but was computed as %d\n",
                 line, start_index, finish_index, expected, sum );
         abort();
     }
@@ -200,7 +200,7 @@ void TestAccumulator( int mode, int nthread ) {
         Accumulator<T> acc( addend, sum );
         tbb::tick_count t0 = tbb::tick_count::now();
 #if PRINT_DEBUG
-        printf("--------- mode=%d range=[0..%ld)\n",mode,n);
+        REPORT("--------- mode=%d range=[0..%ld)\n",mode,n);
 #endif /* PRINT_DEBUG */
         ScanIsRunning = true;
 
@@ -218,14 +218,14 @@ void TestAccumulator( int mode, int nthread ) {
 
         ScanIsRunning = false;
 #if PRINT_DEBUG
-        printf("=========\n");
+        REPORT("=========\n");
 #endif /* PRINT_DEBUG */
         Snooze(false);
         tbb::tick_count t1 = tbb::tick_count::now();
         long used_once_count = 0;
         for( long i=0; i<n; ++i ) 
             if( !(AddendHistory[i]&USED_FINAL) ) {
-                printf("failed to use addend[%ld] %s\n",i,AddendHistory[i]&USED_NONFINAL?"(but used nonfinal)":"");
+                REPORT("failed to use addend[%ld] %s\n",i,AddendHistory[i]&USED_NONFINAL?"(but used nonfinal)":"");
             }
         for( long i=0; i<n; ++i ) {
             VerifySum( 0, i, sum[i], __LINE__ );
@@ -235,8 +235,7 @@ void TestAccumulator( int mode, int nthread ) {
             ASSERT( acc.my_total==sum[n-1], NULL );
         else
             ASSERT( acc.my_total==0, NULL );
-        if( Verbose ) 
-            printf("time [n=%ld] = %g\tused_once%% = %g\tnthread=%d\n",n,(t1-t0).seconds(), n==0 ? 0 : 100.0*used_once_count/n,nthread);
+        REMARK("time [n=%ld] = %g\tused_once%% = %g\tnthread=%d\n",n,(t1-t0).seconds(), n==0 ? 0 : 100.0*used_once_count/n,nthread);
     }
     delete[] addend;
     delete[] sum;
@@ -250,6 +249,7 @@ static void TestScanTags() {
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     // Default is to run on two threads.
     MinThread = MaxThread = 2;
@@ -270,6 +270,6 @@ int main(int argc, char* argv[]) {
             ASSERT( NumberOfLiveAccumulator==0, NULL );
         }
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_parallel_sort.cpp b/src/test/test_parallel_sort.cpp
index 20f2c83..977de6c 100644
--- a/src/test/test_parallel_sort.cpp
+++ b/src/test/test_parallel_sort.cpp
@@ -26,9 +26,6 @@
     the GNU General Public License.
 */
 
-#include "tbb/parallel_sort.h"
-
-#include "harness.h"
 #include <math.h>
 #include <algorithm>
 #include <iterator>
@@ -37,8 +34,10 @@
 #include <cstring>
 #include <exception>
 
+#include "tbb/parallel_sort.h"
 #include "tbb/task_scheduler_init.h"
 #include "tbb/concurrent_vector.h"
+#include "harness.h"
 
 /** Has tightly controlled interface so that we can verify
     that parallel_sort uses only the required interface. */
@@ -78,7 +77,7 @@ bool Validate<std::string *>(std::string * a, std::string * b, size_t n) {
     for (size_t i = 0; i < n; i++) {
         if ( Verbose && a[i] != b[i]) {
           for (size_t j = 0; j < n; j++) {
-              printf("a[%llu] == %s and b[%llu] == %s\n", static_cast<unsigned long long>(j), a[j].c_str(), static_cast<unsigned long long>(j), b[j].c_str());
+              REPORT("a[%llu] == %s and b[%llu] == %s\n", static_cast<unsigned long long>(j), a[j].c_str(), static_cast<unsigned long long>(j), b[j].c_str());
           }
         }
         ASSERT( a[i] == b[i], NULL );
@@ -337,8 +336,7 @@ bool parallel_sortTest(size_t n, RandomAccessIterator iter, RandomAccessIterator
 
     init_iter(iter, sorted_list, n, local_comp, true);
     do {
-        if ( Verbose) 
-            printf("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(), 
+        REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(), 
                    static_cast<unsigned long long>(current_p), static_cast<unsigned long long>(n));
         if (comp != NULL) {
             tbb::parallel_sort(iter, iter + n, local_comp );
@@ -347,7 +345,7 @@ bool parallel_sortTest(size_t n, RandomAccessIterator iter, RandomAccessIterator
          }
         if (!Validate(iter, sorted_list, n)) 
             passed = false;
-        if ( Verbose ) printf("passed\n");
+        REMARK("passed\n");
     } while (init_iter(iter, sorted_list, n, local_comp, false));
     return passed;
 }
@@ -361,15 +359,14 @@ bool parallel_sortTest(size_t n, Minimal * iter, Minimal * sorted_list, const Mi
 
     init_iter(iter, sorted_list, n, *compare, true);
     do {
-        if ( Verbose) 
-            printf("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(),
+        REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(),
                     static_cast<unsigned long long>(current_p), static_cast<unsigned long long>(n));
 
         tbb::parallel_sort(iter, iter + n, *compare );
 
         if (!Validate(iter, sorted_list, n))
             passed = false;
-        if ( Verbose ) printf("passed\n");
+        REMARK("passed\n");
     } while (init_iter(iter, sorted_list, n, *compare, false));
     return passed;
 }
@@ -384,15 +381,14 @@ bool parallel_sortTest(size_t n, tbb::concurrent_vector<Minimal>::iterator iter,
     
     init_iter(iter, sorted_list, n, *compare, true);
     do {
-        if ( Verbose) 
-            printf("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(),
+        REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(),
                     static_cast<unsigned long long>(current_p), static_cast<unsigned long long>(n));
     
         tbb::parallel_sort(iter, iter + n, *compare );
 
         if (!Validate(iter, sorted_list, n))
             passed = false;
-        if ( Verbose ) printf("passed\n");
+        REMARK("passed\n");
     } while (init_iter(iter, sorted_list, n, *compare, false));
     return passed;
 }
@@ -509,11 +505,11 @@ void Flog() {
 #include <cstdio>
 #include "harness_cpu.h"
 
-//! Parses the command line and iterates over the number of threads, calling Flog
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine(argc,argv);
     if( MinThread<1 ) {
-        printf("Usage: number of threads must be positive\n");
+        REPORT("Usage: number of threads must be positive\n");
         exit(1);
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -526,7 +522,7 @@ int main( int argc, char* argv[] ) {
             TestCPUUserTime(p);
         }
     } 
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_parallel_while.cpp b/src/test/test_parallel_while.cpp
index 7d91e37..62488c6 100644
--- a/src/test/test_parallel_while.cpp
+++ b/src/test/test_parallel_while.cpp
@@ -155,17 +155,17 @@ static void Run( int nthread, int n ) {
     for( int i=0; i<n; ++i )   
         for( int j=0; j<n; ++j )    
             ASSERT( C[i][j]==D[i][j], NULL );
-    if( Verbose ) 
-        printf("time=%g\tnthread=%d\tn=%d\n",(t1-t0).seconds(),nthread,n);
+    REMARK("time=%g\tnthread=%d\tn=%d\n",(t1-t0).seconds(),nthread,n);
 }
 
 #include "tbb/task_scheduler_init.h"
 #include "harness_cpu.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     ParseCommandLine( argc, argv );
     if( MinThread<1 ) {
-        printf("number of threads must be positive\n");
+        REPORT("number of threads must be positive\n");
         exit(1);
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -176,7 +176,7 @@ int main( int argc, char* argv[] ) {
         // Test that all workers sleep when no work
         TestCPUUserTime(p);
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_pipeline.cpp b/src/test/test_pipeline.cpp
index 3685fb4..1e4a652 100644
--- a/src/test/test_pipeline.cpp
+++ b/src/test/test_pipeline.cpp
@@ -33,7 +33,6 @@
 #include <cstdlib>
 #include <cstdio>
 #include "harness.h"
-#include "harness_trace.h"
 
 // In the test, variables related to token counting are declared
 // as unsigned long to match definition of tbb::internal::Token.
@@ -171,8 +170,8 @@ struct hacked_pipeline {
     virtual ~hacked_pipeline();
 };
 
-//! The struct below repeats layout of tbb::internal::ordered_buffer.
-struct hacked_ordered_buffer {
+//! The struct below repeats layout of tbb::internal::input_buffer.
+struct hacked_input_buffer {
     void* array; // This should be changed to task_info* if ever used
     tbb::internal::Token array_size;
     tbb::internal::Token low_token;
@@ -185,7 +184,7 @@ struct hacked_ordered_buffer {
 //! The struct below repeats layout of tbb::filter.
 struct hacked_filter {
     tbb::filter* next_filter_in_pipeline;
-    hacked_ordered_buffer* input_buffer;
+    hacked_input_buffer* my_input_buffer;
     unsigned char my_filter_mode;
     tbb::filter* prev_filter_in_pipeline;
     tbb::pipeline* my_pipeline;
@@ -233,8 +232,8 @@ void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) {
             // The ordered buffer of serial filters is hacked as well.
             if ( filter[i]->is_serial() ) {
                 if( do_hacking_tests ) {
-                    ((hacked_filter*)(void*)filter[i])->input_buffer->low_token = ~tokens_before_wraparound;
-                    ((hacked_filter*)(void*)filter[i])->input_buffer->high_token = ~tokens_before_wraparound;
+                    ((hacked_filter*)(void*)filter[i])->my_input_buffer->low_token = ~tokens_before_wraparound;
+                    ((hacked_filter*)(void*)filter[i])->my_input_buffer->high_token = ~tokens_before_wraparound;
                 }
                 parallelism_limit += 1;
             } else {
@@ -292,18 +291,18 @@ void waiting_probe::probe( ) {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Default is at least one thread.
     MinThread = 1;
     out_of_order_count = 0;
     ParseCommandLine(argc,argv);
     if( MinThread<1 ) {
-        printf("must have at least one thread");
+        REPORT("must have at least one thread");
         exit(1);
     }
     if( tbb::TBB_runtime_interface_version()>TBB_INTERFACE_VERSION) {
-        if( Verbose )
-            printf("Warning: implementation dependent tests disabled\n");
+        REMARK("Warning: implementation dependent tests disabled\n");
         do_hacking_tests = false;
     }
 
@@ -320,7 +319,7 @@ int main( int argc, char* argv[] ) {
         TestCPUUserTime(nthread);
     }
     if( !out_of_order_count )
-        printf("Warning: out of order serial filter received tokens in order\n");
-    printf("done\n");
+        REPORT("Warning: out of order serial filter received tokens in order\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_pipeline_with_tbf.cpp b/src/test/test_pipeline_with_tbf.cpp
index ace350a..ff256c3 100644
--- a/src/test/test_pipeline_with_tbf.cpp
+++ b/src/test/test_pipeline_with_tbf.cpp
@@ -33,11 +33,17 @@
 #include <cstdlib>
 #include <cstdio>
 #include "harness.h"
-#include "harness_trace.h"
 
 // In the test, variables related to token counting are declared
 // as unsigned long to match definition of tbb::internal::Token.
 
+//! Id of thread that first executes work on non-thread-bound stages
+tbb::tbb_thread::id thread_id;
+//! Zero thread id
+tbb::tbb_thread::id id0;
+//! True if non-thread-bound stages must be executed on one thread
+bool is_serial_execution;
+
 struct Buffer {
     //! Indicates that the buffer is not used.
     static const unsigned long unused = ~0ul;
@@ -90,6 +96,18 @@ public:
         return static_cast<Buffer*>(item);
     } 
     /*override*/void* operator()( void* item ) {
+        // Check if work is done only on one thread when ntokens==1 or 
+        // when pipeline has only one filter that is serial and non-thread-bound
+        if( is_serial_execution && !this->is_bound() ) {
+            // Get id of current thread
+            tbb::tbb_thread::id id = tbb::this_tbb_thread::get_id();
+            // At first execution, set thread_id to current thread id.
+            // Serialized execution is expected, so there should be no race.
+            if( thread_id == id0 )
+                thread_id = id;
+            // Check if work is done on one thread 
+            ASSERT( thread_id == id, "non-thread-bound stages executed on different threads when must be executed on a single one");
+        }
         Harness::ConcurrencyTracker ct;
         if( this->is_serial() )
             ASSERT( !my_is_running, "premature entry to serial stage" );
@@ -213,6 +231,13 @@ struct hacked_filter {
     #pragma warning (disable: 4127)
 #endif
 
+void clear_global_state() {
+    Harness::ConcurrencyTracker::Reset();
+    memset( Done, 0, sizeof(Done) );
+    thread_id = id0;
+    is_serial_execution = false;
+}
+
 void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) {
     // There are 3 non-thread-bound filter types: serial_in_order and serial_out_of_order, parallel
     static const tbb::filter::mode non_tb_filters_table[] = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order, tbb::filter::parallel}; 
@@ -225,85 +250,95 @@ void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) {
 
     REMARK( "testing with %lu threads and %lu filters\n", nthread, number_of_filters );
     ASSERT( number_of_filters<=MaxFilters, "too many filters" );
-    tbb::internal::Token ntokens = nthread<MaxBuffer ? nthread : MaxBuffer;
-    // Count maximum iterations number
-    unsigned limit = 1;
-    for( unsigned i=0; i<number_of_filters; ++i)
-        limit *= number_of_filter_types;
-    // Iterate over possible filter sequences
-    for( unsigned numeral=0; numeral<limit; ++numeral ) {
-        REMARK( "testing configuration %lu of %lu\n", numeral, limit );
-        // Build pipeline
-        tbb::pipeline pipeline;
-        tbb::filter* filter[MaxFilters];
-        unsigned temp = numeral;
-        // parallelism_limit is the upper bound on the possible parallelism
-        unsigned parallelism_limit = 0;
-        // number of thread-bound-filters in the current sequence
-        unsigned number_of_tb_filters = 0;
-        // ordinal numbers of thread-bound-filters in the current sequence
-        unsigned array_of_tb_filter_numbers[MaxFilters];
-        for( unsigned i=0; i<number_of_filters; ++i, temp/=number_of_filter_types ) {
-            bool is_bound = temp%number_of_filter_types&0x1;
-            tbb::filter::mode filter_type;
-            if( is_bound ) {
-                filter_type = tb_filters_table[temp%number_of_filter_types/number_of_non_tb_filter_types];
-            } else
-                filter_type = non_tb_filters_table[temp%number_of_filter_types/number_of_tb_filter_types];
-            const bool is_last = i==number_of_filters-1;
-            if( is_bound ) {
-                if( i == 0 )
-                    filter[i] = new InputFilter<tbb::thread_bound_filter>(filter_type,ntokens,Done[i],is_last);
-                else
-                    filter[i] = new BaseFilter<tbb::thread_bound_filter>(filter_type,Done[i],is_last);
-                array_of_tb_filter_numbers[number_of_tb_filters] = i;
-                number_of_tb_filters++;
-            } else {
-                if( i == 0 )
-                   filter[i] = new InputFilter<tbb::filter>(filter_type,ntokens,Done[i],is_last);
-                else
-                    filter[i] = new BaseFilter<tbb::filter>(filter_type,Done[i],is_last);
+    tbb::internal::Token max_tokens = nthread < MaxBuffer ? nthread : MaxBuffer;
+    // The loop has 1 iteration if max_tokens=1 and 2 iterations if max_tokens>1:
+    // one iteration for ntokens=1 and second for ntokens=max_tokens 
+    // Iteration for ntokens=1 is required in each test case to check if pipeline run only on one thread 
+    unsigned max_iteration = max_tokens > 1 ? 2 : 1; 
+    tbb::internal::Token ntokens = 1;
+    for( unsigned iteration = 0; iteration < max_iteration; iteration++) {
+        if( iteration > 0 ) 
+            ntokens = max_tokens;
+        // Count maximum iterations number
+        unsigned limit = 1;
+        for( unsigned i=0; i<number_of_filters; ++i)
+            limit *= number_of_filter_types;
+        // Iterate over possible filter sequences
+        for( unsigned numeral=0; numeral<limit; ++numeral ) {
+            REMARK( "testing configuration %lu of %lu\n", numeral, limit );
+            // Build pipeline
+            tbb::pipeline pipeline;
+            tbb::filter* filter[MaxFilters];
+            unsigned temp = numeral;
+            // parallelism_limit is the upper bound on the possible parallelism
+            unsigned parallelism_limit = 0;
+            // number of thread-bound-filters in the current sequence
+            unsigned number_of_tb_filters = 0;
+            // ordinal numbers of thread-bound-filters in the current sequence
+            unsigned array_of_tb_filter_numbers[MaxFilters];
+            for( unsigned i=0; i<number_of_filters; ++i, temp/=number_of_filter_types ) {
+                bool is_bound = temp%number_of_filter_types&0x1;
+                tbb::filter::mode filter_type;
+                if( is_bound ) {
+                    filter_type = tb_filters_table[temp%number_of_filter_types/number_of_non_tb_filter_types];
+                } else
+                    filter_type = non_tb_filters_table[temp%number_of_filter_types/number_of_tb_filter_types];
+                const bool is_last = i==number_of_filters-1;
+                if( is_bound ) {
+                    if( i == 0 )
+                        filter[i] = new InputFilter<tbb::thread_bound_filter>(filter_type,ntokens,Done[i],is_last);
+                    else
+                        filter[i] = new BaseFilter<tbb::thread_bound_filter>(filter_type,Done[i],is_last);
+                    array_of_tb_filter_numbers[number_of_tb_filters] = i;
+                    number_of_tb_filters++;
+                } else {
+                    if( i == 0 )
+                       filter[i] = new InputFilter<tbb::filter>(filter_type,ntokens,Done[i],is_last);
+                    else
+                        filter[i] = new BaseFilter<tbb::filter>(filter_type,Done[i],is_last);
+                }
+                pipeline.add_filter(*filter[i]);
+                if ( filter[i]->is_serial() ) {
+                    parallelism_limit += 1;
+                } else {
+                    parallelism_limit = nthread;
+                }
             }
-            pipeline.add_filter(*filter[i]);
-            if ( filter[i]->is_serial() ) {
-                parallelism_limit += 1;
-            } else {
+            clear_global_state();
+            // Account for clipping of parallelism.
+            if( parallelism_limit>nthread ) 
                 parallelism_limit = nthread;
+            if( parallelism_limit>ntokens )
+                parallelism_limit = (unsigned)ntokens;
+            StreamSize = nthread; // min( MaxStreamSize, nthread * MaxStreamItemsPerThread );
+
+            for( unsigned i=0; i<number_of_filters; ++i ) {
+                static_cast<BaseFilter<tbb::filter>*>(filter[i])->current_token=0;
             }
-        }
-        // Account for clipping of parallelism.
-        if( parallelism_limit>nthread ) 
-            parallelism_limit = nthread;
-        if( parallelism_limit>ntokens )
-            parallelism_limit = (unsigned)ntokens;
-        Harness::ConcurrencyTracker::Reset();
-        StreamSize = nthread; // min( MaxStreamSize, nthread * MaxStreamItemsPerThread );
-
-        memset( Done, 0, sizeof(Done) );
-        for( unsigned i=0; i<number_of_filters; ++i ) {
-            static_cast<BaseFilter<tbb::filter>*>(filter[i])->current_token=0;
-        }
-        tbb::tbb_thread* t[MaxFilters];
-        for( unsigned j = 0; j<number_of_tb_filters; j++)
-            t[j] = new tbb::tbb_thread(process_loop(), static_cast<tbb::thread_bound_filter*>(filter[array_of_tb_filter_numbers[j]]));
-        pipeline.run( ntokens );
-        for( unsigned j = 0; j<number_of_tb_filters; j++)
-           t[j]->join();
-        ASSERT( !Harness::ConcurrencyTracker::InstantParallelism(), "filter still running?" );
-        for( unsigned i=0; i<number_of_filters; ++i )
-            ASSERT( static_cast<BaseFilter<tbb::filter>*>(filter[i])->current_token==StreamSize, NULL );
-        for( unsigned i=0; i<MaxFilters; ++i )
-            for( unsigned j=0; j<StreamSize; ++j ) {
-                ASSERT( Done[i][j]==(i<number_of_filters), NULL );
+            tbb::tbb_thread* t[MaxFilters];
+            for( unsigned j = 0; j<number_of_tb_filters; j++)
+                t[j] = new tbb::tbb_thread(process_loop(), static_cast<tbb::thread_bound_filter*>(filter[array_of_tb_filter_numbers[j]]));
+            if( ntokens == 1 || ( number_of_filters == 1 && number_of_tb_filters == 0 && filter[0]->is_serial() ))
+                is_serial_execution = true;
+            pipeline.run( ntokens );
+            for( unsigned j = 0; j<number_of_tb_filters; j++)
+               t[j]->join();
+            ASSERT( !Harness::ConcurrencyTracker::InstantParallelism(), "filter still running?" );
+            for( unsigned i=0; i<number_of_filters; ++i )
+                ASSERT( static_cast<BaseFilter<tbb::filter>*>(filter[i])->current_token==StreamSize, NULL );
+            for( unsigned i=0; i<MaxFilters; ++i )
+                for( unsigned j=0; j<StreamSize; ++j ) {
+                    ASSERT( Done[i][j]==(i<number_of_filters), NULL );
+                }
+            if( Harness::ConcurrencyTracker::PeakParallelism() < parallelism_limit ) 
+                REMARK( "nthread=%lu ntokens=%lu MaxParallelism=%lu parallelism_limit=%lu\n",
+                    nthread, ntokens, Harness::ConcurrencyTracker::PeakParallelism(), parallelism_limit );
+            for( unsigned i=0; i < number_of_filters; ++i ) {
+                delete filter[i];
+                filter[i] = NULL;
             }
-        if( Harness::ConcurrencyTracker::PeakParallelism() < parallelism_limit ) 
-            REMARK( "nthread=%lu ntokens=%lu MaxParallelism=%lu parallelism_limit=%lu\n",
-                nthread, ntokens, Harness::ConcurrencyTracker::PeakParallelism(), parallelism_limit );
-        for( unsigned i=0; i < number_of_filters; ++i ) {
-            delete filter[i];
-            filter[i] = NULL;
+            pipeline.clear();
         }
-        pipeline.clear();
     }
 }
 
@@ -321,13 +356,14 @@ void waiting_probe::probe( ) {
 
 #include "tbb/task_scheduler_init.h"
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Default is at least one thread.
     MinThread = 1;
     out_of_order_count = 0;
     ParseCommandLine(argc,argv);
     if( MinThread<1 ) {
-        printf("must have at least one thread");
+        REPORT("must have at least one thread");
         exit(1);
     }
 
@@ -336,8 +372,8 @@ int main( int argc, char* argv[] ) {
         // Initialize TBB task scheduler
         tbb::task_scheduler_init init(nthread);
 
-        // Test pipelines with n filters
-        for( unsigned n=MaxFilters; n<=MaxFilters; ++n ) {
+        // Test pipelines with 1 and maximal number of filters
+        for( unsigned n=1; n<=MaxFilters; n*=MaxFilters ) {
             // Thread-bound stages are serviced by user-created threads those 
             // don't run the pipeline and don't service non-thread-bound stages 
             TestTrivialPipeline(nthread,n);
@@ -347,7 +383,7 @@ int main( int argc, char* argv[] ) {
         TestCPUUserTime(nthread);
     }
     if( !out_of_order_count )
-        printf("Warning: out of order serial filter received tokens in order\n");
-    printf("done\n");
+        REPORT("Warning: out of order serial filter received tokens in order\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_rwm_upgrade_downgrade.cpp b/src/test/test_rwm_upgrade_downgrade.cpp
index 182329e..06f6a44 100644
--- a/src/test/test_rwm_upgrade_downgrade.cpp
+++ b/src/test/test_rwm_upgrade_downgrade.cpp
@@ -67,6 +67,7 @@ struct Hammer: NoAssign {
 queuing_rw_mutex QRW_mutex;
 spin_rw_mutex SRW_mutex;
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
     for( int p=MinThread; p<=MaxThread; ++p ) {
@@ -75,6 +76,6 @@ int main( int argc, char* argv[]) {
         Count = 0;
         NativeParallelFor( p, Hammer<spin_rw_mutex>(SRW_mutex) );
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_task.cpp b/src/test/test_task.cpp
index 082ba0f..67b5673 100644
--- a/src/test/test_task.cpp
+++ b/src/test/test_task.cpp
@@ -36,63 +36,61 @@
 // Test for task::spawn_children and task_list
 //------------------------------------------------------------------------
 
-#if __TBB_TASK_DEQUE
 
 class UnboundedlyRecursiveOnUnboundedStealingTask : public tbb::task {
     typedef UnboundedlyRecursiveOnUnboundedStealingTask this_type;
 
-    this_type *my_parent;
-    const int my_depth; 
-    volatile bool my_go_ahead;
+    this_type *m_Parent;
+    const int m_Depth; 
+    volatile bool m_GoAhead;
 
-    volatile uintptr_t my_anchor;
+    volatile uintptr_t m_Anchor;
 
     // Well, virtually unboundedly, for any practical purpose
     static const int max_depth = 1000000; 
 
 public:
     UnboundedlyRecursiveOnUnboundedStealingTask( this_type *parent = NULL, int depth = max_depth )
-        : my_parent(parent)
-        , my_depth(depth)
-        , my_go_ahead(true)
-        , my_anchor(0)
+        : m_Parent(parent)
+        , m_Depth(depth)
+        , m_GoAhead(true)
+        , m_Anchor(0)
     {}
 
     /*override*/
     tbb::task* execute() {
-        if( !my_parent || (my_depth > 0 &&  my_parent->my_go_ahead) ) {
-            if ( my_parent ) {
+        if( !m_Parent || (m_Depth > 0 &&  m_Parent->m_GoAhead) ) {
+            if ( m_Parent ) {
                 // We are stolen, let our parent to start waiting for us
-                my_parent->my_go_ahead = false;
+                m_Parent->m_GoAhead = false;
             }
-            tbb::task &t = *new( tbb::task::allocate_child() ) this_type(this, my_depth - 1);
+            tbb::task &t = *new( tbb::task::allocate_child() ) this_type(this, m_Depth - 1);
             set_ref_count( 2 );
             spawn( t );
             // Give a willing thief a chance to steal
-            for( int i = 0; i < 1000000 && my_go_ahead; ++i ) {
-                my_anchor += 1;
+            for( int i = 0; i < 1000000 && m_GoAhead; ++i ) {
+                m_Anchor += 1;
                 __TBB_Yield();
             }
             // If our child has not been stolen yet, then prohibit it siring ones 
             // of its own (when this thread executes it inside the next wait_for_all)
-            my_go_ahead = false;
+            m_GoAhead = false;
             wait_for_all();
         }
         return NULL;
     }
 }; // UnboundedlyRecursiveOnUnboundedStealingTask
 
-#endif /* __TBB_TASK_DEQUE */
 
 
 tbb::atomic<int> Count;
 
 class RecursiveTask: public tbb::task {
-    const int my_child_count;
-    const int my_depth; 
-    //! Spawn tasks in list.  Exact method depends upon my_depth&bit_mask.
-    void spawn_list( tbb::task_list& list, int bit_mask ) {
-        if( my_depth&bit_mask ) {
+    const int m_ChildCount;
+    const int m_Depth; 
+    //! Spawn tasks in list.  Exact method depends upon m_Depth&bit_mask.
+    void SpawnList( tbb::task_list& list, int bit_mask ) {
+        if( m_Depth&bit_mask ) {
             spawn(list);
             ASSERT( list.empty(), NULL );
             wait_for_all();
@@ -102,22 +100,22 @@ class RecursiveTask: public tbb::task {
         }
     }
 public:
-    RecursiveTask( int child_count, int depth ) : my_child_count(child_count), my_depth(depth) {}
+    RecursiveTask( int child_count, int depth ) : m_ChildCount(child_count), m_Depth(depth) {}
     /*override*/ tbb::task* execute() {
         ++Count;
-        if( my_depth>0 ) {
+        if( m_Depth>0 ) {
             tbb::task_list list;
             ASSERT( list.empty(), NULL );
-            for( int k=0; k<my_child_count; ++k ) {
-                list.push_back( *new( tbb::task::allocate_child() ) RecursiveTask(my_child_count/2,my_depth-1 ) );
+            for( int k=0; k<m_ChildCount; ++k ) {
+                list.push_back( *new( tbb::task::allocate_child() ) RecursiveTask(m_ChildCount/2,m_Depth-1 ) );
                 ASSERT( !list.empty(), NULL );
             }
-            set_ref_count( my_child_count+1 );
-            spawn_list( list, 1 );
+            set_ref_count( m_ChildCount+1 );
+            SpawnList( list, 1 );
             // Now try reusing this as the parent.
             set_ref_count(2);
             list.push_back( *new (tbb::task::allocate_child() ) tbb::empty_task() );
-            spawn_list( list, 2 );
+            SpawnList( list, 2 );
         }
         return NULL;
     }
@@ -131,20 +129,16 @@ static int Expected( int child_count, int depth ) {
 #include "tbb/task_scheduler_init.h"
 #include "harness.h"
 
-#if __TBB_TASK_DEQUE
 void TestStealLimit( int nthread ) {
-    if( Verbose ) 
-        printf( "testing steal limiting heuristics for %d threads\n", nthread );
+    REMARK( "testing steal limiting heuristics for %d threads\n", nthread );
     tbb::task_scheduler_init init(nthread);
     tbb::task &t = *new( tbb::task::allocate_root() ) UnboundedlyRecursiveOnUnboundedStealingTask();
     tbb::task::spawn_root_and_wait(t);
 }
-#endif /* __TBB_TASK_DEQUE */
 
 //! Test task::spawn( task_list& )
 void TestSpawnChildren( int nthread ) {
-    if( Verbose ) 
-        printf("testing task::spawn_children for %d threads\n",nthread);
+    REMARK("testing task::spawn_children for %d threads\n",nthread);
     tbb::task_scheduler_init init(nthread);
     for( int j=0; j<50; ++j ) {
         Count = 0;
@@ -157,8 +151,7 @@ void TestSpawnChildren( int nthread ) {
 
 //! Test task::spawn_root_and_wait( task_list& )
 void TestSpawnRootList( int nthread ) {
-    if( Verbose ) 
-        printf("testing task::spawn_root_and_wait(task_list&) for %d threads\n",nthread);
+    REMARK("testing task::spawn_root_and_wait(task_list&) for %d threads\n",nthread);
     tbb::task_scheduler_init init(nthread);
     for( int j=0; j<5; ++j )
         for( int k=0; k<10; ++k ) {
@@ -177,23 +170,23 @@ void TestSpawnRootList( int nthread ) {
 //------------------------------------------------------------------------
 
 class TaskGenerator: public tbb::task {
-    int my_child_count;
-    int my_depth;
+    int m_ChildCount;
+    int m_Depth;
     
 public:
-    TaskGenerator( int child_count, int depth ) : my_child_count(child_count), my_depth(depth) {}
-    ~TaskGenerator( ) { my_child_count = my_depth = -125; }
+    TaskGenerator( int child_count, int depth ) : m_ChildCount(child_count), m_Depth(depth) {}
+    ~TaskGenerator( ) { m_ChildCount = m_Depth = -125; }
 
     /*override*/ tbb::task* execute() {
-        ASSERT( my_child_count>=0 && my_depth>=0, NULL );
-        if( my_depth>0 ) {
+        ASSERT( m_ChildCount>=0 && m_Depth>=0, NULL );
+        if( m_Depth>0 ) {
             recycle_as_safe_continuation();
-            set_ref_count( my_child_count+1 );
-            for( int j=0; j<my_child_count; ++j ) {
-                tbb::task& t = *new( allocate_child() ) TaskGenerator(my_child_count/2,my_depth-1);
+            set_ref_count( m_ChildCount+1 );
+            for( int j=0; j<m_ChildCount; ++j ) {
+                tbb::task& t = *new( allocate_child() ) TaskGenerator(m_ChildCount/2,m_Depth-1);
                 spawn(t);
             }
-            --my_depth;
+            --m_Depth;
             __TBB_Yield();
             ASSERT( state()==recycle && ref_count()>0, NULL);
         }
@@ -202,8 +195,7 @@ public:
 };
 
 void TestSafeContinuation( int nthread ) {
-    if( Verbose ) 
-        printf("testing task::recycle_as_safe_continuation for %d threads\n",nthread);
+    REMARK("testing task::recycle_as_safe_continuation for %d threads\n",nthread);
     tbb::task_scheduler_init init(nthread);
     for( int j=8; j<33; ++j ) {
         TaskGenerator& p = *new( tbb::task::allocate_root() ) TaskGenerator(j,5);
@@ -410,8 +402,7 @@ void TestAlignmentOfOneClass() {
 #include "harness_m128.h"
 
 void TestAlignment() {
-    if( Verbose ) 
-        printf("testing alignment\n");
+    REMARK("testing alignment\n");
     tbb::task_scheduler_init init;
     // Try types that have variety of alignments
     TestAlignmentOfOneClass<char>();
@@ -460,8 +451,7 @@ int Fib( int n ) {
 }
 
 void TestLeftRecursion( int p ) {
-    if( Verbose ) 
-        printf("testing non-spawned roots for %d threads\n",p);
+    REMARK("testing non-spawned roots for %d threads\n",p);
     tbb::task_scheduler_init init(p);
     int sum = 0; 
     for( int i=0; i<100; ++i )
@@ -516,8 +506,7 @@ tbb::atomic<int> DagTask::execution_count;
 tbb::atomic<int> DagTask::destruction_count;
 
 void TestDag( int p ) {
-    if( Verbose ) 
-        printf("testing evaluation of DAG for %d threads\n",p);
+    REMARK("testing evaluation of DAG for %d threads\n",p);
     tbb::task_scheduler_init init(p);
     DagTask::execution_count=0;
     DagTask::destruction_count=0;
@@ -550,13 +539,16 @@ class RelaxedOwnershipTask: public tbb::task {
     static Harness::SpinBarrier m_barrier;
 
     tbb::task* execute () {
+        tbb::task &p = *parent();
         tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
         r.set_ref_count( 1 );
         m_barrier.wait();
-        parent()->spawn( m_taskToSpawn );
-        parent()->destroy( m_taskToDestroy );
+        p.spawn( *new(p.allocate_child()) tbb::empty_task );
+        p.spawn( *new(p.allocate_additional_child_of(p)) tbb::empty_task );
+        p.spawn( m_taskToSpawn );
+        p.destroy( m_taskToDestroy );
         r.spawn_and_wait_for_all( m_taskToExecute );
-        parent()->destroy( r );
+        p.destroy( r );
         return NULL;
     }
 public:
@@ -573,12 +565,11 @@ Harness::SpinBarrier RelaxedOwnershipTask::m_barrier;
 void TestRelaxedOwnership( int p ) {
     if ( p < 2 )
         return;
-#if __TEST_TBB_RML
+
     if( unsigned(p)>tbb::tbb_thread::hardware_concurrency() )
         return;
-#endif
-    if( Verbose ) 
-        printf("testing tasks exercising relaxed ownership freedom for %d threads\n", p);
+
+    REMARK("testing tasks exercising relaxed ownership freedom for %d threads\n", p);
     tbb::task_scheduler_init init(p);
     RelaxedOwnershipTask::SetBarrier(p);
     tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
@@ -589,7 +580,7 @@ void TestRelaxedOwnership( int p ) {
                   &tE = *new( r.allocate_child() ) tbb::empty_task;
         tl.push_back( *new( r.allocate_child() ) RelaxedOwnershipTask(tS, tD, tE) );
     }
-    r.set_ref_count( 4 * p + 1 );
+    r.set_ref_count( 5 * p + 1 );
     r.spawn_and_wait_for_all( tl );
     r.destroy( r );
 }
@@ -616,14 +607,65 @@ void TestUserThread( int p ) {
     }
 }
 
-//------------------------------------------------------------------------
+
+class TaskWithChildToSteal : public tbb::task {
+    const int m_Depth; 
+    volatile bool m_GoAhead;
+
+public:
+    TaskWithChildToSteal( int depth )
+        : m_Depth(depth)
+        , m_GoAhead(false)
+    {}
+
+    /*override*/
+    tbb::task* execute() {
+        m_GoAhead = true;
+        if ( m_Depth > 0 ) {
+            TaskWithChildToSteal &t = *new( tbb::task::allocate_child() ) TaskWithChildToSteal(m_Depth - 1);
+            t.SpawnMeAndWaitOn( *this );
+        }
+        else
+            Harness::Sleep(50); // The last task in chain sleeps for 50 ms
+        return NULL;
+    }
+
+    void SpawnMeAndWaitOn( tbb::task& parent ) {
+        parent.set_ref_count( 2 );
+        parent.spawn( *this );
+        while (!this->m_GoAhead )
+            __TBB_Yield();
+        parent.wait_for_all();
+    }
+}; // TaskWithChildToSteal
+
+void TestDispatchLoopResponsiveness() {
+    REMARK("testing that dispatch loops do not go into eternal sleep when all remaining children are stolen\n");
+    // Recursion depth values test the following sorts of dispatch loops
+    // 0 - master's outermost
+    // 1 - worker's nested
+    // 2 - master's nested
+    tbb::task_scheduler_init init(2);
+    tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
+    for ( int depth = 0; depth < 3; ++depth ) {
+        TaskWithChildToSteal &t = *new( r.allocate_child() ) TaskWithChildToSteal(depth);
+        t.SpawnMeAndWaitOn(r);
+    }
+    r.destroy(r);
+    // The success criteria of this test is not hanging
+}
+
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     MinThread = 1;
     ParseCommandLine( argc, argv );
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
     TestUnconstructibleTask<1>();
     TestUnconstructibleTask<10000>();
+#endif
     TestAlignment();
     TestNoteAffinityContext();
+    TestDispatchLoopResponsiveness();
     for( int p=MinThread; p<=MaxThread; ++p ) {
         TestSpawnChildren( p );
         TestSpawnRootList( p );
@@ -632,14 +674,10 @@ int main(int argc, char* argv[]) {
         TestDag( p );
         TestAffinity( p );
         TestUserThread( p );
-#if __TBB_TASK_DEQUE
         TestStealLimit( p );
-#endif /* __TBB_TASK_DEQUE */
-#if __TBB_RELAXED_OWNERSHIP
         TestRelaxedOwnership( p );
-#endif /* __TBB_RELAXED_OWNERSHIP */
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
diff --git a/src/test/test_task_assertions.cpp b/src/test/test_task_assertions.cpp
index e81d637..b13c1f1 100644
--- a/src/test/test_task_assertions.cpp
+++ b/src/test/test_task_assertions.cpp
@@ -51,48 +51,17 @@ struct AbuseOneTask {
         tbb::task_scheduler_init init;
         // Thread 1 attempts to incorrectly use the task created by thread 0.
         tbb::task_list list;
-#if !__TBB_RELAXED_OWNERSHIP
-        TRY_BAD_EXPR(AbusedTask->spawn(*AbusedTask),"owne");
-        TRY_BAD_EXPR(AbusedTask->spawn_and_wait_for_all(*AbusedTask),"owne");
-        TRY_BAD_EXPR(tbb::task::spawn_root_and_wait(*AbusedTask),"owne");
-
-        // Try variant that operate on a tbb::task_list
-        TRY_BAD_EXPR(AbusedTask->spawn(list),"owne");
-        TRY_BAD_EXPR(AbusedTask->spawn_and_wait_for_all(list),"owne");
-#endif /* !__TBB_RELAXED_OWNERSHIP */
         // spawn_root_and_wait over empty list should vacuously succeed.
         tbb::task::spawn_root_and_wait(list);
 
         // Check that spawn_root_and_wait fails on non-empty list. 
         list.push_back(*AbusedTask);
-#if !__TBB_RELAXED_OWNERSHIP
-        TRY_BAD_EXPR(tbb::task::spawn_root_and_wait(list),"owne");
-
-        TRY_BAD_EXPR(AbusedTask->destroy(*AbusedTask),"owne");
-        TRY_BAD_EXPR(AbusedTask->wait_for_all(),"owne");
-#endif /* !__TBB_RELAXED_OWNERSHIP */
 
         // Try abusing recycle_as_continuation
         TRY_BAD_EXPR(AbusedTask->recycle_as_continuation(), "execute" );
         TRY_BAD_EXPR(AbusedTask->recycle_as_safe_continuation(), "execute" );
         TRY_BAD_EXPR(AbusedTask->recycle_to_reexecute(), "execute" );
 
-#if !__TBB_TASK_DEQUE
-        // Check correct use of depth parameter
-        tbb::task::depth_type depth = AbusedTask->depth();
-        ASSERT( depth==0, NULL );
-        for( int k=1; k<=81; k*=3 ) {
-            AbusedTask->set_depth(depth+k);
-            ASSERT( AbusedTask->depth()==depth+k, NULL );
-            AbusedTask->add_to_depth(k+1);
-            ASSERT( AbusedTask->depth()==depth+2*k+1, NULL );
-        }
-        AbusedTask->set_depth(0);
-
-        // Try abusing the depth parameter
-        TRY_BAD_EXPR(AbusedTask->set_depth(-1),"negative");
-        TRY_BAD_EXPR(AbusedTask->add_to_depth(-1),"negative");
-#endif /* !__TBB_TASK_DEQUE */
 
         ++AbuseOneTaskRan;
     }
@@ -114,13 +83,13 @@ void TestTaskAssertions() {
 #endif /* TBB_USE_ASSERT */
 }
 
-//------------------------------------------------------------------------
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
-#if __GLIBC__==2&&__GLIBC_MINOR__==3
-    printf("skip\n");
+#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
+    REPORT("skip\n");
 #else
     TestTaskAssertions();
-    printf("done\n");
+    REPORT("done\n");
 #endif
     return 0;
 }
diff --git a/src/test/test_task_auto_init.cpp b/src/test/test_task_auto_init.cpp
index 9a0d829..ccd52f1 100644
--- a/src/test/test_task_auto_init.cpp
+++ b/src/test/test_task_auto_init.cpp
@@ -26,15 +26,161 @@
     the GNU General Public License.
 */
 
+// Testing automatic initialization of TBB task scheduler, so do not use task_scheduler_init anywhere.
+
 #include "tbb/task.h"
-#include <cstdio>
 
-//! Test driver
-int main() {
-    // Testing automatic initialization of task scheduler, so do not put task_scheduler_init here.
-    tbb::task* root = new( tbb::task::allocate_root() ) tbb::empty_task;
-    root->set_ref_count(0);
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+#include "tbb/atomic.h"
+
+static tbb::atomic<int> g_NumTestsExecuted;
+
+#define TEST_PROLOGUE() ++g_NumTestsExecuted
+
+// Global data used in testing use cases with cross-thread usage of TBB objects
+static tbb::task *g_Root1 = NULL,
+                 *g_Root2 = NULL,
+                 *g_Root3 = NULL,
+                 *g_Task = NULL;
+static tbb::task_group_context* g_Ctx = NULL;
+
+
+void TestTaskSelf () {
+    TEST_PROLOGUE();
+    tbb::task& t = tbb::task::self();
+    ASSERT( !t.parent() && t.ref_count() == 1 && !t.affinity(), "Master's default task properties changed?" );
+}
+
+void TestRootAllocation () {
+    TEST_PROLOGUE();
+    tbb::task &r = *new( tbb::task::allocate_root() ) tbb::empty_task;
+    tbb::task::spawn_root_and_wait(r);
+}
+
+inline void ExecuteChildAndCleanup ( tbb::task &r, tbb::task &t ) {
+    r.set_ref_count(2);
+    r.spawn_and_wait_for_all(t);
+    r.destroy(r);
+}
+
+void TestChildAllocation () {
+    TEST_PROLOGUE();
+    tbb::task &t = *new( g_Root1->allocate_child() ) tbb::empty_task;
+    ExecuteChildAndCleanup( *g_Root1, t );
+}
+
+void TestAdditionalChildAllocation () {
+    TEST_PROLOGUE();
+    tbb::task &t = *new( g_Root2->allocate_additional_child_of(*g_Root2) ) tbb::empty_task;
+    ExecuteChildAndCleanup( *g_Root2, t );
+}
+
+void TestTaskGroupContextCreation () {
+    TEST_PROLOGUE();
+    tbb::task_group_context ctx;
+    tbb::task &r = *new( tbb::task::allocate_root(ctx) ) tbb::empty_task;
+    tbb::task::spawn_root_and_wait(r);
+}
+
+void TestRootAllocationWithContext () {
+    TEST_PROLOGUE();
+    tbb::task* root = new( tbb::task::allocate_root(*g_Ctx) ) tbb::empty_task;
     tbb::task::spawn_root_and_wait(*root);
-    std::printf("done\n");
+}
+
+void TestSpawn () {
+    TEST_PROLOGUE();
+    g_Task->spawn(*g_Task);
+}
+
+void TestWaitForAll () {
+    TEST_PROLOGUE();
+    g_Root3->wait_for_all();
+    g_Root3->destroy( *g_Root3 );
+}
+
+typedef void (*TestFnPtr)();
+
+const TestFnPtr TestFuncsTable[] = {
+        TestTaskSelf, TestRootAllocation, TestChildAllocation, TestAdditionalChildAllocation, 
+        TestTaskGroupContextCreation, TestRootAllocationWithContext, TestSpawn, TestWaitForAll };
+
+const int NumTestFuncs = sizeof(TestFuncsTable) / sizeof(TestFnPtr);
+
+struct TestThreadBody : NoAssign, Harness::NoAfterlife {
+    // Each invocation of operator() happens in a fresh thread with zero-based ID 
+    // id, and checks a specific auto-initialization scenario.
+    void operator() ( int id ) const {
+        ASSERT( id >= 0 && id < NumTestFuncs, "Test diver: NativeParallelFor is used incorrectly" );
+        TestFuncsTable[id]();
+    }
+};
+
+
+#include "../tbb/tls.h"
+
+void UseAFewNewTlsKeys () {
+    tbb::internal::tls<volatile intptr_t> tls1, tls2, tls3, tls4;
+    tls1 = tls2 = tls3 = tls4 = -1;
+}
+
+using tbb::internal::spin_wait_until_eq;
+
+volatile bool FafRunning   = false,
+              FafCanFinish = false;
+
+//! This task is supposed to be executed during termination of an auto-initialized master thread 
+class FireAndForgetTask : public tbb::task {
+    tbb::task* execute () {
+        // Let another master thread proceed requesting new TLS keys
+        FafRunning = true;
+        UseAFewNewTlsKeys();
+        // Wait while another master thread dirtied its new TLS slots
+        spin_wait_until_eq( FafCanFinish, true );
+        FafRunning = false;
+        return NULL;
+    }
+};
+
+struct DriverThreadBody : NoAssign, Harness::NoAfterlife {
+    void operator() ( int id ) const {
+        ASSERT( id < 2, "Only two test driver threads are expected" );
+        if ( id == 0 ) {
+            // Prepare global data
+            tbb::task_group_context ctx;
+            g_Ctx = &ctx;
+            g_Root1 = new( tbb::task::allocate_root() ) tbb::empty_task;
+            g_Root2 = new( tbb::task::allocate_root() ) tbb::empty_task;
+            g_Root3 = new( tbb::task::allocate_root() ) tbb::empty_task;
+            g_Task = new( g_Root3->allocate_child() ) tbb::empty_task;
+            g_Root3->set_ref_count(2);
+            // Run tests
+            NativeParallelFor( NumTestFuncs, TestThreadBody() );
+            ASSERT( g_NumTestsExecuted == NumTestFuncs, "Test diver: Wrong number of tests executed" );
+
+            // This test checks the validity of temporarily restoring the value of 
+            // the last TLS slot for a given key during the termination of an 
+            // auto-initialized master thread (in Governor::auto_terminate). 
+            // If anything goes wrong, GenericScheduler::cleanup_master() will assert.
+            tbb::task &r = *new( tbb::task::allocate_root() ) FireAndForgetTask;
+            r.spawn(r);
+        }
+        else {
+            spin_wait_until_eq( FafRunning, true );
+            UseAFewNewTlsKeys();
+            FafCanFinish = true;
+            spin_wait_until_eq( FafRunning, false );
+        }
+    }
+};
+
+__TBB_TEST_EXPORT
+int main() {
+    // Do not use any TBB functionality in the main thread!
+
+    NativeParallelFor( 2, DriverThreadBody() );
+    
+	REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_task_group.cpp b/src/test/test_task_group.cpp
index 6981767..63f057e 100644
--- a/src/test/test_task_group.cpp
+++ b/src/test/test_task_group.cpp
@@ -26,10 +26,13 @@
     the GNU General Public License.
 */
 
-//! function_task<T> cannot be instantiated with a lambda
-#define __TBB_LAMBDA_AS_TEMPL_PARAM_BROKEN (__INTEL_COMPILER == 1100)
-//! task_handle<T> cannot be instantiated with a function ptr withour explicit cast
-#define __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN ((__linux__ || __APPLE__) && __INTEL_COMPILER && __INTEL_COMPILER < 1100)
+//! task_handle<T> cannot be instantiated with a function ptr without explicit cast
+#define __TBB_FUNC_PTR_AS_TEMPL_PARAM_BROKEN ((__linux__ || __APPLE__) && __INTEL_COMPILER && __INTEL_COMPILER < 1100) || __SUNPRO_CC
+#define __TBB_UNQUALIFIED_CALL_OF_DTOR_BROKEN (__GNUC__==3 && __GNUC_MINOR__<=3)
+
+#ifndef TBBTEST_USE_TBB
+    #define TBBTEST_USE_TBB 1
+#endif
 
 #if !TBBTEST_USE_TBB
     #if _MSC_VER < 1600
@@ -66,7 +69,6 @@
 
 #include "tbb/atomic.h"
 #include "harness_concurrency_tracker.h"
-#include "harness_trace.h"
 
 unsigned g_MaxConcurrency = 0;
 
@@ -100,7 +102,7 @@ class  SharedGroupBodyImpl : NoCopy, Harness::NoAfterlife {
 
     struct TaskFunctor {
         SharedGroupBodyImpl *m_pOwner;
-        void operator () () {
+        void operator () () const {
             if ( m_pOwner->m_sharingMode & ParallelWait ) {
                 while ( Harness::ConcurrencyTracker::PeakParallelism() < m_pOwner->m_numThreads )
                     __TBB_Yield();
@@ -259,7 +261,7 @@ struct FibTask : NoAssign, Harness::NoAfterlife {
     uint_t* m_pRes;
     const uint_t m_Num;
     FibTask( uint_t* y, uint_t n ) : m_pRes(y), m_Num(n) {}
-    void operator() () {
+    void operator() () const {
         *m_pRes = Func(m_Num);
     } 
 };
@@ -333,11 +335,11 @@ void TestFib2 () {
 
 class FibTask_SpawnRightChildOnly : NoAssign, Harness::NoAfterlife {
     uint_t* m_pRes;
-    uint_t m_Num;
+    mutable uint_t m_Num;
 
 public:
     FibTask_SpawnRightChildOnly( uint_t* y, uint_t n ) : m_pRes(y), m_Num(n) {}
-    void operator() () {
+    void operator() () const {
         Harness::ConcurrencyTracker ct;
         AssertLive();
         if( m_Num < 2 ) {
@@ -348,12 +350,7 @@ public:
             Concurrency::task_handle<FibTask_SpawnRightChildOnly> h = FibTask_SpawnRightChildOnly(&y, m_Num-1);
             tg.run( h );
             m_Num -= 2;
-#if TBBTEST_USE_TBB
             tg.run_and_wait( *this );
-#else    
-            (*this)();
-            tg.wait();
-#endif
             *m_pRes += y;
         }
     }
@@ -385,7 +382,7 @@ class FibTask_SpawnBothChildren : NoAssign, Harness::NoAfterlife {
     uint_t m_Num;
 public:
     FibTask_SpawnBothChildren( uint_t* y, uint_t n ) : m_pRes(y), m_Num(n) {}
-    void operator() () {
+    void operator() () const {
         Harness::ConcurrencyTracker ct;
         AssertLive();
         if( m_Num < 2 ) {
@@ -431,23 +428,18 @@ void TestFib4 () {
             break;
         rg.run( *h );
     }
-#if TBBTEST_USE_TBB
     rg.run_and_wait( *h );
-#else    
-    (*h)();
-    rg.wait();
-#endif
     for( unsigned i = 0; i < numRepeats; ++i )
-#if __GNUC__==3 && __GNUC_MINOR__<=2
+#if __TBB_UNQUALIFIED_CALL_OF_DTOR_BROKEN
         ((handle_type*)(handles + i * hSize))->Concurrency::task_handle<void(*)()>::~task_handle();
 #else
         ((handle_type*)(handles + i * hSize))->~handle_type();
 #endif
-    delete handles;
+    delete []handles;
     FIB_TEST_EPILOGUE(g_Sum);
 }
 
-#if __TBB_LAMBDAS_PRESENT && !__TBB_LAMBDA_AS_TEMPL_PARAM_BROKEN
+#if __TBB_LAMBDAS_PRESENT 
 //------------------------------------------------------------------------
 // Test for a mixed tree of task groups.
 // The chores are specified as lambdas
@@ -464,6 +456,24 @@ void TestFibWithLambdas () {
     rg.wait();
     FIB_TEST_EPILOGUE(sum);
 }
+
+//------------------------------------------------------------------------
+// Test for make_task.
+// The chores are specified as lambdas converted to task_handles.
+//------------------------------------------------------------------------
+
+void TestFibWithMakeTask () {
+    REMARK ("Make_task test");
+    FIB_TEST_PROLOGUE();
+    atomic_t sum;
+    sum = 0;
+    Concurrency::task_group rg;
+    for( unsigned i = 0; i < numRepeats; ++i ) {
+      rg.run( Concurrency::make_task( [&](){sum += Fib_SpawnBothChildren(N);} ) );
+    }
+    rg.wait();
+    FIB_TEST_EPILOGUE(sum);
+}
 #endif /* __TBB_LAMBDAS_PRESENT */
 
 
@@ -538,7 +548,7 @@ class ThrowingTask : NoAssign, Harness::NoAfterlife {
     atomic_t &m_TaskCount;
 public:
     ThrowingTask( atomic_t& counter ) : m_TaskCount(counter) {}
-    void operator() () {
+    void operator() () const {
         Harness::ConcurrencyTracker ct;
         AssertLive();
         if ( g_Throw ) {
@@ -708,7 +718,7 @@ public:
             ((handle_type*)(m_handles + i * hSize))->~handle_type();
         ASSERT( g_TaskCount <= NUM_GROUPS * NUM_CHORES, "Too many tasks reported. The test is broken" );
         ASSERT( g_TaskCount < NUM_GROUPS * NUM_CHORES, "No tasks were cancelled. Cancellation model changed?" );
-        ASSERT( g_TaskCount <= g_ExecutedAtCancellation + Harness::ConcurrencyTracker::PeakParallelism(), "Too many tasks survived cancellation" );
+        ASSERT( g_TaskCount <= g_ExecutedAtCancellation + g_MaxConcurrency, "Too many tasks survived cancellation" );
     }
 }; // StructuredCancellationTestDriver
 
@@ -770,9 +780,11 @@ void TestStructuredWait () {
 #endif /* TBB_USE_ASSERT */
 }
 
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     MinThread = 1;
     ParseCommandLine( argc, argv );
+    REMARK ("Testing %s task_group functionality\n", TBBTEST_USE_TBB ? "TBB" : "PPL");
     for( int p=MinThread; p<=MaxThread; ++p ) {
         g_MaxConcurrency = p;
 #if TBBTEST_USE_TBB
@@ -797,8 +809,9 @@ int main(int argc, char* argv[]) {
         TestFib3();
         TestFib4<Concurrency::task_group>();
         TestFib4<Concurrency::structured_task_group>();
-#if __TBB_LAMBDAS_PRESENT && !__TBB_LAMBDA_AS_TEMPL_PARAM_BROKEN
+#if __TBB_LAMBDAS_PRESENT
         TestFibWithLambdas();
+        TestFibWithMakeTask();
 #endif
         TestCancellation1();
         TestStructuredCancellation1();
@@ -814,8 +827,8 @@ int main(int argc, char* argv[]) {
 #endif
     }
 #if __TBB_EXCEPTION_HANDLING_BROKEN
-    printf("Warning: Exception handling tests are skipped because of a known issue.\n");
+    REPORT("Warning: Exception handling tests are skipped because of a known issue.\n");
 #endif
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_task_leaks.cpp b/src/test/test_task_leaks.cpp
index 429eca5..994c0c4 100644
--- a/src/test/test_task_leaks.cpp
+++ b/src/test/test_task_leaks.cpp
@@ -123,7 +123,7 @@ void RunTaskGenerators( int i ) {
     else
         dummy_root->spawn( *new( dummy_root->allocate_child() ) ChangeProducer );
     if( i==260 && !Producer ) {
-        printf("Warning: producer has not changed after 10 attempts; running on a single core?\n");
+        REPORT("Warning: producer has not changed after 10 attempts; running on a single core?\n");
     }
     for( int j=0; j<100; ++j ) {
         tbb::task& t = *new( tbb::task::allocate_root() ) TaskGenerator(/*child_count=*/4, /*depth=*/6);
@@ -137,8 +137,7 @@ void RunTaskGenerators( int i ) {
 /** The test takes a while to run, so we run it only with the default
     number of threads. */
 void TestTaskReclamation() {
-    if( Verbose )
-        printf("testing task reclamation\n");
+    REMARK("testing task reclamation\n");
 
     size_t initial_amount_of_memory = 0;
     double task_count_sum = 0;
@@ -146,8 +145,7 @@ void TestTaskReclamation() {
     double average, sigma;
 
     tbb::task_scheduler_init init (MinThread);
-    if( Verbose )
-        printf("Starting with %d threads\n", MinThread);
+    REMARK("Starting with %d threads\n", MinThread);
     // For now, the master will produce "additional" tasks; later a worker will replace it;
     Producer  = internal::Governor::local_scheduler();
     int N = 20;
@@ -164,14 +162,12 @@ void TestTaskReclamation() {
         task_count_sum += n;
         task_count_sum_square += n*n;
 
-        if( Verbose )
-            printf( "Consumed %ld bytes and %ld objects (iteration=%d)\n", long(m), long(n), i );
+        REMARK( "Consumed %ld bytes and %ld objects (iteration=%d)\n", long(m), long(n), i );
     }
     // Calculate statistical values
     average = task_count_sum / N;
     sigma   = sqrt( (task_count_sum_square - task_count_sum*task_count_sum/N)/N );
-    if( Verbose )
-        printf("Average task count: %g, sigma: %g, sum: %g, square sum:%g \n", average, sigma, task_count_sum, task_count_sum_square);
+    REMARK("Average task count: %g, sigma: %g, sum: %g, square sum:%g \n", average, sigma, task_count_sum, task_count_sum_square);
 
     int error_count = 0;
     for( int i=0; i<500; ++i ) {
@@ -185,29 +181,26 @@ void TestTaskReclamation() {
             ++error_count;
             // Use 4*sigma interval (for normal distribution, 3*sigma contains ~99% of values).
             // Issue a warning for the first couple of times, then errors
-            printf( "%s: possible leak of up to %ld bytes; currently %ld cached task objects (iteration=%d)\n",
+            REPORT( "%s: possible leak of up to %ld bytes; currently %ld cached task objects (iteration=%d)\n",
                     error_count>3?"Error":"Warning", static_cast<unsigned long>(m-initial_amount_of_memory), long(n), i );
             initial_amount_of_memory = m;
             if( error_count>5 ) break;
         } else {
-            if( Verbose )
-                printf( "Consumed %ld bytes and %ld objects (iteration=%d)\n", long(m), long(n), i );
+            REMARK( "Consumed %ld bytes and %ld objects (iteration=%d)\n", long(m), long(n), i );
         }
     }
 }
 
-//------------------------------------------------------------------------
-
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     MinThread = -1;
     ParseCommandLine( argc, argv );
     if( !GetMemoryUsage() ) {
-        if( Verbose )
-            printf("GetMemoryUsage is not implemented for this platform\n");
-        printf("skip\n");
+        REMARK("GetMemoryUsage is not implemented for this platform\n");
+        REPORT("skip\n");
     } else {
         TestTaskReclamation();
-        printf("done\n");
+        REPORT("done\n");
     }
     return 0;
 }
diff --git a/src/test/test_task_scheduler_init.cpp b/src/test/test_task_scheduler_init.cpp
index ee1d061..ee622b7 100644
--- a/src/test/test_task_scheduler_init.cpp
+++ b/src/test/test_task_scheduler_init.cpp
@@ -70,7 +70,6 @@ void InitializeAndTerminate( int maxthread ) {
 #if _WIN64
 namespace std {      // 64-bit Windows compilers have not caught up with 1998 ISO C++ standard
     using ::srand;
-    using ::printf;
 }
 #endif /* _WIN64 */
 
@@ -79,7 +78,7 @@ struct ThreadedInit {
         try {
             InitializeAndTerminate(MaxThread);
         } catch( std::runtime_error& error ) {
-            std::printf("ERROR: %s\n", error.what() );
+            REPORT("ERROR: %s\n", error.what() );
         }
     }
 };
@@ -89,8 +88,35 @@ struct ThreadedInit {
 #include <tchar.h>
 #endif /* _MSC_VER */
 
-//! Test driver
+#include "harness_concurrency_tracker.h"
+#include "tbb/parallel_for.h"
+#include "tbb/blocked_range.h"
+
+typedef tbb::blocked_range<int> Range;
+
+class ConcurrencyTrackingBody {
+public:
+    void operator() ( const Range& ) const {
+        Harness::ConcurrencyTracker ct;
+        for ( volatile int i = 0; i < 1000000; ++i );
+    }
+};
+
+/** The test will fail in particular if task_scheduler_init mistakenly hooks up 
+    auto-initialization mechanism. **/
+void AssertExplicitInitIsNotSupplanted () {
+    int hardwareConcurrency = tbb::task_scheduler_init::default_num_threads();
+    tbb::task_scheduler_init init(1);
+    Harness::ConcurrencyTracker::Reset();
+    tbb::parallel_for( Range(0, hardwareConcurrency * 2, 1), ConcurrencyTrackingBody(), tbb::simple_partitioner() );
+    ASSERT( Harness::ConcurrencyTracker::PeakParallelism() == 1, 
+            "Manual init provided more threads than requested. See also the comment at the beginning of main()." );
+}
+
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
+    // Do not use tbb::task_scheduler_init directly in the scope of main's body,
+    // as a static variable, or as a member of a static variable.
 #if _MSC_VER && !__TBB_NO_IMPLICIT_LINKAGE
     #ifdef _DEBUG
         ASSERT(!GetModuleHandle(_T("tbb.dll")) && GetModuleHandle(_T("tbb_debug.dll")),
@@ -107,12 +133,13 @@ int main(int argc, char* argv[]) {
     try {
         InitializeAndTerminate(MaxThread);
     } catch( std::runtime_error& error ) {
-        std::printf("ERROR: %s\n", error.what() );
+        REPORT("ERROR: %s\n", error.what() );
     }
     for( int p=MinThread; p<=MaxThread; ++p ) {
-        if( Verbose ) printf("testing with %d threads\n", p );
+        REMARK("testing with %d threads\n", p );
         NativeParallelFor( p, ThreadedInit() );
     }
-    std::printf("done\n");
+    AssertExplicitInitIsNotSupplanted();
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_task_scheduler_observer.cpp b/src/test/test_task_scheduler_observer.cpp
index 854829b..2d51184 100644
--- a/src/test/test_task_scheduler_observer.cpp
+++ b/src/test/test_task_scheduler_observer.cpp
@@ -119,6 +119,7 @@ void TestObserver( int p, int q ) {
     NativeParallelFor( p, DoTest(q) );
 }
 
+__TBB_TEST_EXPORT
 int main(int argc, char* argv[]) {
     ParseCommandLine( argc, argv );
 
@@ -127,6 +128,6 @@ int main(int argc, char* argv[]) {
             TestObserver(p,q);
     ASSERT( EntryCount>0, "on_scheduler_entry not exercised" );
     ASSERT( ExitCount>0, "on_scheduler_exit not exercised" );
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_tbb_header.cpp b/src/test/test_tbb_header.cpp
index 3edc3af..c004b34 100644
--- a/src/test/test_tbb_header.cpp
+++ b/src/test/test_tbb_header.cpp
@@ -34,10 +34,8 @@
 **/
 
 #include "tbb/tbb.h"
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
 
-volatile size_t g_sink;
+static volatile size_t g_sink;
 
 #define TestTypeDefinitionPresence( Type) g_sink = sizeof(tbb::Type);
 #define TestTypeDefinitionPresence2(TypeStart, TypeEnd) g_sink = sizeof(tbb::TypeStart,TypeEnd);
@@ -64,11 +62,18 @@ struct Body3 {
     void assign( const Body3& ) {}
 };
 
-#if __SUNPRO_CC
-using std::printf;
+#if __TBB_TEST_SECONDARY
+/* This mode is used to produce secondary object file that should be linked with
+   main object file in order to detect "multiple definition" linker error.
+*/
+int secondary(int /*argc*/, char* /*argv*/[])
+#else
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+__TBB_TEST_EXPORT
+int main(int /*argc*/, char* /*argv*/[])
 #endif
-
-int main(int /*argc*/, char* /*argv*/[]) {
+{
     TestTypeDefinitionPresence2(aligned_space<int, 1> );
     TestTypeDefinitionPresence( atomic<int> );
     TestTypeDefinitionPresence( cache_aligned_allocator<int> );
@@ -114,6 +119,8 @@ int main(int /*argc*/, char* /*argv*/[]) {
     TestTypeDefinitionPresence( tbb_allocator<int> );
     TestTypeDefinitionPresence( zero_allocator<int> );
     TestTypeDefinitionPresence( tick_count );
-    printf("done\n");
+#if !__TBB_TEST_SECONDARY
+    REPORT("done\n");
+#endif
     return 0;
 }
diff --git a/src/test/test_tbb_thread.cpp b/src/test/test_tbb_thread.cpp
index 7348489..84cbb8d 100644
--- a/src/test/test_tbb_thread.cpp
+++ b/src/test/test_tbb_thread.cpp
@@ -28,6 +28,8 @@
 
 #include "tbb/tbb_thread.h"
 #include "tbb/atomic.h"
+
+#include "harness_report.h"
 #include "harness_assert.h"
 
 static const int THRDS = 3;
@@ -222,7 +224,9 @@ void RunTests() {
     ASSERT( ! thrs[2].joinable(), NULL );
     ASSERT( BaseCount==4, "object leak detected" );
 
+#if !__TBB_EXCEPTION_HANDLING_TOTALLY_BROKEN
     CheckExceptionSafety(); 
+#endif
 
     // Note: all tests involving BaseCount should be put before the tests
     // involing detached threads, because there is no way of knowing when 
@@ -267,12 +271,13 @@ id_relation CheckSignatures() {
     return r[1];
 }
 
+#define HARNESS_NO_PARSE_COMMAND_LINE 1
+#include "harness.h"
+
+__TBB_TEST_EXPORT
 int main( int , char *[] ) {
     CheckSignatures();
     RunTests();
-    std::printf("done\n");
+    REPORT("done\n");
     return 0;
 }
-
-#define HARNESS_NO_PARSE_COMMAND_LINE 1
-#include "harness.h"
diff --git a/src/test/test_tbb_version.cpp b/src/test/test_tbb_version.cpp
index 8a7be77..7484361 100644
--- a/src/test/test_tbb_version.cpp
+++ b/src/test/test_tbb_version.cpp
@@ -55,8 +55,8 @@ void initialize_strings_vector(std::vector <string_pair>* vector);
 const char stderr_stream[] = "version_test.err";
 const char stdout_stream[] = "version_test.out";
 
-int main(int argc, char*[] )
-{
+__TBB_TEST_EXPORT
+int main(int argc, char*[] ) {
 /* We first introduced runtime version identification in 3014 */
 #if TBB_INTERFACE_VERSION>=3014 
     // For now, just test that run-time TBB version matches the compile-time version,
@@ -73,12 +73,12 @@ int main(int argc, char*[] )
         if(argc>1) {
             stream_err = freopen( stderr_stream, "w", stderr );
             if( stream_err == NULL ){
-                printf( "Internal test error (freopen)\n" );
+                REPORT( "Internal test error (freopen)\n" );
                 exit( 1 );
             }
             stream_out = freopen( stdout_stream, "w", stdout );
             if( stream_out == NULL ){
-                printf( "Internal test error (freopen)\n" );
+                REPORT( "Internal test error (freopen)\n" );
                 exit( 1 );
             }
             {
@@ -90,33 +90,33 @@ int main(int argc, char*[] )
         }
         //1st step check that output is empty if TBB_VERSION is not defined.
         if ( getenv("TBB_VERSION") ){
-            printf( "TBB_VERSION defined, skipping step 1 (empty output check)\n" );
+            REPORT( "TBB_VERSION defined, skipping step 1 (empty output check)\n" );
         }else{
             if( ( system(TEST_SYSTEM_COMMAND) ) != 0 ){
-                printf( "Error (step 1): Internal test error\n" );
+                REPORT( "Error (step 1): Internal test error\n" );
                 exit( 1 );
             }
             //Checking output streams - they should be empty
             stream_err = fopen( stderr_stream, "r" );
             if( stream_err == NULL ){
-                printf( "Error (step 1):Internal test error (stderr open)\n" );
+                REPORT( "Error (step 1):Internal test error (stderr open)\n" );
                 exit( 1 );
             }
             while( !feof( stream_err ) ) {
                 if( fgets( psBuffer, 512, stream_err ) != NULL ){
-                    printf( "Error (step 1): stderr should be empty\n" );
+                    REPORT( "Error (step 1): stderr should be empty\n" );
                     exit( 1 );
                 }
             }
             fclose( stream_err );
             stream_out = fopen( stdout_stream, "r" );
             if( stream_out == NULL ){
-                printf( "Error (step 1):Internal test error (stdout open)\n" );
+                REPORT( "Error (step 1):Internal test error (stdout open)\n" );
                 exit( 1 );
             }
             while( !feof( stream_out ) ) {
                 if( fgets( psBuffer, 512, stream_out ) != NULL ){
-                    printf( "Error (step 1): stdout should be empty\n" );
+                    REPORT( "Error (step 1): stdout should be empty\n" );
                     exit( 1 );
                 }
             }
@@ -129,7 +129,7 @@ int main(int argc, char*[] )
         }
 
         if( ( system(TEST_SYSTEM_COMMAND) ) != 0 ){
-            printf( "Error (step 2):Internal test error\n" );
+            REPORT( "Error (step 2):Internal test error\n" );
             exit( 1 );
         }
         //Checking pipe - it should contain version data
@@ -141,12 +141,12 @@ int main(int argc, char*[] )
 
         stream_out = fopen( stdout_stream, "r" );
         if( stream_out == NULL ){
-            printf( "Error (step 2):Internal test error (stdout open)\n" );
+            REPORT( "Error (step 2):Internal test error (stdout open)\n" );
             exit( 1 );
         }
         while( !feof( stream_out ) ) {
             if( fgets( psBuffer, 512, stream_out ) != NULL ){
-                printf( "Error (step 2): stdout should be empty\n" );
+                REPORT( "Error (step 2): stdout should be empty\n" );
                 exit( 1 );
             }
         }
@@ -154,7 +154,7 @@ int main(int argc, char*[] )
 
         stream_err = fopen( stderr_stream, "r" );
         if( stream_err == NULL ){
-            printf( "Error (step 1):Internal test error (stderr open)\n" );
+            REPORT( "Error (step 1):Internal test error (stderr open)\n" );
             exit( 1 );
         }
         
@@ -164,14 +164,14 @@ int main(int argc, char*[] )
             if( fgets( psBuffer, 512, stream_err ) != NULL ){
                 do{
                     if ( strings_iterator == strings_vector.end() ){
-                        printf( "Error: version string dictionary ended prematurely.\n" );
-                        printf( "No match for: \t%s", psBuffer );
+                        REPORT( "Error: version string dictionary ended prematurely.\n" );
+                        REPORT( "No match for: \t%s", psBuffer );
                         exit( 1 );
                     }
                     if ( strstr( psBuffer, strings_iterator->first.c_str() ) == NULL ){
                         if( strings_iterator->second == required ){
-                            printf( "Error: version strings do not match.\n" );
-                            printf( "Expected \"%s\" not found in:\n\t%s", strings_iterator->first.c_str(), psBuffer );
+                            REPORT( "Error: version strings do not match.\n" );
+                            REPORT( "Expected \"%s\" not found in:\n\t%s", strings_iterator->first.c_str(), psBuffer );
                             exit( 1 );
                         }else{
                             //Do we need to print in case there is no non-required string?
@@ -188,7 +188,7 @@ int main(int argc, char*[] )
     } catch(...) {
         ASSERT( 0,"unexpected exception" );
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 
@@ -197,7 +197,7 @@ int main(int argc, char*[] )
 void initialize_strings_vector(std::vector <string_pair>* vector)
 {
     vector->push_back(string_pair("TBB: VERSION\t\t2.2", required));          // check TBB_VERSION
-    vector->push_back(string_pair("TBB: INTERFACE VERSION\t4000", required)); // check TBB_INTERFACE_VERSION
+    vector->push_back(string_pair("TBB: INTERFACE VERSION\t4001", required)); // check TBB_INTERFACE_VERSION
     vector->push_back(string_pair("TBB: BUILD_DATE", required));
     vector->push_back(string_pair("TBB: BUILD_HOST", required));
     vector->push_back(string_pair("TBB: BUILD_OS", required));
diff --git a/src/test/test_tick_count.cpp b/src/test/test_tick_count.cpp
index 2401a03..3538cbc 100644
--- a/src/test/test_tick_count.cpp
+++ b/src/test/test_tick_count.cpp
@@ -86,14 +86,13 @@ void TestSimpleDelay( int ntrial, double duration, double tolerance ) {
     // Compute average worktime and average delta
     double worktime = total_worktime/ntrial;
     double delta = worktime-duration;
-    if (Verbose)
-        printf("worktime=%g delta=%g tolerance=%g\n", worktime, delta, tolerance);
+    REMARK("worktime=%g delta=%g tolerance=%g\n", worktime, delta, tolerance);
 
     // Check that delta is acceptable
     if( delta<0 ) 
-        printf("ERROR: delta=%g < 0\n",delta); 
+        REPORT("ERROR: delta=%g < 0\n",delta); 
     if( delta>tolerance )
-        printf("%s: delta=%g > %g=tolerance where duration=%g\n",delta>3*tolerance?"ERROR":"Warning",delta,tolerance,duration);
+        REPORT("%s: delta=%g > %g=tolerance where duration=%g\n",delta>3*tolerance?"ERROR":"Warning",delta,tolerance,duration);
 }
 
 //------------------------------------------------------------------------
@@ -104,41 +103,37 @@ void TestSimpleDelay( int ntrial, double duration, double tolerance ) {
 const int MAX_NTHREAD = 1000;
 static tbb::atomic<int> Counter;
 static volatile bool Flag;
-static tbb::tick_count tick_countArray[MAX_NTHREAD];
+static tbb::tick_count tick_count_array[MAX_NTHREAD];
 
-struct tick_countDifferenceBody {
+struct TickCountDifferenceBody {
     void operator()( int id ) const {
         if( --Counter==0 ) Flag = true;
         while( !Flag ) continue;
-        tick_countArray[id] = tbb::tick_count::now();
+        tick_count_array[id] = tbb::tick_count::now();
     }
 };
 
 //! Test that two tick_count values recorded on different threads can be meaningfully subtracted.
-void Testtick_countDifference( int n ) {
+void TestTickCountDifference( int n ) {
     double tolerance = 3E-4;
     for( int trial=0; trial<10; ++trial ) {
         Counter = n;
         Flag = false;
-        NativeParallelFor( n, tick_countDifferenceBody() ); 
+        NativeParallelFor( n, TickCountDifferenceBody() ); 
         ASSERT( Counter==0, NULL ); 
         for( int i=0; i<n; ++i )
             for( int j=0; j<i; ++j ) {
-                double diff = (tick_countArray[i]-tick_countArray[j]).seconds();
+                double diff = (tick_count_array[i]-tick_count_array[j]).seconds();
                 if( diff<0 ) diff = -diff;
                 if( diff>tolerance ) {
-                    printf("%s: cross-thread tick_count difference = %g > %g = tolerance\n",
+                    REPORT("%s: cross-thread tick_count difference = %g > %g = tolerance\n",
                            diff>3*tolerance?"ERROR":"Warning",diff,tolerance);
                 }
             }
     }
 }
 
-//------------------------------------------------------------------------
-// Test driver
-//------------------------------------------------------------------------
-
-//! Top level test driver. 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[]) {
     ParseCommandLine(argc, argv);
 
@@ -150,8 +145,8 @@ int main( int argc, char* argv[]) {
     TestArithmetic(t0,t1,t2);
 
     for( int n=MinThread; n<=MaxThread; ++n ) {
-        Testtick_countDifference(n);
+        TestTickCountDifference(n);
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
diff --git a/src/test/test_user_events.cpp b/src/test/test_user_events.cpp
index 33d2ec0..48bc5e4 100644
--- a/src/test/test_user_events.cpp
+++ b/src/test/test_user_events.cpp
@@ -200,10 +200,10 @@ void Test()
 }  // namespace internal
 }  // namespace tbb
 
-int main()
-{
+__TBB_TEST_EXPORT
+int main() {
     tbb::internal::Test();
-    std::printf("done\n");
+    REPORT("done\n");
 }
 
 #define HARNESS_NO_PARSE_COMMAND_LINE 1
diff --git a/src/test/test_yield.cpp b/src/test/test_yield.cpp
index 35c33e1..2b9761d 100644
--- a/src/test/test_yield.cpp
+++ b/src/test/test_yield.cpp
@@ -49,7 +49,7 @@ struct RoundRobin: NoAssign {
                 if( j%100==0 ) {
                     tbb::tick_count t1 = tbb::tick_count::now();
                     if( (t1-t0).seconds()>=1.0*number_of_threads ) {
-                        printf("Warning: __TBB_Yield failing to yield with %d threads (or system is heavily loaded)\n",number_of_threads);
+                        REPORT("Warning: __TBB_Yield failing to yield with %d threads (or system is heavily loaded)\n",number_of_threads);
                         Quit = true;
                         return;
                     }
@@ -61,17 +61,18 @@ struct RoundRobin: NoAssign {
     }
 };
 
+__TBB_TEST_EXPORT
 int main( int argc, char* argv[] ) {
     // Set defaults
     MaxThread = MinThread = 3;
     ParseCommandLine( argc, argv );
     for( int p=MinThread; p<=MaxThread; ++p ) {
-        if( Verbose ) printf("testing with %d threads\n", p );
+        REMARK("testing with %d threads\n", p );
         CyclicCounter = 0;
         Quit = false;
         NativeParallelFor( long(p), RoundRobin(p) );
     }
-    printf("done\n");
+    REPORT("done\n");
     return 0;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tbb.git



More information about the debian-science-commits mailing list